Compare commits
34 commits
develop
...
feature/3-
Author | SHA1 | Date | |
---|---|---|---|
e5b18cc268 | |||
b601131dfb | |||
46a0c05d6f | |||
a807440e4d | |||
0957f0f1a4 | |||
32a25e27b1 | |||
cb92b01fdc | |||
214ff6227d | |||
ac7cb66bd0 | |||
40eef0fa04 | |||
a57c97e1a1 | |||
0d33434dbf | |||
133287988e | |||
7a16ac2c0a | |||
e83a37fd85 | |||
2c30a14c03 | |||
d00292fbb9 | |||
dd1e7a2d18 | |||
fad4a2382a | |||
7bee939654 | |||
5f5bc2256e | |||
f01d10b81d | |||
4b64d4a793 | |||
3c986d645a | |||
174e0d9af2 | |||
f344cdb3f8 | |||
708645f968 | |||
5a00280bdc | |||
3e18bcb223 | |||
510bbd8f3b | |||
57d074d5fe | |||
933a3c92f5 | |||
1929209937 | |||
5420f9c817 |
117 changed files with 11403 additions and 23305 deletions
32
.drone.yml
32
.drone.yml
|
@ -6,9 +6,35 @@ steps:
|
|||
image: node:12
|
||||
commands:
|
||||
- npm install
|
||||
- name: audit
|
||||
image: node:12
|
||||
failure: ignore
|
||||
commands:
|
||||
- npm audit
|
||||
- name: build
|
||||
image: node:12
|
||||
environment:
|
||||
NPMPATH: "node_modules/.bin"
|
||||
commands:
|
||||
- $NPMPATH/grunt
|
||||
- npm run build:prod
|
||||
- name: update version
|
||||
image: node:12
|
||||
commands:
|
||||
- npm version prerelease
|
||||
when:
|
||||
branch:
|
||||
- develop
|
||||
- feature/*
|
||||
# - name: release
|
||||
# image: plugins/gitea-release
|
||||
# settings:
|
||||
# api_key:
|
||||
# from_secret: gitea_token
|
||||
# base_url: https://gittr.ch/
|
||||
# checksum:
|
||||
# - md5
|
||||
# - sha512
|
||||
# files: dist/*
|
||||
# file_exists: fail
|
||||
# note: README.md
|
||||
# title: VERSION
|
||||
# when:
|
||||
# event: tag
|
||||
|
|
|
@ -11,5 +11,6 @@ insert_final_newline = true
|
|||
|
||||
[*.yml]
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
|
74
.eslintrc.json
Normal file
74
.eslintrc.json
Normal file
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 6,
|
||||
"project": "./tsconfig.json",
|
||||
"sourceType": "module"
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"plugins": [
|
||||
"header",
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"env": {
|
||||
"browser": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended"
|
||||
],
|
||||
"rules": {
|
||||
"curly": "error",
|
||||
"eol-last": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"no-console": [
|
||||
"error",
|
||||
{
|
||||
"allow": [
|
||||
"warn",
|
||||
"error"
|
||||
]
|
||||
}
|
||||
],
|
||||
"no-unused-vars": "off",
|
||||
"quotes": [
|
||||
"error",
|
||||
"single"
|
||||
],
|
||||
"semi": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"sort-imports": "error",
|
||||
"header/header": [
|
||||
"error",
|
||||
"header.ts"
|
||||
],
|
||||
"@typescript-eslint/member-ordering": [
|
||||
"error"
|
||||
],
|
||||
"@typescript-eslint/no-namespace": [
|
||||
"error",
|
||||
{
|
||||
"allowDeclarations": true
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-parameter-properties": [
|
||||
"error",
|
||||
{
|
||||
"allows": [
|
||||
"private readonly"
|
||||
]
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
"vars": "all",
|
||||
"args": "after-used",
|
||||
"ignoreRestSiblings": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
70
README.md
70
README.md
|
@ -2,16 +2,19 @@
|
|||
Du willst Bärneruhr auf deiner Website verwenden? Dank des jQuery-Plugins geht das so einfach, dass es sogar deine Grossmutter tun könnte!
|
||||
|
||||
## 1. Benötigte Dateien einbinden
|
||||
* Binde folgende CSS-Datei im HTML-Dokument ein:
|
||||
* dist/uhr.min.css
|
||||
* Binde zusätzlich mindestens eine der folgenden CSS-Dateien im HTML ein, je nach dem, welche Farben deine Uhr unterstützen soll:
|
||||
* dist/uhr-black.min.css
|
||||
* dist/uhr-white.min.css
|
||||
* dist/uhr-red.min.css
|
||||
* dist/uhr-yellow.min.css
|
||||
* dist/uhr-green.min.css
|
||||
* dist/uhr-blue.min.css
|
||||
* dist/uhr-pink.min.css
|
||||
**FIXME Folgender Absatz muss angepasst werden**
|
||||
Binde folgende CSS-Datei im HTML-Dokument ein:
|
||||
* dist/uhr.min.css
|
||||
|
||||
**FIXME Folgender Absatz muss angepasst werden**
|
||||
Binde zusätzlich mindestens eine der folgenden CSS-Dateien im HTML ein, je nach dem, welche Farben deine Uhr unterstützen soll:
|
||||
* dist/uhr-black.min.css
|
||||
* dist/uhr-white.min.css
|
||||
* dist/uhr-red.min.css
|
||||
* dist/uhr-yellow.min.css
|
||||
* dist/uhr-green.min.css
|
||||
* dist/uhr-blue.min.css
|
||||
* dist/uhr-pink.min.css
|
||||
|
||||
Beim Einbinden muss das attribut `data-class` angegeben werden, welches die CSS-Klasse des Themes definiert. Optional kann mit `data-name` ein im Dropdown anzuzeigender Name angegeben werden. Beispiel:
|
||||
|
||||
|
@ -19,31 +22,32 @@ Beim Einbinden muss das attribut `data-class` angegeben werden, welches die CSS-
|
|||
<link rel="stylesheet" type="text/css" href="dist/uhr-black.min.css" data-class="black" data-name="Schwarz" />
|
||||
```
|
||||
|
||||
* Binde nach den CSS-Dateien (wichtig!) folgende Javascript-Dateien im HTML-Dokument ein:
|
||||
* dist/libs.min.js: Dies enthält die minifizierten Versionen von jQuery, jQuery-UI (mit den Komponenten `code` und `widget`) und jQuery-Cookie.
|
||||
Alternativ kannst Du auch direkt die benötigten Bibliotheken einbinden:
|
||||
* jquery (getestet mit Version 3.4.1)
|
||||
* jquery-ui (getestet mit Version 1.12.1)
|
||||
Binde nach den CSS-Dateien (wichtig: *nicht* vorher) die benötigten Bibliotheken ein:
|
||||
* jquery (getestet mit Version 3.4.1)
|
||||
* jquery-ui (getestet mit Version 1.12.1)
|
||||
* Von jquery-ui wird die Komponente 'widget' benötigt.
|
||||
* jquery-cookie (getestet mit Version 1.4.1)
|
||||
Je nach dem, in welchen Sprachen du die Uhr verwenden willst, noch eine der folgenden Dateien:
|
||||
* dist/jquery.uhr.complete.min.js: Enthält die Hauptdatei sowie alle unterstützten Sprachdateien
|
||||
* dist/jquery.uhr.base.min.js: Enthält die Hauptdatei sowie Bärndütsch (de_CH)
|
||||
* dist/jquery.uhr.main.min.js: Enthält ausschliesslich die Hauptdatei. Zusätzlich muss noch mindestens eine Sprachdatei eingebunden werden (siehe unten).
|
||||
* js-cookie (getestet mit Version 2.2.0)
|
||||
|
||||
* Je nach dem, welche der obigen Dateien du eingebunden hast, kannst du noch individuelle Sprachdateien einbinden. Im Einstellungsfenster der Uhr werden diese Sprachen dann in der Reihenfolge zur Auswahl angeboten, in welcher du sie eingebunden hast.
|
||||
* dist/jquery.uhr.langs.min.js: Enthält alle Sprachen
|
||||
* dist/jquery.uhr.baselangs.min.js: Enthält alle Sprachen bis auf Bärndütsch (de_CH), welche bereits in dist/jquery.uhr.base.min.js enthalten ist.
|
||||
* src/uhr-de_CH.js (Bärndütsch)
|
||||
* src/uhr-de_CH_genau.js (Bärndütsch, siehe unten)
|
||||
* src/uhr-de.js (Deutsch)
|
||||
* src/uhr-dk.js (Dänisch)
|
||||
* src/uhr-en.js (Englisch)
|
||||
* src/uhr-es.js (Spanisch)
|
||||
* src/uhr-fr.js (Französisch)
|
||||
* src/uhr-it.js (Italienisch)
|
||||
* src/uhr-nl.js (Niederländisch)
|
||||
* src/uhr-pt.js (Portugiesisch)
|
||||
**FIXME Folgender Absatz muss angepasst werden**
|
||||
Je nach dem, in welchen Sprachen du die Uhr verwenden willst, noch eine der folgenden Dateien:
|
||||
* dist/jquery.uhr.complete.min.js: Enthält die Hauptdatei sowie alle unterstützten Sprachdateien
|
||||
* dist/jquery.uhr.base.min.js: Enthält die Hauptdatei sowie Bärndütsch (de_CH)
|
||||
* dist/jquery.uhr.main.min.js: Enthält ausschliesslich die Hauptdatei. Zusätzlich muss noch mindestens eine Sprachdatei eingebunden werden (siehe unten).
|
||||
|
||||
**FIXME Folgender Absatz muss angepasst werden**
|
||||
Je nach dem, welche der obigen Dateien du eingebunden hast, kannst du noch individuelle Sprachdateien einbinden. Im Einstellungsfenster der Uhr werden diese Sprachen dann in der Reihenfolge zur Auswahl angeboten, in welcher du sie eingebunden hast.
|
||||
* dist/jquery.uhr.langs.min.js: Enthält alle Sprachen
|
||||
* dist/jquery.uhr.baselangs.min.js: Enthält alle Sprachen bis auf Bärndütsch (de_CH), welche bereits in dist/jquery.uhr.base.min.js enthalten ist.
|
||||
* src/uhr-de_CH.js (Bärndütsch)
|
||||
* src/uhr-de_CH_genau.js (Variante von Bärndütsch, siehe unten)
|
||||
* src/uhr-de.js (Deutsch)
|
||||
* src/uhr-dk.js (Dänisch)
|
||||
* src/uhr-en.js (Englisch)
|
||||
* src/uhr-es.js (Spanisch)
|
||||
* src/uhr-fr.js (Französisch)
|
||||
* src/uhr-it.js (Italienisch)
|
||||
* src/uhr-nl.js (Niederländisch)
|
||||
* src/uhr-pt.js (Portugiesisch)
|
||||
|
||||
`src/uhr-de_CH_genau.js` ist eine Variante von Bärndütsch, bei der zur vollen Stunde zusätzlich das Wort "genau" angezeigt wird (also z.B. um 15:00 Uhr "ES ISCH GENAU DRÜ" anstelle von "ES ISCH DRÜ").
|
||||
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
9.0.0-dev.0
|
||||
$npm_package_version
|
||||
|
|
|
@ -12,20 +12,22 @@ GNU General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
.uhr.red {
|
||||
background-color: #700;
|
||||
}
|
||||
.black {
|
||||
&.uhr {
|
||||
background-color: #111;
|
||||
|
||||
.red .onoffswitch-inner:before {
|
||||
background-color: #700;
|
||||
}
|
||||
|
||||
.uhr.red .dot:not(.active) {
|
||||
.dot:not(.active) {
|
||||
border-color: rgba(255, 255, 255, 0.1);
|
||||
box-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.uhr.red .letter:not(.active) {
|
||||
.letter:not(.active) {
|
||||
color: rgba(255, 255, 255, 0.1);
|
||||
text-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.onoffswitch-inner:before {
|
||||
background-color: #111;
|
||||
}
|
||||
}
|
|
@ -12,20 +12,22 @@ GNU General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
.uhr.green {
|
||||
background-color: #0c0;
|
||||
}
|
||||
.blue {
|
||||
&.uhr {
|
||||
background-color: #00a;
|
||||
|
||||
.green .onoffswitch-inner:before {
|
||||
background-color: #0c0;
|
||||
}
|
||||
.dot:not(.active) {
|
||||
border-color: rgba(255, 255, 255, 0.1);
|
||||
box-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.uhr.green .dot:not(.active) {
|
||||
border-color: rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0 0 0.1em rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.letter:not(.active) {
|
||||
color: rgba(255, 255, 255, 0.1);
|
||||
text-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.uhr.green .letter:not(.active) {
|
||||
color: rgba(0, 0, 0, 0.1);
|
||||
text-shadow: 0 0 0.1em rgba(0, 0, 0, 0.1);
|
||||
.onoffswitch-inner:before {
|
||||
background-color: #00a;
|
||||
}
|
||||
}
|
|
@ -12,20 +12,22 @@ GNU General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
.uhr.black {
|
||||
background-color: #111;
|
||||
}
|
||||
.green {
|
||||
&.uhr {
|
||||
background-color: #0c0;
|
||||
|
||||
.black .onoffswitch-inner:before {
|
||||
background-color: #111;
|
||||
}
|
||||
.dot:not(.active) {
|
||||
border-color: rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0 0 0.1em rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.uhr.black .dot:not(.active) {
|
||||
border-color: rgba(255, 255, 255, 0.1);
|
||||
box-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
.letter:not(.active) {
|
||||
color: rgba(0, 0, 0, 0.1);
|
||||
text-shadow: 0 0 0.1em rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.uhr.black .letter:not(.active) {
|
||||
color: rgba(255, 255, 255, 0.1);
|
||||
text-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
|
||||
.onoffswitch-inner:before {
|
||||
background-color: #0c0;
|
||||
}
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
.uhr.pink {
|
||||
background-color: #f0a;
|
||||
}
|
||||
|
||||
.uhr.pink .dot.active {
|
||||
border-color: #fff;
|
||||
box-shadow: 0 0 0.1em #fff;
|
||||
}
|
||||
|
||||
.uhr.pink .letter.active {
|
||||
color: #fff;
|
||||
text-shadow: 0 0 0.1em #fff;
|
||||
}
|
||||
|
||||
.pink .onoffswitch-inner:before {
|
||||
background-color: #f0a;
|
||||
}
|
||||
|
||||
.uhr.pink .dot:not(.active) {
|
||||
border-color: rgba(255, 255, 255, 0.1);
|
||||
box-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.uhr.pink .letter:not(.active) {
|
||||
color: rgba(255, 255, 255, 0.1);
|
||||
text-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
|
||||
}
|
43
css/uhr-pink.scss
Normal file
43
css/uhr-pink.scss
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
.pink {
|
||||
&.uhr {
|
||||
background-color: #f0a;
|
||||
|
||||
.dot.active {
|
||||
border-color: #fff;
|
||||
box-shadow: 0 0 0.1em #fff;
|
||||
}
|
||||
|
||||
.letter.active {
|
||||
color: #fff;
|
||||
text-shadow: 0 0 0.1em #fff;
|
||||
}
|
||||
|
||||
.dot:not(.active) {
|
||||
border-color: rgba(255, 255, 255, 0.1);
|
||||
box-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.letter:not(.active) {
|
||||
color: rgba(255, 255, 255, 0.1);
|
||||
text-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.onoffswitch-inner:before {
|
||||
background-color: #f0a;
|
||||
}
|
||||
}
|
|
@ -12,20 +12,22 @@ GNU General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
.uhr.blue {
|
||||
background-color: #00a;
|
||||
}
|
||||
.red {
|
||||
&.uhr {
|
||||
background-color: #700;
|
||||
|
||||
.blue .onoffswitch-inner:before {
|
||||
background-color: #00a;
|
||||
}
|
||||
|
||||
.uhr.blue .dot:not(.active) {
|
||||
.dot:not(.active) {
|
||||
border-color: rgba(255, 255, 255, 0.1);
|
||||
box-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.uhr.blue .letter:not(.active) {
|
||||
.letter:not(.active) {
|
||||
color: rgba(255, 255, 255, 0.1);
|
||||
text-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.onoffswitch-inner:before {
|
||||
background-color: #700;
|
||||
}
|
||||
}
|
|
@ -12,30 +12,32 @@ GNU General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
.uhr.white {
|
||||
.white {
|
||||
&.uhr {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
.uhr.white .dot.active {
|
||||
.dot.active {
|
||||
border-color: #fff;
|
||||
box-shadow: 0 0 0.1em #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.uhr.white .letter.active {
|
||||
.letter.active {
|
||||
color: #fff;
|
||||
text-shadow: 0 0 0.1em #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.white .onoffswitch-inner:before {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
.uhr.white .dot:not(.active) {
|
||||
.dot:not(.active) {
|
||||
border-color: rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0 0 0.1em rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.uhr.white .letter:not(.active) {
|
||||
.letter:not(.active) {
|
||||
color: rgba(0, 0, 0, 0.1);
|
||||
text-shadow: 0 0 0.1em rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.onoffswitch-inner:before {
|
||||
background-color: #ccc;
|
||||
}
|
||||
}
|
|
@ -12,30 +12,32 @@ GNU General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
.uhr.yellow {
|
||||
.yellow {
|
||||
&.uhr {
|
||||
background-color: #fd0;
|
||||
}
|
||||
|
||||
.uhr.yellow .dot.active {
|
||||
.dot.active {
|
||||
border-color: #fff;
|
||||
box-shadow: 0 0 0.1em #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.uhr.yellow .letter.active {
|
||||
.letter.active {
|
||||
color: #fff;
|
||||
text-shadow: 0 0 0.1em #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.yellow .onoffswitch-inner:before {
|
||||
background-color: #fd0;
|
||||
}
|
||||
|
||||
.uhr.yellow .dot:not(.active) {
|
||||
.dot:not(.active) {
|
||||
border-color: rgba(0, 0, 0, 0.05);
|
||||
box-shadow: 0 0 0.1em rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
}
|
||||
|
||||
.uhr.yellow .letter:not(.active) {
|
||||
.letter:not(.active) {
|
||||
color: rgba(0, 0, 0, 0.05);
|
||||
text-shadow: 0 0 0.1em rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
}
|
||||
|
||||
.onoffswitch-inner:before {
|
||||
background-color: #fd0;
|
||||
}
|
||||
}
|
250
css/uhr.scss
Normal file
250
css/uhr.scss
Normal file
|
@ -0,0 +1,250 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@font-face {
|
||||
font-family: 'Uhrenfont';
|
||||
src: url('../resources/assets/fonts/uhr.woff') format('woff');
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Uhrenfont', sans-serif;
|
||||
}
|
||||
|
||||
.uhr {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
transition: background-color 0.5s;
|
||||
|
||||
.reflection {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: radial-gradient(225em 45em at 160% 0, rgba(255, 255, 255, 0.4) 0, rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0) 40%) no-repeat scroll;
|
||||
display: block;
|
||||
margin: 0.15em;
|
||||
}
|
||||
|
||||
.letterarea {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 12%;
|
||||
bottom: 12%;
|
||||
left: 12%;
|
||||
right: 12%;
|
||||
overflow: hidden;
|
||||
font-size: 200%;
|
||||
}
|
||||
}
|
||||
|
||||
#themeswitcher {
|
||||
}
|
||||
|
||||
.item {
|
||||
transition: box-shadow 0.5s, text-shadow 0.5s, border-color 0.5s, color 0.5s;
|
||||
}
|
||||
|
||||
.dot {
|
||||
position: absolute;
|
||||
display: block;
|
||||
height: 0;
|
||||
width: 0;
|
||||
border: 0.2em solid;
|
||||
border-radius: 1em;
|
||||
|
||||
&.active {
|
||||
border-color: #eee;
|
||||
box-shadow: 0 0 0.2em #eee;
|
||||
}
|
||||
}
|
||||
|
||||
.dot1 {
|
||||
top: 3.75%;
|
||||
left: 3.75%;
|
||||
}
|
||||
|
||||
.dot2 {
|
||||
top: 3.75%;
|
||||
right: 3.75%;
|
||||
}
|
||||
|
||||
.dot3 {
|
||||
bottom: 3.75%;
|
||||
right: 3.75%;
|
||||
}
|
||||
|
||||
.dot4 {
|
||||
bottom: 3.75%;
|
||||
left: 3.75%;
|
||||
}
|
||||
|
||||
.letter {
|
||||
height: 10%;
|
||||
width: 9.0909%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
line-height: 160%;
|
||||
|
||||
&.active {
|
||||
color: #eee;
|
||||
text-shadow: 0 0 0.2em #eee;
|
||||
}
|
||||
}
|
||||
|
||||
.onoffswitch {
|
||||
position: relative;
|
||||
width: 86px;
|
||||
margin: 1em;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
}
|
||||
|
||||
.onoffswitch-checkbox {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.onoffswitch-label {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
border: 2px solid #999;
|
||||
border-radius: 50px;
|
||||
}
|
||||
|
||||
.onoffswitch-inner, .modeswitch-inner {
|
||||
width: 200%;
|
||||
margin-left: -100%;
|
||||
-moz-transition: margin 0.3s ease-in 0s;
|
||||
-webkit-transition: margin 0.3s ease-in 0s;
|
||||
-o-transition: margin 0.3s ease-in 0s;
|
||||
transition: margin 0.3s ease-in 0s;
|
||||
}
|
||||
|
||||
.onoffswitch-inner:before, .onoffswitch-inner:after, .modeswitch-inner:before, .modeswitch-inner:after {
|
||||
float: left;
|
||||
width: 50%;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
line-height: 24px;
|
||||
font-size: 18px;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.onoffswitch-inner:before {
|
||||
content: "EIN";
|
||||
padding-left: 12px;
|
||||
color: #eee;
|
||||
transition: background-color 0.5s;
|
||||
}
|
||||
|
||||
.onoffswitch-inner:after {
|
||||
content: "AUS";
|
||||
padding-right: 12px;
|
||||
background-color: #eee;
|
||||
color: #999;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.onoffswitch-switch {
|
||||
width: 30px;
|
||||
margin: -3px;
|
||||
background: #fff;
|
||||
border: 2px solid #999;
|
||||
border-radius: 50px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 58px;
|
||||
-moz-transition: all 0.3s ease-in 0s;
|
||||
-webkit-transition: all 0.3s ease-in 0s;
|
||||
-o-transition: all 0.3s ease-in 0s;
|
||||
transition: all 0.3s ease-in 0s;
|
||||
}
|
||||
|
||||
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner,
|
||||
.onoffswitch-checkbox:checked + .onoffswitch-label .modeswitch-inner {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.modeswitch-inner:before {
|
||||
content: "MIN";
|
||||
padding-left: 12px;
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.modeswitch-inner:after {
|
||||
content: "SEC";
|
||||
padding-right: 12px;
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
a.uhr-configlink {
|
||||
cursor: pointer;
|
||||
background: url("../resources/assets/images/settings.png") no-repeat;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: inline-block;
|
||||
margin: 2px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.uhr-controlpanel {
|
||||
border-radius: 0.5em;
|
||||
box-shadow: 0 0 1em black;
|
||||
background-color: #fff;
|
||||
display: inline-block;
|
||||
padding: 0.5em;
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
margin-left: 1em;
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
a.uhr-closecontrolpanel {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: -1em;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background: url("../resources/assets/images/close.png") no-repeat;
|
||||
}
|
||||
|
||||
#disclaimer {
|
||||
font-size: 0.5em;
|
||||
|
||||
a {
|
||||
color: #444;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
0
resources/close.png → dist/assets/close.png
vendored
0
resources/close.png → dist/assets/close.png
vendored
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 407 B |
Before Width: | Height: | Size: 435 B After Width: | Height: | Size: 435 B |
1
dist/assets/uhr-black.css
vendored
Normal file
1
dist/assets/uhr-black.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.black.uhr{background-color:#111}.black.uhr .dot:not(.active){border-color:rgba(255,255,255,0.1);box-shadow:0 0 0.1em rgba(255,255,255,0.1)}.black.uhr .letter:not(.active){color:rgba(255,255,255,0.1);text-shadow:0 0 0.1em rgba(255,255,255,0.1)}.black .onoffswitch-inner:before{background-color:#111}
|
1
dist/assets/uhr-blue.css
vendored
Normal file
1
dist/assets/uhr-blue.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.blue.uhr{background-color:#00a}.blue.uhr .dot:not(.active){border-color:rgba(255,255,255,0.1);box-shadow:0 0 0.1em rgba(255,255,255,0.1)}.blue.uhr .letter:not(.active){color:rgba(255,255,255,0.1);text-shadow:0 0 0.1em rgba(255,255,255,0.1)}.blue .onoffswitch-inner:before{background-color:#00a}
|
1
dist/assets/uhr-green.css
vendored
Normal file
1
dist/assets/uhr-green.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.green.uhr{background-color:#0c0}.green.uhr .dot:not(.active){border-color:rgba(0,0,0,0.1);box-shadow:0 0 0.1em rgba(0,0,0,0.1)}.green.uhr .letter:not(.active){color:rgba(0,0,0,0.1);text-shadow:0 0 0.1em rgba(0,0,0,0.1)}.green .onoffswitch-inner:before{background-color:#0c0}
|
1
dist/assets/uhr-pink.css
vendored
Normal file
1
dist/assets/uhr-pink.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.pink.uhr{background-color:#f0a}.pink.uhr .dot.active{border-color:#fff;box-shadow:0 0 0.1em #fff}.pink.uhr .letter.active{color:#fff;text-shadow:0 0 0.1em #fff}.pink.uhr .dot:not(.active){border-color:rgba(255,255,255,0.1);box-shadow:0 0 0.1em rgba(255,255,255,0.1)}.pink.uhr .letter:not(.active){color:rgba(255,255,255,0.1);text-shadow:0 0 0.1em rgba(255,255,255,0.1)}.pink .onoffswitch-inner:before{background-color:#f0a}
|
1
dist/assets/uhr-red.css
vendored
Normal file
1
dist/assets/uhr-red.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.red.uhr{background-color:#700}.red.uhr .dot:not(.active){border-color:rgba(255,255,255,0.1);box-shadow:0 0 0.1em rgba(255,255,255,0.1)}.red.uhr .letter:not(.active){color:rgba(255,255,255,0.1);text-shadow:0 0 0.1em rgba(255,255,255,0.1)}.red .onoffswitch-inner:before{background-color:#700}
|
1
dist/assets/uhr-white.css
vendored
Normal file
1
dist/assets/uhr-white.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.white.uhr{background-color:#ccc}.white.uhr .dot.active{border-color:#fff;box-shadow:0 0 0.1em #fff}.white.uhr .letter.active{color:#fff;text-shadow:0 0 0.1em #fff}.white.uhr .dot:not(.active){border-color:rgba(0,0,0,0.1);box-shadow:0 0 0.1em rgba(0,0,0,0.1)}.white.uhr .letter:not(.active){color:rgba(0,0,0,0.1);text-shadow:0 0 0.1em rgba(0,0,0,0.1)}.white .onoffswitch-inner:before{background-color:#ccc}
|
1
dist/assets/uhr-yellow.css
vendored
Normal file
1
dist/assets/uhr-yellow.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.yellow.uhr{background-color:#fd0}.yellow.uhr .dot.active{border-color:#fff;box-shadow:0 0 0.1em #fff}.yellow.uhr .letter.active{color:#fff;text-shadow:0 0 0.1em #fff}.yellow.uhr .dot:not(.active){border-color:rgba(0,0,0,0.05);box-shadow:0 0 0.1em rgba(0,0,0,0.05)}.yellow.uhr .letter:not(.active){color:rgba(0,0,0,0.05);text-shadow:0 0 0.1em rgba(0,0,0,0.05)}.yellow .onoffswitch-inner:before{background-color:#fd0}
|
1
dist/assets/uhr.css
vendored
Normal file
1
dist/assets/uhr.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
@font-face{font-family:'Uhrenfont';src:url(../assets/uhr.woff) format("woff")}body{font-family:'Uhrenfont', sans-serif}.uhr{position:relative;margin:0;transition:background-color 0.5s}.uhr .reflection{position:absolute;top:0;bottom:0;left:0;right:0;background:radial-gradient(225em 45em at 160% 0, rgba(255,255,255,0.4) 0, rgba(255,255,255,0.05) 40%, rgba(255,255,255,0) 40%) no-repeat scroll;display:block;margin:0.15em}.uhr .letterarea{display:block;position:absolute;top:12%;bottom:12%;left:12%;right:12%;overflow:hidden;font-size:200%}.item{transition:box-shadow 0.5s, text-shadow 0.5s, border-color 0.5s, color 0.5s}.dot{position:absolute;display:block;height:0;width:0;border:0.2em solid;border-radius:1em}.dot.active{border-color:#eee;box-shadow:0 0 0.2em #eee}.dot1{top:3.75%;left:3.75%}.dot2{top:3.75%;right:3.75%}.dot3{bottom:3.75%;right:3.75%}.dot4{bottom:3.75%;left:3.75%}.letter{height:10%;width:9.0909%;padding:0;margin:0;display:inline-block;text-align:center;line-height:160%}.letter.active{color:#eee;text-shadow:0 0 0.2em #eee}.onoffswitch{position:relative;width:86px;margin:1em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.onoffswitch-checkbox{display:none}.onoffswitch-label{display:block;overflow:hidden;cursor:pointer;border:2px solid #999;border-radius:50px}.onoffswitch-inner,.modeswitch-inner{width:200%;margin-left:-100%;-moz-transition:margin 0.3s ease-in 0s;-webkit-transition:margin 0.3s ease-in 0s;-o-transition:margin 0.3s ease-in 0s;transition:margin 0.3s ease-in 0s}.onoffswitch-inner:before,.onoffswitch-inner:after,.modeswitch-inner:before,.modeswitch-inner:after{float:left;width:50%;height:24px;padding:0;line-height:24px;font-size:18px;color:white;font-weight:bold;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.onoffswitch-inner:before{content:"EIN";padding-left:12px;color:#eee;transition:background-color 0.5s}.onoffswitch-inner:after{content:"AUS";padding-right:12px;background-color:#eee;color:#999;text-align:right}.onoffswitch-switch{width:30px;margin:-3px;background:#fff;border:2px solid #999;border-radius:50px;position:absolute;top:0;bottom:0;right:58px;-moz-transition:all 0.3s ease-in 0s;-webkit-transition:all 0.3s ease-in 0s;-o-transition:all 0.3s ease-in 0s;transition:all 0.3s ease-in 0s}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner,.onoffswitch-checkbox:checked+.onoffswitch-label .modeswitch-inner{margin-left:0}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-switch{right:0}.modeswitch-inner:before{content:"MIN";padding-left:12px;background-color:#fff;color:#000}.modeswitch-inner:after{content:"SEC";padding-right:12px;background-color:#fff;color:#000;text-align:right}a.uhr-configlink{cursor:pointer;background:url(../assets/settings.png) no-repeat;width:24px;height:24px;display:inline-block;margin:2px;vertical-align:top}.uhr-controlpanel{border-radius:0.5em;box-shadow:0 0 1em black;background-color:#fff;display:inline-block;padding:0.5em;position:sticky;bottom:0;margin-left:1em}.uhr-controlpanel .content{position:relative}a.uhr-closecontrolpanel{cursor:pointer;display:inline-block;position:absolute;right:0;top:-1em;width:24px;height:24px;background:url(../assets/close.png) no-repeat}#disclaimer{font-size:0.5em}#disclaimer a{color:#444;text-decoration:underline}
|
0
resources/uhr.woff → dist/assets/uhr.woff
vendored
0
resources/uhr.woff → dist/assets/uhr.woff
vendored
889
dist/jquery.uhr.base.js
vendored
889
dist/jquery.uhr.base.js
vendored
|
@ -1,889 +0,0 @@
|
|||
/*! uhr - v9.0.0-dev.0 - 2019-05-03
|
||||
* http://bärneruhr.ch/
|
||||
* Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */
|
||||
(function ($) {
|
||||
'use strict';
|
||||
var uhrGlobals = {
|
||||
"id": 0,
|
||||
"languages": [],
|
||||
"themes": [],
|
||||
registerLanguage: function registerLanguage(code, language) {
|
||||
var alreadyExists = uhrGlobals.languages.some(function (element) {
|
||||
if (code === element.code) {
|
||||
console.error("Error: Language code '" + code + "' cannot be registered for language '" + language.language +
|
||||
"' because it is already registered for language '" + element.language + "'!");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
if (!alreadyExists) {
|
||||
language.code = code;
|
||||
uhrGlobals.languages.push(language);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// auto-detect themes
|
||||
$('link[rel=stylesheet]').each(function (index, item) {
|
||||
var styleSheet = $(item);
|
||||
var styleClass = styleSheet.attr('data-class');
|
||||
if (styleClass !== undefined) {
|
||||
var name = styleSheet.attr('data-name');
|
||||
if (name === undefined) {
|
||||
name = styleClass;
|
||||
}
|
||||
uhrGlobals.themes.push({'styleClass': styleClass, 'name': name});
|
||||
}
|
||||
});
|
||||
// fall-back if no theme was included
|
||||
if (uhrGlobals.themes.length === 0) {
|
||||
uhrGlobals.themes.push({});
|
||||
}
|
||||
|
||||
// public interface methods (exported later)
|
||||
var setCookie;
|
||||
var isOn;
|
||||
var update;
|
||||
var start = function start() {
|
||||
if (!isOn.bind(this)()) {
|
||||
this.timer = window.setInterval(function () {
|
||||
this.options.time = new Date();
|
||||
update.bind(this)();
|
||||
}.bind(this), 1000);
|
||||
update.bind(this)();
|
||||
setCookie.bind(this)('uhr-status', 'on');
|
||||
}
|
||||
};
|
||||
var stop = function stop() {
|
||||
if (isOn.bind(this)()) {
|
||||
window.clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
update.bind(this)();
|
||||
setCookie.bind(this)('uhr-status', 'off');
|
||||
}
|
||||
};
|
||||
var toggle = function toggle() {
|
||||
if (isOn.bind(this)()) {
|
||||
this.stop();
|
||||
} else {
|
||||
this.start();
|
||||
}
|
||||
};
|
||||
var language;
|
||||
|
||||
/**
|
||||
* Ein Buchstabe. Hilfsklasse für den Renderer und Inhalt der Layout-Arrays.
|
||||
* @param value Der Buchstabe, der Dargestellt werden soll.
|
||||
* @param style Die CSS-Styleklassen des Buchstabens.
|
||||
*/
|
||||
function Letter(value, style) {
|
||||
var myValue = value;
|
||||
var myStyle = style || '';
|
||||
this.addStyle = function (style) {
|
||||
if (myStyle === '') {
|
||||
myStyle = style;
|
||||
} else {
|
||||
myStyle += ' ' + style;
|
||||
}
|
||||
};
|
||||
this.toString = function () {
|
||||
return '<span class="item letter ' + myStyle + '">' + myValue + '</span>';
|
||||
};
|
||||
}
|
||||
|
||||
function UhrRendererV2Delegate(layout) {
|
||||
var vorne0 = {
|
||||
3: [2, 3, 4],
|
||||
4: [1, 5],
|
||||
5: [1, 4, 5],
|
||||
6: [1, 3, 5],
|
||||
7: [1, 2, 5],
|
||||
8: [1, 5],
|
||||
9: [2, 3, 4]
|
||||
};
|
||||
var hinten0 = {
|
||||
3: [8, 9, 10],
|
||||
4: [7, 11],
|
||||
5: [7, 10, 11],
|
||||
6: [7, 9, 11],
|
||||
7: [7, 8, 11],
|
||||
8: [7, 11],
|
||||
9: [8, 9, 10]
|
||||
};
|
||||
var vorne1 = {
|
||||
3: [3],
|
||||
4: [2, 3],
|
||||
5: [3],
|
||||
6: [3],
|
||||
7: [3],
|
||||
8: [3],
|
||||
9: [2, 3, 4]
|
||||
};
|
||||
var hinten1 = {
|
||||
3: [9],
|
||||
4: [8, 9],
|
||||
5: [9],
|
||||
6: [9],
|
||||
7: [9],
|
||||
8: [9],
|
||||
9: [8, 9, 10]
|
||||
};
|
||||
var vorne2 = {
|
||||
3: [2, 3, 4],
|
||||
4: [1, 5],
|
||||
5: [5],
|
||||
6: [4],
|
||||
7: [3],
|
||||
8: [2],
|
||||
9: [1, 2, 3, 4, 5]
|
||||
};
|
||||
var hinten2 = {
|
||||
3: [8, 9, 10],
|
||||
4: [7, 11],
|
||||
5: [11],
|
||||
6: [10],
|
||||
7: [9],
|
||||
8: [8],
|
||||
9: [7, 8, 9, 10, 11]
|
||||
};
|
||||
var vorne3 = {
|
||||
3: [1, 2, 3, 4, 5],
|
||||
4: [4],
|
||||
5: [3],
|
||||
6: [4],
|
||||
7: [5],
|
||||
8: [1, 5],
|
||||
9: [2, 3, 4]
|
||||
};
|
||||
var hinten3 = {
|
||||
3: [7, 8, 9, 10, 11],
|
||||
4: [10],
|
||||
5: [9],
|
||||
6: [10],
|
||||
7: [11],
|
||||
8: [7, 11],
|
||||
9: [8, 9, 10]
|
||||
};
|
||||
var vorne4 = {
|
||||
3: [4],
|
||||
4: [3, 4],
|
||||
5: [2, 4],
|
||||
6: [1, 4],
|
||||
7: [1, 2, 3, 4, 5],
|
||||
8: [4],
|
||||
9: [4]
|
||||
};
|
||||
var hinten4 = {
|
||||
3: [10],
|
||||
4: [9, 10],
|
||||
5: [8, 10],
|
||||
6: [7, 10],
|
||||
7: [7, 8, 9, 10, 11],
|
||||
8: [10],
|
||||
9: [10]
|
||||
};
|
||||
var vorne5 = {
|
||||
3: [1, 2, 3, 4, 5],
|
||||
4: [1],
|
||||
5: [1, 2, 3, 4],
|
||||
6: [5],
|
||||
7: [5],
|
||||
8: [1, 5],
|
||||
9: [2, 3, 4]
|
||||
};
|
||||
var hinten5 = {
|
||||
3: [7, 8, 9, 10, 11],
|
||||
4: [7],
|
||||
5: [7, 8, 9, 10],
|
||||
6: [11],
|
||||
7: [11],
|
||||
8: [7, 11],
|
||||
9: [8, 9, 10]
|
||||
};
|
||||
var hinten6 = {
|
||||
3: [9, 10],
|
||||
4: [8],
|
||||
5: [7],
|
||||
6: [7, 8, 9, 10],
|
||||
7: [7, 11],
|
||||
8: [7, 11],
|
||||
9: [8, 9, 10]
|
||||
};
|
||||
var hinten7 = {
|
||||
3: [7, 8, 9, 10, 11],
|
||||
4: [11],
|
||||
5: [10],
|
||||
6: [9],
|
||||
7: [8],
|
||||
8: [8],
|
||||
9: [8]
|
||||
};
|
||||
var hinten8 = {
|
||||
3: [8, 9, 10],
|
||||
4: [7, 11],
|
||||
5: [7, 11],
|
||||
6: [8, 9, 10],
|
||||
7: [7, 11],
|
||||
8: [7, 11],
|
||||
9: [8, 9, 10]
|
||||
};
|
||||
var hinten9 = {
|
||||
3: [8, 9, 10],
|
||||
4: [7, 11],
|
||||
5: [7, 11],
|
||||
6: [8, 9, 10, 11],
|
||||
7: [11],
|
||||
8: [10],
|
||||
9: [8, 9]
|
||||
};
|
||||
var seconds = {
|
||||
"0": [vorne0, hinten0],
|
||||
"1": [vorne0, hinten1],
|
||||
"2": [vorne0, hinten2],
|
||||
"3": [vorne0, hinten3],
|
||||
"4": [vorne0, hinten4],
|
||||
"5": [vorne0, hinten5],
|
||||
"6": [vorne0, hinten6],
|
||||
"7": [vorne0, hinten7],
|
||||
"8": [vorne0, hinten8],
|
||||
"9": [vorne0, hinten9],
|
||||
"10": [vorne1, hinten0],
|
||||
"11": [vorne1, hinten1],
|
||||
"12": [vorne1, hinten2],
|
||||
"13": [vorne1, hinten3],
|
||||
"14": [vorne1, hinten4],
|
||||
"15": [vorne1, hinten5],
|
||||
"16": [vorne1, hinten6],
|
||||
"17": [vorne1, hinten7],
|
||||
"18": [vorne1, hinten8],
|
||||
"19": [vorne1, hinten9],
|
||||
"20": [vorne2, hinten0],
|
||||
"21": [vorne2, hinten1],
|
||||
"22": [vorne2, hinten2],
|
||||
"23": [vorne2, hinten3],
|
||||
"24": [vorne2, hinten4],
|
||||
"25": [vorne2, hinten5],
|
||||
"26": [vorne2, hinten6],
|
||||
"27": [vorne2, hinten7],
|
||||
"28": [vorne2, hinten8],
|
||||
"29": [vorne2, hinten9],
|
||||
"30": [vorne3, hinten0],
|
||||
"31": [vorne3, hinten1],
|
||||
"32": [vorne3, hinten2],
|
||||
"33": [vorne3, hinten3],
|
||||
"34": [vorne3, hinten4],
|
||||
"35": [vorne3, hinten5],
|
||||
"36": [vorne3, hinten6],
|
||||
"37": [vorne3, hinten7],
|
||||
"38": [vorne3, hinten8],
|
||||
"39": [vorne3, hinten9],
|
||||
"40": [vorne4, hinten0],
|
||||
"41": [vorne4, hinten1],
|
||||
"42": [vorne4, hinten2],
|
||||
"43": [vorne4, hinten3],
|
||||
"44": [vorne4, hinten4],
|
||||
"45": [vorne4, hinten5],
|
||||
"46": [vorne4, hinten6],
|
||||
"47": [vorne4, hinten7],
|
||||
"48": [vorne4, hinten8],
|
||||
"49": [vorne4, hinten9],
|
||||
"50": [vorne5, hinten0],
|
||||
"51": [vorne5, hinten1],
|
||||
"52": [vorne5, hinten2],
|
||||
"53": [vorne5, hinten3],
|
||||
"54": [vorne5, hinten4],
|
||||
"55": [vorne5, hinten5],
|
||||
"56": [vorne5, hinten6],
|
||||
"57": [vorne5, hinten7],
|
||||
"58": [vorne5, hinten8],
|
||||
"59": [vorne5, hinten9]
|
||||
};
|
||||
|
||||
function parseObject(letters, styleClass, object) {
|
||||
if (typeof object !== 'undefined' && object !== null) {
|
||||
Object.keys(object).forEach(function (y) {
|
||||
var highlightLetters = object[y];
|
||||
highlightLetters.forEach(function (x) {
|
||||
letters[y - 1][x - 1].addStyle(styleClass);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function parseArrayOrObject(letters, styleClass, input) {
|
||||
if (typeof input !== 'undefined' && input !== null) {
|
||||
if (Array.isArray(input)) {
|
||||
input.forEach(function (item) {
|
||||
parseObject(letters, styleClass, item);
|
||||
});
|
||||
} else {
|
||||
parseObject(letters, styleClass, input);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function parseTimeDefinition(letters, styleClass, definition) {
|
||||
if (typeof definition !== 'undefined' && definition !== null) {
|
||||
Object.keys(definition).forEach(function (listString) {
|
||||
var array = listString.split(',');
|
||||
var highlightLetters = definition[listString];
|
||||
array.forEach(function (item) {
|
||||
parseArrayOrObject(letters, styleClass + item, highlightLetters);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.parse = function parse() {
|
||||
var letters = [];
|
||||
layout.letters.forEach(function (string) {
|
||||
var line = [];
|
||||
for (var c = 0; c < string.length; c++) {
|
||||
var character = new Letter(string[c]);
|
||||
line.push(character);
|
||||
}
|
||||
letters.push(line);
|
||||
});
|
||||
parseArrayOrObject(letters, 'on', layout.permanent);
|
||||
if (typeof layout.seconds !== 'undefined' && layout.seconds !== null) {
|
||||
parseTimeDefinition(letters, 'second', layout.seconds);
|
||||
} else {
|
||||
parseTimeDefinition(letters, 'second', seconds);
|
||||
}
|
||||
parseTimeDefinition(letters, 'minute', layout.minutes);
|
||||
parseTimeDefinition(letters, 'hour', layout.hours);
|
||||
return letters;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Hilfsklasse zum Rendern der Uhr.
|
||||
* @param layout Layout-Objekt, das gerendert werden soll.
|
||||
* @param renderarea Das jQuery-gewrappte HTML-Element, auf dem gerendert werden soll.
|
||||
*/
|
||||
function UhrRenderer(layout, renderarea) {
|
||||
this.render = function render(beforeshow) {
|
||||
if (layout.parsed === undefined) {
|
||||
switch (layout.version) {
|
||||
case 2:
|
||||
var delegate = new UhrRendererV2Delegate(layout);
|
||||
var parsedLayout = delegate.parse();
|
||||
Object.defineProperty(layout, "parsed", {
|
||||
"value": parsedLayout,
|
||||
"writable": false,
|
||||
"configurable": false
|
||||
});
|
||||
break;
|
||||
default:
|
||||
console.warn("Unknown layout version: '" + layout.version + "'");
|
||||
return;
|
||||
}
|
||||
}
|
||||
var letters = layout.parsed;
|
||||
renderarea.fadeOut('fast', function () {
|
||||
renderarea.empty();
|
||||
letters.forEach(function (line, index, array) {
|
||||
line.forEach(function (letter) {
|
||||
renderarea.append(letter.toString());
|
||||
});
|
||||
if (index < array.length - 1) {
|
||||
renderarea.append('<br/>');
|
||||
}
|
||||
});
|
||||
if (typeof beforeshow === 'function') {
|
||||
beforeshow();
|
||||
}
|
||||
renderarea.fadeIn('fast');
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
var setLanguage = function setLanguage(languageKey) {
|
||||
if (languageKey !== this.options.language) {
|
||||
this.options.language = languageKey;
|
||||
var renderer = new UhrRenderer(language.bind(this)(), this.element.find('.letterarea'));
|
||||
renderer.render.bind(this)(function () {
|
||||
this.currentMinute = -1;
|
||||
update.bind(this)();
|
||||
}.bind(this));
|
||||
setCookie.bind(this)('uhr-language', languageKey);
|
||||
update.bind(this)();
|
||||
}
|
||||
};
|
||||
var setTheme = function setTheme(theme) {
|
||||
if (theme !== this.options.theme) {
|
||||
this.element.removeClass(this.options.theme).addClass(theme);
|
||||
$('#uhr-onoffswitch' + this.id).removeClass(this.options.theme).addClass(theme);
|
||||
this.options.theme = theme;
|
||||
setCookie.bind(this)('uhr-theme', theme);
|
||||
}
|
||||
};
|
||||
var setTime = function setTime(time) {
|
||||
this.currentMinute = -1;
|
||||
if (time === null) {
|
||||
this.options.time = new Date();
|
||||
} else {
|
||||
if (this.timer !== null) {
|
||||
window.clearInterval(this.timer);
|
||||
}
|
||||
this.options.time = time;
|
||||
}
|
||||
update.bind(this)();
|
||||
};
|
||||
var setMode = function (mode) {
|
||||
this.options.mode = mode;
|
||||
this.currentMinute = -1;
|
||||
update.bind(this)();
|
||||
setCookie.bind(this)('uhr-mode', mode);
|
||||
};
|
||||
var setWidth = function setWidth(width) {
|
||||
var e = this.element;
|
||||
e.css('width', width);
|
||||
var realWidth = e.width();
|
||||
e.width(realWidth);
|
||||
e.height(realWidth);
|
||||
e.css('font-size', (realWidth / 40) + 'px');
|
||||
};
|
||||
|
||||
// private interface methods
|
||||
var setupHTML;
|
||||
var wireFunctionality;
|
||||
var create = function create() {
|
||||
this.id = uhrGlobals.id++;
|
||||
this.timer = null;
|
||||
this.currentMinute = -1;
|
||||
var userTime = this.options.time;
|
||||
var hash, params;
|
||||
if (this.options.time === undefined) {
|
||||
this.options.time = new Date();
|
||||
}
|
||||
// parse the URL params
|
||||
hash = window.location.hash;
|
||||
if (hash !== undefined && typeof hash === 'string' && hash.charAt(0) === '#') {
|
||||
hash = hash.substring(1);
|
||||
hash = decodeURIComponent(hash);
|
||||
params = hash.split('&');
|
||||
params.forEach(function (element) {
|
||||
var pair = element.split('=');
|
||||
var key = pair[0];
|
||||
var value = pair[1];
|
||||
switch (key) {
|
||||
case 'l':
|
||||
case 'language':
|
||||
this.options.language = value;
|
||||
this.options.force = true;
|
||||
break;
|
||||
case 't':
|
||||
case 'theme':
|
||||
this.options.theme = value;
|
||||
this.options.force = true;
|
||||
break;
|
||||
case 'm':
|
||||
case 'mode':
|
||||
this.options.mode = value;
|
||||
this.options.force = true;
|
||||
break;
|
||||
case 's':
|
||||
case 'status':
|
||||
this.options.status = value;
|
||||
this.options.force = true;
|
||||
break;
|
||||
}
|
||||
}.bind(this));
|
||||
}
|
||||
// end parse the URL params
|
||||
setupHTML.bind(this)();
|
||||
wireFunctionality.bind(this)();
|
||||
if (userTime !== undefined) {
|
||||
this.time(userTime);
|
||||
}
|
||||
};
|
||||
// private helper methods (not exported)
|
||||
var toggleConfigScreen = function toggleConfigScreen() {
|
||||
$('#uhr-controlpanel' + this.id).toggle('fast');
|
||||
};
|
||||
// set up
|
||||
setupHTML = function setupHTML() {
|
||||
var e = this.element;
|
||||
// Base clock area
|
||||
e.addClass('uhr');
|
||||
e.empty();
|
||||
e.append('<span class="item dot dot1"></span>');
|
||||
e.append('<span class="item dot dot2"></span>');
|
||||
e.append('<span class="item dot dot3"></span>');
|
||||
e.append('<span class="item dot dot4"></span>');
|
||||
e.append('<div class="letterarea"></div>');
|
||||
e.append('<div class="reflection"></div>');
|
||||
setWidth.bind(this)(this.options.width);
|
||||
|
||||
if (this.options.controls) {
|
||||
var controlpanel = $('<div class="uhr-controlpanel" id="uhr-controlpanel' + this.id + '"></div>');
|
||||
var content = $('<div class="content"></div>');
|
||||
controlpanel.append(content);
|
||||
// on/off switch
|
||||
var toggleSwitch = $('<div class="onoffswitch" id="uhr-onoffswitch' + this.id + '"></div>');
|
||||
toggleSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox' + this.id +
|
||||
'" checked="checked" />');
|
||||
toggleSwitch.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox' + this.id + '">' +
|
||||
'<div class="onoffswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + '</label>');
|
||||
content.append(toggleSwitch);
|
||||
|
||||
// time mode switch
|
||||
var modeSwitch = $('<div class="onoffswitch" id="uhr-modeswitch' + this.id + '"></div>');
|
||||
modeSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox' + this.id +
|
||||
'" checked="checked" />');
|
||||
modeSwitch.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox' + this.id + '">' +
|
||||
'<div class="modeswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' +
|
||||
'</label>');
|
||||
content.append(modeSwitch);
|
||||
// language chooser
|
||||
if (uhrGlobals.languages.length > 1) {
|
||||
var languageChooser = $('<select id="uhr-languagechooser' + this.id + '"></select>');
|
||||
uhrGlobals.languages.forEach(function (item) {
|
||||
languageChooser.append('<option value="' + item.code + '">' + item.language + '</option>');
|
||||
});
|
||||
content.append(languageChooser);
|
||||
}
|
||||
|
||||
// theme chooser
|
||||
if (uhrGlobals.themes.length > 1) {
|
||||
var themeChooser = $('<select id="uhr-themechooser' + this.id + '"></select>');
|
||||
uhrGlobals.themes.forEach(function (item) {
|
||||
themeChooser.append('<option value="' + item.styleClass + '">' + item.name + '</option>');
|
||||
});
|
||||
content.append(themeChooser);
|
||||
}
|
||||
var closebutton = $('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel' + this.id + '"></a>');
|
||||
closebutton.on('click', function () {
|
||||
$('#uhr-controlpanel' + this.id).hide('fast');
|
||||
}.bind(this));
|
||||
content.append(closebutton);
|
||||
e.after(controlpanel);
|
||||
controlpanel.hide();
|
||||
var configlink = $('<a class="uhr-configlink" id="uhr-configlink' + this.id + '"></a>');
|
||||
configlink.on('click', function () {
|
||||
toggleConfigScreen.bind(this)();
|
||||
}.bind(this));
|
||||
e.after(configlink);
|
||||
}
|
||||
};
|
||||
wireFunctionality = function wireFunctionality() {
|
||||
// on/off switch
|
||||
var toggleSwitch = $('#uhr-onoffswitch-checkbox' + this.id);
|
||||
toggleSwitch.on('click', function () {
|
||||
this.toggle();
|
||||
}.bind(this));
|
||||
var status = $.cookie('uhr-status' + this.id);
|
||||
if (status === undefined || this.options.force) {
|
||||
status = this.options.status;
|
||||
}
|
||||
toggleSwitch.prop('checked', status === 'on');
|
||||
if (status === 'on') {
|
||||
this.start();
|
||||
} else {
|
||||
this.stop();
|
||||
}
|
||||
|
||||
// time mode switch
|
||||
var modeSwitch = $('#uhr-modeswitch-checkbox' + this.id);
|
||||
modeSwitch.on('click', function () {
|
||||
if (this.options.mode === 'seconds') {
|
||||
setMode.bind(this)('normal');
|
||||
} else {
|
||||
setMode.bind(this)('seconds');
|
||||
}
|
||||
}.bind(this));
|
||||
|
||||
var mode = $.cookie('uhr-mode' + this.id);
|
||||
if (mode === undefined || this.options.force) {
|
||||
mode = this.options.mode;
|
||||
}
|
||||
modeSwitch.prop('checked', mode !== 'seconds');
|
||||
if (mode === 'seconds') {
|
||||
setMode.bind(this)('seconds');
|
||||
} else {
|
||||
setMode.bind(this)('normal');
|
||||
}
|
||||
|
||||
// language chooser
|
||||
var languageChooser = $('#uhr-languagechooser' + this.id);
|
||||
languageChooser.on('change', function () {
|
||||
var languageKey = $('#uhr-languagechooser' + this.id).val();
|
||||
this.language(languageKey);
|
||||
}.bind(this));
|
||||
var selectedLanguage = $.cookie('uhr-language' + this.id);
|
||||
if (selectedLanguage === undefined || this.options.force) {
|
||||
selectedLanguage = this.options.language;
|
||||
}
|
||||
var found = uhrGlobals.languages.some(function (item) {
|
||||
return selectedLanguage === item.code;
|
||||
});
|
||||
if (!found) {
|
||||
var fallbackLanguage;
|
||||
if (uhrGlobals.languages.length > 0) {
|
||||
fallbackLanguage = uhrGlobals.languages[0].code;
|
||||
} else {
|
||||
fallbackLanguage = '';
|
||||
}
|
||||
console.warn("Language '" + selectedLanguage + "' not found! Using fallback '" + fallbackLanguage + "'");
|
||||
selectedLanguage = fallbackLanguage;
|
||||
}
|
||||
languageChooser.val(selectedLanguage);
|
||||
this.options.language = "";
|
||||
this.language(selectedLanguage);
|
||||
|
||||
// theme chooser
|
||||
var themeChooser = $('#uhr-themechooser' + this.id);
|
||||
themeChooser.on('change', function () {
|
||||
var themeKey = $('#uhr-themechooser' + this.id).val();
|
||||
this.theme(themeKey);
|
||||
}.bind(this));
|
||||
var selectedTheme = $.cookie('uhr-theme' + this.id);
|
||||
if (selectedTheme === undefined || this.options.force) {
|
||||
selectedTheme = this.options.theme;
|
||||
}
|
||||
found = uhrGlobals.themes.some(function (item) {
|
||||
return selectedTheme === item.styleClass;
|
||||
});
|
||||
if (!found) {
|
||||
var fallbackTheme = uhrGlobals.themes[0].styleClass;
|
||||
console.warn("Theme '" + selectedTheme + "' not found! Using fallback '" + fallbackTheme + "'");
|
||||
selectedTheme = fallbackTheme;
|
||||
}
|
||||
themeChooser.val(selectedTheme);
|
||||
this.options.theme = "";
|
||||
this.theme(selectedTheme);
|
||||
if (this.options.autoresize) {
|
||||
$(window).on('resize', function () {
|
||||
var $e = this.element;
|
||||
var $parent = $e.parent();
|
||||
var $window = $(window);
|
||||
var parentWidth = $parent.width();
|
||||
var parentHeight = $parent.height();
|
||||
var windowWidth = $window.width();
|
||||
var windowHeight = $window.height();
|
||||
var size = Math.min(parentWidth, parentHeight, windowWidth, windowHeight) + 'px';
|
||||
setWidth.bind(this)(size);
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
var destroy = function destroy() {
|
||||
this.timer = null;
|
||||
$(this.element)
|
||||
.removeAttr('style')
|
||||
.removeAttr('class')
|
||||
.empty();
|
||||
$('#uhr-configlink' + this.id).remove();
|
||||
$('#uhr-controlpanel' + this.id).remove();
|
||||
|
||||
};
|
||||
setCookie = function setCookie(cookieName, cookieValue) {
|
||||
var options = {};
|
||||
if (this.options.cookiePath !== undefined) {
|
||||
options = {expires: 365, path: this.options.cookiePath};
|
||||
} else {
|
||||
options = {expires: 365};
|
||||
}
|
||||
$.cookie(cookieName + this.id, cookieValue, options);
|
||||
};
|
||||
|
||||
// business logic
|
||||
isOn = function isOn() {
|
||||
return this.timer !== null;
|
||||
};
|
||||
var show;
|
||||
var clear;
|
||||
update = function update() {
|
||||
if (isOn.bind(this)()) {
|
||||
var time = this.options.time;
|
||||
if (!language.bind(this)().hasOwnProperty('seconds') && this.options.mode !== 'seconds') {
|
||||
if (time.getMinutes() === this.currentMinute) {
|
||||
return;
|
||||
}
|
||||
this.currentMinute = time.getMinutes();
|
||||
}
|
||||
show.bind(this)(time);
|
||||
} else {
|
||||
clear.bind(this)();
|
||||
this.currentMinute = -1;
|
||||
}
|
||||
};
|
||||
var highlight;
|
||||
var getSecond;
|
||||
var getDotMinute;
|
||||
var getCoarseMinute;
|
||||
var getHour;
|
||||
show = function show(time) {
|
||||
var second = getSecond.bind(this)(time);
|
||||
var dotMinute = getDotMinute.bind(this)(time);
|
||||
var hour = getHour.bind(this)(time);
|
||||
var coarseMinute = getCoarseMinute.bind(this)(time);
|
||||
clear.bind(this)();
|
||||
if (this.options.mode === 'seconds') {
|
||||
highlight.bind(this)('second' + second);
|
||||
} else {
|
||||
highlight.bind(this)('on');
|
||||
for (var i = 1; i <= dotMinute; i++) {
|
||||
highlight.bind(this)('dot' + i);
|
||||
}
|
||||
highlight.bind(this)('minute' + coarseMinute);
|
||||
highlight.bind(this)('hour' + hour);
|
||||
}
|
||||
};
|
||||
highlight = function highlight(itemClass) {
|
||||
this.element.find('.item.' + itemClass).addClass('active');
|
||||
};
|
||||
clear = function clear() {
|
||||
this.element.find('.item').removeClass('active');
|
||||
};
|
||||
getSecond = function getSecond(date) {
|
||||
if (typeof language.bind(this)().getSeconds === 'function') {
|
||||
return language.bind(this)().getSeconds(date);
|
||||
}
|
||||
return date.getSeconds();
|
||||
};
|
||||
getDotMinute = function getDotMinute(date) {
|
||||
if (typeof language.bind(this)().getDotMinute === 'function') {
|
||||
return language.bind(this)().getDotMinute(date);
|
||||
}
|
||||
var minutes = date.getMinutes();
|
||||
return minutes % 5;
|
||||
};
|
||||
getCoarseMinute = function getCoarseMinute(date) {
|
||||
if (typeof language.bind(this)().getCoarseMinute === 'function') {
|
||||
return language.bind(this)().getCoarseMinute(date);
|
||||
}
|
||||
return date.getMinutes();
|
||||
};
|
||||
getHour = function getHour(date) {
|
||||
if (typeof language.bind(this)().getHour === 'function') {
|
||||
return language.bind(this)().getHour(date);
|
||||
}
|
||||
var hour = date.getHours();
|
||||
if (date.getMinutes() >= 25) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
};
|
||||
language = function language() {
|
||||
var matchingLanguages = uhrGlobals.languages.filter(function (element) {
|
||||
return (element.code === this.options.language);
|
||||
}, this);
|
||||
if (matchingLanguages.length > 0) {
|
||||
return matchingLanguages[0];
|
||||
}
|
||||
// fallback: return empty object
|
||||
return {};
|
||||
};
|
||||
|
||||
$.widget("fritteli.uhr", {
|
||||
"options": {
|
||||
width: '100%',
|
||||
status: 'on',
|
||||
language: 'de_CH',
|
||||
theme: uhrGlobals.themes[0].styleClass,
|
||||
force: false,
|
||||
controls: true,
|
||||
cookiePath: undefined,
|
||||
autoresize: true,
|
||||
mode: 'normal'
|
||||
},
|
||||
"start": start,
|
||||
"stop": stop,
|
||||
"toggle": toggle,
|
||||
"language": setLanguage,
|
||||
"theme": setTheme,
|
||||
"time": setTime,
|
||||
"mode": setMode,
|
||||
"width": setWidth,
|
||||
// constructor method
|
||||
"_create": create,
|
||||
// destructor method
|
||||
"_destroy": destroy
|
||||
});
|
||||
$.fritteli.uhr.register = uhrGlobals.registerLanguage;
|
||||
})(jQuery);
|
||||
|
||||
(function($) {
|
||||
'use strict';
|
||||
// hilfsvariablen
|
||||
var es_isch = {1: [1, 2, 4, 5, 6, 7]};
|
||||
var ab = {4: [1, 2]};
|
||||
var vor = {3: [9, 10, 11]};
|
||||
var haubi = {4: [4, 5, 6, 7, 8]};
|
||||
var fuef = {1: [9, 10, 11]};
|
||||
var zae = {2: [9, 10, 11]};
|
||||
var viertu = {2: [1, 2, 3, 4, 5, 6]};
|
||||
var zwaenzg = {3: [1, 2, 3, 4, 5, 6]};
|
||||
var layout = {
|
||||
// version: zur Zeit immer 2 (Pflichtattribut)
|
||||
"version": 2,
|
||||
// Sprechender Name der Sprache
|
||||
"language": 'Bärndütsch',
|
||||
// Buchstabenfeld als Array von Strings.
|
||||
"letters": [
|
||||
'ESKISCHAFÜF',
|
||||
'VIERTUBFZÄÄ',
|
||||
'ZWÄNZGSIVOR',
|
||||
'ABOHAUBIEGE',
|
||||
'EISZWÖISDRÜ',
|
||||
'VIERIFÜFIQT',
|
||||
'SÄCHSISIBNI',
|
||||
'ACHTINÜNIEL',
|
||||
'ZÄNIERBEUFI',
|
||||
'ZWÖUFINAUHR'
|
||||
],
|
||||
// Permanent aktive Buchstaben. <array-or-object>, vgl. ausführliche Beschreibung bei "minutes".
|
||||
"permanent": es_isch,
|
||||
/*
|
||||
* Minuten: Objekt im folgenden Format:
|
||||
* {
|
||||
* <minuten>: <array-or-object>,
|
||||
* ...
|
||||
* }
|
||||
* <minuten>: String von Komma-separierten Minutenwerten, zu welchem die in <array-or-object> angegebenen Buchstaben aktiv sein sollen
|
||||
* <array-or-object> : [ <object>, ...] | <object>
|
||||
* <object>: { <zeile> : [ <spalte>, ... ] }
|
||||
* <zeile>: Die Zeile, in welcher die Buchstaben liegen; von oben gezählt, oben ist 1.
|
||||
* <spalte>: Die Spalte, in der ein einzelner Buchstabe liegt; von links gezählt, links ist 1.
|
||||
* Beispiel:
|
||||
* "minutes": {
|
||||
* "0,1": {1: [6, 7, 9]},
|
||||
* "5": [ {3: [1, 2]}, {4: [10, 11]} ]
|
||||
* }
|
||||
* Erklärung:
|
||||
* Bei Minuten 0 und 1 sind die Buchstaben 6, 7 und 9 der ersten Zeile aktiv.
|
||||
* Bei Minute 5 sind die Buchstaben 1 und 2 der Zeile 3 sowie die Buchstaben 10 und 11 der Zeile 4 aktiv.
|
||||
*/
|
||||
"minutes": {
|
||||
"5,6,7,8,9": [fuef, ab],
|
||||
"10,11,12,13,14": [zae, ab],
|
||||
"15,16,17,18,19": [viertu, ab],
|
||||
"20,21,22,23,24": [zwaenzg, ab],
|
||||
"25,26,27,28,29": [fuef, vor, haubi],
|
||||
"30,31,32,33,34": haubi,
|
||||
"35,36,37,38,39": [fuef, ab, haubi],
|
||||
"40,41,42,43,44": [zwaenzg, vor],
|
||||
"45,46,47,48,49": [viertu, vor],
|
||||
"50,51,52,53,54": [zae, vor],
|
||||
"55,56,57,58,59": [fuef, vor]
|
||||
},
|
||||
// Die Stunden; gleiches Format wie bei den Minuten
|
||||
"hours": {
|
||||
"0,12": {10: [1, 2, 3, 4, 5, 6]},
|
||||
"1,13": {5: [1, 2, 3]},
|
||||
"2,14": {5: [4, 5, 6, 7]},
|
||||
"3,15": {5: [9, 10, 11]},
|
||||
"4,16": {6: [1, 2, 3, 4, 5]},
|
||||
"5,17": {6: [6, 7, 8, 9]},
|
||||
"6,18": {7: [1, 2, 3, 4, 5, 6]},
|
||||
"7,19": {7: [7, 8, 9, 10, 11]},
|
||||
"8,20": {8: [1, 2, 3, 4, 5]},
|
||||
"9,21": {8: [6, 7, 8, 9]},
|
||||
"10,22": {9: [1, 2, 3, 4]},
|
||||
"11,23": {9: [8, 9, 10, 11]}
|
||||
}
|
||||
};
|
||||
// Das Layout bei der Uhr unter dem Code "de_CH" registrieren.
|
||||
$.fritteli.uhr.register('de_CH', layout);
|
||||
}(jQuery));
|
5
dist/jquery.uhr.base.min.js
vendored
5
dist/jquery.uhr.base.min.js
vendored
File diff suppressed because one or more lines are too long
717
dist/jquery.uhr.baselangs.js
vendored
717
dist/jquery.uhr.baselangs.js
vendored
|
@ -1,717 +0,0 @@
|
|||
/*! uhr - v9.0.0-dev.0 - 2019-05-03
|
||||
* http://bärneruhr.ch/
|
||||
* Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */
|
||||
(function($) {
|
||||
'use strict';
|
||||
var es_ist = {1: [1, 2, 4, 5, 6]};
|
||||
var uhr = {10: [9, 10, 11]};
|
||||
var nach = {4: [8, 9, 10, 11]};
|
||||
var vor = {4: [1, 2, 3]};
|
||||
var halb = {5: [1, 2, 3, 4]};
|
||||
var fuenf = {1: [8, 9, 10, 11]};
|
||||
var zehn = {2: [1, 2, 3, 4]};
|
||||
var viertel = {3: [5, 6, 7, 8, 9, 10, 11]};
|
||||
var zwanzig = {2: [5, 6, 7, 8, 9, 10, 11]};
|
||||
var dreiviertel = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]};
|
||||
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'Deutsch',
|
||||
"letters": [
|
||||
'ESKISTAFÜNF',
|
||||
'ZEHNZWANZIG',
|
||||
'DREIVIERTEL',
|
||||
'VORFUNKNACH',
|
||||
'HALBAELFÜNF',
|
||||
'EINSXAMZWEI',
|
||||
'DREIPMJVIER',
|
||||
'SECHSNLACHT',
|
||||
'SIEBENZWÖLF',
|
||||
'ZEHNEUNKUHR'
|
||||
],
|
||||
"permanent": es_ist,
|
||||
"minutes": {
|
||||
"0,1,2,3,4": uhr,
|
||||
"5,6,7,8,9": [fuenf, nach],
|
||||
"10,11,12,13,14": [zehn, nach],
|
||||
"15,16,17,18,19": [viertel, nach],
|
||||
"20,21,22,23,24": [zwanzig, nach],
|
||||
"25,26,27,28,29": [fuenf, vor, halb],
|
||||
"30,31,32,33,34": halb,
|
||||
"35,36,37,38,39": [fuenf, nach, halb],
|
||||
"40,41,42,43,44": [zwanzig, vor],
|
||||
"45,46,47,48,49": dreiviertel,
|
||||
"50,51,52,53,54": [zehn, vor],
|
||||
"55,56,57,58,59": [fuenf, vor]
|
||||
},
|
||||
"hours": {
|
||||
"0,12": {9: [7, 8, 9, 10, 11]},
|
||||
"1,13": {6: [1, 2, 3, 4]},
|
||||
"2,14": {6: [8, 9, 10, 11]},
|
||||
"3,15": {7: [1, 2, 3, 4]},
|
||||
"4,16": {7: [8, 9, 10, 11]},
|
||||
"5,17": {5: [8, 9, 10, 11]},
|
||||
"6,18": {8: [1, 2, 3, 4, 5]},
|
||||
"7,19": {9: [1, 2, 3, 4, 5, 6]},
|
||||
"8,20": {8: [8, 9, 10, 11]},
|
||||
"9,21": {10: [4, 5, 6, 7]},
|
||||
"10,22": {10: [1, 2, 3, 4]},
|
||||
"11,23": {5: [6, 7, 8]}
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('de', layout);
|
||||
}(jQuery));
|
||||
(function($) {
|
||||
'use strict';
|
||||
// hilfsvariablen
|
||||
var es_isch = {1: [1, 2, 4, 5, 6, 7]};
|
||||
var ab = {4: [1, 2]};
|
||||
var vor = {3: [9, 10, 11]};
|
||||
var haubi = {4: [4, 5, 6, 7, 8]};
|
||||
var fuef = {1: [9, 10, 11]};
|
||||
var zae = {2: [9, 10, 11]};
|
||||
var viertu = {2: [1, 2, 3, 4, 5, 6]};
|
||||
var zwaenzg = {3: [1, 2, 3, 4, 5, 6]};
|
||||
var layout = {
|
||||
// version: zur Zeit immer 2 (Pflichtattribut)
|
||||
"version": 2,
|
||||
// Sprechender Name der Sprache
|
||||
"language": 'Bärndütsch',
|
||||
// Buchstabenfeld als Array von Strings.
|
||||
"letters": [
|
||||
'ESKISCHAFÜF',
|
||||
'VIERTUBFZÄÄ',
|
||||
'ZWÄNZGSIVOR',
|
||||
'ABOHAUBIEGE',
|
||||
'EISZWÖISDRÜ',
|
||||
'VIERIFÜFIQT',
|
||||
'SÄCHSISIBNI',
|
||||
'ACHTINÜNIEL',
|
||||
'ZÄNIERBEUFI',
|
||||
'ZWÖUFINAUHR'
|
||||
],
|
||||
// Permanent aktive Buchstaben. <array-or-object>, vgl. ausführliche Beschreibung bei "minutes".
|
||||
"permanent": es_isch,
|
||||
/*
|
||||
* Minuten: Objekt im folgenden Format:
|
||||
* {
|
||||
* <minuten>: <array-or-object>,
|
||||
* ...
|
||||
* }
|
||||
* <minuten>: String von Komma-separierten Minutenwerten, zu welchem die in <array-or-object> angegebenen Buchstaben aktiv sein sollen
|
||||
* <array-or-object> : [ <object>, ...] | <object>
|
||||
* <object>: { <zeile> : [ <spalte>, ... ] }
|
||||
* <zeile>: Die Zeile, in welcher die Buchstaben liegen; von oben gezählt, oben ist 1.
|
||||
* <spalte>: Die Spalte, in der ein einzelner Buchstabe liegt; von links gezählt, links ist 1.
|
||||
* Beispiel:
|
||||
* "minutes": {
|
||||
* "0,1": {1: [6, 7, 9]},
|
||||
* "5": [ {3: [1, 2]}, {4: [10, 11]} ]
|
||||
* }
|
||||
* Erklärung:
|
||||
* Bei Minuten 0 und 1 sind die Buchstaben 6, 7 und 9 der ersten Zeile aktiv.
|
||||
* Bei Minute 5 sind die Buchstaben 1 und 2 der Zeile 3 sowie die Buchstaben 10 und 11 der Zeile 4 aktiv.
|
||||
*/
|
||||
"minutes": {
|
||||
"5,6,7,8,9": [fuef, ab],
|
||||
"10,11,12,13,14": [zae, ab],
|
||||
"15,16,17,18,19": [viertu, ab],
|
||||
"20,21,22,23,24": [zwaenzg, ab],
|
||||
"25,26,27,28,29": [fuef, vor, haubi],
|
||||
"30,31,32,33,34": haubi,
|
||||
"35,36,37,38,39": [fuef, ab, haubi],
|
||||
"40,41,42,43,44": [zwaenzg, vor],
|
||||
"45,46,47,48,49": [viertu, vor],
|
||||
"50,51,52,53,54": [zae, vor],
|
||||
"55,56,57,58,59": [fuef, vor]
|
||||
},
|
||||
// Die Stunden; gleiches Format wie bei den Minuten
|
||||
"hours": {
|
||||
"0,12": {10: [1, 2, 3, 4, 5, 6]},
|
||||
"1,13": {5: [1, 2, 3]},
|
||||
"2,14": {5: [4, 5, 6, 7]},
|
||||
"3,15": {5: [9, 10, 11]},
|
||||
"4,16": {6: [1, 2, 3, 4, 5]},
|
||||
"5,17": {6: [6, 7, 8, 9]},
|
||||
"6,18": {7: [1, 2, 3, 4, 5, 6]},
|
||||
"7,19": {7: [7, 8, 9, 10, 11]},
|
||||
"8,20": {8: [1, 2, 3, 4, 5]},
|
||||
"9,21": {8: [6, 7, 8, 9]},
|
||||
"10,22": {9: [1, 2, 3, 4]},
|
||||
"11,23": {9: [8, 9, 10, 11]}
|
||||
}
|
||||
};
|
||||
// Das Layout bei der Uhr unter dem Code "de_CH" registrieren.
|
||||
$.fritteli.uhr.register('de_CH', layout);
|
||||
}(jQuery));
|
||||
(function($) {
|
||||
'use strict';
|
||||
var es_isch = {1: [1, 2, 4, 5, 6, 7]};
|
||||
var genau = {3: [7, 8, 9, 10, 11]};
|
||||
var ab = {4: [4, 5]};
|
||||
var vor = {4: [1, 2, 3]};
|
||||
var haubi = {4: [7, 8, 9, 10, 11]};
|
||||
var fuef = {1: [9, 10, 11]};
|
||||
var zae = {2: [9, 10, 11]};
|
||||
var viertu = {2: [1, 2, 3, 4, 5, 6]};
|
||||
var zwaenzg = {3: [1, 2, 3, 4, 5, 6]};
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'Bärndütsch (genau)',
|
||||
"letters": [
|
||||
'ESKISCHAFÜF',
|
||||
'VIERTUBFZÄÄ',
|
||||
'ZWÄNZGGENAU',
|
||||
'VORABOHAUBI',
|
||||
'EISZWÖISDRÜ',
|
||||
'VIERIFÜFIQT',
|
||||
'SÄCHSISIBNI',
|
||||
'ACHTINÜNIEL',
|
||||
'ZÄNIERBEUFI',
|
||||
'ZWÖUFINAUHR'
|
||||
],
|
||||
"permanent": es_isch,
|
||||
"minutes": {
|
||||
"0": genau,
|
||||
"5,6,7,8,9": [fuef, ab],
|
||||
"10,11,12,13,14": [zae, ab],
|
||||
"15,16,17,18,19": [viertu, ab],
|
||||
"20,21,22,23,24": [zwaenzg, ab],
|
||||
"25,26,27,28,29": [fuef, vor, haubi],
|
||||
"30,31,32,33,34": haubi,
|
||||
"35,36,37,38,39": [fuef, ab, haubi],
|
||||
"40,41,42,43,44": [zwaenzg, vor],
|
||||
"45,46,47,48,49": [viertu, vor],
|
||||
"50,51,52,53,54": [zae, vor],
|
||||
"55,56,57,58,59": [fuef, vor]
|
||||
},
|
||||
"hours": {
|
||||
"0,12": {10: [1, 2, 3, 4, 5, 6]},
|
||||
"1,13": {5: [1, 2, 3]},
|
||||
"2,14": {5: [4, 5, 6, 7]},
|
||||
"3,15": {5: [9, 10, 11]},
|
||||
"4,16": {6: [1, 2, 3, 4, 5]},
|
||||
"5,17": {6: [6, 7, 8, 9]},
|
||||
"6,18": {7: [1, 2, 3, 4, 5, 6]},
|
||||
"7,19": {7: [7, 8, 9, 10, 11]},
|
||||
"8,20": {8: [1, 2, 3, 4, 5]},
|
||||
"9,21": {8: [6, 7, 8, 9]},
|
||||
"10,22": {9: [1, 2, 3, 4]},
|
||||
"11,23": {9: [8, 9, 10, 11]}
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('de_CH_genau', layout);
|
||||
}(jQuery));
|
||||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
(function($) {
|
||||
'use strict';
|
||||
|
||||
var klokken_er = {1: [1, 2, 3, 4, 5, 6, 7, 9, 10]};
|
||||
var minutter = {4: [4, 5, 6, 7, 8, 9, 10, 11]};
|
||||
var i = {5: [8]};
|
||||
var over = {5: [4, 5, 6, 7]};
|
||||
var fem = {2: [1, 2, 3]};
|
||||
var ti = {4: [1, 2]};
|
||||
var kvart = {3: [4, 5, 6, 7, 8]};
|
||||
var tyve = {2: [4, 5, 6, 7]};
|
||||
var halv = {6: [8, 9, 10, 11]};
|
||||
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'Dansk',
|
||||
"letters": [
|
||||
'KLOKKENVERO',
|
||||
'FEMTYVESKLA',
|
||||
'OJEKVARTVAT',
|
||||
'TIAMINUTTER',
|
||||
'VEMOVERILMF',
|
||||
'MONALISHALV',
|
||||
'ETTOTREFIRE',
|
||||
'FEMSEKSRSYV',
|
||||
'OTTERNIMETI',
|
||||
'ELLEVEATOLV'
|
||||
],
|
||||
"permanent": klokken_er,
|
||||
"minutes": {
|
||||
"5,6,7,8,9": [fem, minutter, over],
|
||||
"10,11,12,13,14": [ti, minutter, over],
|
||||
"15,16,17,18,19": [kvart, over],
|
||||
"20,21,22,23,24": [tyve, minutter, over],
|
||||
"25,26,27,28,29": [fem, minutter, i, halv],
|
||||
"30,31,32,33,34": [halv],
|
||||
"35,36,37,38,39": [fem, minutter, over, halv],
|
||||
"40,41,42,43,44": [tyve, minutter, i],
|
||||
"45,46,47,48,49": [kvart, i],
|
||||
"50,51,52,53,54": [ti, minutter, i],
|
||||
"55,56,57,58,59": [fem, minutter, i]
|
||||
},
|
||||
"hours": {
|
||||
"0,12": {10: [8, 9, 10, 11]},
|
||||
"1,13": {7: [1, 2]},
|
||||
"2,14": {7: [3, 4]},
|
||||
"3,15": {7: [5, 6, 7]},
|
||||
"4,16": {7: [8, 9, 10, 11]},
|
||||
"5,17": {8: [1, 2, 3]},
|
||||
"6,18": {8: [4, 5, 6, 7]},
|
||||
"7,19": {8: [9, 10, 11]},
|
||||
"8,20": {9: [1, 2, 3, 4]},
|
||||
"9,21": {9: [6, 7]},
|
||||
"10,22": {9: [10, 11]},
|
||||
"11,23": {10: [1, 2, 3, 4, 5, 6]}
|
||||
},
|
||||
"getHour": function (date) {
|
||||
var hour = date.getHours();
|
||||
if (date.getMinutes() >= 25) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('dk', layout);
|
||||
}(jQuery));
|
||||
(function($) {
|
||||
'use strict';
|
||||
var it_is = {1: [1, 2, 4, 5]};
|
||||
var half = {4: [1, 2, 3, 4]};
|
||||
var to = {4: [10, 11]};
|
||||
var past = {5: [1, 2, 3, 4]};
|
||||
var o_clock = {10: [5, 6, 7, 8, 9, 10, 11]};
|
||||
var five = {3: [7, 8, 9, 10]};
|
||||
var ten = {4: [6, 7, 8]};
|
||||
var a_quarter = {2: [1, 3, 4, 5, 6, 7, 8, 9]};
|
||||
var twenty = {3: [1, 2, 3, 4, 5, 6]};
|
||||
var twentyfive = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]};
|
||||
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'English',
|
||||
"letters": [
|
||||
'ITLISBFAMPM',
|
||||
'ACQUARTERDC',
|
||||
'TWENTYFIVEX',
|
||||
'HALFBTENFTO',
|
||||
'PASTERUNINE',
|
||||
'ONESIXTHREE',
|
||||
'FOURFIVETWO',
|
||||
'EIGHTELEVEN',
|
||||
'SEVENTWELVE',
|
||||
'TENSO\'CLOCK'
|
||||
],
|
||||
"permanent": it_is,
|
||||
"minutes": {
|
||||
"0,1,2,3,4": o_clock,
|
||||
"5,6,7,8,9": [five, past],
|
||||
"10,11,12,13,14": [ten, past],
|
||||
"15,16,17,18,19": [a_quarter, past],
|
||||
"20,21,22,23,24": [twenty, past],
|
||||
"25,26,27,28,29": [twentyfive, past],
|
||||
"30,31,32,33,34": [half, past],
|
||||
"35,36,37,38,39": [twentyfive, to],
|
||||
"40,41,42,43,44": [twenty, to],
|
||||
"45,46,47,48,49": [a_quarter, to],
|
||||
"50,51,52,53,54": [ten, to],
|
||||
"55,56,57,58,59": [five, to]
|
||||
},
|
||||
"hours": {
|
||||
"0,12": {9: [6, 7, 8, 9, 10, 11]},
|
||||
"1,13": {6: [1, 2, 3]},
|
||||
"2,14": {7: [9, 10, 11]},
|
||||
"3,15": {6: [7, 8, 9, 10, 11]},
|
||||
"4,16": {7: [1, 2, 3, 4]},
|
||||
"5,17": {7: [5, 6, 7, 8]},
|
||||
"6,18": {6: [4, 5, 6]},
|
||||
"7,19": {9: [1, 2, 3, 4, 5]},
|
||||
"8,20": {8: [1, 2, 3, 4, 5]},
|
||||
"9,21": {5: [8, 9, 10, 11]},
|
||||
"10,22": {10: [1, 2, 3]},
|
||||
"11,23": {8: [6, 7, 8, 9, 10, 11]}
|
||||
},
|
||||
"getHour": function(date) {
|
||||
var hour = date.getHours();
|
||||
if (date.getMinutes() >= 35) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('en', layout);
|
||||
}(jQuery));
|
||||
(function($) {
|
||||
'use strict';
|
||||
var es_la = {1: [1, 2, 6, 7]};
|
||||
var son_las = {1: [2, 3, 4, 6, 7, 8]};
|
||||
var y = {7: [6]};
|
||||
var menos = {7: [7, 8, 9, 10, 11]};
|
||||
var media = {10: [1, 2, 3, 4, 5]};
|
||||
var cinco = {9: [7, 8, 9, 10, 11]};
|
||||
var diez = {8: [8, 9, 10, 11]};
|
||||
var cuarto = {10: [6, 7, 8, 9, 10, 11]};
|
||||
var veinte = {8: [2, 3, 4, 5, 6, 7]};
|
||||
var veinticinco = {9: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]};
|
||||
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'Español',
|
||||
"letters": [
|
||||
'ESONELASUNA',
|
||||
'DOSITRESORE',
|
||||
'CUATROCINCO',
|
||||
'SEISASIETEN',
|
||||
'OCHONUEVEYO',
|
||||
'LADIEZSONCE',
|
||||
'DOCELYMENOS',
|
||||
'OVEINTEDIEZ',
|
||||
'VEINTICINCO',
|
||||
'MEDIACUARTO'
|
||||
],
|
||||
"permanent": [],
|
||||
"minutes": {
|
||||
"5,6,7,8,9": [y, cinco],
|
||||
"10,11,12,13,14": [y, diez],
|
||||
"15,16,17,18,19": [y, cuarto],
|
||||
"20,21,22,23,24": [y, veinte],
|
||||
"25,26,27,28,29": [y, veinticinco],
|
||||
"30,31,32,33,34": [y, media],
|
||||
"35,36,37,38,39": [menos, veinticinco],
|
||||
"40,41,42,43,44": [menos, veinte],
|
||||
"45,46,47,48,49": [menos, cuarto],
|
||||
"50,51,52,53,54": [menos, diez],
|
||||
"55,56,57,58,59": [menos, cinco]
|
||||
},
|
||||
"hours": {
|
||||
"0,12": [son_las, {7: [1, 2, 3, 4]}],
|
||||
"1,13": [es_la, {1: [9, 10, 11]}],
|
||||
"2,14": [son_las, {2: [1, 2, 3]}],
|
||||
"3,15": [son_las, {2: [5, 6, 7, 8]}],
|
||||
"4,16": [son_las, {3: [1, 2, 3, 4, 5, 6]}],
|
||||
"5,17": [son_las, {3: [7, 8, 9, 10, 11]}],
|
||||
"6,18": [son_las, {4: [1, 2, 3, 4]}],
|
||||
"7,19": [son_las, {4: [6, 7, 8, 9, 10]}],
|
||||
"8,20": [son_las, {5: [1, 2, 3, 4]}],
|
||||
"9,21": [son_las, {5: [5, 6, 7, 8, 9]}],
|
||||
"10,22": [son_las, {6: [3, 4, 5, 6]}],
|
||||
"11,23": [son_las, {6: [8, 9, 10, 11]}]
|
||||
},
|
||||
"getHour": function(date) {
|
||||
var hour = date.getHours();
|
||||
if (date.getMinutes() >= 35) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('es', layout);
|
||||
}(jQuery));
|
||||
|
||||
(function($) {
|
||||
'use strict';
|
||||
var il_est = {1: [1, 2, 4, 5, 6]};
|
||||
var et = {8: [1, 2]};
|
||||
var moins = {7: [1, 2, 3, 4, 5]};
|
||||
var demie = {10: [4, 5, 6, 7, 8]};
|
||||
var heures = {6: [6, 7, 8, 9, 10, 11]};
|
||||
var le = {7: [7, 8]};
|
||||
var cinq = {9: [7, 8, 9, 10]};
|
||||
var dix = {7: [9, 10, 11]};
|
||||
var quart = {8: [4, 5, 6, 7, 8]};
|
||||
var vingt = {9: [1, 2, 3, 4, 5]};
|
||||
var vingtcinq = {9: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]};
|
||||
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'Français',
|
||||
"letters": [
|
||||
'ILNESTODEUX',
|
||||
'QUATRETROIS',
|
||||
'NEUFUNESEPT',
|
||||
'HUITSIXCINQ',
|
||||
'MIDIXMINUIT',
|
||||
'ONZERHEURES',
|
||||
'MOINSOLEDIX',
|
||||
'ETRQUARTPMD',
|
||||
'VINGT-CINQU',
|
||||
'ETSDEMIEPAM'
|
||||
],
|
||||
"permanent": il_est,
|
||||
"minutes": {
|
||||
"5,6,7,8,9": cinq,
|
||||
"10,11,12,13,14": dix,
|
||||
"15,16,17,18,19": [et, quart],
|
||||
"20,21,22,23,24": vingt,
|
||||
"25,26,27,28,29": vingtcinq,
|
||||
"30,31,32,33,34": [et, demie],
|
||||
"35,36,37,38,39": [moins, vingtcinq],
|
||||
"40,41,42,43,44": [moins, vingt],
|
||||
"45,46,47,48,49": [moins, le, quart],
|
||||
"50,51,52,53,54": [moins, dix],
|
||||
"55,56,57,58,59": [moins, cinq]
|
||||
},
|
||||
"hours": {
|
||||
"0": {5: [6, 7, 8, 9, 10, 11]},
|
||||
"1,13": [
|
||||
{3: [5, 6, 7]},
|
||||
heures
|
||||
],
|
||||
"2,14": [
|
||||
{1: [8, 9, 10, 11]},
|
||||
heures
|
||||
],
|
||||
"3,15": [
|
||||
{2: [7, 8, 9, 10, 11]},
|
||||
heures
|
||||
],
|
||||
"4,16": [
|
||||
{2: [1, 2, 3, 4, 5, 6]},
|
||||
heures
|
||||
],
|
||||
"5,17": [
|
||||
{4: [8, 9, 10, 11]},
|
||||
heures
|
||||
],
|
||||
"6,18": [
|
||||
{4: [5, 6, 7]},
|
||||
heures
|
||||
],
|
||||
"7,19": [
|
||||
{3: [8, 9, 10, 11]},
|
||||
heures
|
||||
],
|
||||
"8,20": [
|
||||
{4: [1, 2, 3, 4]},
|
||||
heures
|
||||
],
|
||||
"9,21": [
|
||||
{3: [1, 2, 3, 4]},
|
||||
heures
|
||||
],
|
||||
"10,22": [
|
||||
{5: [3, 4, 5]},
|
||||
heures
|
||||
],
|
||||
"11,23": [
|
||||
{6: [1, 2, 3, 4]},
|
||||
heures
|
||||
],
|
||||
"12": {5: [1, 2, 3, 4]}
|
||||
},
|
||||
"getHour": function(date) {
|
||||
var hour = date.getHours();
|
||||
if (date.getMinutes() >= 35) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('fr', layout);
|
||||
}(jQuery));
|
||||
(function($) {
|
||||
'use strict';
|
||||
var sono_le = {1: [1, 2, 3, 4, 6, 7]};
|
||||
var e_l = {2: [1, 3, 4]};
|
||||
var e = {8: [1]};
|
||||
var meno = {7: [8, 9, 10, 11]};
|
||||
var mezza = {10: [7, 8, 9, 10, 11]};
|
||||
var cinque = {9: [6, 7, 8, 9, 10, 11]};
|
||||
var dieci = {10: [1, 2, 3, 4, 5]};
|
||||
var un_quarto = {8: [3, 4, 6, 7, 8, 9, 10, 11]};
|
||||
var venti = {9: [1, 2, 3, 4, 5]};
|
||||
var venticinque = {9: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]};
|
||||
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'Italiano',
|
||||
"letters": [
|
||||
'SONORLEBORE',
|
||||
'ÈRL\'UNASDUE',
|
||||
'TREOTTONOVE',
|
||||
'DIECIUNDICI',
|
||||
'DODICISETTE',
|
||||
'QUATTROCSEI',
|
||||
'CINQUEAMENO',
|
||||
'ECUNOQUARTO',
|
||||
'VENTICINQUE',
|
||||
'DIECIPMEZZA'
|
||||
],
|
||||
"permanent": [],
|
||||
"minutes": {
|
||||
"5,6,7,8,9": [e, cinque],
|
||||
"10,11,12,13,14": [e, dieci],
|
||||
"15,16,17,18,19": [e, un_quarto],
|
||||
"20,21,22,23,24": [e, venti],
|
||||
"25,26,27,28,29": [e, venticinque],
|
||||
"30,31,32,33,34": [e, mezza],
|
||||
"35,36,37,38,39": [meno, venticinque],
|
||||
"40,41,42,43,44": [meno, venti],
|
||||
"45,46,47,48,49": [meno, un_quarto],
|
||||
"50,51,52,53,54": [meno, dieci],
|
||||
"55,56,57,58,59": [meno, cinque]
|
||||
},
|
||||
"hours": {
|
||||
"0,12": [sono_le, {5: [1, 2, 3, 4, 5, 6]}],
|
||||
"1,13": [e_l, {2: [5, 6, 7]}],
|
||||
"2,14": [sono_le, {2: [9, 10, 11]}],
|
||||
"3,15": [sono_le, {3: [1, 2, 3]}],
|
||||
"4,16": [sono_le, {6: [1, 2, 3, 4, 5, 6, 7]}],
|
||||
"5,17": [sono_le, {7: [1, 2, 3, 4, 5, 6]}],
|
||||
"6,18": [sono_le, {6: [9, 10, 11]}],
|
||||
"7,19": [sono_le, {5: [7, 8, 9, 10, 11]}],
|
||||
"8,20": [sono_le, {3: [4, 5, 6, 7]}],
|
||||
"9,21": [sono_le, {3: [8, 9, 10, 11]}],
|
||||
"10,22": [sono_le, {4: [1, 2, 3, 4, 5]}],
|
||||
"11,23": [sono_le, {4: [6, 7, 8, 9, 10, 11]}]
|
||||
},
|
||||
"getHour": function(date) {
|
||||
var hour = date.getHours();
|
||||
if (date.getMinutes() >= 35) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('it', layout);
|
||||
}(jQuery));
|
||||
(function($) {
|
||||
'use strict';
|
||||
var het_is = {1: [1, 2, 3, 5, 6]};
|
||||
var over1 = {3: [1, 2, 3, 4]};
|
||||
var voor1 = {2: [8, 9, 10, 11]};
|
||||
var over2 = {4: [8, 9, 10, 11]};
|
||||
var voor2 = {5: [1, 2, 3, 4]};
|
||||
var half = {4: [1, 2, 3, 4]};
|
||||
var vijf = {1: [8, 9, 10, 11]};
|
||||
var tien = {2: [1, 2, 3, 4]};
|
||||
var kwart = {3: [7, 8, 9, 10, 11]};
|
||||
var uur = {10: [9, 10, 11]};
|
||||
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'Nederlands',
|
||||
"letters": [
|
||||
'HETKISAVIJF',
|
||||
'TIENBTZVOOR',
|
||||
'OVERMEKWART',
|
||||
'HALFSPWOVER',
|
||||
'VOORTHGEENS',
|
||||
'TWEEPVCDRIE',
|
||||
'VIERVIJFZES',
|
||||
'ZEVENONEGEN',
|
||||
'ACHTTIENELF',
|
||||
'TWAALFBFUUR'
|
||||
],
|
||||
"permanent": het_is,
|
||||
"minutes": {
|
||||
"0,1,2,3,4": uur,
|
||||
"5,6,7,8,9": [vijf, over1],
|
||||
"10,11,12,13,14": [tien, over1],
|
||||
"15,16,17,18,19": [kwart, over2],
|
||||
"20,21,22,23,24": [tien, voor1, half],
|
||||
"25,26,27,28,29": [vijf, voor1, half],
|
||||
"30,31,32,33,34": half,
|
||||
"35,36,37,38,39": [vijf, over1, half],
|
||||
"40,41,42,43,44": [tien, over1, half],
|
||||
"45,46,47,48,49": [kwart, voor2],
|
||||
"50,51,52,53,54": [tien, voor1],
|
||||
"55,56,57,58,59": [vijf, voor1]
|
||||
},
|
||||
"hours": {
|
||||
"0,12": {10: [1, 2, 3, 4, 5, 6]},
|
||||
"1,13": {5: [8, 9, 10]},
|
||||
"2,14": {6: [1, 2, 3, 4]},
|
||||
"3,15": {6: [8, 9, 10, 11]},
|
||||
"4,16": {7: [1, 2, 3, 4]},
|
||||
"5,17": {7: [5, 6, 7, 8]},
|
||||
"6,18": {7: [9, 10, 11]},
|
||||
"7,19": {8: [1, 2, 3, 4, 5]},
|
||||
"8,20": {9: [1, 2, 3, 4]},
|
||||
"9,21": {8: [7, 8, 9, 10, 11]},
|
||||
"10,22": {9: [5, 6, 7, 8]},
|
||||
"11,23": {9: [9, 10, 11]}
|
||||
},
|
||||
"getHour": function(date) {
|
||||
var hour = date.getHours();
|
||||
if (date.getMinutes() >= 20) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('nl', layout);
|
||||
}(jQuery));
|
||||
(function ($) {
|
||||
'use strict';
|
||||
var e_ = {1: [1]};
|
||||
var sao = {1: [2, 3, 4]};
|
||||
var e1 = {7: [8]};
|
||||
var e2 = {10: [5]};
|
||||
var menos = {7: [7, 8, 9, 10, 11]};
|
||||
var meia = {8: [8, 9, 10, 11]};
|
||||
var cinco = {10: [7, 8, 9, 10, 11]};
|
||||
var dez = {10: [1, 2, 3]};
|
||||
var um_quarto = {9: [1, 2, 4, 5, 6, 7, 8, 9]};
|
||||
var vinte = {8: [1, 2, 3, 4, 5]};
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'Português',
|
||||
"letters": [
|
||||
'ÉSÃOUMATRÊS',
|
||||
'MEIOLDIADEZ',
|
||||
'DUASEISETEY',
|
||||
'QUATROHNOVE',
|
||||
'CINCOITONZE',
|
||||
'ZMEIALNOITE',
|
||||
'HORASYMENOS',
|
||||
'VINTECAMEIA',
|
||||
'UMVQUARTOPM',
|
||||
'DEZOEYCINCO'
|
||||
],
|
||||
"minutes": {
|
||||
"5,6,7,8,9": [e1, cinco],
|
||||
"10,11,12,13,14": [e1, dez],
|
||||
"15,16,17,18,19": [e1, um_quarto],
|
||||
"20,21,22,23,24": [e1, vinte],
|
||||
"25,26,27,28,29": [e1, vinte, e2, cinco],
|
||||
"30,31,32,33,34": [e1, meia],
|
||||
"35,36,37,38,39": [menos, vinte, e2, cinco],
|
||||
"40,41,42,43,44": [menos, vinte],
|
||||
"45,46,47,48,49": [menos, um_quarto],
|
||||
"50,51,52,53,54": [menos, dez],
|
||||
"55,56,57,58,59": [menos, cinco]
|
||||
},
|
||||
"hours": {
|
||||
"0": [e_, {"6": [2, 3, 4, 5, 7, 8, 9, 10, 11]}],
|
||||
"12": [e_, {"2": [1, 2, 3, 4, 6, 7, 8]}],
|
||||
"1,13": [e_, {"1": [5, 6, 7]}],
|
||||
"2,14": [sao, {"3": [1, 2, 3, 4]}],
|
||||
"3,15": [sao, {"1": [8, 9, 10, 11]}],
|
||||
"4,16": [sao, {"4": [1, 2, 3, 4, 5, 6]}],
|
||||
"5,17": [sao, {"5": [1, 2, 3, 4, 5]}],
|
||||
"6,18": [sao, {"3": [4, 5, 6, 7]}],
|
||||
"7,19": [sao, {"3": [7, 8, 9, 10]}],
|
||||
"8,20": [sao, {"5": [5, 6, 7, 8]}],
|
||||
"9,21": [sao, {"4": [8, 9, 10, 11]}],
|
||||
"10,22": [sao, {"2": [9, 10, 11]}],
|
||||
"11,23": [sao, {"5": [8, 9, 10, 11]}]
|
||||
},
|
||||
"getHour": function (date) {
|
||||
var hour = date.getHours();
|
||||
if (date.getMinutes() >= 35) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('pt', layout);
|
||||
}(jQuery));
|
5
dist/jquery.uhr.baselangs.min.js
vendored
5
dist/jquery.uhr.baselangs.min.js
vendored
File diff suppressed because one or more lines are too long
1520
dist/jquery.uhr.complete.js
vendored
1520
dist/jquery.uhr.complete.js
vendored
File diff suppressed because it is too large
Load diff
5
dist/jquery.uhr.complete.min.js
vendored
5
dist/jquery.uhr.complete.min.js
vendored
File diff suppressed because one or more lines are too long
717
dist/jquery.uhr.langs.js
vendored
717
dist/jquery.uhr.langs.js
vendored
|
@ -1,717 +0,0 @@
|
|||
/*! uhr - v9.0.0-dev.0 - 2019-05-03
|
||||
* http://bärneruhr.ch/
|
||||
* Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */
|
||||
(function($) {
|
||||
'use strict';
|
||||
var es_ist = {1: [1, 2, 4, 5, 6]};
|
||||
var uhr = {10: [9, 10, 11]};
|
||||
var nach = {4: [8, 9, 10, 11]};
|
||||
var vor = {4: [1, 2, 3]};
|
||||
var halb = {5: [1, 2, 3, 4]};
|
||||
var fuenf = {1: [8, 9, 10, 11]};
|
||||
var zehn = {2: [1, 2, 3, 4]};
|
||||
var viertel = {3: [5, 6, 7, 8, 9, 10, 11]};
|
||||
var zwanzig = {2: [5, 6, 7, 8, 9, 10, 11]};
|
||||
var dreiviertel = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]};
|
||||
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'Deutsch',
|
||||
"letters": [
|
||||
'ESKISTAFÜNF',
|
||||
'ZEHNZWANZIG',
|
||||
'DREIVIERTEL',
|
||||
'VORFUNKNACH',
|
||||
'HALBAELFÜNF',
|
||||
'EINSXAMZWEI',
|
||||
'DREIPMJVIER',
|
||||
'SECHSNLACHT',
|
||||
'SIEBENZWÖLF',
|
||||
'ZEHNEUNKUHR'
|
||||
],
|
||||
"permanent": es_ist,
|
||||
"minutes": {
|
||||
"0,1,2,3,4": uhr,
|
||||
"5,6,7,8,9": [fuenf, nach],
|
||||
"10,11,12,13,14": [zehn, nach],
|
||||
"15,16,17,18,19": [viertel, nach],
|
||||
"20,21,22,23,24": [zwanzig, nach],
|
||||
"25,26,27,28,29": [fuenf, vor, halb],
|
||||
"30,31,32,33,34": halb,
|
||||
"35,36,37,38,39": [fuenf, nach, halb],
|
||||
"40,41,42,43,44": [zwanzig, vor],
|
||||
"45,46,47,48,49": dreiviertel,
|
||||
"50,51,52,53,54": [zehn, vor],
|
||||
"55,56,57,58,59": [fuenf, vor]
|
||||
},
|
||||
"hours": {
|
||||
"0,12": {9: [7, 8, 9, 10, 11]},
|
||||
"1,13": {6: [1, 2, 3, 4]},
|
||||
"2,14": {6: [8, 9, 10, 11]},
|
||||
"3,15": {7: [1, 2, 3, 4]},
|
||||
"4,16": {7: [8, 9, 10, 11]},
|
||||
"5,17": {5: [8, 9, 10, 11]},
|
||||
"6,18": {8: [1, 2, 3, 4, 5]},
|
||||
"7,19": {9: [1, 2, 3, 4, 5, 6]},
|
||||
"8,20": {8: [8, 9, 10, 11]},
|
||||
"9,21": {10: [4, 5, 6, 7]},
|
||||
"10,22": {10: [1, 2, 3, 4]},
|
||||
"11,23": {5: [6, 7, 8]}
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('de', layout);
|
||||
}(jQuery));
|
||||
(function($) {
|
||||
'use strict';
|
||||
// hilfsvariablen
|
||||
var es_isch = {1: [1, 2, 4, 5, 6, 7]};
|
||||
var ab = {4: [1, 2]};
|
||||
var vor = {3: [9, 10, 11]};
|
||||
var haubi = {4: [4, 5, 6, 7, 8]};
|
||||
var fuef = {1: [9, 10, 11]};
|
||||
var zae = {2: [9, 10, 11]};
|
||||
var viertu = {2: [1, 2, 3, 4, 5, 6]};
|
||||
var zwaenzg = {3: [1, 2, 3, 4, 5, 6]};
|
||||
var layout = {
|
||||
// version: zur Zeit immer 2 (Pflichtattribut)
|
||||
"version": 2,
|
||||
// Sprechender Name der Sprache
|
||||
"language": 'Bärndütsch',
|
||||
// Buchstabenfeld als Array von Strings.
|
||||
"letters": [
|
||||
'ESKISCHAFÜF',
|
||||
'VIERTUBFZÄÄ',
|
||||
'ZWÄNZGSIVOR',
|
||||
'ABOHAUBIEGE',
|
||||
'EISZWÖISDRÜ',
|
||||
'VIERIFÜFIQT',
|
||||
'SÄCHSISIBNI',
|
||||
'ACHTINÜNIEL',
|
||||
'ZÄNIERBEUFI',
|
||||
'ZWÖUFINAUHR'
|
||||
],
|
||||
// Permanent aktive Buchstaben. <array-or-object>, vgl. ausführliche Beschreibung bei "minutes".
|
||||
"permanent": es_isch,
|
||||
/*
|
||||
* Minuten: Objekt im folgenden Format:
|
||||
* {
|
||||
* <minuten>: <array-or-object>,
|
||||
* ...
|
||||
* }
|
||||
* <minuten>: String von Komma-separierten Minutenwerten, zu welchem die in <array-or-object> angegebenen Buchstaben aktiv sein sollen
|
||||
* <array-or-object> : [ <object>, ...] | <object>
|
||||
* <object>: { <zeile> : [ <spalte>, ... ] }
|
||||
* <zeile>: Die Zeile, in welcher die Buchstaben liegen; von oben gezählt, oben ist 1.
|
||||
* <spalte>: Die Spalte, in der ein einzelner Buchstabe liegt; von links gezählt, links ist 1.
|
||||
* Beispiel:
|
||||
* "minutes": {
|
||||
* "0,1": {1: [6, 7, 9]},
|
||||
* "5": [ {3: [1, 2]}, {4: [10, 11]} ]
|
||||
* }
|
||||
* Erklärung:
|
||||
* Bei Minuten 0 und 1 sind die Buchstaben 6, 7 und 9 der ersten Zeile aktiv.
|
||||
* Bei Minute 5 sind die Buchstaben 1 und 2 der Zeile 3 sowie die Buchstaben 10 und 11 der Zeile 4 aktiv.
|
||||
*/
|
||||
"minutes": {
|
||||
"5,6,7,8,9": [fuef, ab],
|
||||
"10,11,12,13,14": [zae, ab],
|
||||
"15,16,17,18,19": [viertu, ab],
|
||||
"20,21,22,23,24": [zwaenzg, ab],
|
||||
"25,26,27,28,29": [fuef, vor, haubi],
|
||||
"30,31,32,33,34": haubi,
|
||||
"35,36,37,38,39": [fuef, ab, haubi],
|
||||
"40,41,42,43,44": [zwaenzg, vor],
|
||||
"45,46,47,48,49": [viertu, vor],
|
||||
"50,51,52,53,54": [zae, vor],
|
||||
"55,56,57,58,59": [fuef, vor]
|
||||
},
|
||||
// Die Stunden; gleiches Format wie bei den Minuten
|
||||
"hours": {
|
||||
"0,12": {10: [1, 2, 3, 4, 5, 6]},
|
||||
"1,13": {5: [1, 2, 3]},
|
||||
"2,14": {5: [4, 5, 6, 7]},
|
||||
"3,15": {5: [9, 10, 11]},
|
||||
"4,16": {6: [1, 2, 3, 4, 5]},
|
||||
"5,17": {6: [6, 7, 8, 9]},
|
||||
"6,18": {7: [1, 2, 3, 4, 5, 6]},
|
||||
"7,19": {7: [7, 8, 9, 10, 11]},
|
||||
"8,20": {8: [1, 2, 3, 4, 5]},
|
||||
"9,21": {8: [6, 7, 8, 9]},
|
||||
"10,22": {9: [1, 2, 3, 4]},
|
||||
"11,23": {9: [8, 9, 10, 11]}
|
||||
}
|
||||
};
|
||||
// Das Layout bei der Uhr unter dem Code "de_CH" registrieren.
|
||||
$.fritteli.uhr.register('de_CH', layout);
|
||||
}(jQuery));
|
||||
(function($) {
|
||||
'use strict';
|
||||
var es_isch = {1: [1, 2, 4, 5, 6, 7]};
|
||||
var genau = {3: [7, 8, 9, 10, 11]};
|
||||
var ab = {4: [4, 5]};
|
||||
var vor = {4: [1, 2, 3]};
|
||||
var haubi = {4: [7, 8, 9, 10, 11]};
|
||||
var fuef = {1: [9, 10, 11]};
|
||||
var zae = {2: [9, 10, 11]};
|
||||
var viertu = {2: [1, 2, 3, 4, 5, 6]};
|
||||
var zwaenzg = {3: [1, 2, 3, 4, 5, 6]};
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'Bärndütsch (genau)',
|
||||
"letters": [
|
||||
'ESKISCHAFÜF',
|
||||
'VIERTUBFZÄÄ',
|
||||
'ZWÄNZGGENAU',
|
||||
'VORABOHAUBI',
|
||||
'EISZWÖISDRÜ',
|
||||
'VIERIFÜFIQT',
|
||||
'SÄCHSISIBNI',
|
||||
'ACHTINÜNIEL',
|
||||
'ZÄNIERBEUFI',
|
||||
'ZWÖUFINAUHR'
|
||||
],
|
||||
"permanent": es_isch,
|
||||
"minutes": {
|
||||
"0": genau,
|
||||
"5,6,7,8,9": [fuef, ab],
|
||||
"10,11,12,13,14": [zae, ab],
|
||||
"15,16,17,18,19": [viertu, ab],
|
||||
"20,21,22,23,24": [zwaenzg, ab],
|
||||
"25,26,27,28,29": [fuef, vor, haubi],
|
||||
"30,31,32,33,34": haubi,
|
||||
"35,36,37,38,39": [fuef, ab, haubi],
|
||||
"40,41,42,43,44": [zwaenzg, vor],
|
||||
"45,46,47,48,49": [viertu, vor],
|
||||
"50,51,52,53,54": [zae, vor],
|
||||
"55,56,57,58,59": [fuef, vor]
|
||||
},
|
||||
"hours": {
|
||||
"0,12": {10: [1, 2, 3, 4, 5, 6]},
|
||||
"1,13": {5: [1, 2, 3]},
|
||||
"2,14": {5: [4, 5, 6, 7]},
|
||||
"3,15": {5: [9, 10, 11]},
|
||||
"4,16": {6: [1, 2, 3, 4, 5]},
|
||||
"5,17": {6: [6, 7, 8, 9]},
|
||||
"6,18": {7: [1, 2, 3, 4, 5, 6]},
|
||||
"7,19": {7: [7, 8, 9, 10, 11]},
|
||||
"8,20": {8: [1, 2, 3, 4, 5]},
|
||||
"9,21": {8: [6, 7, 8, 9]},
|
||||
"10,22": {9: [1, 2, 3, 4]},
|
||||
"11,23": {9: [8, 9, 10, 11]}
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('de_CH_genau', layout);
|
||||
}(jQuery));
|
||||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
(function($) {
|
||||
'use strict';
|
||||
|
||||
var klokken_er = {1: [1, 2, 3, 4, 5, 6, 7, 9, 10]};
|
||||
var minutter = {4: [4, 5, 6, 7, 8, 9, 10, 11]};
|
||||
var i = {5: [8]};
|
||||
var over = {5: [4, 5, 6, 7]};
|
||||
var fem = {2: [1, 2, 3]};
|
||||
var ti = {4: [1, 2]};
|
||||
var kvart = {3: [4, 5, 6, 7, 8]};
|
||||
var tyve = {2: [4, 5, 6, 7]};
|
||||
var halv = {6: [8, 9, 10, 11]};
|
||||
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'Dansk',
|
||||
"letters": [
|
||||
'KLOKKENVERO',
|
||||
'FEMTYVESKLA',
|
||||
'OJEKVARTVAT',
|
||||
'TIAMINUTTER',
|
||||
'VEMOVERILMF',
|
||||
'MONALISHALV',
|
||||
'ETTOTREFIRE',
|
||||
'FEMSEKSRSYV',
|
||||
'OTTERNIMETI',
|
||||
'ELLEVEATOLV'
|
||||
],
|
||||
"permanent": klokken_er,
|
||||
"minutes": {
|
||||
"5,6,7,8,9": [fem, minutter, over],
|
||||
"10,11,12,13,14": [ti, minutter, over],
|
||||
"15,16,17,18,19": [kvart, over],
|
||||
"20,21,22,23,24": [tyve, minutter, over],
|
||||
"25,26,27,28,29": [fem, minutter, i, halv],
|
||||
"30,31,32,33,34": [halv],
|
||||
"35,36,37,38,39": [fem, minutter, over, halv],
|
||||
"40,41,42,43,44": [tyve, minutter, i],
|
||||
"45,46,47,48,49": [kvart, i],
|
||||
"50,51,52,53,54": [ti, minutter, i],
|
||||
"55,56,57,58,59": [fem, minutter, i]
|
||||
},
|
||||
"hours": {
|
||||
"0,12": {10: [8, 9, 10, 11]},
|
||||
"1,13": {7: [1, 2]},
|
||||
"2,14": {7: [3, 4]},
|
||||
"3,15": {7: [5, 6, 7]},
|
||||
"4,16": {7: [8, 9, 10, 11]},
|
||||
"5,17": {8: [1, 2, 3]},
|
||||
"6,18": {8: [4, 5, 6, 7]},
|
||||
"7,19": {8: [9, 10, 11]},
|
||||
"8,20": {9: [1, 2, 3, 4]},
|
||||
"9,21": {9: [6, 7]},
|
||||
"10,22": {9: [10, 11]},
|
||||
"11,23": {10: [1, 2, 3, 4, 5, 6]}
|
||||
},
|
||||
"getHour": function (date) {
|
||||
var hour = date.getHours();
|
||||
if (date.getMinutes() >= 25) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('dk', layout);
|
||||
}(jQuery));
|
||||
(function($) {
|
||||
'use strict';
|
||||
var it_is = {1: [1, 2, 4, 5]};
|
||||
var half = {4: [1, 2, 3, 4]};
|
||||
var to = {4: [10, 11]};
|
||||
var past = {5: [1, 2, 3, 4]};
|
||||
var o_clock = {10: [5, 6, 7, 8, 9, 10, 11]};
|
||||
var five = {3: [7, 8, 9, 10]};
|
||||
var ten = {4: [6, 7, 8]};
|
||||
var a_quarter = {2: [1, 3, 4, 5, 6, 7, 8, 9]};
|
||||
var twenty = {3: [1, 2, 3, 4, 5, 6]};
|
||||
var twentyfive = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]};
|
||||
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'English',
|
||||
"letters": [
|
||||
'ITLISBFAMPM',
|
||||
'ACQUARTERDC',
|
||||
'TWENTYFIVEX',
|
||||
'HALFBTENFTO',
|
||||
'PASTERUNINE',
|
||||
'ONESIXTHREE',
|
||||
'FOURFIVETWO',
|
||||
'EIGHTELEVEN',
|
||||
'SEVENTWELVE',
|
||||
'TENSO\'CLOCK'
|
||||
],
|
||||
"permanent": it_is,
|
||||
"minutes": {
|
||||
"0,1,2,3,4": o_clock,
|
||||
"5,6,7,8,9": [five, past],
|
||||
"10,11,12,13,14": [ten, past],
|
||||
"15,16,17,18,19": [a_quarter, past],
|
||||
"20,21,22,23,24": [twenty, past],
|
||||
"25,26,27,28,29": [twentyfive, past],
|
||||
"30,31,32,33,34": [half, past],
|
||||
"35,36,37,38,39": [twentyfive, to],
|
||||
"40,41,42,43,44": [twenty, to],
|
||||
"45,46,47,48,49": [a_quarter, to],
|
||||
"50,51,52,53,54": [ten, to],
|
||||
"55,56,57,58,59": [five, to]
|
||||
},
|
||||
"hours": {
|
||||
"0,12": {9: [6, 7, 8, 9, 10, 11]},
|
||||
"1,13": {6: [1, 2, 3]},
|
||||
"2,14": {7: [9, 10, 11]},
|
||||
"3,15": {6: [7, 8, 9, 10, 11]},
|
||||
"4,16": {7: [1, 2, 3, 4]},
|
||||
"5,17": {7: [5, 6, 7, 8]},
|
||||
"6,18": {6: [4, 5, 6]},
|
||||
"7,19": {9: [1, 2, 3, 4, 5]},
|
||||
"8,20": {8: [1, 2, 3, 4, 5]},
|
||||
"9,21": {5: [8, 9, 10, 11]},
|
||||
"10,22": {10: [1, 2, 3]},
|
||||
"11,23": {8: [6, 7, 8, 9, 10, 11]}
|
||||
},
|
||||
"getHour": function(date) {
|
||||
var hour = date.getHours();
|
||||
if (date.getMinutes() >= 35) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('en', layout);
|
||||
}(jQuery));
|
||||
(function($) {
|
||||
'use strict';
|
||||
var es_la = {1: [1, 2, 6, 7]};
|
||||
var son_las = {1: [2, 3, 4, 6, 7, 8]};
|
||||
var y = {7: [6]};
|
||||
var menos = {7: [7, 8, 9, 10, 11]};
|
||||
var media = {10: [1, 2, 3, 4, 5]};
|
||||
var cinco = {9: [7, 8, 9, 10, 11]};
|
||||
var diez = {8: [8, 9, 10, 11]};
|
||||
var cuarto = {10: [6, 7, 8, 9, 10, 11]};
|
||||
var veinte = {8: [2, 3, 4, 5, 6, 7]};
|
||||
var veinticinco = {9: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]};
|
||||
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'Español',
|
||||
"letters": [
|
||||
'ESONELASUNA',
|
||||
'DOSITRESORE',
|
||||
'CUATROCINCO',
|
||||
'SEISASIETEN',
|
||||
'OCHONUEVEYO',
|
||||
'LADIEZSONCE',
|
||||
'DOCELYMENOS',
|
||||
'OVEINTEDIEZ',
|
||||
'VEINTICINCO',
|
||||
'MEDIACUARTO'
|
||||
],
|
||||
"permanent": [],
|
||||
"minutes": {
|
||||
"5,6,7,8,9": [y, cinco],
|
||||
"10,11,12,13,14": [y, diez],
|
||||
"15,16,17,18,19": [y, cuarto],
|
||||
"20,21,22,23,24": [y, veinte],
|
||||
"25,26,27,28,29": [y, veinticinco],
|
||||
"30,31,32,33,34": [y, media],
|
||||
"35,36,37,38,39": [menos, veinticinco],
|
||||
"40,41,42,43,44": [menos, veinte],
|
||||
"45,46,47,48,49": [menos, cuarto],
|
||||
"50,51,52,53,54": [menos, diez],
|
||||
"55,56,57,58,59": [menos, cinco]
|
||||
},
|
||||
"hours": {
|
||||
"0,12": [son_las, {7: [1, 2, 3, 4]}],
|
||||
"1,13": [es_la, {1: [9, 10, 11]}],
|
||||
"2,14": [son_las, {2: [1, 2, 3]}],
|
||||
"3,15": [son_las, {2: [5, 6, 7, 8]}],
|
||||
"4,16": [son_las, {3: [1, 2, 3, 4, 5, 6]}],
|
||||
"5,17": [son_las, {3: [7, 8, 9, 10, 11]}],
|
||||
"6,18": [son_las, {4: [1, 2, 3, 4]}],
|
||||
"7,19": [son_las, {4: [6, 7, 8, 9, 10]}],
|
||||
"8,20": [son_las, {5: [1, 2, 3, 4]}],
|
||||
"9,21": [son_las, {5: [5, 6, 7, 8, 9]}],
|
||||
"10,22": [son_las, {6: [3, 4, 5, 6]}],
|
||||
"11,23": [son_las, {6: [8, 9, 10, 11]}]
|
||||
},
|
||||
"getHour": function(date) {
|
||||
var hour = date.getHours();
|
||||
if (date.getMinutes() >= 35) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('es', layout);
|
||||
}(jQuery));
|
||||
|
||||
(function($) {
|
||||
'use strict';
|
||||
var il_est = {1: [1, 2, 4, 5, 6]};
|
||||
var et = {8: [1, 2]};
|
||||
var moins = {7: [1, 2, 3, 4, 5]};
|
||||
var demie = {10: [4, 5, 6, 7, 8]};
|
||||
var heures = {6: [6, 7, 8, 9, 10, 11]};
|
||||
var le = {7: [7, 8]};
|
||||
var cinq = {9: [7, 8, 9, 10]};
|
||||
var dix = {7: [9, 10, 11]};
|
||||
var quart = {8: [4, 5, 6, 7, 8]};
|
||||
var vingt = {9: [1, 2, 3, 4, 5]};
|
||||
var vingtcinq = {9: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]};
|
||||
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'Français',
|
||||
"letters": [
|
||||
'ILNESTODEUX',
|
||||
'QUATRETROIS',
|
||||
'NEUFUNESEPT',
|
||||
'HUITSIXCINQ',
|
||||
'MIDIXMINUIT',
|
||||
'ONZERHEURES',
|
||||
'MOINSOLEDIX',
|
||||
'ETRQUARTPMD',
|
||||
'VINGT-CINQU',
|
||||
'ETSDEMIEPAM'
|
||||
],
|
||||
"permanent": il_est,
|
||||
"minutes": {
|
||||
"5,6,7,8,9": cinq,
|
||||
"10,11,12,13,14": dix,
|
||||
"15,16,17,18,19": [et, quart],
|
||||
"20,21,22,23,24": vingt,
|
||||
"25,26,27,28,29": vingtcinq,
|
||||
"30,31,32,33,34": [et, demie],
|
||||
"35,36,37,38,39": [moins, vingtcinq],
|
||||
"40,41,42,43,44": [moins, vingt],
|
||||
"45,46,47,48,49": [moins, le, quart],
|
||||
"50,51,52,53,54": [moins, dix],
|
||||
"55,56,57,58,59": [moins, cinq]
|
||||
},
|
||||
"hours": {
|
||||
"0": {5: [6, 7, 8, 9, 10, 11]},
|
||||
"1,13": [
|
||||
{3: [5, 6, 7]},
|
||||
heures
|
||||
],
|
||||
"2,14": [
|
||||
{1: [8, 9, 10, 11]},
|
||||
heures
|
||||
],
|
||||
"3,15": [
|
||||
{2: [7, 8, 9, 10, 11]},
|
||||
heures
|
||||
],
|
||||
"4,16": [
|
||||
{2: [1, 2, 3, 4, 5, 6]},
|
||||
heures
|
||||
],
|
||||
"5,17": [
|
||||
{4: [8, 9, 10, 11]},
|
||||
heures
|
||||
],
|
||||
"6,18": [
|
||||
{4: [5, 6, 7]},
|
||||
heures
|
||||
],
|
||||
"7,19": [
|
||||
{3: [8, 9, 10, 11]},
|
||||
heures
|
||||
],
|
||||
"8,20": [
|
||||
{4: [1, 2, 3, 4]},
|
||||
heures
|
||||
],
|
||||
"9,21": [
|
||||
{3: [1, 2, 3, 4]},
|
||||
heures
|
||||
],
|
||||
"10,22": [
|
||||
{5: [3, 4, 5]},
|
||||
heures
|
||||
],
|
||||
"11,23": [
|
||||
{6: [1, 2, 3, 4]},
|
||||
heures
|
||||
],
|
||||
"12": {5: [1, 2, 3, 4]}
|
||||
},
|
||||
"getHour": function(date) {
|
||||
var hour = date.getHours();
|
||||
if (date.getMinutes() >= 35) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('fr', layout);
|
||||
}(jQuery));
|
||||
(function($) {
|
||||
'use strict';
|
||||
var sono_le = {1: [1, 2, 3, 4, 6, 7]};
|
||||
var e_l = {2: [1, 3, 4]};
|
||||
var e = {8: [1]};
|
||||
var meno = {7: [8, 9, 10, 11]};
|
||||
var mezza = {10: [7, 8, 9, 10, 11]};
|
||||
var cinque = {9: [6, 7, 8, 9, 10, 11]};
|
||||
var dieci = {10: [1, 2, 3, 4, 5]};
|
||||
var un_quarto = {8: [3, 4, 6, 7, 8, 9, 10, 11]};
|
||||
var venti = {9: [1, 2, 3, 4, 5]};
|
||||
var venticinque = {9: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]};
|
||||
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'Italiano',
|
||||
"letters": [
|
||||
'SONORLEBORE',
|
||||
'ÈRL\'UNASDUE',
|
||||
'TREOTTONOVE',
|
||||
'DIECIUNDICI',
|
||||
'DODICISETTE',
|
||||
'QUATTROCSEI',
|
||||
'CINQUEAMENO',
|
||||
'ECUNOQUARTO',
|
||||
'VENTICINQUE',
|
||||
'DIECIPMEZZA'
|
||||
],
|
||||
"permanent": [],
|
||||
"minutes": {
|
||||
"5,6,7,8,9": [e, cinque],
|
||||
"10,11,12,13,14": [e, dieci],
|
||||
"15,16,17,18,19": [e, un_quarto],
|
||||
"20,21,22,23,24": [e, venti],
|
||||
"25,26,27,28,29": [e, venticinque],
|
||||
"30,31,32,33,34": [e, mezza],
|
||||
"35,36,37,38,39": [meno, venticinque],
|
||||
"40,41,42,43,44": [meno, venti],
|
||||
"45,46,47,48,49": [meno, un_quarto],
|
||||
"50,51,52,53,54": [meno, dieci],
|
||||
"55,56,57,58,59": [meno, cinque]
|
||||
},
|
||||
"hours": {
|
||||
"0,12": [sono_le, {5: [1, 2, 3, 4, 5, 6]}],
|
||||
"1,13": [e_l, {2: [5, 6, 7]}],
|
||||
"2,14": [sono_le, {2: [9, 10, 11]}],
|
||||
"3,15": [sono_le, {3: [1, 2, 3]}],
|
||||
"4,16": [sono_le, {6: [1, 2, 3, 4, 5, 6, 7]}],
|
||||
"5,17": [sono_le, {7: [1, 2, 3, 4, 5, 6]}],
|
||||
"6,18": [sono_le, {6: [9, 10, 11]}],
|
||||
"7,19": [sono_le, {5: [7, 8, 9, 10, 11]}],
|
||||
"8,20": [sono_le, {3: [4, 5, 6, 7]}],
|
||||
"9,21": [sono_le, {3: [8, 9, 10, 11]}],
|
||||
"10,22": [sono_le, {4: [1, 2, 3, 4, 5]}],
|
||||
"11,23": [sono_le, {4: [6, 7, 8, 9, 10, 11]}]
|
||||
},
|
||||
"getHour": function(date) {
|
||||
var hour = date.getHours();
|
||||
if (date.getMinutes() >= 35) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('it', layout);
|
||||
}(jQuery));
|
||||
(function($) {
|
||||
'use strict';
|
||||
var het_is = {1: [1, 2, 3, 5, 6]};
|
||||
var over1 = {3: [1, 2, 3, 4]};
|
||||
var voor1 = {2: [8, 9, 10, 11]};
|
||||
var over2 = {4: [8, 9, 10, 11]};
|
||||
var voor2 = {5: [1, 2, 3, 4]};
|
||||
var half = {4: [1, 2, 3, 4]};
|
||||
var vijf = {1: [8, 9, 10, 11]};
|
||||
var tien = {2: [1, 2, 3, 4]};
|
||||
var kwart = {3: [7, 8, 9, 10, 11]};
|
||||
var uur = {10: [9, 10, 11]};
|
||||
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'Nederlands',
|
||||
"letters": [
|
||||
'HETKISAVIJF',
|
||||
'TIENBTZVOOR',
|
||||
'OVERMEKWART',
|
||||
'HALFSPWOVER',
|
||||
'VOORTHGEENS',
|
||||
'TWEEPVCDRIE',
|
||||
'VIERVIJFZES',
|
||||
'ZEVENONEGEN',
|
||||
'ACHTTIENELF',
|
||||
'TWAALFBFUUR'
|
||||
],
|
||||
"permanent": het_is,
|
||||
"minutes": {
|
||||
"0,1,2,3,4": uur,
|
||||
"5,6,7,8,9": [vijf, over1],
|
||||
"10,11,12,13,14": [tien, over1],
|
||||
"15,16,17,18,19": [kwart, over2],
|
||||
"20,21,22,23,24": [tien, voor1, half],
|
||||
"25,26,27,28,29": [vijf, voor1, half],
|
||||
"30,31,32,33,34": half,
|
||||
"35,36,37,38,39": [vijf, over1, half],
|
||||
"40,41,42,43,44": [tien, over1, half],
|
||||
"45,46,47,48,49": [kwart, voor2],
|
||||
"50,51,52,53,54": [tien, voor1],
|
||||
"55,56,57,58,59": [vijf, voor1]
|
||||
},
|
||||
"hours": {
|
||||
"0,12": {10: [1, 2, 3, 4, 5, 6]},
|
||||
"1,13": {5: [8, 9, 10]},
|
||||
"2,14": {6: [1, 2, 3, 4]},
|
||||
"3,15": {6: [8, 9, 10, 11]},
|
||||
"4,16": {7: [1, 2, 3, 4]},
|
||||
"5,17": {7: [5, 6, 7, 8]},
|
||||
"6,18": {7: [9, 10, 11]},
|
||||
"7,19": {8: [1, 2, 3, 4, 5]},
|
||||
"8,20": {9: [1, 2, 3, 4]},
|
||||
"9,21": {8: [7, 8, 9, 10, 11]},
|
||||
"10,22": {9: [5, 6, 7, 8]},
|
||||
"11,23": {9: [9, 10, 11]}
|
||||
},
|
||||
"getHour": function(date) {
|
||||
var hour = date.getHours();
|
||||
if (date.getMinutes() >= 20) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('nl', layout);
|
||||
}(jQuery));
|
||||
(function ($) {
|
||||
'use strict';
|
||||
var e_ = {1: [1]};
|
||||
var sao = {1: [2, 3, 4]};
|
||||
var e1 = {7: [8]};
|
||||
var e2 = {10: [5]};
|
||||
var menos = {7: [7, 8, 9, 10, 11]};
|
||||
var meia = {8: [8, 9, 10, 11]};
|
||||
var cinco = {10: [7, 8, 9, 10, 11]};
|
||||
var dez = {10: [1, 2, 3]};
|
||||
var um_quarto = {9: [1, 2, 4, 5, 6, 7, 8, 9]};
|
||||
var vinte = {8: [1, 2, 3, 4, 5]};
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'Português',
|
||||
"letters": [
|
||||
'ÉSÃOUMATRÊS',
|
||||
'MEIOLDIADEZ',
|
||||
'DUASEISETEY',
|
||||
'QUATROHNOVE',
|
||||
'CINCOITONZE',
|
||||
'ZMEIALNOITE',
|
||||
'HORASYMENOS',
|
||||
'VINTECAMEIA',
|
||||
'UMVQUARTOPM',
|
||||
'DEZOEYCINCO'
|
||||
],
|
||||
"minutes": {
|
||||
"5,6,7,8,9": [e1, cinco],
|
||||
"10,11,12,13,14": [e1, dez],
|
||||
"15,16,17,18,19": [e1, um_quarto],
|
||||
"20,21,22,23,24": [e1, vinte],
|
||||
"25,26,27,28,29": [e1, vinte, e2, cinco],
|
||||
"30,31,32,33,34": [e1, meia],
|
||||
"35,36,37,38,39": [menos, vinte, e2, cinco],
|
||||
"40,41,42,43,44": [menos, vinte],
|
||||
"45,46,47,48,49": [menos, um_quarto],
|
||||
"50,51,52,53,54": [menos, dez],
|
||||
"55,56,57,58,59": [menos, cinco]
|
||||
},
|
||||
"hours": {
|
||||
"0": [e_, {"6": [2, 3, 4, 5, 7, 8, 9, 10, 11]}],
|
||||
"12": [e_, {"2": [1, 2, 3, 4, 6, 7, 8]}],
|
||||
"1,13": [e_, {"1": [5, 6, 7]}],
|
||||
"2,14": [sao, {"3": [1, 2, 3, 4]}],
|
||||
"3,15": [sao, {"1": [8, 9, 10, 11]}],
|
||||
"4,16": [sao, {"4": [1, 2, 3, 4, 5, 6]}],
|
||||
"5,17": [sao, {"5": [1, 2, 3, 4, 5]}],
|
||||
"6,18": [sao, {"3": [4, 5, 6, 7]}],
|
||||
"7,19": [sao, {"3": [7, 8, 9, 10]}],
|
||||
"8,20": [sao, {"5": [5, 6, 7, 8]}],
|
||||
"9,21": [sao, {"4": [8, 9, 10, 11]}],
|
||||
"10,22": [sao, {"2": [9, 10, 11]}],
|
||||
"11,23": [sao, {"5": [8, 9, 10, 11]}]
|
||||
},
|
||||
"getHour": function (date) {
|
||||
var hour = date.getHours();
|
||||
if (date.getMinutes() >= 35) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('pt', layout);
|
||||
}(jQuery));
|
5
dist/jquery.uhr.langs.min.js
vendored
5
dist/jquery.uhr.langs.min.js
vendored
File diff suppressed because one or more lines are too long
805
dist/jquery.uhr.main.js
vendored
805
dist/jquery.uhr.main.js
vendored
|
@ -1,805 +0,0 @@
|
|||
/*! uhr - v9.0.0-dev.0 - 2019-05-03
|
||||
* http://bärneruhr.ch/
|
||||
* Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */
|
||||
(function ($) {
|
||||
'use strict';
|
||||
var uhrGlobals = {
|
||||
"id": 0,
|
||||
"languages": [],
|
||||
"themes": [],
|
||||
registerLanguage: function registerLanguage(code, language) {
|
||||
var alreadyExists = uhrGlobals.languages.some(function (element) {
|
||||
if (code === element.code) {
|
||||
console.error("Error: Language code '" + code + "' cannot be registered for language '" + language.language +
|
||||
"' because it is already registered for language '" + element.language + "'!");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
if (!alreadyExists) {
|
||||
language.code = code;
|
||||
uhrGlobals.languages.push(language);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// auto-detect themes
|
||||
$('link[rel=stylesheet]').each(function (index, item) {
|
||||
var styleSheet = $(item);
|
||||
var styleClass = styleSheet.attr('data-class');
|
||||
if (styleClass !== undefined) {
|
||||
var name = styleSheet.attr('data-name');
|
||||
if (name === undefined) {
|
||||
name = styleClass;
|
||||
}
|
||||
uhrGlobals.themes.push({'styleClass': styleClass, 'name': name});
|
||||
}
|
||||
});
|
||||
// fall-back if no theme was included
|
||||
if (uhrGlobals.themes.length === 0) {
|
||||
uhrGlobals.themes.push({});
|
||||
}
|
||||
|
||||
// public interface methods (exported later)
|
||||
var setCookie;
|
||||
var isOn;
|
||||
var update;
|
||||
var start = function start() {
|
||||
if (!isOn.bind(this)()) {
|
||||
this.timer = window.setInterval(function () {
|
||||
this.options.time = new Date();
|
||||
update.bind(this)();
|
||||
}.bind(this), 1000);
|
||||
update.bind(this)();
|
||||
setCookie.bind(this)('uhr-status', 'on');
|
||||
}
|
||||
};
|
||||
var stop = function stop() {
|
||||
if (isOn.bind(this)()) {
|
||||
window.clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
update.bind(this)();
|
||||
setCookie.bind(this)('uhr-status', 'off');
|
||||
}
|
||||
};
|
||||
var toggle = function toggle() {
|
||||
if (isOn.bind(this)()) {
|
||||
this.stop();
|
||||
} else {
|
||||
this.start();
|
||||
}
|
||||
};
|
||||
var language;
|
||||
|
||||
/**
|
||||
* Ein Buchstabe. Hilfsklasse für den Renderer und Inhalt der Layout-Arrays.
|
||||
* @param value Der Buchstabe, der Dargestellt werden soll.
|
||||
* @param style Die CSS-Styleklassen des Buchstabens.
|
||||
*/
|
||||
function Letter(value, style) {
|
||||
var myValue = value;
|
||||
var myStyle = style || '';
|
||||
this.addStyle = function (style) {
|
||||
if (myStyle === '') {
|
||||
myStyle = style;
|
||||
} else {
|
||||
myStyle += ' ' + style;
|
||||
}
|
||||
};
|
||||
this.toString = function () {
|
||||
return '<span class="item letter ' + myStyle + '">' + myValue + '</span>';
|
||||
};
|
||||
}
|
||||
|
||||
function UhrRendererV2Delegate(layout) {
|
||||
var vorne0 = {
|
||||
3: [2, 3, 4],
|
||||
4: [1, 5],
|
||||
5: [1, 4, 5],
|
||||
6: [1, 3, 5],
|
||||
7: [1, 2, 5],
|
||||
8: [1, 5],
|
||||
9: [2, 3, 4]
|
||||
};
|
||||
var hinten0 = {
|
||||
3: [8, 9, 10],
|
||||
4: [7, 11],
|
||||
5: [7, 10, 11],
|
||||
6: [7, 9, 11],
|
||||
7: [7, 8, 11],
|
||||
8: [7, 11],
|
||||
9: [8, 9, 10]
|
||||
};
|
||||
var vorne1 = {
|
||||
3: [3],
|
||||
4: [2, 3],
|
||||
5: [3],
|
||||
6: [3],
|
||||
7: [3],
|
||||
8: [3],
|
||||
9: [2, 3, 4]
|
||||
};
|
||||
var hinten1 = {
|
||||
3: [9],
|
||||
4: [8, 9],
|
||||
5: [9],
|
||||
6: [9],
|
||||
7: [9],
|
||||
8: [9],
|
||||
9: [8, 9, 10]
|
||||
};
|
||||
var vorne2 = {
|
||||
3: [2, 3, 4],
|
||||
4: [1, 5],
|
||||
5: [5],
|
||||
6: [4],
|
||||
7: [3],
|
||||
8: [2],
|
||||
9: [1, 2, 3, 4, 5]
|
||||
};
|
||||
var hinten2 = {
|
||||
3: [8, 9, 10],
|
||||
4: [7, 11],
|
||||
5: [11],
|
||||
6: [10],
|
||||
7: [9],
|
||||
8: [8],
|
||||
9: [7, 8, 9, 10, 11]
|
||||
};
|
||||
var vorne3 = {
|
||||
3: [1, 2, 3, 4, 5],
|
||||
4: [4],
|
||||
5: [3],
|
||||
6: [4],
|
||||
7: [5],
|
||||
8: [1, 5],
|
||||
9: [2, 3, 4]
|
||||
};
|
||||
var hinten3 = {
|
||||
3: [7, 8, 9, 10, 11],
|
||||
4: [10],
|
||||
5: [9],
|
||||
6: [10],
|
||||
7: [11],
|
||||
8: [7, 11],
|
||||
9: [8, 9, 10]
|
||||
};
|
||||
var vorne4 = {
|
||||
3: [4],
|
||||
4: [3, 4],
|
||||
5: [2, 4],
|
||||
6: [1, 4],
|
||||
7: [1, 2, 3, 4, 5],
|
||||
8: [4],
|
||||
9: [4]
|
||||
};
|
||||
var hinten4 = {
|
||||
3: [10],
|
||||
4: [9, 10],
|
||||
5: [8, 10],
|
||||
6: [7, 10],
|
||||
7: [7, 8, 9, 10, 11],
|
||||
8: [10],
|
||||
9: [10]
|
||||
};
|
||||
var vorne5 = {
|
||||
3: [1, 2, 3, 4, 5],
|
||||
4: [1],
|
||||
5: [1, 2, 3, 4],
|
||||
6: [5],
|
||||
7: [5],
|
||||
8: [1, 5],
|
||||
9: [2, 3, 4]
|
||||
};
|
||||
var hinten5 = {
|
||||
3: [7, 8, 9, 10, 11],
|
||||
4: [7],
|
||||
5: [7, 8, 9, 10],
|
||||
6: [11],
|
||||
7: [11],
|
||||
8: [7, 11],
|
||||
9: [8, 9, 10]
|
||||
};
|
||||
var hinten6 = {
|
||||
3: [9, 10],
|
||||
4: [8],
|
||||
5: [7],
|
||||
6: [7, 8, 9, 10],
|
||||
7: [7, 11],
|
||||
8: [7, 11],
|
||||
9: [8, 9, 10]
|
||||
};
|
||||
var hinten7 = {
|
||||
3: [7, 8, 9, 10, 11],
|
||||
4: [11],
|
||||
5: [10],
|
||||
6: [9],
|
||||
7: [8],
|
||||
8: [8],
|
||||
9: [8]
|
||||
};
|
||||
var hinten8 = {
|
||||
3: [8, 9, 10],
|
||||
4: [7, 11],
|
||||
5: [7, 11],
|
||||
6: [8, 9, 10],
|
||||
7: [7, 11],
|
||||
8: [7, 11],
|
||||
9: [8, 9, 10]
|
||||
};
|
||||
var hinten9 = {
|
||||
3: [8, 9, 10],
|
||||
4: [7, 11],
|
||||
5: [7, 11],
|
||||
6: [8, 9, 10, 11],
|
||||
7: [11],
|
||||
8: [10],
|
||||
9: [8, 9]
|
||||
};
|
||||
var seconds = {
|
||||
"0": [vorne0, hinten0],
|
||||
"1": [vorne0, hinten1],
|
||||
"2": [vorne0, hinten2],
|
||||
"3": [vorne0, hinten3],
|
||||
"4": [vorne0, hinten4],
|
||||
"5": [vorne0, hinten5],
|
||||
"6": [vorne0, hinten6],
|
||||
"7": [vorne0, hinten7],
|
||||
"8": [vorne0, hinten8],
|
||||
"9": [vorne0, hinten9],
|
||||
"10": [vorne1, hinten0],
|
||||
"11": [vorne1, hinten1],
|
||||
"12": [vorne1, hinten2],
|
||||
"13": [vorne1, hinten3],
|
||||
"14": [vorne1, hinten4],
|
||||
"15": [vorne1, hinten5],
|
||||
"16": [vorne1, hinten6],
|
||||
"17": [vorne1, hinten7],
|
||||
"18": [vorne1, hinten8],
|
||||
"19": [vorne1, hinten9],
|
||||
"20": [vorne2, hinten0],
|
||||
"21": [vorne2, hinten1],
|
||||
"22": [vorne2, hinten2],
|
||||
"23": [vorne2, hinten3],
|
||||
"24": [vorne2, hinten4],
|
||||
"25": [vorne2, hinten5],
|
||||
"26": [vorne2, hinten6],
|
||||
"27": [vorne2, hinten7],
|
||||
"28": [vorne2, hinten8],
|
||||
"29": [vorne2, hinten9],
|
||||
"30": [vorne3, hinten0],
|
||||
"31": [vorne3, hinten1],
|
||||
"32": [vorne3, hinten2],
|
||||
"33": [vorne3, hinten3],
|
||||
"34": [vorne3, hinten4],
|
||||
"35": [vorne3, hinten5],
|
||||
"36": [vorne3, hinten6],
|
||||
"37": [vorne3, hinten7],
|
||||
"38": [vorne3, hinten8],
|
||||
"39": [vorne3, hinten9],
|
||||
"40": [vorne4, hinten0],
|
||||
"41": [vorne4, hinten1],
|
||||
"42": [vorne4, hinten2],
|
||||
"43": [vorne4, hinten3],
|
||||
"44": [vorne4, hinten4],
|
||||
"45": [vorne4, hinten5],
|
||||
"46": [vorne4, hinten6],
|
||||
"47": [vorne4, hinten7],
|
||||
"48": [vorne4, hinten8],
|
||||
"49": [vorne4, hinten9],
|
||||
"50": [vorne5, hinten0],
|
||||
"51": [vorne5, hinten1],
|
||||
"52": [vorne5, hinten2],
|
||||
"53": [vorne5, hinten3],
|
||||
"54": [vorne5, hinten4],
|
||||
"55": [vorne5, hinten5],
|
||||
"56": [vorne5, hinten6],
|
||||
"57": [vorne5, hinten7],
|
||||
"58": [vorne5, hinten8],
|
||||
"59": [vorne5, hinten9]
|
||||
};
|
||||
|
||||
function parseObject(letters, styleClass, object) {
|
||||
if (typeof object !== 'undefined' && object !== null) {
|
||||
Object.keys(object).forEach(function (y) {
|
||||
var highlightLetters = object[y];
|
||||
highlightLetters.forEach(function (x) {
|
||||
letters[y - 1][x - 1].addStyle(styleClass);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function parseArrayOrObject(letters, styleClass, input) {
|
||||
if (typeof input !== 'undefined' && input !== null) {
|
||||
if (Array.isArray(input)) {
|
||||
input.forEach(function (item) {
|
||||
parseObject(letters, styleClass, item);
|
||||
});
|
||||
} else {
|
||||
parseObject(letters, styleClass, input);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function parseTimeDefinition(letters, styleClass, definition) {
|
||||
if (typeof definition !== 'undefined' && definition !== null) {
|
||||
Object.keys(definition).forEach(function (listString) {
|
||||
var array = listString.split(',');
|
||||
var highlightLetters = definition[listString];
|
||||
array.forEach(function (item) {
|
||||
parseArrayOrObject(letters, styleClass + item, highlightLetters);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.parse = function parse() {
|
||||
var letters = [];
|
||||
layout.letters.forEach(function (string) {
|
||||
var line = [];
|
||||
for (var c = 0; c < string.length; c++) {
|
||||
var character = new Letter(string[c]);
|
||||
line.push(character);
|
||||
}
|
||||
letters.push(line);
|
||||
});
|
||||
parseArrayOrObject(letters, 'on', layout.permanent);
|
||||
if (typeof layout.seconds !== 'undefined' && layout.seconds !== null) {
|
||||
parseTimeDefinition(letters, 'second', layout.seconds);
|
||||
} else {
|
||||
parseTimeDefinition(letters, 'second', seconds);
|
||||
}
|
||||
parseTimeDefinition(letters, 'minute', layout.minutes);
|
||||
parseTimeDefinition(letters, 'hour', layout.hours);
|
||||
return letters;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Hilfsklasse zum Rendern der Uhr.
|
||||
* @param layout Layout-Objekt, das gerendert werden soll.
|
||||
* @param renderarea Das jQuery-gewrappte HTML-Element, auf dem gerendert werden soll.
|
||||
*/
|
||||
function UhrRenderer(layout, renderarea) {
|
||||
this.render = function render(beforeshow) {
|
||||
if (layout.parsed === undefined) {
|
||||
switch (layout.version) {
|
||||
case 2:
|
||||
var delegate = new UhrRendererV2Delegate(layout);
|
||||
var parsedLayout = delegate.parse();
|
||||
Object.defineProperty(layout, "parsed", {
|
||||
"value": parsedLayout,
|
||||
"writable": false,
|
||||
"configurable": false
|
||||
});
|
||||
break;
|
||||
default:
|
||||
console.warn("Unknown layout version: '" + layout.version + "'");
|
||||
return;
|
||||
}
|
||||
}
|
||||
var letters = layout.parsed;
|
||||
renderarea.fadeOut('fast', function () {
|
||||
renderarea.empty();
|
||||
letters.forEach(function (line, index, array) {
|
||||
line.forEach(function (letter) {
|
||||
renderarea.append(letter.toString());
|
||||
});
|
||||
if (index < array.length - 1) {
|
||||
renderarea.append('<br/>');
|
||||
}
|
||||
});
|
||||
if (typeof beforeshow === 'function') {
|
||||
beforeshow();
|
||||
}
|
||||
renderarea.fadeIn('fast');
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
var setLanguage = function setLanguage(languageKey) {
|
||||
if (languageKey !== this.options.language) {
|
||||
this.options.language = languageKey;
|
||||
var renderer = new UhrRenderer(language.bind(this)(), this.element.find('.letterarea'));
|
||||
renderer.render.bind(this)(function () {
|
||||
this.currentMinute = -1;
|
||||
update.bind(this)();
|
||||
}.bind(this));
|
||||
setCookie.bind(this)('uhr-language', languageKey);
|
||||
update.bind(this)();
|
||||
}
|
||||
};
|
||||
var setTheme = function setTheme(theme) {
|
||||
if (theme !== this.options.theme) {
|
||||
this.element.removeClass(this.options.theme).addClass(theme);
|
||||
$('#uhr-onoffswitch' + this.id).removeClass(this.options.theme).addClass(theme);
|
||||
this.options.theme = theme;
|
||||
setCookie.bind(this)('uhr-theme', theme);
|
||||
}
|
||||
};
|
||||
var setTime = function setTime(time) {
|
||||
this.currentMinute = -1;
|
||||
if (time === null) {
|
||||
this.options.time = new Date();
|
||||
} else {
|
||||
if (this.timer !== null) {
|
||||
window.clearInterval(this.timer);
|
||||
}
|
||||
this.options.time = time;
|
||||
}
|
||||
update.bind(this)();
|
||||
};
|
||||
var setMode = function (mode) {
|
||||
this.options.mode = mode;
|
||||
this.currentMinute = -1;
|
||||
update.bind(this)();
|
||||
setCookie.bind(this)('uhr-mode', mode);
|
||||
};
|
||||
var setWidth = function setWidth(width) {
|
||||
var e = this.element;
|
||||
e.css('width', width);
|
||||
var realWidth = e.width();
|
||||
e.width(realWidth);
|
||||
e.height(realWidth);
|
||||
e.css('font-size', (realWidth / 40) + 'px');
|
||||
};
|
||||
|
||||
// private interface methods
|
||||
var setupHTML;
|
||||
var wireFunctionality;
|
||||
var create = function create() {
|
||||
this.id = uhrGlobals.id++;
|
||||
this.timer = null;
|
||||
this.currentMinute = -1;
|
||||
var userTime = this.options.time;
|
||||
var hash, params;
|
||||
if (this.options.time === undefined) {
|
||||
this.options.time = new Date();
|
||||
}
|
||||
// parse the URL params
|
||||
hash = window.location.hash;
|
||||
if (hash !== undefined && typeof hash === 'string' && hash.charAt(0) === '#') {
|
||||
hash = hash.substring(1);
|
||||
hash = decodeURIComponent(hash);
|
||||
params = hash.split('&');
|
||||
params.forEach(function (element) {
|
||||
var pair = element.split('=');
|
||||
var key = pair[0];
|
||||
var value = pair[1];
|
||||
switch (key) {
|
||||
case 'l':
|
||||
case 'language':
|
||||
this.options.language = value;
|
||||
this.options.force = true;
|
||||
break;
|
||||
case 't':
|
||||
case 'theme':
|
||||
this.options.theme = value;
|
||||
this.options.force = true;
|
||||
break;
|
||||
case 'm':
|
||||
case 'mode':
|
||||
this.options.mode = value;
|
||||
this.options.force = true;
|
||||
break;
|
||||
case 's':
|
||||
case 'status':
|
||||
this.options.status = value;
|
||||
this.options.force = true;
|
||||
break;
|
||||
}
|
||||
}.bind(this));
|
||||
}
|
||||
// end parse the URL params
|
||||
setupHTML.bind(this)();
|
||||
wireFunctionality.bind(this)();
|
||||
if (userTime !== undefined) {
|
||||
this.time(userTime);
|
||||
}
|
||||
};
|
||||
// private helper methods (not exported)
|
||||
var toggleConfigScreen = function toggleConfigScreen() {
|
||||
$('#uhr-controlpanel' + this.id).toggle('fast');
|
||||
};
|
||||
// set up
|
||||
setupHTML = function setupHTML() {
|
||||
var e = this.element;
|
||||
// Base clock area
|
||||
e.addClass('uhr');
|
||||
e.empty();
|
||||
e.append('<span class="item dot dot1"></span>');
|
||||
e.append('<span class="item dot dot2"></span>');
|
||||
e.append('<span class="item dot dot3"></span>');
|
||||
e.append('<span class="item dot dot4"></span>');
|
||||
e.append('<div class="letterarea"></div>');
|
||||
e.append('<div class="reflection"></div>');
|
||||
setWidth.bind(this)(this.options.width);
|
||||
|
||||
if (this.options.controls) {
|
||||
var controlpanel = $('<div class="uhr-controlpanel" id="uhr-controlpanel' + this.id + '"></div>');
|
||||
var content = $('<div class="content"></div>');
|
||||
controlpanel.append(content);
|
||||
// on/off switch
|
||||
var toggleSwitch = $('<div class="onoffswitch" id="uhr-onoffswitch' + this.id + '"></div>');
|
||||
toggleSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox' + this.id +
|
||||
'" checked="checked" />');
|
||||
toggleSwitch.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox' + this.id + '">' +
|
||||
'<div class="onoffswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + '</label>');
|
||||
content.append(toggleSwitch);
|
||||
|
||||
// time mode switch
|
||||
var modeSwitch = $('<div class="onoffswitch" id="uhr-modeswitch' + this.id + '"></div>');
|
||||
modeSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox' + this.id +
|
||||
'" checked="checked" />');
|
||||
modeSwitch.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox' + this.id + '">' +
|
||||
'<div class="modeswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' +
|
||||
'</label>');
|
||||
content.append(modeSwitch);
|
||||
// language chooser
|
||||
if (uhrGlobals.languages.length > 1) {
|
||||
var languageChooser = $('<select id="uhr-languagechooser' + this.id + '"></select>');
|
||||
uhrGlobals.languages.forEach(function (item) {
|
||||
languageChooser.append('<option value="' + item.code + '">' + item.language + '</option>');
|
||||
});
|
||||
content.append(languageChooser);
|
||||
}
|
||||
|
||||
// theme chooser
|
||||
if (uhrGlobals.themes.length > 1) {
|
||||
var themeChooser = $('<select id="uhr-themechooser' + this.id + '"></select>');
|
||||
uhrGlobals.themes.forEach(function (item) {
|
||||
themeChooser.append('<option value="' + item.styleClass + '">' + item.name + '</option>');
|
||||
});
|
||||
content.append(themeChooser);
|
||||
}
|
||||
var closebutton = $('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel' + this.id + '"></a>');
|
||||
closebutton.on('click', function () {
|
||||
$('#uhr-controlpanel' + this.id).hide('fast');
|
||||
}.bind(this));
|
||||
content.append(closebutton);
|
||||
e.after(controlpanel);
|
||||
controlpanel.hide();
|
||||
var configlink = $('<a class="uhr-configlink" id="uhr-configlink' + this.id + '"></a>');
|
||||
configlink.on('click', function () {
|
||||
toggleConfigScreen.bind(this)();
|
||||
}.bind(this));
|
||||
e.after(configlink);
|
||||
}
|
||||
};
|
||||
wireFunctionality = function wireFunctionality() {
|
||||
// on/off switch
|
||||
var toggleSwitch = $('#uhr-onoffswitch-checkbox' + this.id);
|
||||
toggleSwitch.on('click', function () {
|
||||
this.toggle();
|
||||
}.bind(this));
|
||||
var status = $.cookie('uhr-status' + this.id);
|
||||
if (status === undefined || this.options.force) {
|
||||
status = this.options.status;
|
||||
}
|
||||
toggleSwitch.prop('checked', status === 'on');
|
||||
if (status === 'on') {
|
||||
this.start();
|
||||
} else {
|
||||
this.stop();
|
||||
}
|
||||
|
||||
// time mode switch
|
||||
var modeSwitch = $('#uhr-modeswitch-checkbox' + this.id);
|
||||
modeSwitch.on('click', function () {
|
||||
if (this.options.mode === 'seconds') {
|
||||
setMode.bind(this)('normal');
|
||||
} else {
|
||||
setMode.bind(this)('seconds');
|
||||
}
|
||||
}.bind(this));
|
||||
|
||||
var mode = $.cookie('uhr-mode' + this.id);
|
||||
if (mode === undefined || this.options.force) {
|
||||
mode = this.options.mode;
|
||||
}
|
||||
modeSwitch.prop('checked', mode !== 'seconds');
|
||||
if (mode === 'seconds') {
|
||||
setMode.bind(this)('seconds');
|
||||
} else {
|
||||
setMode.bind(this)('normal');
|
||||
}
|
||||
|
||||
// language chooser
|
||||
var languageChooser = $('#uhr-languagechooser' + this.id);
|
||||
languageChooser.on('change', function () {
|
||||
var languageKey = $('#uhr-languagechooser' + this.id).val();
|
||||
this.language(languageKey);
|
||||
}.bind(this));
|
||||
var selectedLanguage = $.cookie('uhr-language' + this.id);
|
||||
if (selectedLanguage === undefined || this.options.force) {
|
||||
selectedLanguage = this.options.language;
|
||||
}
|
||||
var found = uhrGlobals.languages.some(function (item) {
|
||||
return selectedLanguage === item.code;
|
||||
});
|
||||
if (!found) {
|
||||
var fallbackLanguage;
|
||||
if (uhrGlobals.languages.length > 0) {
|
||||
fallbackLanguage = uhrGlobals.languages[0].code;
|
||||
} else {
|
||||
fallbackLanguage = '';
|
||||
}
|
||||
console.warn("Language '" + selectedLanguage + "' not found! Using fallback '" + fallbackLanguage + "'");
|
||||
selectedLanguage = fallbackLanguage;
|
||||
}
|
||||
languageChooser.val(selectedLanguage);
|
||||
this.options.language = "";
|
||||
this.language(selectedLanguage);
|
||||
|
||||
// theme chooser
|
||||
var themeChooser = $('#uhr-themechooser' + this.id);
|
||||
themeChooser.on('change', function () {
|
||||
var themeKey = $('#uhr-themechooser' + this.id).val();
|
||||
this.theme(themeKey);
|
||||
}.bind(this));
|
||||
var selectedTheme = $.cookie('uhr-theme' + this.id);
|
||||
if (selectedTheme === undefined || this.options.force) {
|
||||
selectedTheme = this.options.theme;
|
||||
}
|
||||
found = uhrGlobals.themes.some(function (item) {
|
||||
return selectedTheme === item.styleClass;
|
||||
});
|
||||
if (!found) {
|
||||
var fallbackTheme = uhrGlobals.themes[0].styleClass;
|
||||
console.warn("Theme '" + selectedTheme + "' not found! Using fallback '" + fallbackTheme + "'");
|
||||
selectedTheme = fallbackTheme;
|
||||
}
|
||||
themeChooser.val(selectedTheme);
|
||||
this.options.theme = "";
|
||||
this.theme(selectedTheme);
|
||||
if (this.options.autoresize) {
|
||||
$(window).on('resize', function () {
|
||||
var $e = this.element;
|
||||
var $parent = $e.parent();
|
||||
var $window = $(window);
|
||||
var parentWidth = $parent.width();
|
||||
var parentHeight = $parent.height();
|
||||
var windowWidth = $window.width();
|
||||
var windowHeight = $window.height();
|
||||
var size = Math.min(parentWidth, parentHeight, windowWidth, windowHeight) + 'px';
|
||||
setWidth.bind(this)(size);
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
var destroy = function destroy() {
|
||||
this.timer = null;
|
||||
$(this.element)
|
||||
.removeAttr('style')
|
||||
.removeAttr('class')
|
||||
.empty();
|
||||
$('#uhr-configlink' + this.id).remove();
|
||||
$('#uhr-controlpanel' + this.id).remove();
|
||||
|
||||
};
|
||||
setCookie = function setCookie(cookieName, cookieValue) {
|
||||
var options = {};
|
||||
if (this.options.cookiePath !== undefined) {
|
||||
options = {expires: 365, path: this.options.cookiePath};
|
||||
} else {
|
||||
options = {expires: 365};
|
||||
}
|
||||
$.cookie(cookieName + this.id, cookieValue, options);
|
||||
};
|
||||
|
||||
// business logic
|
||||
isOn = function isOn() {
|
||||
return this.timer !== null;
|
||||
};
|
||||
var show;
|
||||
var clear;
|
||||
update = function update() {
|
||||
if (isOn.bind(this)()) {
|
||||
var time = this.options.time;
|
||||
if (!language.bind(this)().hasOwnProperty('seconds') && this.options.mode !== 'seconds') {
|
||||
if (time.getMinutes() === this.currentMinute) {
|
||||
return;
|
||||
}
|
||||
this.currentMinute = time.getMinutes();
|
||||
}
|
||||
show.bind(this)(time);
|
||||
} else {
|
||||
clear.bind(this)();
|
||||
this.currentMinute = -1;
|
||||
}
|
||||
};
|
||||
var highlight;
|
||||
var getSecond;
|
||||
var getDotMinute;
|
||||
var getCoarseMinute;
|
||||
var getHour;
|
||||
show = function show(time) {
|
||||
var second = getSecond.bind(this)(time);
|
||||
var dotMinute = getDotMinute.bind(this)(time);
|
||||
var hour = getHour.bind(this)(time);
|
||||
var coarseMinute = getCoarseMinute.bind(this)(time);
|
||||
clear.bind(this)();
|
||||
if (this.options.mode === 'seconds') {
|
||||
highlight.bind(this)('second' + second);
|
||||
} else {
|
||||
highlight.bind(this)('on');
|
||||
for (var i = 1; i <= dotMinute; i++) {
|
||||
highlight.bind(this)('dot' + i);
|
||||
}
|
||||
highlight.bind(this)('minute' + coarseMinute);
|
||||
highlight.bind(this)('hour' + hour);
|
||||
}
|
||||
};
|
||||
highlight = function highlight(itemClass) {
|
||||
this.element.find('.item.' + itemClass).addClass('active');
|
||||
};
|
||||
clear = function clear() {
|
||||
this.element.find('.item').removeClass('active');
|
||||
};
|
||||
getSecond = function getSecond(date) {
|
||||
if (typeof language.bind(this)().getSeconds === 'function') {
|
||||
return language.bind(this)().getSeconds(date);
|
||||
}
|
||||
return date.getSeconds();
|
||||
};
|
||||
getDotMinute = function getDotMinute(date) {
|
||||
if (typeof language.bind(this)().getDotMinute === 'function') {
|
||||
return language.bind(this)().getDotMinute(date);
|
||||
}
|
||||
var minutes = date.getMinutes();
|
||||
return minutes % 5;
|
||||
};
|
||||
getCoarseMinute = function getCoarseMinute(date) {
|
||||
if (typeof language.bind(this)().getCoarseMinute === 'function') {
|
||||
return language.bind(this)().getCoarseMinute(date);
|
||||
}
|
||||
return date.getMinutes();
|
||||
};
|
||||
getHour = function getHour(date) {
|
||||
if (typeof language.bind(this)().getHour === 'function') {
|
||||
return language.bind(this)().getHour(date);
|
||||
}
|
||||
var hour = date.getHours();
|
||||
if (date.getMinutes() >= 25) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
};
|
||||
language = function language() {
|
||||
var matchingLanguages = uhrGlobals.languages.filter(function (element) {
|
||||
return (element.code === this.options.language);
|
||||
}, this);
|
||||
if (matchingLanguages.length > 0) {
|
||||
return matchingLanguages[0];
|
||||
}
|
||||
// fallback: return empty object
|
||||
return {};
|
||||
};
|
||||
|
||||
$.widget("fritteli.uhr", {
|
||||
"options": {
|
||||
width: '100%',
|
||||
status: 'on',
|
||||
language: 'de_CH',
|
||||
theme: uhrGlobals.themes[0].styleClass,
|
||||
force: false,
|
||||
controls: true,
|
||||
cookiePath: undefined,
|
||||
autoresize: true,
|
||||
mode: 'normal'
|
||||
},
|
||||
"start": start,
|
||||
"stop": stop,
|
||||
"toggle": toggle,
|
||||
"language": setLanguage,
|
||||
"theme": setTheme,
|
||||
"time": setTime,
|
||||
"mode": setMode,
|
||||
"width": setWidth,
|
||||
// constructor method
|
||||
"_create": create,
|
||||
// destructor method
|
||||
"_destroy": destroy
|
||||
});
|
||||
$.fritteli.uhr.register = uhrGlobals.registerLanguage;
|
||||
})(jQuery);
|
5
dist/jquery.uhr.main.min.js
vendored
5
dist/jquery.uhr.main.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/lib/layout_de.js
vendored
Normal file
2
dist/lib/layout_de.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}({2:function(e,t,r){"use strict";r.r(t),r.d(t,"LayoutDe",function(){return l});var n={4:[8,9,10,11]},o={4:[1,2,3]},u={5:[1,2,3,4]},i={1:[8,9,10,11]},f={2:[1,2,3,4]},c={2:[5,6,7,8,9,10,11]},l={code:"de",hours:{"0,12":{9:[7,8,9,10,11]},"1,13":{6:[1,2,3,4]},"2,14":{6:[8,9,10,11]},"3,15":{7:[1,2,3,4]},"4,16":{7:[8,9,10,11]},"5,17":{5:[8,9,10,11]},"6,18":{8:[1,2,3,4,5]},"7,19":{9:[1,2,3,4,5,6]},"8,20":{8:[8,9,10,11]},"9,21":{10:[4,5,6,7]},"10,22":{10:[1,2,3,4]},"11,23":{5:[6,7,8]}},letters:["ESKISTAFÜNF","ZEHNZWANZIG","DREIVIERTEL","VORFUNKNACH","HALBAELFÜNF","EINSXAMZWEI","DREIPMJVIER","SECHSNLACHT","SIEBENZWÖLF","ZEHNEUNKUHR"],minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[i,n],"10,11,12,13,14":[f,n],"15,16,17,18,19":[{3:[5,6,7,8,9,10,11]},n],"20,21,22,23,24":[c,n],"25,26,27,28,29":[i,o,u],"30,31,32,33,34":u,"35,36,37,38,39":[i,n,u],"40,41,42,43,44":[c,o],"45,46,47,48,49":{3:[1,2,3,4,5,6,7,8,9,10,11]},"50,51,52,53,54":[f,o],"55,56,57,58,59":[i,o]},permanent:{1:[1,2,4,5,6]},prettyName:"Deutsch",version:2};$.fritteli.uhr.register(l)}});
|
||||
//# sourceMappingURL=layout_de.js.map
|
1
dist/lib/layout_de.js.map
vendored
Normal file
1
dist/lib/layout_de.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/lib/layout_de_ch.js
vendored
Normal file
2
dist/lib/layout_de_ch.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=3)}({3:function(e,t,r){"use strict";r.r(t),r.d(t,"LayoutDeCh",function(){return a});var n={4:[1,2]},o={3:[9,10,11]},u={4:[4,5,6,7,8]},i={1:[9,10,11]},f={2:[9,10,11]},c={2:[1,2,3,4,5,6]},l={3:[1,2,3,4,5,6]},a={code:"de_CH",hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}},letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],minutes:{"5,6,7,8,9":[i,n],"10,11,12,13,14":[f,n],"15,16,17,18,19":[c,n],"20,21,22,23,24":[l,n],"25,26,27,28,29":[i,o,u],"30,31,32,33,34":u,"35,36,37,38,39":[i,n,u],"40,41,42,43,44":[l,o],"45,46,47,48,49":[c,o],"50,51,52,53,54":[f,o],"55,56,57,58,59":[i,o]},permanent:{1:[1,2,4,5,6,7]},prettyName:"Bärndütsch",version:2};$.fritteli.uhr.register(a)}});
|
||||
//# sourceMappingURL=layout_de_ch.js.map
|
1
dist/lib/layout_de_ch.js.map
vendored
Normal file
1
dist/lib/layout_de_ch.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/lib/layout_de_ch_genau.js
vendored
Normal file
2
dist/lib/layout_de_ch_genau.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var u=t[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)r.d(n,u,function(t){return e[t]}.bind(null,u));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){"use strict";r.r(t),r.d(t,"LayoutDeChGenau",function(){return l});var n={4:[4,5]},u={4:[1,2,3]},o={4:[7,8,9,10,11]},i={1:[9,10,11]},f={2:[9,10,11]},a={2:[1,2,3,4,5,6]},c={3:[1,2,3,4,5,6]},l={code:"de_CH_genau",hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}},letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGGENAU","VORABOHAUBI","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],minutes:{0:{3:[7,8,9,10,11]},"5,6,7,8,9":[i,n],"10,11,12,13,14":[f,n],"15,16,17,18,19":[a,n],"20,21,22,23,24":[c,n],"25,26,27,28,29":[i,u,o],"30,31,32,33,34":o,"35,36,37,38,39":[i,n,o],"40,41,42,43,44":[c,u],"45,46,47,48,49":[a,u],"50,51,52,53,54":[f,u],"55,56,57,58,59":[i,u]},permanent:{1:[1,2,4,5,6,7]},prettyName:"Bärndütsch (genau)",version:2};$.fritteli.uhr.register(l)}});
|
||||
//# sourceMappingURL=layout_de_ch_genau.js.map
|
1
dist/lib/layout_de_ch_genau.js.map
vendored
Normal file
1
dist/lib/layout_de_ch_genau.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/lib/layout_dk.js
vendored
Normal file
2
dist/lib/layout_dk.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}({5:function(e,t,r){"use strict";r.r(t),r.d(t,"LayoutDk",function(){return d});var n={4:[4,5,6,7,8,9,10,11]},o={5:[8]},u={5:[4,5,6,7]},i={2:[1,2,3]},f={4:[1,2]},l={3:[4,5,6,7,8]},c={2:[4,5,6,7]},a={6:[8,9,10,11]},d={code:"dk",hours:{"0,12":{10:[8,9,10,11]},"1,13":{7:[1,2]},"2,14":{7:[3,4]},"3,15":{7:[5,6,7]},"4,16":{7:[8,9,10,11]},"5,17":{8:[1,2,3]},"6,18":{8:[4,5,6,7]},"7,19":{8:[9,10,11]},"8,20":{9:[1,2,3,4]},"9,21":{9:[6,7]},"10,22":{9:[10,11]},"11,23":{10:[1,2,3,4,5,6]}},letters:["KLOKKENVERO","FEMTYVESKLA","OJEKVARTVAT","TIAMINUTTER","VEMOVERILMF","MONALISHALV","ETTOTREFIRE","FEMSEKSRSYV","OTTERNIMETI","ELLEVEATOLV"],minutes:{"5,6,7,8,9":[i,n,u],"10,11,12,13,14":[f,n,u],"15,16,17,18,19":[l,u],"20,21,22,23,24":[c,n,u],"25,26,27,28,29":[i,n,o,a],"30,31,32,33,34":[a],"35,36,37,38,39":[i,n,u,a],"40,41,42,43,44":[c,n,o],"45,46,47,48,49":[l,o],"50,51,52,53,54":[f,n,o],"55,56,57,58,59":[i,n,o]},permanent:{1:[1,2,3,4,5,6,7,9,10]},prettyName:"Dansk",version:2};$.fritteli.uhr.register(d)}});
|
||||
//# sourceMappingURL=layout_dk.js.map
|
1
dist/lib/layout_dk.js.map
vendored
Normal file
1
dist/lib/layout_dk.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/lib/layout_en.js
vendored
Normal file
2
dist/lib/layout_en.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=6)}({6:function(e,t,r){"use strict";r.r(t),r.d(t,"LayoutEn",function(){return a});var n={4:[10,11]},o={5:[1,2,3,4]},u={3:[7,8,9,10]},i={4:[6,7,8]},f={2:[1,3,4,5,6,7,8,9]},l={3:[1,2,3,4,5,6]},c={3:[1,2,3,4,5,6,7,8,9,10]},a={code:"en",getHour:function(e){var t=e.getHours();return e.getMinutes()>=35?(t+1)%24:t},hours:{"0,12":{9:[6,7,8,9,10,11]},"1,13":{6:[1,2,3]},"2,14":{7:[9,10,11]},"3,15":{6:[7,8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{6:[4,5,6]},"7,19":{9:[1,2,3,4,5]},"8,20":{8:[1,2,3,4,5]},"9,21":{5:[8,9,10,11]},"10,22":{10:[1,2,3]},"11,23":{8:[6,7,8,9,10,11]}},letters:["ITLISBFAMPM","ACQUARTERDC","TWENTYFIVEX","HALFBTENFTO","PASTERUNINE","ONESIXTHREE","FOURFIVETWO","EIGHTELEVEN","SEVENTWELVE","TENSO'CLOCK"],minutes:{"0,1,2,3,4":{10:[5,6,7,8,9,10,11]},"5,6,7,8,9":[u,o],"10,11,12,13,14":[i,o],"15,16,17,18,19":[f,o],"20,21,22,23,24":[l,o],"25,26,27,28,29":[c,o],"30,31,32,33,34":[{4:[1,2,3,4]},o],"35,36,37,38,39":[c,n],"40,41,42,43,44":[l,n],"45,46,47,48,49":[f,n],"50,51,52,53,54":[i,n],"55,56,57,58,59":[u,n]},permanent:{1:[1,2,4,5]},prettyName:"English",version:2};$.fritteli.uhr.register(a)}});
|
||||
//# sourceMappingURL=layout_en.js.map
|
1
dist/lib/layout_en.js.map
vendored
Normal file
1
dist/lib/layout_en.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/lib/layout_es.js
vendored
Normal file
2
dist/lib/layout_es.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=7)}({7:function(e,t,r){"use strict";r.r(t),r.d(t,"LayoutEs",function(){return s});var n={1:[2,3,4,6,7,8]},o={7:[6]},u={7:[7,8,9,10,11]},i={9:[7,8,9,10,11]},f={8:[8,9,10,11]},l={10:[6,7,8,9,10,11]},c={8:[2,3,4,5,6,7]},a={9:[1,2,3,4,5,6,7,8,9,10,11]},s={code:"es",getHour:function(e){var t=e.getHours();return e.getMinutes()>=35?(t+1)%24:t},hours:{"0,12":[n,{7:[1,2,3,4]}],"1,13":[{1:[1,2,6,7]},{1:[9,10,11]}],"2,14":[n,{2:[1,2,3]}],"3,15":[n,{2:[5,6,7,8]}],"4,16":[n,{3:[1,2,3,4,5,6]}],"5,17":[n,{3:[7,8,9,10,11]}],"6,18":[n,{4:[1,2,3,4]}],"7,19":[n,{4:[6,7,8,9,10]}],"8,20":[n,{5:[1,2,3,4]}],"9,21":[n,{5:[5,6,7,8,9]}],"10,22":[n,{6:[3,4,5,6]}],"11,23":[n,{6:[8,9,10,11]}]},letters:["ESONELASUNA","DOSITRESORE","CUATROCINCO","SEISASIETEN","OCHONUEVEYO","LADIEZSONCE","DOCELYMENOS","OVEINTEDIEZ","VEINTICINCO","MEDIACUARTO"],minutes:{"5,6,7,8,9":[o,i],"10,11,12,13,14":[o,f],"15,16,17,18,19":[o,l],"20,21,22,23,24":[o,c],"25,26,27,28,29":[o,a],"30,31,32,33,34":[o,{10:[1,2,3,4,5]}],"35,36,37,38,39":[u,a],"40,41,42,43,44":[u,c],"45,46,47,48,49":[u,l],"50,51,52,53,54":[u,f],"55,56,57,58,59":[u,i]},permanent:null,prettyName:"Español",version:2};$.fritteli.uhr.register(s)}});
|
||||
//# sourceMappingURL=layout_es.js.map
|
1
dist/lib/layout_es.js.map
vendored
Normal file
1
dist/lib/layout_es.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/lib/layout_fr.js
vendored
Normal file
2
dist/lib/layout_fr.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8)}({8:function(e,t,r){"use strict";r.r(t),r.d(t,"LayoutFr",function(){return s});var n={8:[1,2]},o={7:[1,2,3,4,5]},u={6:[6,7,8,9,10,11]},i={9:[7,8,9,10]},f={7:[9,10,11]},a={8:[4,5,6,7,8]},c={9:[1,2,3,4,5]},l={9:[1,2,3,4,5,6,7,8,9,10]},s={code:"fr",getHour:function(e){var t=e.getHours();return e.getMinutes()>=35?(t+1)%24:t},hours:{0:{5:[6,7,8,9,10,11]},"1,13":[{3:[5,6,7]},u],"2,14":[{1:[8,9,10,11]},u],"3,15":[{2:[7,8,9,10,11]},u],"4,16":[{2:[1,2,3,4,5,6]},u],"5,17":[{4:[8,9,10,11]},u],"6,18":[{4:[5,6,7]},u],"7,19":[{3:[8,9,10,11]},u],"8,20":[{4:[1,2,3,4]},u],"9,21":[{3:[1,2,3,4]},u],"10,22":[{5:[3,4,5]},u],"11,23":[{6:[1,2,3,4]},u],12:{5:[1,2,3,4]}},letters:["ILNESTODEUX","QUATRETROIS","NEUFUNESEPT","HUITSIXCINQ","MIDIXMINUIT","ONZERHEURES","MOINSOLEDIX","ETRQUARTPMD","VINGT-CINQU","ETSDEMIEPAM"],minutes:{"5,6,7,8,9":i,"10,11,12,13,14":f,"15,16,17,18,19":[n,a],"20,21,22,23,24":c,"25,26,27,28,29":l,"30,31,32,33,34":[n,{10:[4,5,6,7,8]}],"35,36,37,38,39":[o,l],"40,41,42,43,44":[o,c],"45,46,47,48,49":[o,{7:[7,8]},a],"50,51,52,53,54":[o,f],"55,56,57,58,59":[o,i]},permanent:{1:[1,2,4,5,6]},prettyName:"Français",version:2};$.fritteli.uhr.register(s)}});
|
||||
//# sourceMappingURL=layout_fr.js.map
|
1
dist/lib/layout_fr.js.map
vendored
Normal file
1
dist/lib/layout_fr.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/lib/layout_it.js
vendored
Normal file
2
dist/lib/layout_it.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=9)}({9:function(e,t,r){"use strict";r.r(t),r.d(t,"LayoutIt",function(){return s});var n={1:[1,2,3,4,6,7]},o={8:[1]},u={7:[8,9,10,11]},i={9:[6,7,8,9,10,11]},f={10:[1,2,3,4,5]},l={8:[3,4,6,7,8,9,10,11]},a={9:[1,2,3,4,5]},c={9:[1,2,3,4,5,6,7,8,9,10,11]},s={code:"it",getHour:function(e){var t=e.getHours();return e.getMinutes()>=35?(t+1)%24:t},hours:{"0,12":[n,{5:[1,2,3,4,5,6]}],"1,13":[{2:[1,3,4]},{2:[5,6,7]}],"2,14":[n,{2:[9,10,11]}],"3,15":[n,{3:[1,2,3]}],"4,16":[n,{6:[1,2,3,4,5,6,7]}],"5,17":[n,{7:[1,2,3,4,5,6]}],"6,18":[n,{6:[9,10,11]}],"7,19":[n,{5:[7,8,9,10,11]}],"8,20":[n,{3:[4,5,6,7]}],"9,21":[n,{3:[8,9,10,11]}],"10,22":[n,{4:[1,2,3,4,5]}],"11,23":[n,{4:[6,7,8,9,10,11]}]},letters:["SONORLEBORE","ÈRL'UNASDUE","TREOTTONOVE","DIECIUNDICI","DODICISETTE","QUATTROCSEI","CINQUEAMENO","ECUNOQUARTO","VENTICINQUE","DIECIPMEZZA"],minutes:{"5,6,7,8,9":[o,i],"10,11,12,13,14":[o,f],"15,16,17,18,19":[o,l],"20,21,22,23,24":[o,a],"25,26,27,28,29":[o,c],"30,31,32,33,34":[o,{10:[7,8,9,10,11]}],"35,36,37,38,39":[u,c],"40,41,42,43,44":[u,a],"45,46,47,48,49":[u,l],"50,51,52,53,54":[u,f],"55,56,57,58,59":[u,i]},permanent:null,prettyName:"Italiano",version:2};$.fritteli.uhr.register(s)}});
|
||||
//# sourceMappingURL=layout_it.js.map
|
1
dist/lib/layout_it.js.map
vendored
Normal file
1
dist/lib/layout_it.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/lib/layout_nl.js
vendored
Normal file
2
dist/lib/layout_nl.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=10)}({10:function(e,t,r){"use strict";r.r(t),r.d(t,"LayoutNl",function(){return c});var n={3:[1,2,3,4]},o={2:[8,9,10,11]},u={4:[1,2,3,4]},i={1:[8,9,10,11]},f={2:[1,2,3,4]},l={3:[7,8,9,10,11]},c={code:"nl",getHour:function(e){var t=e.getHours();return e.getMinutes()>=20?(t+1)%24:t},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[8,9,10]},"2,14":{6:[1,2,3,4]},"3,15":{6:[8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{7:[9,10,11]},"7,19":{8:[1,2,3,4,5]},"8,20":{9:[1,2,3,4]},"9,21":{8:[7,8,9,10,11]},"10,22":{9:[5,6,7,8]},"11,23":{9:[9,10,11]}},letters:["HETKISAVIJF","TIENBTZVOOR","OVERMEKWART","HALFSPWOVER","VOORTHGEENS","TWEEPVCDRIE","VIERVIJFZES","ZEVENONEGEN","ACHTTIENELF","TWAALFBFUUR"],minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[i,n],"10,11,12,13,14":[f,n],"15,16,17,18,19":[l,{4:[8,9,10,11]}],"20,21,22,23,24":[f,o,u],"25,26,27,28,29":[i,o,u],"30,31,32,33,34":u,"35,36,37,38,39":[i,n,u],"40,41,42,43,44":[f,n,u],"45,46,47,48,49":[l,{5:[1,2,3,4]}],"50,51,52,53,54":[f,o],"55,56,57,58,59":[i,o]},permanent:{1:[1,2,3,5,6]},prettyName:"Nederlands",version:2};$.fritteli.uhr.register(c)}});
|
||||
//# sourceMappingURL=layout_nl.js.map
|
1
dist/lib/layout_nl.js.map
vendored
Normal file
1
dist/lib/layout_nl.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/lib/layout_pt.js
vendored
Normal file
2
dist/lib/layout_pt.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var u=t[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)r.d(n,u,function(t){return e[t]}.bind(null,u));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=11)}({11:function(e,t,r){"use strict";r.r(t),r.d(t,"LayoutPt",function(){return p});var n={1:[1]},u={1:[2,3,4]},o={7:[8]},i={10:[5]},f={7:[7,8,9,10,11]},l={10:[7,8,9,10,11]},c={10:[1,2,3]},a={9:[1,2,4,5,6,7,8,9]},s={8:[1,2,3,4,5]},p={code:"pt",getHour:function(e){var t=e.getHours();return e.getMinutes()>=35?(t+1)%24:t},hours:{0:[n,{6:[2,3,4,5,7,8,9,10,11]}],12:[n,{2:[1,2,3,4,6,7,8]}],"1,13":[n,{1:[5,6,7]}],"2,14":[u,{3:[1,2,3,4]}],"3,15":[u,{1:[8,9,10,11]}],"4,16":[u,{4:[1,2,3,4,5,6]}],"5,17":[u,{5:[1,2,3,4,5]}],"6,18":[u,{3:[4,5,6,7]}],"7,19":[u,{3:[7,8,9,10]}],"8,20":[u,{5:[5,6,7,8]}],"9,21":[u,{4:[8,9,10,11]}],"10,22":[u,{2:[9,10,11]}],"11,23":[u,{5:[8,9,10,11]}]},letters:["ÉSÃOUMATRÊS","MEIOLDIADEZ","DUASEISETEY","QUATROHNOVE","CINCOITONZE","ZMEIALNOITE","HORASYMENOS","VINTECAMEIA","UMVQUARTOPM","DEZOEYCINCO"],minutes:{"5,6,7,8,9":[o,l],"10,11,12,13,14":[o,c],"15,16,17,18,19":[o,a],"20,21,22,23,24":[o,s],"25,26,27,28,29":[o,s,i,l],"30,31,32,33,34":[o,{8:[8,9,10,11]}],"35,36,37,38,39":[f,s,i,l],"40,41,42,43,44":[f,s],"45,46,47,48,49":[f,a],"50,51,52,53,54":[f,c],"55,56,57,58,59":[f,l]},permanent:null,prettyName:"Português",version:2};$.fritteli.uhr.register(p)}});
|
||||
//# sourceMappingURL=layout_pt.js.map
|
1
dist/lib/layout_pt.js.map
vendored
Normal file
1
dist/lib/layout_pt.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/lib/uhr.bundle.js
vendored
Normal file
2
dist/lib/uhr.bundle.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/lib/uhr.bundle.js.map
vendored
Normal file
1
dist/lib/uhr.bundle.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/lib/uhr.js
vendored
Normal file
2
dist/lib/uhr.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/lib/uhr.js.map
vendored
Normal file
1
dist/lib/uhr.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
11453
dist/libs.js
vendored
11453
dist/libs.js
vendored
File diff suppressed because it is too large
Load diff
5
dist/libs.min.js
vendored
5
dist/libs.min.js
vendored
File diff suppressed because one or more lines are too long
1
dist/uhr-black.min.css
vendored
1
dist/uhr-black.min.css
vendored
|
@ -1 +0,0 @@
|
|||
.uhr.black{background-color:#111}.black .onoffswitch-inner:before{background-color:#111}.uhr.black .dot:not(.active){border-color:rgba(255,255,255,.1);box-shadow:0 0 .1em rgba(255,255,255,.1)}.uhr.black .letter:not(.active){color:rgba(255,255,255,.1);text-shadow:0 0 .1em rgba(255,255,255,.1)}
|
1
dist/uhr-blue.min.css
vendored
1
dist/uhr-blue.min.css
vendored
|
@ -1 +0,0 @@
|
|||
.uhr.blue{background-color:#00a}.blue .onoffswitch-inner:before{background-color:#00a}.uhr.blue .dot:not(.active){border-color:rgba(255,255,255,.1);box-shadow:0 0 .1em rgba(255,255,255,.1)}.uhr.blue .letter:not(.active){color:rgba(255,255,255,.1);text-shadow:0 0 .1em rgba(255,255,255,.1)}
|
1
dist/uhr-green.min.css
vendored
1
dist/uhr-green.min.css
vendored
|
@ -1 +0,0 @@
|
|||
.uhr.green{background-color:#0c0}.green .onoffswitch-inner:before{background-color:#0c0}.uhr.green .dot:not(.active){border-color:rgba(0,0,0,.1);box-shadow:0 0 .1em rgba(0,0,0,.1)}.uhr.green .letter:not(.active){color:rgba(0,0,0,.1);text-shadow:0 0 .1em rgba(0,0,0,.1)}
|
1
dist/uhr-pink.min.css
vendored
1
dist/uhr-pink.min.css
vendored
|
@ -1 +0,0 @@
|
|||
.uhr.pink{background-color:#f0a}.uhr.pink .dot.active{border-color:#fff;box-shadow:0 0 .1em #fff}.uhr.pink .letter.active{color:#fff;text-shadow:0 0 .1em #fff}.pink .onoffswitch-inner:before{background-color:#f0a}.uhr.pink .dot:not(.active){border-color:rgba(255,255,255,.1);box-shadow:0 0 .1em rgba(255,255,255,.1)}.uhr.pink .letter:not(.active){color:rgba(255,255,255,.1);text-shadow:0 0 .1em rgba(255,255,255,.1)}
|
1
dist/uhr-red.min.css
vendored
1
dist/uhr-red.min.css
vendored
|
@ -1 +0,0 @@
|
|||
.uhr.red{background-color:#700}.red .onoffswitch-inner:before{background-color:#700}.uhr.red .dot:not(.active){border-color:rgba(255,255,255,.1);box-shadow:0 0 .1em rgba(255,255,255,.1)}.uhr.red .letter:not(.active){color:rgba(255,255,255,.1);text-shadow:0 0 .1em rgba(255,255,255,.1)}
|
1
dist/uhr-white.min.css
vendored
1
dist/uhr-white.min.css
vendored
|
@ -1 +0,0 @@
|
|||
.uhr.white{background-color:#ccc}.uhr.white .dot.active{border-color:#fff;box-shadow:0 0 .1em #fff}.uhr.white .letter.active{color:#fff;text-shadow:0 0 .1em #fff}.white .onoffswitch-inner:before{background-color:#ccc}.uhr.white .dot:not(.active){border-color:rgba(0,0,0,.1);box-shadow:0 0 .1em rgba(0,0,0,.1)}.uhr.white .letter:not(.active){color:rgba(0,0,0,.1);text-shadow:0 0 .1em rgba(0,0,0,.1)}
|
1
dist/uhr-yellow.min.css
vendored
1
dist/uhr-yellow.min.css
vendored
|
@ -1 +0,0 @@
|
|||
.uhr.yellow{background-color:#fd0}.uhr.yellow .dot.active{border-color:#fff;box-shadow:0 0 .1em #fff}.uhr.yellow .letter.active{color:#fff;text-shadow:0 0 .1em #fff}.yellow .onoffswitch-inner:before{background-color:#fd0}.uhr.yellow .dot:not(.active){border-color:rgba(0,0,0,.05);box-shadow:0 0 .1em rgba(0,0,0,.05)}.uhr.yellow .letter:not(.active){color:rgba(0,0,0,.05);text-shadow:0 0 .1em rgba(0,0,0,.05)}
|
1
dist/uhr.min.css
vendored
1
dist/uhr.min.css
vendored
|
@ -1 +0,0 @@
|
|||
@font-face{font-family:Uhrenfont;src:url(../resources/uhr.woff) format('woff')}body{font-family:Uhrenfont,sans-serif}.uhr{position:relative;margin:0;transition:background-color .5s}.uhr .reflection{position:absolute;top:0;bottom:0;left:0;right:0;background:radial-gradient(225em 45em at 160% 0,rgba(255,255,255,.4) 0,rgba(255,255,255,.05) 40%,rgba(255,255,255,0) 40%) no-repeat scroll;display:block;margin:.15em}.uhr .letterarea{display:block;position:absolute;top:12%;bottom:12%;left:12%;right:12%;overflow:hidden;font-size:200%}.item{transition:box-shadow .5s,text-shadow .5s,border-color .5s,color .5s}.dot{position:absolute;display:block;height:0;width:0;border:.2em solid;border-radius:1em}.dot.active{border-color:#eee;box-shadow:0 0 .2em #eee}.dot1{top:3.75%;left:3.75%}.dot2{top:3.75%;right:3.75%}.dot3{bottom:3.75%;right:3.75%}.dot4{bottom:3.75%;left:3.75%}.letter{height:10%;width:9.0909%;padding:0;margin:0;display:inline-block;text-align:center;line-height:160%}.letter.active{color:#eee;text-shadow:0 0 .2em #eee}.onoffswitch{position:relative;width:86px;margin:1em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.onoffswitch-checkbox{display:none}.onoffswitch-label{display:block;overflow:hidden;cursor:pointer;border:2px solid #999;border-radius:50px}.modeswitch-inner,.onoffswitch-inner{width:200%;margin-left:-100%;-moz-transition:margin .3s ease-in 0s;-webkit-transition:margin .3s ease-in 0s;-o-transition:margin .3s ease-in 0s;transition:margin .3s ease-in 0s}.modeswitch-inner:after,.modeswitch-inner:before,.onoffswitch-inner:after,.onoffswitch-inner:before{float:left;width:50%;height:24px;padding:0;line-height:24px;font-size:18px;color:#fff;font-weight:700;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.onoffswitch-inner:before{content:"EIN";padding-left:12px;color:#eee;transition:background-color .5s}.onoffswitch-inner:after{content:"AUS";padding-right:12px;background-color:#eee;color:#999;text-align:right}.onoffswitch-switch{width:30px;margin:-3px;background:#fff;border:2px solid #999;border-radius:50px;position:absolute;top:0;bottom:0;right:58px;-moz-transition:all .3s ease-in 0s;-webkit-transition:all .3s ease-in 0s;-o-transition:all .3s ease-in 0s;transition:all .3s ease-in 0s}.onoffswitch-checkbox:checked+.onoffswitch-label .modeswitch-inner,.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner{margin-left:0}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-switch{right:0}.modeswitch-inner:before{content:"MIN";padding-left:12px;background-color:#fff;color:#000}.modeswitch-inner:after{content:"SEC";padding-right:12px;background-color:#fff;color:#000;text-align:right}a.uhr-configlink{cursor:pointer;background:url(../resources/settings.png) no-repeat;width:24px;height:24px;display:inline-block;margin:2px;vertical-align:top}.uhr-controlpanel{border-radius:.5em;box-shadow:0 0 1em #000;background-color:#fff;display:inline-block;padding:.5em;position:sticky;bottom:0;margin-left:1em}.uhr-controlpanel .content{position:relative}a.uhr-closecontrolpanel{cursor:pointer;display:inline-block;position:absolute;right:0;top:-1em;width:24px;height:24px;background:url(../resources/close.png) no-repeat}#disclaimer{font-size:.5em}#disclaimer a{color:#444;text-decoration:underline}
|
14
header.ts
Normal file
14
header.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
39
index.html
39
index.html
|
@ -21,18 +21,32 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
|
||||
<meta name="apple-mobile-web-app-title" content="Bärneruhr"/>
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr.min.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-black.min.css" data-class="black" data-name="Schwarz"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-white.min.css" data-class="white" data-name="Weiss"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-red.min.css" data-class="red" data-name="Rot"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-yellow.min.css" data-class="yellow" data-name="Gelb"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-green.min.css" data-class="green" data-name="Grün"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-blue.min.css" data-class="blue" data-name="Blau"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-pink.min.css" data-class="pink" data-name="Pink"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/assets/uhr.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/assets/uhr-black.css" data-class="black"
|
||||
data-name="Schwarz"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/assets/uhr-white.css" data-class="white"
|
||||
data-name="Weiss"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/assets/uhr-red.css" data-class="red" data-name="Rot"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/assets/uhr-yellow.css" data-class="yellow"
|
||||
data-name="Gelb"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/assets/uhr-green.css" data-class="green"
|
||||
data-name="Grün"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/assets/uhr-blue.css" data-class="blue"
|
||||
data-name="Blau"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/assets/uhr-pink.css" data-class="pink"
|
||||
data-name="Pink"/>
|
||||
<link rel="shortcut icon" type="image/png" href="resources/favicon.png"/>
|
||||
<link rel="apple-touch-icon-precomposed" href="resources/apple-touch-icon-precomposed.png"/>
|
||||
<script type="text/javascript" src="dist/libs.min.js"></script>
|
||||
<script type="text/javascript" src="dist/jquery.uhr.complete.min.js"></script>
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.4.1.js"
|
||||
integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU="
|
||||
crossorigin="anonymous"></script>
|
||||
<script
|
||||
src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"
|
||||
integrity="sha256-T0Vest3yCU7pafRw9r+settMBX6JkKN06dqBnpQ8d30="
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
|
||||
<script type="text/javascript" src="dist/lib/uhr.bundle.js"></script>
|
||||
<script type="text/javascript">
|
||||
function go(url) {
|
||||
window.location = url;
|
||||
|
@ -42,10 +56,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
</head>
|
||||
<body style="padding:0;margin:0;">
|
||||
<div id="uhr"></div>
|
||||
<p id="disclaimer">Created by <a href="http://www.fritteli.ch/">fritteli</a>, inspired by <a href="http://www.qlocktwo.com/">QLOCKTWO</a>. <a
|
||||
<p id="disclaimer">Created by <a href="http://www.fritteli.ch/">fritteli</a>, inspired by <a
|
||||
href="http://www.qlocktwo.com/">QLOCKTWO</a>. <a
|
||||
onclick="go('info/index.html')" href="#">Read more!</a></p>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
(function ($) {
|
||||
var width = $(window).width();
|
||||
var height = $(window).height();
|
||||
var size = Math.min(width, height) + 'px';
|
||||
|
|
|
@ -18,13 +18,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
<title>Die Zeit im Wort - Informationen</title>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width,user-scalable=yes,initial-scale=1"/>
|
||||
<link rel="stylesheet" type="text/css" href="../dist/uhr.min.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../dist/uhr-black.min.css" data-class="black"/>
|
||||
<link rel="stylesheet" type="text/css" href="../dist/uhr-red.min.css" data-class="red"/>
|
||||
<link rel="stylesheet" type="text/css" href="../dist/assets/uhr.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../dist/assets/uhr-black.css" data-class="black"/>
|
||||
<link rel="stylesheet" type="text/css" href="../dist/assets/uhr-red.css" data-class="red"/>
|
||||
<link rel="stylesheet" type="text/css" href="info.css"/>
|
||||
<link rel="shortcut icon" type="image/png" href="../resources/favicon.png"/>
|
||||
<script type="text/javascript" src="../dist/libs.min.js"></script>
|
||||
<script type="text/javascript" src="../dist/jquery.uhr.base.min.js"></script>
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.4.1.js"
|
||||
integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU="
|
||||
crossorigin="anonymous"></script>
|
||||
<script
|
||||
src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"
|
||||
integrity="sha256-T0Vest3yCU7pafRw9r+settMBX6JkKN06dqBnpQ8d30="
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
|
||||
<script type="text/javascript" src="../dist/lib/uhr.bundle.js"></script>
|
||||
<!--<script type="text/javascript" src="../dist/lib/layout_de_ch.js"></script>-->
|
||||
<script type="text/javascript">
|
||||
function go(url) {
|
||||
window.location = url;
|
||||
|
@ -75,16 +84,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
<h3 id="requirements">Benötigte Bibliotheken<a href="#toc" class="toclink">Zum Inhalt</a></h3>
|
||||
<ul>
|
||||
<li><a href="http://jquery.com/download/">jQuery</a> (getestet mit Version 2.1.0)</li>
|
||||
<li><a href="http://jqueryui.com/download/">jQuery-UI</a> (getestet mit Version 1.10.4) mit folgenden
|
||||
<li><a href="http://jquery.com/download/">jQuery</a> (getestet mit Version 3.4.1)</li>
|
||||
<li><a href="http://jqueryui.com/download/">jQuery-UI</a> (getestet mit Version 1.12.1) mit folgenden
|
||||
Komponenten:
|
||||
<ul>
|
||||
<li>core</li>
|
||||
<li>widget</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="https://github.com/carhartl/jquery-cookie/releases">jQuery-cookie</a> (getestet mit Version
|
||||
1.4.0)
|
||||
<li><a href="https://github.com/js-cookie/js-cookie/releases">js-cookie</a> (getestet mit Version
|
||||
2.2.0)
|
||||
</li>
|
||||
</ul>
|
||||
<h3 id="include-in-html">Einbinden in HTML<a href="#toc" class="toclink">Zum Inhalt</a></h3>
|
||||
|
@ -95,15 +103,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
<p>Füge folgende Zeilen im <code><head></code>-Tag deines HTML-Dokumentes ein. <strong>Beachte dabei,
|
||||
dass die CSS-Dateien <em>vor</em> den Javascript eingebunden werden</strong>.<br/>
|
||||
<code><link rel="stylesheet" type="text/css" href="dist/uhr.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-black.min.css" data-class="black" data-name="Schwarz" />
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-white.min.css" data-class="white" data-name="Weiss" />
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-red.min.css" data-class="red" data-name="Rot" />
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-yellow.min.css" data-class="yellow" data-name="Gelb" />
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-green.min.css" data-class="green" data-name="Grün" />
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-blue.min.css" data-class="blue" data-name="Blau" />
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-pink.min.css" data-class="pink" data-name="Pink" />
|
||||
<script type="text/javascript" src="dist/libs.min.js"></script>
|
||||
<script type="text/javascript" src="dist/jquery.uhr.complete.min.js"></script></code>
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-black.min.css" data-class="black"
|
||||
data-name="Schwarz" />
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-white.min.css" data-class="white"
|
||||
data-name="Weiss" />
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-red.min.css" data-class="red" data-name="Rot"
|
||||
/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-yellow.min.css" data-class="yellow"
|
||||
data-name="Gelb" />
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-green.min.css" data-class="green"
|
||||
data-name="Grün" />
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-blue.min.css" data-class="blue"
|
||||
data-name="Blau" />
|
||||
<link rel="stylesheet" type="text/css" href="dist/uhr-pink.min.css" data-class="pink"
|
||||
data-name="Pink" />
|
||||
<script type="text/javascript" src="dist/uhr.js"></script></code>
|
||||
</p>
|
||||
|
||||
<p>Von den Stylesheets zwingend ist <code>uhr.css</code> und mindestens eines der Farbschema-Stylesheets. Die
|
||||
|
@ -207,7 +221,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
<br/>Default: <code>'100%'</code></dd>
|
||||
</dl>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
(function ($) {
|
||||
$('#uhr1').uhr({
|
||||
width: '200px',
|
||||
language: 'de_CH',
|
||||
|
|
7569
package-lock.json
generated
7569
package-lock.json
generated
File diff suppressed because it is too large
Load diff
58
package.json
58
package.json
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
"name": "uhr",
|
||||
"version": "9.0.0-dev.0",
|
||||
"version": "9.0.0-dev.1",
|
||||
"description": "jQuery QLOCKTWO plugin",
|
||||
"keywords": [
|
||||
"jquery-plugin",
|
||||
"qlocktwo"
|
||||
],
|
||||
"homepage": "http://bärneruhr.ch/",
|
||||
"homepage": "https://bärneruhr.ch/",
|
||||
"author": {
|
||||
"name": "Manuel Friedli",
|
||||
"email": "manuel@fritteli.ch",
|
||||
"url": "http://www.fritteli.ch/"
|
||||
"url": "https://www.fritteli.ch/"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -22,29 +22,45 @@
|
|||
}
|
||||
],
|
||||
"license": "GPL-3.0",
|
||||
"scripts": {
|
||||
"start": "webpack-dev-server --open --config webpack.dev.js",
|
||||
"lint": "eslint --ext .ts src/",
|
||||
"build": "webpack --mode development --env development --config webpack.dev.js",
|
||||
"build:prod": "webpack -p --mode production --env production --config webpack.prod.js",
|
||||
"preversion": "git add -A . && echo ACTIVATE NPM TEST PLEASE",
|
||||
"version": "echo $npm_package_version > VERSION && git add -A .",
|
||||
"postversion": "git push && git push --tags"
|
||||
},
|
||||
"dependencies": {
|
||||
"jquery": "3.4.1",
|
||||
"jquery-ui": "1.12.1",
|
||||
"jquery.cookie": "1.4.1"
|
||||
"js-cookie": "2.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "1.0.4",
|
||||
"grunt-cli": "1.3.2",
|
||||
"grunt-contrib-clean": "2.0.0",
|
||||
"grunt-contrib-concat": "1.0.1",
|
||||
"grunt-contrib-connect": "2.0.0",
|
||||
"grunt-contrib-cssmin": "3.0.0",
|
||||
"grunt-contrib-jshint": "2.1.0",
|
||||
"grunt-contrib-qunit": "3.1.0",
|
||||
"grunt-contrib-uglify": "4.0.1",
|
||||
"grunt-contrib-watch": "1.1.0",
|
||||
"grunt-mocha-phantomjs": "4.0.0",
|
||||
"grunt-version": "1.3.0",
|
||||
"jshint-stylish": "2.2.1",
|
||||
"load-grunt-tasks": "4.0.0",
|
||||
"phantomjs-prebuilt": "2.1.16",
|
||||
"time-grunt": "2.0.0",
|
||||
"@types/jquery": "3.3.29",
|
||||
"@types/jqueryui": "1.12.7",
|
||||
"@types/js-cookie": "2.2.2",
|
||||
"@typescript-eslint/eslint-plugin": "1.7.0",
|
||||
"@typescript-eslint/parser": "1.7.0",
|
||||
"chai": "4.2.0",
|
||||
"clean-webpack-plugin": "2.0.2",
|
||||
"css-loader": "2.1.1",
|
||||
"eslint": "5.16.0",
|
||||
"eslint-loader": "2.1.2",
|
||||
"eslint-plugin-header": "^3.0.0",
|
||||
"extract-loader": "3.1.0",
|
||||
"file-loader": "3.0.1",
|
||||
"mini-css-extract-plugin": "0.6.0",
|
||||
"mocha": "6.1.4",
|
||||
"chai": "4.2.0"
|
||||
"node-sass": "4.12.0",
|
||||
"phantomjs-prebuilt": "2.1.16",
|
||||
"sass-loader": "7.1.0",
|
||||
"style-loader": "0.23.1",
|
||||
"ts-loader": "5.4.5",
|
||||
"typescript": "3.4.5",
|
||||
"webpack": "4.30.0",
|
||||
"webpack-cli": "3.3.1",
|
||||
"webpack-dev-server": "3.3.1",
|
||||
"webpack-merge": "4.2.1"
|
||||
}
|
||||
}
|
||||
|
|
BIN
resources/assets/fonts/uhr.woff
Normal file
BIN
resources/assets/fonts/uhr.woff
Normal file
Binary file not shown.
BIN
resources/assets/images/close.png
Normal file
BIN
resources/assets/images/close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 407 B |
BIN
resources/assets/images/settings.png
Normal file
BIN
resources/assets/images/settings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 435 B |
|
@ -14,7 +14,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/
|
||||
@font-face {
|
||||
font-family: 'Uhrenfont';
|
||||
src: url('../resources/uhr.woff') format('woff');
|
||||
src: url('../assets/fonts/uhr.woff') format('woff');
|
||||
}
|
||||
|
||||
body {
|
||||
|
@ -25,9 +25,8 @@ body {
|
|||
position: relative;
|
||||
margin: 0;
|
||||
transition: background-color 0.5s;
|
||||
}
|
||||
|
||||
.uhr .reflection {
|
||||
.reflection {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
|
@ -36,6 +35,7 @@ body {
|
|||
background: radial-gradient(225em 45em at 160% 0, rgba(255, 255, 255, 0.4) 0, rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0) 40%) no-repeat scroll;
|
||||
display: block;
|
||||
margin: 0.15em;
|
||||
}
|
||||
}
|
||||
|
||||
#themeswitcher {
|
||||
|
@ -206,7 +206,7 @@ body {
|
|||
|
||||
a.uhr-configlink {
|
||||
cursor: pointer;
|
||||
background: url("../resources/settings.png") no-repeat;
|
||||
background: url("../assets/images/settings.png") no-repeat;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: inline-block;
|
||||
|
@ -228,6 +228,7 @@ a.uhr-configlink {
|
|||
.uhr-controlpanel .content {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
a.uhr-closecontrolpanel {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
|
@ -236,7 +237,7 @@ a.uhr-closecontrolpanel {
|
|||
top: -1em;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background: url("../resources/close.png") no-repeat;
|
||||
background: url("../assets/images/close.png") no-repeat;
|
||||
}
|
||||
|
||||
#disclaimer {
|
43
src/bundle.ts
Normal file
43
src/bundle.ts
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
// We just need to reference all required files at least once, so that the tree-shaker won't remove them from
|
||||
// the bundle.
|
||||
import * as uhr from './index';
|
||||
import {LayoutDe} from './layout/layout-de';
|
||||
import {LayoutDeCh} from './layout/layout-de_ch';
|
||||
import {LayoutDeChGenau} from './layout/layout-de_ch_genau';
|
||||
import {LayoutDk} from './layout/layout-dk';
|
||||
import {LayoutEn} from './layout/layout-en';
|
||||
import {LayoutEs} from './layout/layout-es';
|
||||
import {LayoutFr} from './layout/layout-fr';
|
||||
import {LayoutIt} from './layout/layout-it';
|
||||
import {LayoutNl} from './layout/layout-nl';
|
||||
import {LayoutPt} from './layout/layout-pt';
|
||||
|
||||
/*eslint @typescript-eslint/no-unused-vars: "warn"*/
|
||||
|
||||
let a = uhr;
|
||||
a = LayoutDeCh;
|
||||
a = LayoutDeChGenau;
|
||||
a = LayoutDe;
|
||||
a = LayoutDk;
|
||||
a = LayoutEn;
|
||||
a = LayoutEs;
|
||||
a = LayoutFr;
|
||||
a = LayoutIt;
|
||||
a = LayoutNl;
|
||||
a = LayoutPt;
|
81
src/cookie-handler.ts
Normal file
81
src/cookie-handler.ts
Normal file
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import * as Cookies from 'js-cookie';
|
||||
|
||||
export class CookieHandler {
|
||||
public constructor(private readonly widgetId: string, private readonly cookiePath?: string) {
|
||||
}
|
||||
|
||||
public getLayout(): string {
|
||||
const oldCookie = this.getCookie('uhr-language');
|
||||
if (oldCookie) {
|
||||
// aha, old cookie is set. migrate to new one!
|
||||
this.removeCookie('uhr-language');
|
||||
this.setLayout(oldCookie);
|
||||
}
|
||||
return this.getCookie('uhr-layout');
|
||||
}
|
||||
|
||||
public setLayout(layout: string): void {
|
||||
this.setCookie('uhr-layout', layout);
|
||||
}
|
||||
|
||||
public getMode(): string {
|
||||
return this.getCookie('uhr-mode');
|
||||
}
|
||||
|
||||
public setMode(mode: string): void {
|
||||
this.setCookie('uhr-mode', mode);
|
||||
}
|
||||
|
||||
public getStatus(): string {
|
||||
return this.getCookie('uhr-status');
|
||||
}
|
||||
|
||||
public setStatus(status: string): void {
|
||||
this.setCookie('uhr-status', status);
|
||||
}
|
||||
|
||||
public getTheme(): string {
|
||||
return this.getCookie('uhr-theme');
|
||||
}
|
||||
|
||||
public setTheme(theme: string): void {
|
||||
this.setCookie('uhr-theme', theme);
|
||||
}
|
||||
|
||||
private getCookie(cookieName: string): string {
|
||||
return Cookies.get(cookieName + this.widgetId);
|
||||
}
|
||||
|
||||
private setCookie(cookieName: string, cookieValue: string): void {
|
||||
let options;
|
||||
if (this.cookiePath) {
|
||||
options = {expires: 365, path: this.cookiePath};
|
||||
} else {
|
||||
options = {expires: 365};
|
||||
}
|
||||
Cookies.set(cookieName + this.widgetId, cookieValue, options);
|
||||
}
|
||||
|
||||
private removeCookie(cookieName: string): void {
|
||||
if (this.cookiePath) {
|
||||
Cookies.remove(cookieName + this.widgetId, {path: this.cookiePath});
|
||||
} else {
|
||||
Cookies.remove(cookieName + this.widgetId);
|
||||
}
|
||||
}
|
||||
}
|
87
src/domain/globals.ts
Normal file
87
src/domain/globals.ts
Normal file
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Layout} from './layout';
|
||||
import {Theme} from './theme';
|
||||
|
||||
export class Globals {
|
||||
private static layouts: Layout[] = [];
|
||||
private static themes: Theme[] = [];
|
||||
|
||||
public static registerTheme(name: string, styleClass: string): void {
|
||||
if (Globals.themes.some((value): boolean => value.name === name)) {
|
||||
console.warn(`Theme with name '${name}' already registered; ignoring register request for styleClass '${styleClass}'.`);
|
||||
} else {
|
||||
Globals.themes.push({
|
||||
name,
|
||||
styleClass
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public static hasThemes(): boolean {
|
||||
return Globals.themes.length > 0;
|
||||
}
|
||||
|
||||
public static hasMultipleThemes(): boolean {
|
||||
return Globals.themes.length > 1;
|
||||
}
|
||||
|
||||
public static getFirstTheme(): Theme {
|
||||
return Globals.getTheme(0);
|
||||
}
|
||||
|
||||
public static getTheme(index: number): Theme {
|
||||
return Globals.themes[index];
|
||||
}
|
||||
|
||||
public static getThemes(): Theme[] {
|
||||
return Globals.themes;
|
||||
}
|
||||
|
||||
public static registerLayout(layout: Layout): void {
|
||||
const available = !Globals.layouts.some((element): boolean => {
|
||||
if (layout.code === element.code) {
|
||||
if (layout.prettyName !== element.prettyName) {
|
||||
console.error(
|
||||
`Error: Language code '${layout.code}' cannot be registered for layout '${layout.prettyName}' because it is already registered for layout '${element.prettyName}'!`
|
||||
);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
if (available) {
|
||||
Globals.layouts.push(layout);
|
||||
Globals.layouts.sort((a, b): number => a.prettyName.localeCompare(b.prettyName));
|
||||
}
|
||||
}
|
||||
|
||||
public static hasLayouts(): boolean {
|
||||
return Globals.layouts.length > 0;
|
||||
}
|
||||
|
||||
public static hasMultipleLayouts(): boolean {
|
||||
return Globals.layouts.length > 1;
|
||||
}
|
||||
|
||||
public static getFirstLayout(): Layout {
|
||||
return Globals.layouts[0];
|
||||
}
|
||||
|
||||
public static getLayouts(): Layout[] {
|
||||
return Globals.layouts;
|
||||
}
|
||||
}
|
50
src/domain/layout.ts
Normal file
50
src/domain/layout.ts
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Letter} from './letter';
|
||||
|
||||
export interface Layout {
|
||||
readonly code: string;
|
||||
getCoarseMinute?: (time: Date) => number;
|
||||
getDotMinute?: (time: Date) => number;
|
||||
getHour?: (time: Date) => number;
|
||||
getSeconds?: (time: Date) => number;
|
||||
readonly hours: TimeDefinition;
|
||||
readonly letters: string[];
|
||||
readonly minutes: TimeDefinition;
|
||||
parsed?: Letter[][];
|
||||
readonly permanent: WordDefinition | WordDefinition[];
|
||||
readonly prettyName: string;
|
||||
seconds?: TimeDefinition;
|
||||
readonly version: number;
|
||||
}
|
||||
|
||||
export interface WordDefinition {
|
||||
[line: number]: number[];
|
||||
}
|
||||
|
||||
export interface TimeDefinition {
|
||||
[values: string]: WordDefinition | WordDefinition[];
|
||||
}
|
||||
|
||||
export const EMPTY_LAYOUT: Layout = {
|
||||
code: null,
|
||||
hours: null,
|
||||
letters: [],
|
||||
minutes: null,
|
||||
permanent: [],
|
||||
prettyName: null,
|
||||
version: 2
|
||||
};
|
44
src/domain/letter.ts
Normal file
44
src/domain/letter.ts
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Ein Buchstabe. Hilfsklasse für den Renderer und Inhalt der Layout-Arrays.
|
||||
* @param value Der Buchstabe, der Dargestellt werden soll.
|
||||
* @param style Die CSS-Styleklassen des Buchstabens.
|
||||
*/
|
||||
export class Letter {
|
||||
// private readonly value: string;
|
||||
private style: string;
|
||||
|
||||
public constructor(private readonly value: string, style: string = '') {
|
||||
this.value = value;
|
||||
this.style = style;
|
||||
// if (style) {
|
||||
// this.style = style;
|
||||
// }
|
||||
}
|
||||
|
||||
public addStyle(style: string): void {
|
||||
if (this.style === '') {
|
||||
this.style = style;
|
||||
} else {
|
||||
this.style += ` ${style}`;
|
||||
}
|
||||
}
|
||||
|
||||
public toString(): string {
|
||||
return `<span class="item letter ${this.style}">${this.value}</span>`;
|
||||
}
|
||||
}
|
19
src/domain/theme.ts
Normal file
19
src/domain/theme.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface Theme {
|
||||
styleClass: string;
|
||||
name: string;
|
||||
}
|
87
src/index.ts
Normal file
87
src/index.ts
Normal file
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Globals} from './domain/globals';
|
||||
import {Layout} from './domain/layout';
|
||||
import {Uhr} from './uhr';
|
||||
import {WidgetPrototype} from './widget/widget-prototype';
|
||||
import {autodetectThemes} from './theme-autodetector';
|
||||
|
||||
declare namespace Fritteli {
|
||||
interface Fritteli {
|
||||
uhr: Uhr;
|
||||
}
|
||||
|
||||
interface Uhr {
|
||||
register: (layout: Layout) => void;
|
||||
}
|
||||
}
|
||||
declare namespace $ {
|
||||
const fritteli: Fritteli.Fritteli;
|
||||
const widget: JQueryUI.Widget;
|
||||
}
|
||||
|
||||
// First things first: discover included themes and register them
|
||||
autodetectThemes();
|
||||
|
||||
const widgetPrototype: WidgetPrototype = {
|
||||
options: {
|
||||
width: '100%',
|
||||
status: 'on',
|
||||
language: 'de_CH',
|
||||
theme: Globals.getFirstTheme().styleClass,
|
||||
force: false,
|
||||
controls: true,
|
||||
cookiePath: undefined,
|
||||
autoresize: true,
|
||||
mode: 'normal'
|
||||
},
|
||||
start: function (): void {
|
||||
this._fritteliUhrInstance.start();
|
||||
},
|
||||
stop: function (): void {
|
||||
this._fritteliUhrInstance.stop();
|
||||
},
|
||||
toggle: function (): void {
|
||||
this._fritteliUhrInstance.toggle();
|
||||
},
|
||||
language: function (key: string): void {
|
||||
this._fritteliUhrInstance.setLayout(key);
|
||||
},
|
||||
theme: function (styleClass: string): void {
|
||||
this._fritteliUhrInstance.setTheme(styleClass);
|
||||
},
|
||||
time: function (time: Date): void {
|
||||
this._fritteliUhrInstance.setTime(time);
|
||||
},
|
||||
mode: function (mode: string): void {
|
||||
this._fritteliUhrInstance.setMode(mode);
|
||||
},
|
||||
width: function (width: string): void {
|
||||
this._fritteliUhrInstance.setWidth(width);
|
||||
},
|
||||
// constructor method
|
||||
_create: function (): void {
|
||||
this._fritteliUhrInstance = new Uhr(this);
|
||||
},
|
||||
// destructor method
|
||||
_destroy: function (): void {
|
||||
this._fritteliUhrInstance.destroy();
|
||||
},
|
||||
_fritteliUhrInstance: null
|
||||
};
|
||||
$.widget('fritteli.uhr', widgetPrototype);
|
||||
|
||||
$.fritteli.uhr.register = Globals.registerLayout;
|
322
src/layout-renderer.ts
Normal file
322
src/layout-renderer.ts
Normal file
|
@ -0,0 +1,322 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Layout, TimeDefinition, WordDefinition} from './domain/layout';
|
||||
import {Letter} from './domain/letter';
|
||||
|
||||
class LayoutRendererV2Delegate {
|
||||
private static readonly vorne0: WordDefinition = {
|
||||
3: [2, 3, 4],
|
||||
4: [1, 5],
|
||||
5: [1, 4, 5],
|
||||
6: [1, 3, 5],
|
||||
7: [1, 2, 5],
|
||||
8: [1, 5],
|
||||
9: [2, 3, 4]
|
||||
};
|
||||
private static readonly hinten0: WordDefinition = {
|
||||
3: [8, 9, 10],
|
||||
4: [7, 11],
|
||||
5: [7, 10, 11],
|
||||
6: [7, 9, 11],
|
||||
7: [7, 8, 11],
|
||||
8: [7, 11],
|
||||
9: [8, 9, 10]
|
||||
};
|
||||
private static readonly vorne1: WordDefinition = {
|
||||
3: [3],
|
||||
4: [2, 3],
|
||||
5: [3],
|
||||
6: [3],
|
||||
7: [3],
|
||||
8: [3],
|
||||
9: [2, 3, 4]
|
||||
};
|
||||
private static readonly hinten1: WordDefinition = {
|
||||
3: [9],
|
||||
4: [8, 9],
|
||||
5: [9],
|
||||
6: [9],
|
||||
7: [9],
|
||||
8: [9],
|
||||
9: [8, 9, 10]
|
||||
};
|
||||
private static readonly vorne2: WordDefinition = {
|
||||
3: [2, 3, 4],
|
||||
4: [1, 5],
|
||||
5: [5],
|
||||
6: [4],
|
||||
7: [3],
|
||||
8: [2],
|
||||
9: [1, 2, 3, 4, 5]
|
||||
};
|
||||
private static readonly hinten2: WordDefinition = {
|
||||
3: [8, 9, 10],
|
||||
4: [7, 11],
|
||||
5: [11],
|
||||
6: [10],
|
||||
7: [9],
|
||||
8: [8],
|
||||
9: [7, 8, 9, 10, 11]
|
||||
};
|
||||
private static readonly vorne3: WordDefinition = {
|
||||
3: [1, 2, 3, 4, 5],
|
||||
4: [4],
|
||||
5: [3],
|
||||
6: [4],
|
||||
7: [5],
|
||||
8: [1, 5],
|
||||
9: [2, 3, 4]
|
||||
};
|
||||
private static readonly hinten3: WordDefinition = {
|
||||
3: [7, 8, 9, 10, 11],
|
||||
4: [10],
|
||||
5: [9],
|
||||
6: [10],
|
||||
7: [11],
|
||||
8: [7, 11],
|
||||
9: [8, 9, 10]
|
||||
};
|
||||
private static readonly vorne4: WordDefinition = {
|
||||
3: [4],
|
||||
4: [3, 4],
|
||||
5: [2, 4],
|
||||
6: [1, 4],
|
||||
7: [1, 2, 3, 4, 5],
|
||||
8: [4],
|
||||
9: [4]
|
||||
};
|
||||
private static readonly hinten4: WordDefinition = {
|
||||
3: [10],
|
||||
4: [9, 10],
|
||||
5: [8, 10],
|
||||
6: [7, 10],
|
||||
7: [7, 8, 9, 10, 11],
|
||||
8: [10],
|
||||
9: [10]
|
||||
};
|
||||
private static readonly vorne5: WordDefinition = {
|
||||
3: [1, 2, 3, 4, 5],
|
||||
4: [1],
|
||||
5: [1, 2, 3, 4],
|
||||
6: [5],
|
||||
7: [5],
|
||||
8: [1, 5],
|
||||
9: [2, 3, 4]
|
||||
};
|
||||
private static readonly hinten5: WordDefinition = {
|
||||
3: [7, 8, 9, 10, 11],
|
||||
4: [7],
|
||||
5: [7, 8, 9, 10],
|
||||
6: [11],
|
||||
7: [11],
|
||||
8: [7, 11],
|
||||
9: [8, 9, 10]
|
||||
};
|
||||
private static readonly hinten6: WordDefinition = {
|
||||
3: [9, 10],
|
||||
4: [8],
|
||||
5: [7],
|
||||
6: [7, 8, 9, 10],
|
||||
7: [7, 11],
|
||||
8: [7, 11],
|
||||
9: [8, 9, 10]
|
||||
};
|
||||
private static readonly hinten7: WordDefinition = {
|
||||
3: [7, 8, 9, 10, 11],
|
||||
4: [11],
|
||||
5: [10],
|
||||
6: [9],
|
||||
7: [8],
|
||||
8: [8],
|
||||
9: [8]
|
||||
};
|
||||
private static readonly hinten8: WordDefinition = {
|
||||
3: [8, 9, 10],
|
||||
4: [7, 11],
|
||||
5: [7, 11],
|
||||
6: [8, 9, 10],
|
||||
7: [7, 11],
|
||||
8: [7, 11],
|
||||
9: [8, 9, 10]
|
||||
};
|
||||
private static readonly hinten9: WordDefinition = {
|
||||
3: [8, 9, 10],
|
||||
4: [7, 11],
|
||||
5: [7, 11],
|
||||
6: [8, 9, 10, 11],
|
||||
7: [11],
|
||||
8: [10],
|
||||
9: [8, 9]
|
||||
};
|
||||
private static readonly seconds: TimeDefinition = {
|
||||
'0': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten0],
|
||||
'1': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten1],
|
||||
'2': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten2],
|
||||
'3': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten3],
|
||||
'4': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten4],
|
||||
'5': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten5],
|
||||
'6': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten6],
|
||||
'7': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten7],
|
||||
'8': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten8],
|
||||
'9': [LayoutRendererV2Delegate.vorne0, LayoutRendererV2Delegate.hinten9],
|
||||
'10': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten0],
|
||||
'11': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten1],
|
||||
'12': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten2],
|
||||
'13': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten3],
|
||||
'14': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten4],
|
||||
'15': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten5],
|
||||
'16': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten6],
|
||||
'17': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten7],
|
||||
'18': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten8],
|
||||
'19': [LayoutRendererV2Delegate.vorne1, LayoutRendererV2Delegate.hinten9],
|
||||
'20': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten0],
|
||||
'21': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten1],
|
||||
'22': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten2],
|
||||
'23': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten3],
|
||||
'24': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten4],
|
||||
'25': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten5],
|
||||
'26': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten6],
|
||||
'27': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten7],
|
||||
'28': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten8],
|
||||
'29': [LayoutRendererV2Delegate.vorne2, LayoutRendererV2Delegate.hinten9],
|
||||
'30': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten0],
|
||||
'31': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten1],
|
||||
'32': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten2],
|
||||
'33': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten3],
|
||||
'34': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten4],
|
||||
'35': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten5],
|
||||
'36': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten6],
|
||||
'37': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten7],
|
||||
'38': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten8],
|
||||
'39': [LayoutRendererV2Delegate.vorne3, LayoutRendererV2Delegate.hinten9],
|
||||
'40': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten0],
|
||||
'41': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten1],
|
||||
'42': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten2],
|
||||
'43': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten3],
|
||||
'44': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten4],
|
||||
'45': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten5],
|
||||
'46': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten6],
|
||||
'47': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten7],
|
||||
'48': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten8],
|
||||
'49': [LayoutRendererV2Delegate.vorne4, LayoutRendererV2Delegate.hinten9],
|
||||
'50': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten0],
|
||||
'51': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten1],
|
||||
'52': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten2],
|
||||
'53': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten3],
|
||||
'54': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten4],
|
||||
'55': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten5],
|
||||
'56': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten6],
|
||||
'57': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten7],
|
||||
'58': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten8],
|
||||
'59': [LayoutRendererV2Delegate.vorne5, LayoutRendererV2Delegate.hinten9]
|
||||
};
|
||||
|
||||
public constructor(private readonly layout: Layout) {
|
||||
}
|
||||
|
||||
public parse(): Letter[][] {
|
||||
const letters: Letter[][] = [];
|
||||
this.layout.letters.forEach((lineString: string): void => {
|
||||
const line: Letter[] = [];
|
||||
for (let c = 0; c < lineString.length; c++) {
|
||||
line.push(new Letter(lineString[c]));
|
||||
}
|
||||
letters.push(line);
|
||||
});
|
||||
this.parseArrayOrObject(letters, 'on', this.layout.permanent);
|
||||
if (typeof this.layout.seconds !== 'undefined' && this.layout.seconds !== null) {
|
||||
this.parseTimeDefinition(letters, 'second', this.layout.seconds);
|
||||
} else {
|
||||
this.parseTimeDefinition(letters, 'second', LayoutRendererV2Delegate.seconds);
|
||||
}
|
||||
this.parseTimeDefinition(letters, 'minute', this.layout.minutes);
|
||||
this.parseTimeDefinition(letters, 'hour', this.layout.hours);
|
||||
return letters;
|
||||
}
|
||||
|
||||
private parseObject(letters: Letter[][], styleClass: string, object: WordDefinition): void {
|
||||
if (typeof object !== 'undefined' && object !== null) {
|
||||
Object.keys(object)
|
||||
.map((key: string): number => Number(key))
|
||||
.forEach(
|
||||
(y: number): void => object[y].forEach(
|
||||
(x: number): void => letters[y - 1][x - 1].addStyle(styleClass)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private parseArrayOrObject(letters: Letter[][], styleClass: string, input: WordDefinition | WordDefinition[]): void {
|
||||
if (typeof input !== 'undefined' && input !== null) {
|
||||
if (Array.isArray(input)) {
|
||||
input.forEach((item: WordDefinition): void => this.parseObject(letters, styleClass, item));
|
||||
} else {
|
||||
this.parseObject(letters, styleClass, input);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private parseTimeDefinition(letters: Letter[][], styleClass: string, definition: TimeDefinition): void {
|
||||
if (typeof definition !== 'undefined' && definition !== null) {
|
||||
Object.keys(definition).forEach((listString: string): void => {
|
||||
const timeValues: string[] = listString.split(',');
|
||||
const highlightLetters: WordDefinition | WordDefinition[] = definition[listString];
|
||||
timeValues.forEach((timeValue: string): void => this.parseArrayOrObject(letters, styleClass + timeValue, highlightLetters));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hilfsklasse zum Rendern der Buchstaben der Uhr.
|
||||
* @param layout Layout-Objekt, das gerendert werden soll.
|
||||
* @param renderarea Das jQuery-gewrappte HTML-Element, auf dem gerendert werden soll.
|
||||
*/
|
||||
export class LayoutRenderer {
|
||||
public constructor(private readonly layout: Layout, private readonly renderarea: JQuery<HTMLElement>) {
|
||||
}
|
||||
|
||||
public render(beforeshow?: () => void): void {
|
||||
if (this.layout.parsed === undefined) {
|
||||
if (this.layout.version === 2) {
|
||||
const delegate: LayoutRendererV2Delegate = new LayoutRendererV2Delegate(this.layout);
|
||||
const parsedLayout: Letter[][] = delegate.parse();
|
||||
Object.defineProperty(this.layout, 'parsed', {
|
||||
value: parsedLayout,
|
||||
writable: false,
|
||||
configurable: false
|
||||
});
|
||||
} else {
|
||||
console.warn(`Unknown layout version: '${this.layout.version}', expecting '2'`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
const letters: Letter[][] = this.layout.parsed;
|
||||
this.renderarea.fadeOut('fast', (): void => {
|
||||
this.renderarea.empty();
|
||||
letters.forEach((line, index, array): void => {
|
||||
line.forEach((letter): JQuery<HTMLElement> => this.renderarea.append(letter.toString()));
|
||||
if (index < array.length - 1) {
|
||||
this.renderarea.append('<br/>');
|
||||
}
|
||||
});
|
||||
if (beforeshow) {
|
||||
beforeshow();
|
||||
}
|
||||
this.renderarea.fadeIn('fast');
|
||||
});
|
||||
}
|
||||
}
|
89
src/layout/layout-de.ts
Normal file
89
src/layout/layout-de.ts
Normal file
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Layout, WordDefinition} from '../domain/layout';
|
||||
|
||||
const esIst: WordDefinition = {1: [1, 2, 4, 5, 6]};
|
||||
const uhr: WordDefinition = {10: [9, 10, 11]};
|
||||
const nach: WordDefinition = {4: [8, 9, 10, 11]};
|
||||
const vor: WordDefinition = {4: [1, 2, 3]};
|
||||
const halb: WordDefinition = {5: [1, 2, 3, 4]};
|
||||
const fuenf: WordDefinition = {1: [8, 9, 10, 11]};
|
||||
const zehn: WordDefinition = {2: [1, 2, 3, 4]};
|
||||
const viertel: WordDefinition = {3: [5, 6, 7, 8, 9, 10, 11]};
|
||||
const zwanzig: WordDefinition = {2: [5, 6, 7, 8, 9, 10, 11]};
|
||||
const dreiviertel: WordDefinition = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]};
|
||||
|
||||
export const LayoutDe: Layout = {
|
||||
code: 'de',
|
||||
hours: {
|
||||
'0,12': {9: [7, 8, 9, 10, 11]},
|
||||
'1,13': {6: [1, 2, 3, 4]},
|
||||
'2,14': {6: [8, 9, 10, 11]},
|
||||
'3,15': {7: [1, 2, 3, 4]},
|
||||
'4,16': {7: [8, 9, 10, 11]},
|
||||
'5,17': {5: [8, 9, 10, 11]},
|
||||
'6,18': {8: [1, 2, 3, 4, 5]},
|
||||
'7,19': {9: [1, 2, 3, 4, 5, 6]},
|
||||
'8,20': {8: [8, 9, 10, 11]},
|
||||
'9,21': {10: [4, 5, 6, 7]},
|
||||
'10,22': {10: [1, 2, 3, 4]},
|
||||
'11,23': {5: [6, 7, 8]}
|
||||
},
|
||||
letters: [
|
||||
'ESKISTAFÜNF',
|
||||
'ZEHNZWANZIG',
|
||||
'DREIVIERTEL',
|
||||
'VORFUNKNACH',
|
||||
'HALBAELFÜNF',
|
||||
'EINSXAMZWEI',
|
||||
'DREIPMJVIER',
|
||||
'SECHSNLACHT',
|
||||
'SIEBENZWÖLF',
|
||||
'ZEHNEUNKUHR'
|
||||
],
|
||||
minutes: {
|
||||
'0,1,2,3,4': uhr,
|
||||
'5,6,7,8,9': [fuenf, nach],
|
||||
'10,11,12,13,14': [zehn, nach],
|
||||
'15,16,17,18,19': [viertel, nach],
|
||||
'20,21,22,23,24': [zwanzig, nach],
|
||||
'25,26,27,28,29': [fuenf, vor, halb],
|
||||
'30,31,32,33,34': halb,
|
||||
'35,36,37,38,39': [fuenf, nach, halb],
|
||||
'40,41,42,43,44': [zwanzig, vor],
|
||||
'45,46,47,48,49': dreiviertel,
|
||||
'50,51,52,53,54': [zehn, vor],
|
||||
'55,56,57,58,59': [fuenf, vor]
|
||||
},
|
||||
permanent: esIst,
|
||||
prettyName: 'Deutsch',
|
||||
version: 2
|
||||
};
|
||||
|
||||
declare namespace Fritteli {
|
||||
interface Fritteli {
|
||||
uhr: Uhr;
|
||||
}
|
||||
|
||||
interface Uhr {
|
||||
register: (layout: Layout) => void;
|
||||
}
|
||||
}
|
||||
declare namespace $ {
|
||||
const fritteli: Fritteli.Fritteli;
|
||||
}
|
||||
|
||||
$.fritteli.uhr.register(LayoutDe);
|
86
src/layout/layout-de_ch.ts
Normal file
86
src/layout/layout-de_ch.ts
Normal file
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Layout, WordDefinition} from '../domain/layout';
|
||||
|
||||
const esIsch: WordDefinition = {1: [1, 2, 4, 5, 6, 7]};
|
||||
const ab: WordDefinition = {4: [1, 2]};
|
||||
const vor: WordDefinition = {3: [9, 10, 11]};
|
||||
const haubi: WordDefinition = {4: [4, 5, 6, 7, 8]};
|
||||
const fuef: WordDefinition = {1: [9, 10, 11]};
|
||||
const zae: WordDefinition = {2: [9, 10, 11]};
|
||||
const viertu: WordDefinition = {2: [1, 2, 3, 4, 5, 6]};
|
||||
const zwaenzg: WordDefinition = {3: [1, 2, 3, 4, 5, 6]};
|
||||
|
||||
export const LayoutDeCh: Layout = {
|
||||
code: 'de_CH',
|
||||
hours: {
|
||||
'0,12': {10: [1, 2, 3, 4, 5, 6]},
|
||||
'1,13': {5: [1, 2, 3]},
|
||||
'2,14': {5: [4, 5, 6, 7]},
|
||||
'3,15': {5: [9, 10, 11]},
|
||||
'4,16': {6: [1, 2, 3, 4, 5]},
|
||||
'5,17': {6: [6, 7, 8, 9]},
|
||||
'6,18': {7: [1, 2, 3, 4, 5, 6]},
|
||||
'7,19': {7: [7, 8, 9, 10, 11]},
|
||||
'8,20': {8: [1, 2, 3, 4, 5]},
|
||||
'9,21': {8: [6, 7, 8, 9]},
|
||||
'10,22': {9: [1, 2, 3, 4]},
|
||||
'11,23': {9: [8, 9, 10, 11]}
|
||||
},
|
||||
letters: [
|
||||
'ESKISCHAFÜF',
|
||||
'VIERTUBFZÄÄ',
|
||||
'ZWÄNZGSIVOR',
|
||||
'ABOHAUBIEGE',
|
||||
'EISZWÖISDRÜ',
|
||||
'VIERIFÜFIQT',
|
||||
'SÄCHSISIBNI',
|
||||
'ACHTINÜNIEL',
|
||||
'ZÄNIERBEUFI',
|
||||
'ZWÖUFINAUHR'
|
||||
],
|
||||
minutes: {
|
||||
'5,6,7,8,9': [fuef, ab],
|
||||
'10,11,12,13,14': [zae, ab],
|
||||
'15,16,17,18,19': [viertu, ab],
|
||||
'20,21,22,23,24': [zwaenzg, ab],
|
||||
'25,26,27,28,29': [fuef, vor, haubi],
|
||||
'30,31,32,33,34': haubi,
|
||||
'35,36,37,38,39': [fuef, ab, haubi],
|
||||
'40,41,42,43,44': [zwaenzg, vor],
|
||||
'45,46,47,48,49': [viertu, vor],
|
||||
'50,51,52,53,54': [zae, vor],
|
||||
'55,56,57,58,59': [fuef, vor]
|
||||
},
|
||||
permanent: esIsch,
|
||||
prettyName: 'Bärndütsch',
|
||||
version: 2
|
||||
};
|
||||
|
||||
declare namespace Fritteli {
|
||||
interface Fritteli {
|
||||
uhr: Uhr;
|
||||
}
|
||||
|
||||
interface Uhr {
|
||||
register: (layout: Layout) => void;
|
||||
}
|
||||
}
|
||||
declare namespace $ {
|
||||
const fritteli: Fritteli.Fritteli;
|
||||
}
|
||||
|
||||
$.fritteli.uhr.register(LayoutDeCh);
|
88
src/layout/layout-de_ch_genau.ts
Normal file
88
src/layout/layout-de_ch_genau.ts
Normal file
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Layout, WordDefinition} from '../domain/layout';
|
||||
|
||||
const esIsch: WordDefinition = {1: [1, 2, 4, 5, 6, 7]};
|
||||
const genau: WordDefinition = {3: [7, 8, 9, 10, 11]};
|
||||
const ab: WordDefinition = {4: [4, 5]};
|
||||
const vor: WordDefinition = {4: [1, 2, 3]};
|
||||
const haubi: WordDefinition = {4: [7, 8, 9, 10, 11]};
|
||||
const fuef: WordDefinition = {1: [9, 10, 11]};
|
||||
const zae: WordDefinition = {2: [9, 10, 11]};
|
||||
const viertu: WordDefinition = {2: [1, 2, 3, 4, 5, 6]};
|
||||
const zwaenzg: WordDefinition = {3: [1, 2, 3, 4, 5, 6]};
|
||||
|
||||
export const LayoutDeChGenau: Layout = {
|
||||
code: 'de_CH_genau',
|
||||
hours: {
|
||||
'0,12': {10: [1, 2, 3, 4, 5, 6]},
|
||||
'1,13': {5: [1, 2, 3]},
|
||||
'2,14': {5: [4, 5, 6, 7]},
|
||||
'3,15': {5: [9, 10, 11]},
|
||||
'4,16': {6: [1, 2, 3, 4, 5]},
|
||||
'5,17': {6: [6, 7, 8, 9]},
|
||||
'6,18': {7: [1, 2, 3, 4, 5, 6]},
|
||||
'7,19': {7: [7, 8, 9, 10, 11]},
|
||||
'8,20': {8: [1, 2, 3, 4, 5]},
|
||||
'9,21': {8: [6, 7, 8, 9]},
|
||||
'10,22': {9: [1, 2, 3, 4]},
|
||||
'11,23': {9: [8, 9, 10, 11]}
|
||||
},
|
||||
letters: [
|
||||
'ESKISCHAFÜF',
|
||||
'VIERTUBFZÄÄ',
|
||||
'ZWÄNZGGENAU',
|
||||
'VORABOHAUBI',
|
||||
'EISZWÖISDRÜ',
|
||||
'VIERIFÜFIQT',
|
||||
'SÄCHSISIBNI',
|
||||
'ACHTINÜNIEL',
|
||||
'ZÄNIERBEUFI',
|
||||
'ZWÖUFINAUHR'
|
||||
],
|
||||
minutes: {
|
||||
'0': genau,
|
||||
'5,6,7,8,9': [fuef, ab],
|
||||
'10,11,12,13,14': [zae, ab],
|
||||
'15,16,17,18,19': [viertu, ab],
|
||||
'20,21,22,23,24': [zwaenzg, ab],
|
||||
'25,26,27,28,29': [fuef, vor, haubi],
|
||||
'30,31,32,33,34': haubi,
|
||||
'35,36,37,38,39': [fuef, ab, haubi],
|
||||
'40,41,42,43,44': [zwaenzg, vor],
|
||||
'45,46,47,48,49': [viertu, vor],
|
||||
'50,51,52,53,54': [zae, vor],
|
||||
'55,56,57,58,59': [fuef, vor]
|
||||
},
|
||||
permanent: esIsch,
|
||||
prettyName: 'Bärndütsch (genau)',
|
||||
version: 2
|
||||
};
|
||||
|
||||
declare namespace Fritteli {
|
||||
interface Fritteli {
|
||||
uhr: Uhr;
|
||||
}
|
||||
|
||||
interface Uhr {
|
||||
register: (layout: Layout) => void;
|
||||
}
|
||||
}
|
||||
declare namespace $ {
|
||||
const fritteli: Fritteli.Fritteli;
|
||||
}
|
||||
|
||||
$.fritteli.uhr.register(LayoutDeChGenau);
|
87
src/layout/layout-dk.ts
Normal file
87
src/layout/layout-dk.ts
Normal file
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Layout, WordDefinition} from '../domain/layout';
|
||||
|
||||
const klokkenEr: WordDefinition = {1: [1, 2, 3, 4, 5, 6, 7, 9, 10]};
|
||||
const minutter: WordDefinition = {4: [4, 5, 6, 7, 8, 9, 10, 11]};
|
||||
const i: WordDefinition = {5: [8]};
|
||||
const over: WordDefinition = {5: [4, 5, 6, 7]};
|
||||
const fem: WordDefinition = {2: [1, 2, 3]};
|
||||
const ti: WordDefinition = {4: [1, 2]};
|
||||
const kvart: WordDefinition = {3: [4, 5, 6, 7, 8]};
|
||||
const tyve: WordDefinition = {2: [4, 5, 6, 7]};
|
||||
const halv: WordDefinition = {6: [8, 9, 10, 11]};
|
||||
|
||||
export const LayoutDk: Layout = {
|
||||
code: 'dk',
|
||||
hours: {
|
||||
'0,12': {10: [8, 9, 10, 11]},
|
||||
'1,13': {7: [1, 2]},
|
||||
'2,14': {7: [3, 4]},
|
||||
'3,15': {7: [5, 6, 7]},
|
||||
'4,16': {7: [8, 9, 10, 11]},
|
||||
'5,17': {8: [1, 2, 3]},
|
||||
'6,18': {8: [4, 5, 6, 7]},
|
||||
'7,19': {8: [9, 10, 11]},
|
||||
'8,20': {9: [1, 2, 3, 4]},
|
||||
'9,21': {9: [6, 7]},
|
||||
'10,22': {9: [10, 11]},
|
||||
'11,23': {10: [1, 2, 3, 4, 5, 6]}
|
||||
},
|
||||
letters: [
|
||||
'KLOKKENVERO',
|
||||
'FEMTYVESKLA',
|
||||
'OJEKVARTVAT',
|
||||
'TIAMINUTTER',
|
||||
'VEMOVERILMF',
|
||||
'MONALISHALV',
|
||||
'ETTOTREFIRE',
|
||||
'FEMSEKSRSYV',
|
||||
'OTTERNIMETI',
|
||||
'ELLEVEATOLV'
|
||||
],
|
||||
minutes: {
|
||||
'5,6,7,8,9': [fem, minutter, over],
|
||||
'10,11,12,13,14': [ti, minutter, over],
|
||||
'15,16,17,18,19': [kvart, over],
|
||||
'20,21,22,23,24': [tyve, minutter, over],
|
||||
'25,26,27,28,29': [fem, minutter, i, halv],
|
||||
'30,31,32,33,34': [halv],
|
||||
'35,36,37,38,39': [fem, minutter, over, halv],
|
||||
'40,41,42,43,44': [tyve, minutter, i],
|
||||
'45,46,47,48,49': [kvart, i],
|
||||
'50,51,52,53,54': [ti, minutter, i],
|
||||
'55,56,57,58,59': [fem, minutter, i]
|
||||
},
|
||||
permanent: klokkenEr,
|
||||
prettyName: 'Dansk',
|
||||
version: 2
|
||||
};
|
||||
|
||||
declare namespace Fritteli {
|
||||
interface Fritteli {
|
||||
uhr: Uhr;
|
||||
}
|
||||
|
||||
interface Uhr {
|
||||
register: (layout: Layout) => void;
|
||||
}
|
||||
}
|
||||
declare namespace $ {
|
||||
const fritteli: Fritteli.Fritteli;
|
||||
}
|
||||
|
||||
$.fritteli.uhr.register(LayoutDk);
|
97
src/layout/layout-en.ts
Normal file
97
src/layout/layout-en.ts
Normal file
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Layout, WordDefinition} from '../domain/layout';
|
||||
|
||||
const itIs: WordDefinition = {1: [1, 2, 4, 5]};
|
||||
const half: WordDefinition = {4: [1, 2, 3, 4]};
|
||||
const to: WordDefinition = {4: [10, 11]};
|
||||
const past: WordDefinition = {5: [1, 2, 3, 4]};
|
||||
const oClock: WordDefinition = {10: [5, 6, 7, 8, 9, 10, 11]};
|
||||
const five: WordDefinition = {3: [7, 8, 9, 10]};
|
||||
const ten: WordDefinition = {4: [6, 7, 8]};
|
||||
const aQuarter: WordDefinition = {2: [1, 3, 4, 5, 6, 7, 8, 9]};
|
||||
const twenty: WordDefinition = {3: [1, 2, 3, 4, 5, 6]};
|
||||
const twentyfive: WordDefinition = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]};
|
||||
|
||||
export const LayoutEn: Layout = {
|
||||
code: 'en',
|
||||
getHour: (time: Date): number => {
|
||||
const hour = time.getHours();
|
||||
if (time.getMinutes() >= 35) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
},
|
||||
|
||||
hours: {
|
||||
'0,12': {9: [6, 7, 8, 9, 10, 11]},
|
||||
'1,13': {6: [1, 2, 3]},
|
||||
'2,14': {7: [9, 10, 11]},
|
||||
'3,15': {6: [7, 8, 9, 10, 11]},
|
||||
'4,16': {7: [1, 2, 3, 4]},
|
||||
'5,17': {7: [5, 6, 7, 8]},
|
||||
'6,18': {6: [4, 5, 6]},
|
||||
'7,19': {9: [1, 2, 3, 4, 5]},
|
||||
'8,20': {8: [1, 2, 3, 4, 5]},
|
||||
'9,21': {5: [8, 9, 10, 11]},
|
||||
'10,22': {10: [1, 2, 3]},
|
||||
'11,23': {8: [6, 7, 8, 9, 10, 11]}
|
||||
},
|
||||
letters: [
|
||||
'ITLISBFAMPM',
|
||||
'ACQUARTERDC',
|
||||
'TWENTYFIVEX',
|
||||
'HALFBTENFTO',
|
||||
'PASTERUNINE',
|
||||
'ONESIXTHREE',
|
||||
'FOURFIVETWO',
|
||||
'EIGHTELEVEN',
|
||||
'SEVENTWELVE',
|
||||
'TENSO\'CLOCK'
|
||||
],
|
||||
minutes: {
|
||||
'0,1,2,3,4': oClock,
|
||||
'5,6,7,8,9': [five, past],
|
||||
'10,11,12,13,14': [ten, past],
|
||||
'15,16,17,18,19': [aQuarter, past],
|
||||
'20,21,22,23,24': [twenty, past],
|
||||
'25,26,27,28,29': [twentyfive, past],
|
||||
'30,31,32,33,34': [half, past],
|
||||
'35,36,37,38,39': [twentyfive, to],
|
||||
'40,41,42,43,44': [twenty, to],
|
||||
'45,46,47,48,49': [aQuarter, to],
|
||||
'50,51,52,53,54': [ten, to],
|
||||
'55,56,57,58,59': [five, to]
|
||||
},
|
||||
permanent: itIs,
|
||||
prettyName: 'English',
|
||||
version: 2
|
||||
};
|
||||
|
||||
declare namespace Fritteli {
|
||||
interface Fritteli {
|
||||
uhr: Uhr;
|
||||
}
|
||||
|
||||
interface Uhr {
|
||||
register: (layout: Layout) => void;
|
||||
}
|
||||
}
|
||||
declare namespace $ {
|
||||
const fritteli: Fritteli.Fritteli;
|
||||
}
|
||||
|
||||
$.fritteli.uhr.register(LayoutEn);
|
96
src/layout/layout-es.ts
Normal file
96
src/layout/layout-es.ts
Normal file
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Layout, WordDefinition} from '../domain/layout';
|
||||
|
||||
const esLa: WordDefinition = {1: [1, 2, 6, 7]};
|
||||
const sonLas: WordDefinition = {1: [2, 3, 4, 6, 7, 8]};
|
||||
const y: WordDefinition = {7: [6]};
|
||||
const menos: WordDefinition = {7: [7, 8, 9, 10, 11]};
|
||||
const media: WordDefinition = {10: [1, 2, 3, 4, 5]};
|
||||
const cinco: WordDefinition = {9: [7, 8, 9, 10, 11]};
|
||||
const diez: WordDefinition = {8: [8, 9, 10, 11]};
|
||||
const cuarto: WordDefinition = {10: [6, 7, 8, 9, 10, 11]};
|
||||
const veinte: WordDefinition = {8: [2, 3, 4, 5, 6, 7]};
|
||||
const veinticinco: WordDefinition = {9: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]};
|
||||
|
||||
export const LayoutEs: Layout = {
|
||||
code: 'es',
|
||||
getHour: (time: Date): number => {
|
||||
const hour = time.getHours();
|
||||
if (time.getMinutes() >= 35) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
},
|
||||
|
||||
hours: {
|
||||
'0,12': [sonLas, {7: [1, 2, 3, 4]}],
|
||||
'1,13': [esLa, {1: [9, 10, 11]}],
|
||||
'2,14': [sonLas, {2: [1, 2, 3]}],
|
||||
'3,15': [sonLas, {2: [5, 6, 7, 8]}],
|
||||
'4,16': [sonLas, {3: [1, 2, 3, 4, 5, 6]}],
|
||||
'5,17': [sonLas, {3: [7, 8, 9, 10, 11]}],
|
||||
'6,18': [sonLas, {4: [1, 2, 3, 4]}],
|
||||
'7,19': [sonLas, {4: [6, 7, 8, 9, 10]}],
|
||||
'8,20': [sonLas, {5: [1, 2, 3, 4]}],
|
||||
'9,21': [sonLas, {5: [5, 6, 7, 8, 9]}],
|
||||
'10,22': [sonLas, {6: [3, 4, 5, 6]}],
|
||||
'11,23': [sonLas, {6: [8, 9, 10, 11]}]
|
||||
},
|
||||
letters: [
|
||||
'ESONELASUNA',
|
||||
'DOSITRESORE',
|
||||
'CUATROCINCO',
|
||||
'SEISASIETEN',
|
||||
'OCHONUEVEYO',
|
||||
'LADIEZSONCE',
|
||||
'DOCELYMENOS',
|
||||
'OVEINTEDIEZ',
|
||||
'VEINTICINCO',
|
||||
'MEDIACUARTO'
|
||||
],
|
||||
minutes: {
|
||||
'5,6,7,8,9': [y, cinco],
|
||||
'10,11,12,13,14': [y, diez],
|
||||
'15,16,17,18,19': [y, cuarto],
|
||||
'20,21,22,23,24': [y, veinte],
|
||||
'25,26,27,28,29': [y, veinticinco],
|
||||
'30,31,32,33,34': [y, media],
|
||||
'35,36,37,38,39': [menos, veinticinco],
|
||||
'40,41,42,43,44': [menos, veinte],
|
||||
'45,46,47,48,49': [menos, cuarto],
|
||||
'50,51,52,53,54': [menos, diez],
|
||||
'55,56,57,58,59': [menos, cinco]
|
||||
},
|
||||
permanent: null,
|
||||
prettyName: 'Español',
|
||||
version: 2
|
||||
};
|
||||
|
||||
declare namespace Fritteli {
|
||||
interface Fritteli {
|
||||
uhr: Uhr;
|
||||
}
|
||||
|
||||
interface Uhr {
|
||||
register: (layout: Layout) => void;
|
||||
}
|
||||
}
|
||||
declare namespace $ {
|
||||
const fritteli: Fritteli.Fritteli;
|
||||
}
|
||||
|
||||
$.fritteli.uhr.register(LayoutEs);
|
130
src/layout/layout-fr.ts
Normal file
130
src/layout/layout-fr.ts
Normal file
|
@ -0,0 +1,130 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Layout, WordDefinition} from '../domain/layout';
|
||||
|
||||
const ilEst: WordDefinition = {1: [1, 2, 4, 5, 6]};
|
||||
const et: WordDefinition = {8: [1, 2]};
|
||||
const moins: WordDefinition = {7: [1, 2, 3, 4, 5]};
|
||||
const demie: WordDefinition = {10: [4, 5, 6, 7, 8]};
|
||||
const heures: WordDefinition = {6: [6, 7, 8, 9, 10, 11]};
|
||||
const le: WordDefinition = {7: [7, 8]};
|
||||
const cinq: WordDefinition = {9: [7, 8, 9, 10]};
|
||||
const dix: WordDefinition = {7: [9, 10, 11]};
|
||||
const quart: WordDefinition = {8: [4, 5, 6, 7, 8]};
|
||||
const vingt: WordDefinition = {9: [1, 2, 3, 4, 5]};
|
||||
const vingtcinq: WordDefinition = {9: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]};
|
||||
|
||||
export const LayoutFr: Layout = {
|
||||
code: 'fr',
|
||||
getHour: (time: Date): number => {
|
||||
const hour = time.getHours();
|
||||
if (time.getMinutes() >= 35) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
},
|
||||
hours: {
|
||||
'0': {5: [6, 7, 8, 9, 10, 11]},
|
||||
'1,13': [
|
||||
{3: [5, 6, 7]},
|
||||
heures
|
||||
],
|
||||
'2,14': [
|
||||
{1: [8, 9, 10, 11]},
|
||||
heures
|
||||
],
|
||||
'3,15': [
|
||||
{2: [7, 8, 9, 10, 11]},
|
||||
heures
|
||||
],
|
||||
'4,16': [
|
||||
{2: [1, 2, 3, 4, 5, 6]},
|
||||
heures
|
||||
],
|
||||
'5,17': [
|
||||
{4: [8, 9, 10, 11]},
|
||||
heures
|
||||
],
|
||||
'6,18': [
|
||||
{4: [5, 6, 7]},
|
||||
heures
|
||||
],
|
||||
'7,19': [
|
||||
{3: [8, 9, 10, 11]},
|
||||
heures
|
||||
],
|
||||
'8,20': [
|
||||
{4: [1, 2, 3, 4]},
|
||||
heures
|
||||
],
|
||||
'9,21': [
|
||||
{3: [1, 2, 3, 4]},
|
||||
heures
|
||||
],
|
||||
'10,22': [
|
||||
{5: [3, 4, 5]},
|
||||
heures
|
||||
],
|
||||
'11,23': [
|
||||
{6: [1, 2, 3, 4]},
|
||||
heures
|
||||
],
|
||||
'12': {5: [1, 2, 3, 4]}
|
||||
},
|
||||
letters: [
|
||||
'ILNESTODEUX',
|
||||
'QUATRETROIS',
|
||||
'NEUFUNESEPT',
|
||||
'HUITSIXCINQ',
|
||||
'MIDIXMINUIT',
|
||||
'ONZERHEURES',
|
||||
'MOINSOLEDIX',
|
||||
'ETRQUARTPMD',
|
||||
'VINGT-CINQU',
|
||||
'ETSDEMIEPAM'
|
||||
],
|
||||
minutes: {
|
||||
'5,6,7,8,9': cinq,
|
||||
'10,11,12,13,14': dix,
|
||||
'15,16,17,18,19': [et, quart],
|
||||
'20,21,22,23,24': vingt,
|
||||
'25,26,27,28,29': vingtcinq,
|
||||
'30,31,32,33,34': [et, demie],
|
||||
'35,36,37,38,39': [moins, vingtcinq],
|
||||
'40,41,42,43,44': [moins, vingt],
|
||||
'45,46,47,48,49': [moins, le, quart],
|
||||
'50,51,52,53,54': [moins, dix],
|
||||
'55,56,57,58,59': [moins, cinq]
|
||||
},
|
||||
permanent: ilEst,
|
||||
prettyName: 'Français',
|
||||
version: 2
|
||||
};
|
||||
|
||||
declare namespace Fritteli {
|
||||
interface Fritteli {
|
||||
uhr: Uhr;
|
||||
}
|
||||
|
||||
interface Uhr {
|
||||
register: (layout: Layout) => void;
|
||||
}
|
||||
}
|
||||
declare namespace $ {
|
||||
const fritteli: Fritteli.Fritteli;
|
||||
}
|
||||
|
||||
$.fritteli.uhr.register(LayoutFr);
|
95
src/layout/layout-it.ts
Normal file
95
src/layout/layout-it.ts
Normal file
|
@ -0,0 +1,95 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Layout, WordDefinition} from '../domain/layout';
|
||||
|
||||
const sonoLe: WordDefinition = {1: [1, 2, 3, 4, 6, 7]};
|
||||
const eL: WordDefinition = {2: [1, 3, 4]};
|
||||
const e: WordDefinition = {8: [1]};
|
||||
const meno: WordDefinition = {7: [8, 9, 10, 11]};
|
||||
const mezza: WordDefinition = {10: [7, 8, 9, 10, 11]};
|
||||
const cinque: WordDefinition = {9: [6, 7, 8, 9, 10, 11]};
|
||||
const dieci: WordDefinition = {10: [1, 2, 3, 4, 5]};
|
||||
const unQuarto: WordDefinition = {8: [3, 4, 6, 7, 8, 9, 10, 11]};
|
||||
const venti: WordDefinition = {9: [1, 2, 3, 4, 5]};
|
||||
const venticinque: WordDefinition = {9: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]};
|
||||
|
||||
export const LayoutIt: Layout = {
|
||||
code: 'it',
|
||||
getHour: (time: Date): number => {
|
||||
const hour = time.getHours();
|
||||
if (time.getMinutes() >= 35) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
},
|
||||
hours: {
|
||||
'0,12': [sonoLe, {5: [1, 2, 3, 4, 5, 6]}],
|
||||
'1,13': [eL, {2: [5, 6, 7]}],
|
||||
'2,14': [sonoLe, {2: [9, 10, 11]}],
|
||||
'3,15': [sonoLe, {3: [1, 2, 3]}],
|
||||
'4,16': [sonoLe, {6: [1, 2, 3, 4, 5, 6, 7]}],
|
||||
'5,17': [sonoLe, {7: [1, 2, 3, 4, 5, 6]}],
|
||||
'6,18': [sonoLe, {6: [9, 10, 11]}],
|
||||
'7,19': [sonoLe, {5: [7, 8, 9, 10, 11]}],
|
||||
'8,20': [sonoLe, {3: [4, 5, 6, 7]}],
|
||||
'9,21': [sonoLe, {3: [8, 9, 10, 11]}],
|
||||
'10,22': [sonoLe, {4: [1, 2, 3, 4, 5]}],
|
||||
'11,23': [sonoLe, {4: [6, 7, 8, 9, 10, 11]}]
|
||||
},
|
||||
letters: [
|
||||
'SONORLEBORE',
|
||||
'ÈRL\'UNASDUE',
|
||||
'TREOTTONOVE',
|
||||
'DIECIUNDICI',
|
||||
'DODICISETTE',
|
||||
'QUATTROCSEI',
|
||||
'CINQUEAMENO',
|
||||
'ECUNOQUARTO',
|
||||
'VENTICINQUE',
|
||||
'DIECIPMEZZA'
|
||||
],
|
||||
minutes: {
|
||||
'5,6,7,8,9': [e, cinque],
|
||||
'10,11,12,13,14': [e, dieci],
|
||||
'15,16,17,18,19': [e, unQuarto],
|
||||
'20,21,22,23,24': [e, venti],
|
||||
'25,26,27,28,29': [e, venticinque],
|
||||
'30,31,32,33,34': [e, mezza],
|
||||
'35,36,37,38,39': [meno, venticinque],
|
||||
'40,41,42,43,44': [meno, venti],
|
||||
'45,46,47,48,49': [meno, unQuarto],
|
||||
'50,51,52,53,54': [meno, dieci],
|
||||
'55,56,57,58,59': [meno, cinque]
|
||||
},
|
||||
permanent: null,
|
||||
prettyName: 'Italiano',
|
||||
version: 2
|
||||
};
|
||||
|
||||
declare namespace Fritteli {
|
||||
interface Fritteli {
|
||||
uhr: Uhr;
|
||||
}
|
||||
|
||||
interface Uhr {
|
||||
register: (layout: Layout) => void;
|
||||
}
|
||||
}
|
||||
declare namespace $ {
|
||||
const fritteli: Fritteli.Fritteli;
|
||||
}
|
||||
|
||||
$.fritteli.uhr.register(LayoutIt);
|
96
src/layout/layout-nl.ts
Normal file
96
src/layout/layout-nl.ts
Normal file
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Layout, WordDefinition} from '../domain/layout';
|
||||
|
||||
const hetIs: WordDefinition = {1: [1, 2, 3, 5, 6]};
|
||||
const over1: WordDefinition = {3: [1, 2, 3, 4]};
|
||||
const voor1: WordDefinition = {2: [8, 9, 10, 11]};
|
||||
const over2: WordDefinition = {4: [8, 9, 10, 11]};
|
||||
const voor2: WordDefinition = {5: [1, 2, 3, 4]};
|
||||
const half: WordDefinition = {4: [1, 2, 3, 4]};
|
||||
const vijf: WordDefinition = {1: [8, 9, 10, 11]};
|
||||
const tien: WordDefinition = {2: [1, 2, 3, 4]};
|
||||
const kwart: WordDefinition = {3: [7, 8, 9, 10, 11]};
|
||||
const uur: WordDefinition = {10: [9, 10, 11]};
|
||||
|
||||
export const LayoutNl: Layout = {
|
||||
code: 'nl',
|
||||
getHour: (time: Date): number => {
|
||||
const hour = time.getHours();
|
||||
if (time.getMinutes() >= 20) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
},
|
||||
hours: {
|
||||
'0,12': {10: [1, 2, 3, 4, 5, 6]},
|
||||
'1,13': {5: [8, 9, 10]},
|
||||
'2,14': {6: [1, 2, 3, 4]},
|
||||
'3,15': {6: [8, 9, 10, 11]},
|
||||
'4,16': {7: [1, 2, 3, 4]},
|
||||
'5,17': {7: [5, 6, 7, 8]},
|
||||
'6,18': {7: [9, 10, 11]},
|
||||
'7,19': {8: [1, 2, 3, 4, 5]},
|
||||
'8,20': {9: [1, 2, 3, 4]},
|
||||
'9,21': {8: [7, 8, 9, 10, 11]},
|
||||
'10,22': {9: [5, 6, 7, 8]},
|
||||
'11,23': {9: [9, 10, 11]}
|
||||
},
|
||||
letters: [
|
||||
'HETKISAVIJF',
|
||||
'TIENBTZVOOR',
|
||||
'OVERMEKWART',
|
||||
'HALFSPWOVER',
|
||||
'VOORTHGEENS',
|
||||
'TWEEPVCDRIE',
|
||||
'VIERVIJFZES',
|
||||
'ZEVENONEGEN',
|
||||
'ACHTTIENELF',
|
||||
'TWAALFBFUUR'
|
||||
],
|
||||
minutes: {
|
||||
'0,1,2,3,4': uur,
|
||||
'5,6,7,8,9': [vijf, over1],
|
||||
'10,11,12,13,14': [tien, over1],
|
||||
'15,16,17,18,19': [kwart, over2],
|
||||
'20,21,22,23,24': [tien, voor1, half],
|
||||
'25,26,27,28,29': [vijf, voor1, half],
|
||||
'30,31,32,33,34': half,
|
||||
'35,36,37,38,39': [vijf, over1, half],
|
||||
'40,41,42,43,44': [tien, over1, half],
|
||||
'45,46,47,48,49': [kwart, voor2],
|
||||
'50,51,52,53,54': [tien, voor1],
|
||||
'55,56,57,58,59': [vijf, voor1]
|
||||
},
|
||||
permanent: hetIs,
|
||||
prettyName: 'Nederlands',
|
||||
version: 2
|
||||
};
|
||||
|
||||
declare namespace Fritteli {
|
||||
interface Fritteli {
|
||||
uhr: Uhr;
|
||||
}
|
||||
|
||||
interface Uhr {
|
||||
register: (layout: Layout) => void;
|
||||
}
|
||||
}
|
||||
declare namespace $ {
|
||||
const fritteli: Fritteli.Fritteli;
|
||||
}
|
||||
|
||||
$.fritteli.uhr.register(LayoutNl);
|
96
src/layout/layout-pt.ts
Normal file
96
src/layout/layout-pt.ts
Normal file
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Layout, WordDefinition} from '../domain/layout';
|
||||
|
||||
const e: WordDefinition = {1: [1]};
|
||||
const sao: WordDefinition = {1: [2, 3, 4]};
|
||||
const e1: WordDefinition = {7: [8]};
|
||||
const e2: WordDefinition = {10: [5]};
|
||||
const menos: WordDefinition = {7: [7, 8, 9, 10, 11]};
|
||||
const meia: WordDefinition = {8: [8, 9, 10, 11]};
|
||||
const cinco: WordDefinition = {10: [7, 8, 9, 10, 11]};
|
||||
const dez: WordDefinition = {10: [1, 2, 3]};
|
||||
const umQuarto: WordDefinition = {9: [1, 2, 4, 5, 6, 7, 8, 9]};
|
||||
const vinte: WordDefinition = {8: [1, 2, 3, 4, 5]};
|
||||
|
||||
export const LayoutPt: Layout = {
|
||||
code: 'pt',
|
||||
getHour: (time: Date): number => {
|
||||
const hour = time.getHours();
|
||||
if (time.getMinutes() >= 35) {
|
||||
return (hour + 1) % 24;
|
||||
}
|
||||
return hour;
|
||||
},
|
||||
hours: {
|
||||
'0': [e, {'6': [2, 3, 4, 5, 7, 8, 9, 10, 11]}],
|
||||
'12': [e, {'2': [1, 2, 3, 4, 6, 7, 8]}],
|
||||
'1,13': [e, {'1': [5, 6, 7]}],
|
||||
'2,14': [sao, {'3': [1, 2, 3, 4]}],
|
||||
'3,15': [sao, {'1': [8, 9, 10, 11]}],
|
||||
'4,16': [sao, {'4': [1, 2, 3, 4, 5, 6]}],
|
||||
'5,17': [sao, {'5': [1, 2, 3, 4, 5]}],
|
||||
'6,18': [sao, {'3': [4, 5, 6, 7]}],
|
||||
'7,19': [sao, {'3': [7, 8, 9, 10]}],
|
||||
'8,20': [sao, {'5': [5, 6, 7, 8]}],
|
||||
'9,21': [sao, {'4': [8, 9, 10, 11]}],
|
||||
'10,22': [sao, {'2': [9, 10, 11]}],
|
||||
'11,23': [sao, {'5': [8, 9, 10, 11]}]
|
||||
},
|
||||
letters: [
|
||||
'ÉSÃOUMATRÊS',
|
||||
'MEIOLDIADEZ',
|
||||
'DUASEISETEY',
|
||||
'QUATROHNOVE',
|
||||
'CINCOITONZE',
|
||||
'ZMEIALNOITE',
|
||||
'HORASYMENOS',
|
||||
'VINTECAMEIA',
|
||||
'UMVQUARTOPM',
|
||||
'DEZOEYCINCO'
|
||||
],
|
||||
minutes: {
|
||||
'5,6,7,8,9': [e1, cinco],
|
||||
'10,11,12,13,14': [e1, dez],
|
||||
'15,16,17,18,19': [e1, umQuarto],
|
||||
'20,21,22,23,24': [e1, vinte],
|
||||
'25,26,27,28,29': [e1, vinte, e2, cinco],
|
||||
'30,31,32,33,34': [e1, meia],
|
||||
'35,36,37,38,39': [menos, vinte, e2, cinco],
|
||||
'40,41,42,43,44': [menos, vinte],
|
||||
'45,46,47,48,49': [menos, umQuarto],
|
||||
'50,51,52,53,54': [menos, dez],
|
||||
'55,56,57,58,59': [menos, cinco]
|
||||
},
|
||||
permanent: null,
|
||||
prettyName: 'Português',
|
||||
version: 2
|
||||
};
|
||||
|
||||
declare namespace Fritteli {
|
||||
interface Fritteli {
|
||||
uhr: Uhr;
|
||||
}
|
||||
|
||||
interface Uhr {
|
||||
register: (layout: Layout) => void;
|
||||
}
|
||||
}
|
||||
declare namespace $ {
|
||||
const fritteli: Fritteli.Fritteli;
|
||||
}
|
||||
|
||||
$.fritteli.uhr.register(LayoutPt);
|
36
src/theme-autodetector.ts
Normal file
36
src/theme-autodetector.ts
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import * as $ from 'jquery';
|
||||
import {Globals} from './domain/globals';
|
||||
|
||||
export function autodetectThemes(): void {
|
||||
$('link[rel=stylesheet]').each((index, item): void => {
|
||||
const styleSheet = $(item);
|
||||
const styleClass: string = styleSheet.attr('data-class');
|
||||
if (styleClass !== undefined) {
|
||||
let name: string = styleSheet.attr('data-name');
|
||||
if (name === undefined) {
|
||||
name = styleClass;
|
||||
}
|
||||
Globals.registerTheme(name, styleClass);
|
||||
}
|
||||
});
|
||||
|
||||
// fall-back if no theme was included
|
||||
if (!Globals.hasThemes()) {
|
||||
Globals.registerTheme('', '');
|
||||
}
|
||||
}
|
|
@ -1,74 +0,0 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
(function($) {
|
||||
'use strict';
|
||||
var es_ist = {1: [1, 2, 4, 5, 6]};
|
||||
var uhr = {10: [9, 10, 11]};
|
||||
var nach = {4: [8, 9, 10, 11]};
|
||||
var vor = {4: [1, 2, 3]};
|
||||
var halb = {5: [1, 2, 3, 4]};
|
||||
var fuenf = {1: [8, 9, 10, 11]};
|
||||
var zehn = {2: [1, 2, 3, 4]};
|
||||
var viertel = {3: [5, 6, 7, 8, 9, 10, 11]};
|
||||
var zwanzig = {2: [5, 6, 7, 8, 9, 10, 11]};
|
||||
var dreiviertel = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]};
|
||||
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'Deutsch',
|
||||
"letters": [
|
||||
'ESKISTAFÜNF',
|
||||
'ZEHNZWANZIG',
|
||||
'DREIVIERTEL',
|
||||
'VORFUNKNACH',
|
||||
'HALBAELFÜNF',
|
||||
'EINSXAMZWEI',
|
||||
'DREIPMJVIER',
|
||||
'SECHSNLACHT',
|
||||
'SIEBENZWÖLF',
|
||||
'ZEHNEUNKUHR'
|
||||
],
|
||||
"permanent": es_ist,
|
||||
"minutes": {
|
||||
"0,1,2,3,4": uhr,
|
||||
"5,6,7,8,9": [fuenf, nach],
|
||||
"10,11,12,13,14": [zehn, nach],
|
||||
"15,16,17,18,19": [viertel, nach],
|
||||
"20,21,22,23,24": [zwanzig, nach],
|
||||
"25,26,27,28,29": [fuenf, vor, halb],
|
||||
"30,31,32,33,34": halb,
|
||||
"35,36,37,38,39": [fuenf, nach, halb],
|
||||
"40,41,42,43,44": [zwanzig, vor],
|
||||
"45,46,47,48,49": dreiviertel,
|
||||
"50,51,52,53,54": [zehn, vor],
|
||||
"55,56,57,58,59": [fuenf, vor]
|
||||
},
|
||||
"hours": {
|
||||
"0,12": {9: [7, 8, 9, 10, 11]},
|
||||
"1,13": {6: [1, 2, 3, 4]},
|
||||
"2,14": {6: [8, 9, 10, 11]},
|
||||
"3,15": {7: [1, 2, 3, 4]},
|
||||
"4,16": {7: [8, 9, 10, 11]},
|
||||
"5,17": {5: [8, 9, 10, 11]},
|
||||
"6,18": {8: [1, 2, 3, 4, 5]},
|
||||
"7,19": {9: [1, 2, 3, 4, 5, 6]},
|
||||
"8,20": {8: [8, 9, 10, 11]},
|
||||
"9,21": {10: [4, 5, 6, 7]},
|
||||
"10,22": {10: [1, 2, 3, 4]},
|
||||
"11,23": {5: [6, 7, 8]}
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('de', layout);
|
||||
}(jQuery));
|
|
@ -1,97 +0,0 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
(function($) {
|
||||
'use strict';
|
||||
// hilfsvariablen
|
||||
var es_isch = {1: [1, 2, 4, 5, 6, 7]};
|
||||
var ab = {4: [1, 2]};
|
||||
var vor = {3: [9, 10, 11]};
|
||||
var haubi = {4: [4, 5, 6, 7, 8]};
|
||||
var fuef = {1: [9, 10, 11]};
|
||||
var zae = {2: [9, 10, 11]};
|
||||
var viertu = {2: [1, 2, 3, 4, 5, 6]};
|
||||
var zwaenzg = {3: [1, 2, 3, 4, 5, 6]};
|
||||
var layout = {
|
||||
// version: zur Zeit immer 2 (Pflichtattribut)
|
||||
"version": 2,
|
||||
// Sprechender Name der Sprache
|
||||
"language": 'Bärndütsch',
|
||||
// Buchstabenfeld als Array von Strings.
|
||||
"letters": [
|
||||
'ESKISCHAFÜF',
|
||||
'VIERTUBFZÄÄ',
|
||||
'ZWÄNZGSIVOR',
|
||||
'ABOHAUBIEGE',
|
||||
'EISZWÖISDRÜ',
|
||||
'VIERIFÜFIQT',
|
||||
'SÄCHSISIBNI',
|
||||
'ACHTINÜNIEL',
|
||||
'ZÄNIERBEUFI',
|
||||
'ZWÖUFINAUHR'
|
||||
],
|
||||
// Permanent aktive Buchstaben. <array-or-object>, vgl. ausführliche Beschreibung bei "minutes".
|
||||
"permanent": es_isch,
|
||||
/*
|
||||
* Minuten: Objekt im folgenden Format:
|
||||
* {
|
||||
* <minuten>: <array-or-object>,
|
||||
* ...
|
||||
* }
|
||||
* <minuten>: String von Komma-separierten Minutenwerten, zu welchem die in <array-or-object> angegebenen Buchstaben aktiv sein sollen
|
||||
* <array-or-object> : [ <object>, ...] | <object>
|
||||
* <object>: { <zeile> : [ <spalte>, ... ] }
|
||||
* <zeile>: Die Zeile, in welcher die Buchstaben liegen; von oben gezählt, oben ist 1.
|
||||
* <spalte>: Die Spalte, in der ein einzelner Buchstabe liegt; von links gezählt, links ist 1.
|
||||
* Beispiel:
|
||||
* "minutes": {
|
||||
* "0,1": {1: [6, 7, 9]},
|
||||
* "5": [ {3: [1, 2]}, {4: [10, 11]} ]
|
||||
* }
|
||||
* Erklärung:
|
||||
* Bei Minuten 0 und 1 sind die Buchstaben 6, 7 und 9 der ersten Zeile aktiv.
|
||||
* Bei Minute 5 sind die Buchstaben 1 und 2 der Zeile 3 sowie die Buchstaben 10 und 11 der Zeile 4 aktiv.
|
||||
*/
|
||||
"minutes": {
|
||||
"5,6,7,8,9": [fuef, ab],
|
||||
"10,11,12,13,14": [zae, ab],
|
||||
"15,16,17,18,19": [viertu, ab],
|
||||
"20,21,22,23,24": [zwaenzg, ab],
|
||||
"25,26,27,28,29": [fuef, vor, haubi],
|
||||
"30,31,32,33,34": haubi,
|
||||
"35,36,37,38,39": [fuef, ab, haubi],
|
||||
"40,41,42,43,44": [zwaenzg, vor],
|
||||
"45,46,47,48,49": [viertu, vor],
|
||||
"50,51,52,53,54": [zae, vor],
|
||||
"55,56,57,58,59": [fuef, vor]
|
||||
},
|
||||
// Die Stunden; gleiches Format wie bei den Minuten
|
||||
"hours": {
|
||||
"0,12": {10: [1, 2, 3, 4, 5, 6]},
|
||||
"1,13": {5: [1, 2, 3]},
|
||||
"2,14": {5: [4, 5, 6, 7]},
|
||||
"3,15": {5: [9, 10, 11]},
|
||||
"4,16": {6: [1, 2, 3, 4, 5]},
|
||||
"5,17": {6: [6, 7, 8, 9]},
|
||||
"6,18": {7: [1, 2, 3, 4, 5, 6]},
|
||||
"7,19": {7: [7, 8, 9, 10, 11]},
|
||||
"8,20": {8: [1, 2, 3, 4, 5]},
|
||||
"9,21": {8: [6, 7, 8, 9]},
|
||||
"10,22": {9: [1, 2, 3, 4]},
|
||||
"11,23": {9: [8, 9, 10, 11]}
|
||||
}
|
||||
};
|
||||
// Das Layout bei der Uhr unter dem Code "de_CH" registrieren.
|
||||
$.fritteli.uhr.register('de_CH', layout);
|
||||
}(jQuery));
|
|
@ -1,72 +0,0 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
(function($) {
|
||||
'use strict';
|
||||
var es_isch = {1: [1, 2, 4, 5, 6, 7]};
|
||||
var genau = {3: [7, 8, 9, 10, 11]};
|
||||
var ab = {4: [4, 5]};
|
||||
var vor = {4: [1, 2, 3]};
|
||||
var haubi = {4: [7, 8, 9, 10, 11]};
|
||||
var fuef = {1: [9, 10, 11]};
|
||||
var zae = {2: [9, 10, 11]};
|
||||
var viertu = {2: [1, 2, 3, 4, 5, 6]};
|
||||
var zwaenzg = {3: [1, 2, 3, 4, 5, 6]};
|
||||
var layout = {
|
||||
"version": 2,
|
||||
"language": 'Bärndütsch (genau)',
|
||||
"letters": [
|
||||
'ESKISCHAFÜF',
|
||||
'VIERTUBFZÄÄ',
|
||||
'ZWÄNZGGENAU',
|
||||
'VORABOHAUBI',
|
||||
'EISZWÖISDRÜ',
|
||||
'VIERIFÜFIQT',
|
||||
'SÄCHSISIBNI',
|
||||
'ACHTINÜNIEL',
|
||||
'ZÄNIERBEUFI',
|
||||
'ZWÖUFINAUHR'
|
||||
],
|
||||
"permanent": es_isch,
|
||||
"minutes": {
|
||||
"0": genau,
|
||||
"5,6,7,8,9": [fuef, ab],
|
||||
"10,11,12,13,14": [zae, ab],
|
||||
"15,16,17,18,19": [viertu, ab],
|
||||
"20,21,22,23,24": [zwaenzg, ab],
|
||||
"25,26,27,28,29": [fuef, vor, haubi],
|
||||
"30,31,32,33,34": haubi,
|
||||
"35,36,37,38,39": [fuef, ab, haubi],
|
||||
"40,41,42,43,44": [zwaenzg, vor],
|
||||
"45,46,47,48,49": [viertu, vor],
|
||||
"50,51,52,53,54": [zae, vor],
|
||||
"55,56,57,58,59": [fuef, vor]
|
||||
},
|
||||
"hours": {
|
||||
"0,12": {10: [1, 2, 3, 4, 5, 6]},
|
||||
"1,13": {5: [1, 2, 3]},
|
||||
"2,14": {5: [4, 5, 6, 7]},
|
||||
"3,15": {5: [9, 10, 11]},
|
||||
"4,16": {6: [1, 2, 3, 4, 5]},
|
||||
"5,17": {6: [6, 7, 8, 9]},
|
||||
"6,18": {7: [1, 2, 3, 4, 5, 6]},
|
||||
"7,19": {7: [7, 8, 9, 10, 11]},
|
||||
"8,20": {8: [1, 2, 3, 4, 5]},
|
||||
"9,21": {8: [6, 7, 8, 9]},
|
||||
"10,22": {9: [1, 2, 3, 4]},
|
||||
"11,23": {9: [8, 9, 10, 11]}
|
||||
}
|
||||
};
|
||||
$.fritteli.uhr.register('de_CH_genau', layout);
|
||||
}(jQuery));
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue