reformatted the whole code base

This commit is contained in:
Manuel Friedli 2014-08-26 17:49:23 +02:00
parent f576347c06
commit f171b9c8aa
23 changed files with 1148 additions and 1001 deletions

View File

@ -7,16 +7,7 @@
// Predefined globals whom JSHint will ignore. // Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`. "browser" : true, // Standard browser globals e.g. `window`, `document`.
"node" : false,
"rhino" : false,
"couch" : false,
"wsh" : true, // Windows Scripting Host.
"jquery" : true, "jquery" : true,
"ender" : true,
"prototypejs" : false,
"mootools" : false,
"dojo" : false,
"predef" : [ "predef" : [
"suite", "suite",
@ -28,16 +19,13 @@
"debug" : false, // Allow debugger statements e.g. browser breakpoints. "debug" : false, // Allow debugger statements e.g. browser breakpoints.
"devel" : true, // Allow developments statements e.g. `console.log();`. "devel" : true, // Allow developments statements e.g. `console.log();`.
// ECMAScript 5.
"es5" : true, // Allow ECMAScript 5 syntax.
"strict" : true, // Require `use strict` pragma in every file. "strict" : true, // Require `use strict` pragma in every file.
"globalstrict" : false, // Allow global "use strict" (also enables 'strict'). "globalstrict" : false, // Allow global "use strict" (also enables 'strict').
// The Good Parts. // The Good Parts.
"asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons).
"laxbreak" : true, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
"bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.). "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.).
"boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
"curly" : true, // Require {} for every new block or scope. "curly" : true, // Require {} for every new block or scope.
@ -50,8 +38,6 @@
"latedef" : true, // Prohipit variable use before definition. "latedef" : true, // Prohipit variable use before definition.
"loopfunc" : false, // Allow functions to be defined within loops. "loopfunc" : false, // Allow functions to be defined within loops.
"noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
"regexp" : true, // Prohibit `.` and `[^...]` in regular expressions.
"regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`.
"scripturl" : true, // Tolerate script-targeted URLs. "scripturl" : true, // Tolerate script-targeted URLs.
"shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
"supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`.
@ -67,6 +53,6 @@
"plusplus" : false, // Prohibit use of `++` & `--`. "plusplus" : false, // Prohibit use of `++` & `--`.
"sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. "sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
"trailing" : true, // Prohibit trailing whitespaces. "trailing" : true, // Prohibit trailing whitespaces.
"white" : true, // Check against strict whitespace and indentation rules. "white" : false, // Check against strict whitespace and indentation rules.
"indent" : 0 // Specify indentation spacing "indent" : 0 // Specify indentation spacing
} }

View File

@ -13,16 +13,19 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
.uhr.black { .uhr.black {
background-color: #111; background-color: #111;
} }
.black .onoffswitch-inner:before { .black .onoffswitch-inner:before {
background-color: #111; background-color: #111;
} }
.uhr.black .dot:not(.active) { .uhr.black .dot:not(.active) {
border-color: rgba(255,255,255,0.1); border-color: rgba(255, 255, 255, 0.1);
box-shadow: 0 0 0.1em rgba(255,255,255,0.1); box-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
} }
.uhr.black .letter:not(.active) { .uhr.black .letter:not(.active) {
color: rgba(255,255,255,0.1); color: rgba(255, 255, 255, 0.1);
text-shadow: 0 0 0.1em rgba(255,255,255,0.1); text-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
} }

View File

@ -13,16 +13,19 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
.uhr.blue { .uhr.blue {
background-color: #00a; background-color: #00a;
} }
.blue .onoffswitch-inner:before { .blue .onoffswitch-inner:before {
background-color: #00a; background-color: #00a;
} }
.uhr.blue .dot:not(.active) { .uhr.blue .dot:not(.active) {
border-color: rgba(255,255,255,0.1); border-color: rgba(255, 255, 255, 0.1);
box-shadow: 0 0 0.1em rgba(255,255,255,0.1); box-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
} }
.uhr.blue .letter:not(.active) { .uhr.blue .letter:not(.active) {
color: rgba(255,255,255,0.1); color: rgba(255, 255, 255, 0.1);
text-shadow: 0 0 0.1em rgba(255,255,255,0.1); text-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
} }

View File

@ -13,16 +13,19 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
.uhr.green { .uhr.green {
background-color: #0c0; background-color: #0c0;
} }
.green .onoffswitch-inner:before { .green .onoffswitch-inner:before {
background-color: #0c0; background-color: #0c0;
} }
.uhr.green .dot:not(.active) { .uhr.green .dot:not(.active) {
border-color: rgba(0,0,0,0.1); border-color: rgba(0, 0, 0, 0.1);
box-shadow: 0 0 0.1em rgba(0,0,0,0.1); box-shadow: 0 0 0.1em rgba(0, 0, 0, 0.1);
} }
.uhr.green .letter:not(.active) { .uhr.green .letter:not(.active) {
color: rgba(0,0,0,0.1); color: rgba(0, 0, 0, 0.1);
text-shadow: 0 0 0.1em rgba(0,0,0,0.1); text-shadow: 0 0 0.1em rgba(0, 0, 0, 0.1);
} }

View File

@ -13,24 +13,29 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
.uhr.pink { .uhr.pink {
background-color: #f0a; background-color: #f0a;
} }
.uhr.pink .dot.active{
border-color: #fff; .uhr.pink .dot.active {
box-shadow: 0 0 0.1em #fff; border-color: #fff;
box-shadow: 0 0 0.1em #fff;
} }
.uhr.pink .letter.active{
color: #fff; .uhr.pink .letter.active {
text-shadow: 0 0 0.1em #fff; color: #fff;
text-shadow: 0 0 0.1em #fff;
} }
.pink .onoffswitch-inner:before { .pink .onoffswitch-inner:before {
background-color: #f0a; background-color: #f0a;
} }
.uhr.pink .dot:not(.active) { .uhr.pink .dot:not(.active) {
border-color: rgba(255,255,255,0.1); border-color: rgba(255, 255, 255, 0.1);
box-shadow: 0 0 0.1em rgba(255,255,255,0.1); box-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
} }
.uhr.pink .letter:not(.active) { .uhr.pink .letter:not(.active) {
color: rgba(255,255,255,0.1); color: rgba(255, 255, 255, 0.1);
text-shadow: 0 0 0.1em rgba(255,255,255,0.1); text-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
} }

View File

@ -13,16 +13,19 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
.uhr.red { .uhr.red {
background-color: #700; background-color: #700;
} }
.red .onoffswitch-inner:before { .red .onoffswitch-inner:before {
background-color: #700; background-color: #700;
} }
.uhr.red .dot:not(.active){
border-color: rgba(255,255,255,0.1); .uhr.red .dot:not(.active) {
box-shadow: 0 0 0.1em rgba(255,255,255,0.1); 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) { .uhr.red .letter:not(.active) {
color: rgba(255,255,255,0.1); color: rgba(255, 255, 255, 0.1);
text-shadow: 0 0 0.1em rgba(255,255,255,0.1); text-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
} }

View File

@ -13,24 +13,29 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
.uhr.white { .uhr.white {
background-color: #ccc; background-color: #ccc;
} }
.uhr.white .dot.active{
border-color: #fff; .uhr.white .dot.active {
box-shadow: 0 0 0.1em #fff; border-color: #fff;
box-shadow: 0 0 0.1em #fff;
} }
.uhr.white .letter.active{
color: #fff; .uhr.white .letter.active {
text-shadow: 0 0 0.1em #fff; color: #fff;
text-shadow: 0 0 0.1em #fff;
} }
.white .onoffswitch-inner:before { .white .onoffswitch-inner:before {
background-color: #ccc; background-color: #ccc;
} }
.uhr.white .dot:not(.active) { .uhr.white .dot:not(.active) {
border-color: rgba(0,0,0,0.1); border-color: rgba(0, 0, 0, 0.1);
box-shadow: 0 0 0.1em rgba(0,0,0,0.1); box-shadow: 0 0 0.1em rgba(0, 0, 0, 0.1);
} }
.uhr.white .letter:not(.active) { .uhr.white .letter:not(.active) {
color: rgba(0,0,0,0.1); color: rgba(0, 0, 0, 0.1);
text-shadow: 0 0 0.1em rgba(0,0,0,0.1); text-shadow: 0 0 0.1em rgba(0, 0, 0, 0.1);
} }

View File

@ -13,24 +13,29 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
.uhr.yellow { .uhr.yellow {
background-color: #fd0; background-color: #fd0;
} }
.uhr.yellow .dot.active{
border-color: #fff; .uhr.yellow .dot.active {
box-shadow: 0 0 0.1em #fff; border-color: #fff;
box-shadow: 0 0 0.1em #fff;
} }
.uhr.yellow .letter.active{
color: #fff; .uhr.yellow .letter.active {
text-shadow: 0 0 0.1em #fff; color: #fff;
text-shadow: 0 0 0.1em #fff;
} }
.yellow .onoffswitch-inner:before { .yellow .onoffswitch-inner:before {
background-color: #fd0; background-color: #fd0;
} }
.uhr.yellow .dot:not(.active) { .uhr.yellow .dot:not(.active) {
border-color: rgba(0,0,0,0.05); border-color: rgba(0, 0, 0, 0.05);
box-shadow: 0 0 0.1em rgba(0,0,0,0.05); box-shadow: 0 0 0.1em rgba(0, 0, 0, 0.05);
} }
.uhr.yellow .letter:not(.active) { .uhr.yellow .letter:not(.active) {
color: rgba(0,0,0,0.05); color: rgba(0, 0, 0, 0.05);
text-shadow: 0 0 0.1em rgba(0,0,0,0.05); text-shadow: 0 0 0.1em rgba(0, 0, 0, 0.05);
} }

View File

@ -13,158 +13,179 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
@font-face { @font-face {
font-family: 'Uhrenfont'; font-family: 'Uhrenfont';
src: url('../resources/uhr.woff') format('woff'); src: url('../resources/uhr.woff') format('woff');
} }
body { body {
font-family: 'Uhrenfont', sans-serif; font-family: 'Uhrenfont', sans-serif;
} }
.uhr { .uhr {
position: relative; position: relative;
margin: 0; margin: 0;
transition: background-color 0.5s; transition: background-color 0.5s;
} }
.uhr .reflection { .uhr .reflection {
position: absolute; position: absolute;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 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; 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; display: block;
margin: 0.15em; margin: 0.15em;
} }
#themeswitcher { #themeswitcher {
} }
.uhr .letterarea { .uhr .letterarea {
display: block; display: block;
position: absolute; position: absolute;
top: 12%; top: 12%;
bottom: 12%; bottom: 12%;
left: 12%; left: 12%;
right: 12%; right: 12%;
overflow: hidden; overflow: hidden;
font-size: 200%; font-size: 200%;
} }
.item { .item {
transition: box-shadow 0.5s, text-shadow 0.5s, border-color 0.5s, color 0.5s; transition: box-shadow 0.5s, text-shadow 0.5s, border-color 0.5s, color 0.5s;
} }
.dot { .dot {
position: absolute; position: absolute;
display: block; display: block;
height: 0; height: 0;
width: 0; width: 0;
border: 0.2em solid; border: 0.2em solid;
border-radius: 1em; border-radius: 1em;
} }
.dot.active { .dot.active {
border-color: #eee; border-color: #eee;
box-shadow: 0 0 0.2em #eee; box-shadow: 0 0 0.2em #eee;
} }
.dot1 { .dot1 {
top: 3.75%; top: 3.75%;
left: 3.75%; left: 3.75%;
} }
.dot2 { .dot2 {
top: 3.75%; top: 3.75%;
right: 3.75%; right: 3.75%;
} }
.dot3 { .dot3 {
bottom: 3.75%; bottom: 3.75%;
right: 3.75%; right: 3.75%;
} }
.dot4 { .dot4 {
bottom: 3.75%; bottom: 3.75%;
left: 3.75%; left: 3.75%;
} }
.letter { .letter {
height: 10%; height: 10%;
width: 9.0909%; width: 9.0909%;
padding: 0; padding: 0;
margin: 0; margin: 0;
display: inline-block; display: inline-block;
text-align: center; text-align: center;
line-height: 160%; line-height: 160%;
} }
.letter.active { .letter.active {
color: #eee; color: #eee;
text-shadow: 0 0 0.2em #eee; text-shadow: 0 0 0.2em #eee;
} }
.onoffswitch { .onoffswitch {
position: relative; position: relative;
width: 86px; width: 86px;
margin: 1em; margin: 1em;
-webkit-user-select:none; -webkit-user-select: none;
-moz-user-select:none; -moz-user-select: none;
-ms-user-select: none; -ms-user-select: none;
} }
.onoffswitch-checkbox { .onoffswitch-checkbox {
display: none; display: none;
} }
.onoffswitch-label { .onoffswitch-label {
display: block; display: block;
overflow: hidden; overflow: hidden;
cursor: pointer; cursor: pointer;
border: 2px solid #999; border: 2px solid #999;
border-radius: 50px; border-radius: 50px;
} }
.onoffswitch-inner { .onoffswitch-inner {
width: 200%; width: 200%;
margin-left: -100%; margin-left: -100%;
-moz-transition: margin 0.3s ease-in 0s; -moz-transition: margin 0.3s ease-in 0s;
-webkit-transition: margin 0.3s ease-in 0s; -webkit-transition: margin 0.3s ease-in 0s;
-o-transition: margin 0.3s ease-in 0s; -o-transition: margin 0.3s ease-in 0s;
transition: margin 0.3s ease-in 0s; transition: margin 0.3s ease-in 0s;
} }
.onoffswitch-inner:before, .onoffswitch-inner:after { .onoffswitch-inner:before, .onoffswitch-inner:after {
float: left; float: left;
width: 50%; width: 50%;
height: 24px; height: 24px;
padding: 0; padding: 0;
line-height: 24px; line-height: 24px;
font-size: 18px; font-size: 18px;
color: white; color: white;
font-weight: bold; font-weight: bold;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
} }
.onoffswitch-inner:before { .onoffswitch-inner:before {
content: "EIN"; content: "EIN";
padding-left: 12px; padding-left: 12px;
color: #eee; color: #eee;
transition: background-color 0.5s; transition: background-color 0.5s;
} }
.onoffswitch-inner:after { .onoffswitch-inner:after {
content: "AUS"; content: "AUS";
padding-right: 12px; padding-right: 12px;
background-color: #eee; background-color: #eee;
color: #999; color: #999;
text-align: right; text-align: right;
} }
.onoffswitch-switch { .onoffswitch-switch {
width: 30px; width: 30px;
margin: -3px; margin: -3px;
background: #fff; background: #fff;
border: 2px solid #999; border: 2px solid #999;
border-radius: 50px; border-radius: 50px;
position: absolute; position: absolute;
top: 0; top: 0;
bottom: 0; bottom: 0;
right: 58px; right: 58px;
-moz-transition: all 0.3s ease-in 0s; -moz-transition: all 0.3s ease-in 0s;
-webkit-transition: all 0.3s ease-in 0s; -webkit-transition: all 0.3s ease-in 0s;
-o-transition: all 0.3s ease-in 0s; -o-transition: all 0.3s ease-in 0s;
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 .onoffswitch-inner {
margin-left: 0; margin-left: 0;
} }
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch { .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
right: 0; right: 0;
} }
a.uhr-configlink { a.uhr-configlink {
@ -175,34 +196,39 @@ a.uhr-configlink {
display: inline-block; display: inline-block;
margin: 2px; margin: 2px;
} }
.uhr-controlpanel { .uhr-controlpanel {
background-color: rgba(0,0,0,0.5); background-color: rgba(0, 0, 0, 0.5);
position: fixed; position: fixed;
width: 100%; width: 100%;
height: 100%; height: 100%;
top: 0; top: 0;
left: 0; left: 0;
} }
@media (max-width: 400px) { @media (max-width: 400px) {
.uhr-controlpanel .content { .uhr-controlpanel .content {
height: 100%; height: 100%;
} }
} }
@media (min-width: 401px) { @media (min-width: 401px) {
.uhr-controlpanel .content { .uhr-controlpanel .content {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
width: 10em; width: 10em;
top : 1em; top: 1em;
border-radius: 0.5em; border-radius: 0.5em;
box-shadow: 0 0 1em black; box-shadow: 0 0 1em black;
} }
} }
.uhr-controlpanel .content { .uhr-controlpanel .content {
background-color: #fff; background-color: #fff;
padding: 2em; padding: 2em;
position: relative; position: relative;
} }
a.uhr-closecontrolpanel { a.uhr-closecontrolpanel {
cursor: pointer; cursor: pointer;
display: inline-block; display: inline-block;
@ -213,10 +239,12 @@ a.uhr-closecontrolpanel {
height: 24px; height: 24px;
background: url("../resources/close.png") no-repeat; background: url("../resources/close.png") no-repeat;
} }
#disclaimer { #disclaimer {
font-size: 0.5em; font-size: 0.5em;
} }
#disclaimer a { #disclaimer a {
color: #444; color: #444;
text-decoration: underline; text-decoration: underline;
} }

View File

@ -15,49 +15,50 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<html manifest="manifest.appcache"> <html manifest="manifest.appcache">
<head> <head>
<title>Bärneruhr - Die Zeit im Wort</title> <title>Bärneruhr - Die Zeit im Wort</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black" /> <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="apple-mobile-web-app-title" content="Bärneruhr" /> <meta name="apple-mobile-web-app-title" content="Bärneruhr"/>
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1" /> <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="css/uhr.css" /> <link rel="stylesheet" type="text/css" href="css/uhr.css"/>
<link rel="stylesheet" type="text/css" href="css/uhr-black.css" data-class="black" data-name="Schwarz" /> <link rel="stylesheet" type="text/css" href="css/uhr-black.css" data-class="black" data-name="Schwarz"/>
<link rel="stylesheet" type="text/css" href="css/uhr-white.css" data-class="white" data-name="Weiss" /> <link rel="stylesheet" type="text/css" href="css/uhr-white.css" data-class="white" data-name="Weiss"/>
<link rel="stylesheet" type="text/css" href="css/uhr-red.css" data-class="red" data-name="Rot" /> <link rel="stylesheet" type="text/css" href="css/uhr-red.css" data-class="red" data-name="Rot"/>
<link rel="stylesheet" type="text/css" href="css/uhr-yellow.css" data-class="yellow" data-name="Gelb" /> <link rel="stylesheet" type="text/css" href="css/uhr-yellow.css" data-class="yellow" data-name="Gelb"/>
<link rel="stylesheet" type="text/css" href="css/uhr-green.css" data-class="green" data-name="Grün" /> <link rel="stylesheet" type="text/css" href="css/uhr-green.css" data-class="green" data-name="Grün"/>
<link rel="stylesheet" type="text/css" href="css/uhr-blue.css" data-class="blue" data-name="Blau" /> <link rel="stylesheet" type="text/css" href="css/uhr-blue.css" data-class="blue" data-name="Blau"/>
<link rel="stylesheet" type="text/css" href="css/uhr-pink.css" data-class="pink" data-name="Pink" /> <link rel="stylesheet" type="text/css" href="css/uhr-pink.css" data-class="pink" data-name="Pink"/>
<link rel="shortcut icon" type="image/png" href="resources/favicon.png" /> <link rel="shortcut icon" type="image/png" href="resources/favicon.png"/>
<link rel="apple-touch-icon-precomposed" href="resources/apple-touch-icon-precomposed.png" /> <link rel="apple-touch-icon-precomposed" href="resources/apple-touch-icon-precomposed.png"/>
<script type="text/javascript" src="lib/jquery-2.1.0.min.js"></script> <script type="text/javascript" src="lib/jquery-2.1.0.min.js"></script>
<script type="text/javascript" src="lib/jquery-ui-1.10.4.custom.min.js"></script> <script type="text/javascript" src="lib/jquery-ui-1.10.4.custom.min.js"></script>
<script type="text/javascript" src="lib/jquery-cookie-1.4.0.js"></script> <script type="text/javascript" src="lib/jquery-cookie-1.4.0.js"></script>
<script type="text/javascript" src="js/uhr.js"></script> <script type="text/javascript" src="js/uhr.js"></script>
<script type="text/javascript" src="js/uhr-de_CH.js"></script> <script type="text/javascript" src="js/uhr-de_CH.js"></script>
<script type="text/javascript" src="js/uhr-de_CH_genau.js"></script> <script type="text/javascript" src="js/uhr-de_CH_genau.js"></script>
<script type="text/javascript" src="js/uhr-de_CH-seconds.js"></script> <script type="text/javascript" src="js/uhr-de_CH-seconds.js"></script>
<script type="text/javascript" src="js/uhr-de.js"></script> <script type="text/javascript" src="js/uhr-de.js"></script>
<script type="text/javascript" src="js/uhr-en.js"></script> <script type="text/javascript" src="js/uhr-en.js"></script>
<script type="text/javascript" src="js/uhr-fr.js"></script> <script type="text/javascript" src="js/uhr-fr.js"></script>
<script type="text/javascript" src="js/uhr-it.js"></script> <script type="text/javascript" src="js/uhr-it.js"></script>
</head> </head>
<body style="padding:0;margin:0;"> <body style="padding:0;margin:0;">
<div id="uhr"></div> <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 href="info/">Read more!</a> - <a href="showcase">View full showcase!</a></p> <p id="disclaimer">Created by <a href="http://www.fritteli.ch/">fritteli</a>, inspired by <a href="http://www.qlocktwo.com/">QLOCKTWO</a>. <a
<script type="text/javascript"> href="info/">Read more!</a> - <a href="showcase">View full showcase!</a></p>
(function($) { <script type="text/javascript">
var width = $(window).width(); (function($) {
var height = $(window).height(); var width = $(window).width();
var size = Math.min(width, height) + 'px'; var height = $(window).height();
$('#uhr').uhr({ var size = Math.min(width, height) + 'px';
width: size, $('#uhr').uhr({
color: 'black', width: size,
language: 'de_CH', color: 'black',
controls: true language: 'de_CH',
}); controls: true
})(jQuery); });
</script> })(jQuery);
</script>
</body> </body>
</html> </html>

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +1,48 @@
/*
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/>.
*/
body { body {
font-size: 120%; font-size: 120%;
} }
code { code {
white-space: pre-line; white-space: pre-line;
display: inline-block; display: inline-block;
} }
code.inline {
display: inline;
}
ol { ol {
counter-reset: item; counter-reset: item;
padding-left: 1em; padding-left: 1em;
} }
ol li { ol li {
display: block; display: block;
} }
ol li:before { ol li:before {
content: counters(item, ".") ". "; content: counters(item, ".") ". ";
counter-increment: item; counter-increment: item;
} }
a.toclink { a.toclink {
font-size: 25%; font-size: 25%;
} }
a.toclink:before { a.toclink:before {
content: "▲ "; content: "▲ ";
} }

View File

@ -12,7 +12,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
(function () { (function() {
'use strict'; 'use strict';
var es_ist = {1: [1, 2, 4, 5, 6]}; var es_ist = {1: [1, 2, 4, 5, 6]};
var uhr = {10: [9, 10, 11]}; var uhr = {10: [9, 10, 11]};

View File

@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
(function () { (function() {
'use strict'; 'use strict';
var vorne0 = { var vorne0 = {
3: [2, 3, 4], 3: [2, 3, 4],
@ -73,86 +73,86 @@
9: [7, 8, 9, 10, 11] 9: [7, 8, 9, 10, 11]
}; };
var vorne3 = { var vorne3 = {
3: [1, 2, 3, 4, 5], 3: [1, 2, 3, 4, 5],
4: [4], 4: [4],
5: [3], 5: [3],
6: [4], 6: [4],
7: [5], 7: [5],
8: [1, 5], 8: [1, 5],
9: [2, 3, 4] 9: [2, 3, 4]
}; };
var hinten3 = { var hinten3 = {
3: [7, 8, 9, 10, 11], 3: [7, 8, 9, 10, 11],
4: [10], 4: [10],
5: [9], 5: [9],
6: [10], 6: [10],
7: [11], 7: [11],
8: [7, 11], 8: [7, 11],
9: [8, 9, 10] 9: [8, 9, 10]
}; };
var vorne4 = { var vorne4 = {
3: [4], 3: [4],
4: [3, 4], 4: [3, 4],
5: [2, 4], 5: [2, 4],
6: [1, 4], 6: [1, 4],
7: [1, 2, 3, 4, 5], 7: [1, 2, 3, 4, 5],
8: [4], 8: [4],
9: [4] 9: [4]
}; };
var hinten4 = { var hinten4 = {
3: [10], 3: [10],
4: [9, 10], 4: [9, 10],
5: [8, 10], 5: [8, 10],
6: [7, 10], 6: [7, 10],
7: [7, 8, 9, 10, 11], 7: [7, 8, 9, 10, 11],
8: [10], 8: [10],
9: [10] 9: [10]
}; };
var vorne5 = { var vorne5 = {
3: [1, 2, 3, 4, 5], 3: [1, 2, 3, 4, 5],
4: [1], 4: [1],
5: [1, 2, 3, 4], 5: [1, 2, 3, 4],
6: [5], 6: [5],
7: [5], 7: [5],
8: [1, 5], 8: [1, 5],
9: [2, 3, 4] 9: [2, 3, 4]
}; };
var hinten5 = { var hinten5 = {
3: [7, 8, 9, 10, 11], 3: [7, 8, 9, 10, 11],
4: [7], 4: [7],
5: [7, 8, 9, 10], 5: [7, 8, 9, 10],
6: [11], 6: [11],
7: [11], 7: [11],
8: [7, 11], 8: [7, 11],
9: [8, 9, 10] 9: [8, 9, 10]
}; };
var hinten6 = { var hinten6 = {
3: [9, 10], 3: [9, 10],
4: [8], 4: [8],
5: [7], 5: [7],
6: [7, 8, 9, 10], 6: [7, 8, 9, 10],
7: [7, 11], 7: [7, 11],
8: [7, 11], 8: [7, 11],
9: [8, 9, 10] 9: [8, 9, 10]
}; };
var hinten7 = { var hinten7 = {
3: [7, 8, 9, 10, 11], 3: [7, 8, 9, 10, 11],
4: [11], 4: [11],
5: [10], 5: [10],
6: [9], 6: [9],
7: [8], 7: [8],
8: [8], 8: [8],
9: [8] 9: [8]
}; };
var hinten8 = { var hinten8 = {
3: [8, 9, 10], 3: [8, 9, 10],
4: [7, 11], 4: [7, 11],
5: [7, 11], 5: [7, 11],
6: [8, 9, 10], 6: [8, 9, 10],
7: [7, 11], 7: [7, 11],
8: [7, 11], 8: [7, 11],
9: [8, 9, 10] 9: [8, 9, 10]
}; };
var hinten9 = { var hinten9 = {
3: [8, 9, 10], 3: [8, 9, 10],
4: [7, 11], 4: [7, 11],
@ -239,7 +239,7 @@
"58": [vorne5, hinten8], "58": [vorne5, hinten8],
"59": [vorne5, hinten9] "59": [vorne5, hinten9]
}, },
"getDotMinute": function (time) { "getDotMinute": function() {
return 0; return 0;
} }
}; };

View File

@ -12,7 +12,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
(function () { (function() {
'use strict'; 'use strict';
// hilfsvariablen // hilfsvariablen
var es_isch = {1: [1, 2, 4, 5, 6, 7]}; var es_isch = {1: [1, 2, 4, 5, 6, 7]};

View File

@ -12,7 +12,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
(function () { (function() {
'use strict'; 'use strict';
var es_isch = {1: [1, 2, 4, 5, 6, 7]}; var es_isch = {1: [1, 2, 4, 5, 6, 7]};
var genau = {3: [7, 8, 9, 10, 11]}; var genau = {3: [7, 8, 9, 10, 11]};

View File

@ -12,7 +12,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
(function () { (function() {
'use strict'; 'use strict';
var it_is = {1: [1, 2, 4, 5]}; var it_is = {1: [1, 2, 4, 5]};
var half = {4: [1, 2, 3, 4]}; var half = {4: [1, 2, 3, 4]};
@ -69,7 +69,7 @@
"10,22": {10: [1, 2, 3]}, "10,22": {10: [1, 2, 3]},
"11,23": {8: [6, 7, 8, 9, 10, 11]} "11,23": {8: [6, 7, 8, 9, 10, 11]}
}, },
"getHour": function (date) { "getHour": function(date) {
var hour = date.getHours(); var hour = date.getHours();
if (date.getMinutes() >= 35) { if (date.getMinutes() >= 35) {
return (hour + 1) % 24; return (hour + 1) % 24;

View File

@ -12,7 +12,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
(function () { (function() {
'use strict'; 'use strict';
var il_est = {1: [1, 2, 4, 5, 6]}; var il_est = {1: [1, 2, 4, 5, 6]};
var et = {8: [1, 2]}; var et = {8: [1, 2]};
@ -57,20 +57,53 @@
}, },
"hours": { "hours": {
"0": {5: [6, 7, 8, 9, 10, 11]}, "0": {5: [6, 7, 8, 9, 10, 11]},
"1,13": [{3: [5, 6, 7]}, heures], "1,13": [
"2,14": [{1: [8, 9, 10, 11]}, heures], {3: [5, 6, 7]},
"3,15": [{2: [7, 8, 9, 10, 11]}, heures], heures
"4,16": [{2: [1, 2, 3, 4, 5, 6]}, heures], ],
"5,17": [{4: [8, 9, 10, 11]}, heures], "2,14": [
"6,18": [{4: [5, 6, 7]}, heures], {1: [8, 9, 10, 11]},
"7,19": [{3: [8, 9, 10, 11]}, heures], heures
"8,20": [{4: [1, 2, 3, 4]}, heures], ],
"9,21": [{3: [1, 2, 3, 4]}, heures], "3,15": [
"10,22": [{5: [3, 4, 5]}, heures], {2: [7, 8, 9, 10, 11]},
"11,23": [{6: [1, 2, 3, 4]}, heures], 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]} "12": {5: [1, 2, 3, 4]}
}, },
"getHour": function (date) { "getHour": function(date) {
var hour = date.getHours(); var hour = date.getHours();
if (date.getMinutes() >= 35) { if (date.getMinutes() >= 35) {
return (hour + 1) % 24; return (hour + 1) % 24;

View File

@ -12,7 +12,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
(function () { (function() {
'use strict'; 'use strict';
var sono_le = {1: [1, 2, 3, 4, 6, 7]}; var sono_le = {1: [1, 2, 3, 4, 6, 7]};
var e_l = {2: [1, 3, 4]}; var e_l = {2: [1, 3, 4]};
@ -68,7 +68,7 @@
"10,22": [sono_le, {4: [1, 2, 3, 4, 5]}], "10,22": [sono_le, {4: [1, 2, 3, 4, 5]}],
"11,23": [sono_le, {4: [6, 7, 8, 9, 10, 11]}] "11,23": [sono_le, {4: [6, 7, 8, 9, 10, 11]}]
}, },
"getHour": function (date) { "getHour": function(date) {
var hour = date.getHours(); var hour = date.getHours();
if (date.getMinutes() >= 35) { if (date.getMinutes() >= 35) {
return (hour + 1) % 24; return (hour + 1) % 24;

View File

@ -12,16 +12,17 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
(function ($) { (function($) {
'use strict'; 'use strict';
var uhrGlobals = { var uhrGlobals = {
"id": 0, "id": 0,
"languages": [], "languages": [],
"themes": [], "themes": [],
registerLanguage: function registerLanguage(code, language) { registerLanguage: function registerLanguage(code, language) {
var alreadyExists = uhrGlobals.languages.some(function (element) { var alreadyExists = uhrGlobals.languages.some(function(element) {
if (code === element.code) { 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 + "'!"); 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 true;
} }
return false; return false;
@ -34,7 +35,7 @@
}; };
// auto-detect themes // auto-detect themes
$('link[rel=stylesheet]').each(function (index, item) { $('link[rel=stylesheet]').each(function(index, item) {
var styleSheet = $(item); var styleSheet = $(item);
var styleClass = styleSheet.attr('data-class'); var styleClass = styleSheet.attr('data-class');
if (styleClass !== undefined) { if (styleClass !== undefined) {
@ -53,7 +54,7 @@
// public interface methods (exported later) // public interface methods (exported later)
var start = function start() { var start = function start() {
if (!isOn.bind(this)()) { if (!isOn.bind(this)()) {
this.timer = window.setInterval(function () { this.timer = window.setInterval(function() {
this.options.time = new Date(); this.options.time = new Date();
update.bind(this)(); update.bind(this)();
}.bind(this), 1000); }.bind(this), 1000);
@ -80,7 +81,7 @@
if (languageKey !== this.options.language) { if (languageKey !== this.options.language) {
this.options.language = languageKey; this.options.language = languageKey;
var renderer = new UhrRenderer(language.bind(this)(), this.element.find('.letterarea')); var renderer = new UhrRenderer(language.bind(this)(), this.element.find('.letterarea'));
renderer.render.bind(this)(function () { renderer.render.bind(this)(function() {
this.currentMinute = -1; this.currentMinute = -1;
update.bind(this)(); update.bind(this)();
}.bind(this)); }.bind(this));
@ -152,7 +153,7 @@
if (this.options.controls) { if (this.options.controls) {
var configlink = $('<a class="uhr-configlink" id="uhr-configlink' + this.id + '"></a>'); var configlink = $('<a class="uhr-configlink" id="uhr-configlink' + this.id + '"></a>');
configlink.on('click', function () { configlink.on('click', function() {
showConfigScreen.bind(this)(); showConfigScreen.bind(this)();
}.bind(this)); }.bind(this));
e.after(configlink); e.after(configlink);
@ -161,17 +162,16 @@
controlpanel.append(content); controlpanel.append(content);
// on/off switch // on/off switch
var toggleSwitch = $('<div class="onoffswitch" id="uhr-onoffswitch' + this.id + '"></div>'); 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('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox' + this.id +
toggleSwitch.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox' + this.id + '">' '" checked="checked" />');
+ '<div class="onoffswitch-inner"></div>' toggleSwitch.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox' + this.id + '">' +
+ '<div class="onoffswitch-switch"></div>' '<div class="onoffswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + '</label>');
+ '</label>');
content.append(toggleSwitch); content.append(toggleSwitch);
// language chooser // language chooser
if (uhrGlobals.languages.length > 1) { if (uhrGlobals.languages.length > 1) {
var languageChooser = $('<select id="uhr-languagechooser' + this.id + '"></select>'); var languageChooser = $('<select id="uhr-languagechooser' + this.id + '"></select>');
uhrGlobals.languages.forEach(function (item) { uhrGlobals.languages.forEach(function(item) {
languageChooser.append('<option value="' + item.code + '">' + item.language + '</option>'); languageChooser.append('<option value="' + item.code + '">' + item.language + '</option>');
}); });
content.append(languageChooser); content.append(languageChooser);
@ -180,13 +180,13 @@
// theme chooser // theme chooser
if (uhrGlobals.themes.length > 1) { if (uhrGlobals.themes.length > 1) {
var themeChooser = $('<select id="uhr-themechooser' + this.id + '"></select>'); var themeChooser = $('<select id="uhr-themechooser' + this.id + '"></select>');
uhrGlobals.themes.forEach(function (item) { uhrGlobals.themes.forEach(function(item) {
themeChooser.append('<option value="' + item.styleClass + '">' + item.name + '</option>'); themeChooser.append('<option value="' + item.styleClass + '">' + item.name + '</option>');
}); });
content.append(themeChooser); content.append(themeChooser);
} }
var closebutton = $('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel' + this.id + '"></a>'); var closebutton = $('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel' + this.id + '"></a>');
closebutton.on('click', function () { closebutton.on('click', function() {
$('#uhr-controlpanel' + this.id).fadeOut('fast'); $('#uhr-controlpanel' + this.id).fadeOut('fast');
}.bind(this)); }.bind(this));
content.append(closebutton); content.append(closebutton);
@ -197,7 +197,7 @@
var wireFunctionality = function wireFunctionality() { var wireFunctionality = function wireFunctionality() {
// on/off switch // on/off switch
var toggleSwitch = $('#uhr-onoffswitch-checkbox' + this.id); var toggleSwitch = $('#uhr-onoffswitch-checkbox' + this.id);
toggleSwitch.on('click', function () { toggleSwitch.on('click', function() {
this.toggle(); this.toggle();
}.bind(this)); }.bind(this));
var status = $.cookie('uhr-status' + this.id); var status = $.cookie('uhr-status' + this.id);
@ -213,7 +213,7 @@
// language chooser // language chooser
var languageChooser = $('#uhr-languagechooser' + this.id); var languageChooser = $('#uhr-languagechooser' + this.id);
languageChooser.on('change', function () { languageChooser.on('change', function() {
var languageKey = $('#uhr-languagechooser' + this.id).val(); var languageKey = $('#uhr-languagechooser' + this.id).val();
this.language(languageKey); this.language(languageKey);
}.bind(this)); }.bind(this));
@ -221,7 +221,7 @@
if (selectedLanguage === undefined || this.options.force) { if (selectedLanguage === undefined || this.options.force) {
selectedLanguage = this.options.language; selectedLanguage = this.options.language;
} }
var found = uhrGlobals.languages.some(function (item) { var found = uhrGlobals.languages.some(function(item) {
return selectedLanguage === item.code; return selectedLanguage === item.code;
}); });
if (!found) { if (!found) {
@ -240,7 +240,7 @@
// theme chooser // theme chooser
var themeChooser = $('#uhr-themechooser' + this.id); var themeChooser = $('#uhr-themechooser' + this.id);
themeChooser.on('change', function () { themeChooser.on('change', function() {
var themeKey = $('#uhr-themechooser' + this.id).val(); var themeKey = $('#uhr-themechooser' + this.id).val();
this.theme(themeKey); this.theme(themeKey);
}.bind(this)); }.bind(this));
@ -248,7 +248,7 @@
if (selectedTheme === undefined || this.options.force) { if (selectedTheme === undefined || this.options.force) {
selectedTheme = this.options.theme; selectedTheme = this.options.theme;
} }
found = uhrGlobals.themes.some(function (item) { found = uhrGlobals.themes.some(function(item) {
return selectedTheme === item.styleClass; return selectedTheme === item.styleClass;
}); });
if (!found) { if (!found) {
@ -260,7 +260,7 @@
this.options.theme = ""; this.options.theme = "";
this.theme(selectedTheme); this.theme(selectedTheme);
if (this.options.autoresize) { if (this.options.autoresize) {
$(window).on('resize', function () { $(window).on('resize', function() {
var $e = this.element; var $e = this.element;
var $parent = $e.parent(); var $parent = $e.parent();
var $window = $(window); var $window = $(window);
@ -353,7 +353,7 @@
}; };
var language = function language() { var language = function language() {
var matchingLanguages = uhrGlobals.languages.filter(function (element) { var matchingLanguages = uhrGlobals.languages.filter(function(element) {
return (element.code === this.options.language); return (element.code === this.options.language);
}, this); }, this);
if (matchingLanguages.length > 0) { if (matchingLanguages.length > 0) {
@ -394,21 +394,21 @@
this.render = function render(beforeshow) { this.render = function render(beforeshow) {
if (layout.parsed === undefined) { if (layout.parsed === undefined) {
switch (layout.version) { switch (layout.version) {
case 2: case 2:
var delegate = new UhrRendererV2Delegate(layout); var delegate = new UhrRendererV2Delegate(layout);
var parsedLayout = delegate.parse(); var parsedLayout = delegate.parse();
Object.defineProperty(layout, "parsed", {"value": parsedLayout, "writable": false, "configurable": false}); Object.defineProperty(layout, "parsed", {"value": parsedLayout, "writable": false, "configurable": false});
break; break;
default: default:
console.warn("Unknown layout version: '" + layout.version + "'"); console.warn("Unknown layout version: '" + layout.version + "'");
return; return;
} }
} }
var letters = layout.parsed; var letters = layout.parsed;
renderarea.fadeOut('fast', function () { renderarea.fadeOut('fast', function() {
renderarea.empty(); renderarea.empty();
letters.forEach(function (line, index, array) { letters.forEach(function(line, index, array) {
line.forEach(function (letter) { line.forEach(function(letter) {
renderarea.append(letter.toString()); renderarea.append(letter.toString());
}); });
if (index < array.length - 1) { if (index < array.length - 1) {
@ -427,7 +427,7 @@
function parseArrayOrObject(letters, styleClass, input) { function parseArrayOrObject(letters, styleClass, input) {
if (typeof input !== 'undefined' && input !== null) { if (typeof input !== 'undefined' && input !== null) {
if (Array.isArray(input)) { if (Array.isArray(input)) {
input.forEach(function (item) { input.forEach(function(item) {
parseObject(letters, styleClass, item); parseObject(letters, styleClass, item);
}); });
} else { } else {
@ -438,9 +438,9 @@
function parseObject(letters, styleClass, object) { function parseObject(letters, styleClass, object) {
if (typeof object !== 'undefined' && object !== null) { if (typeof object !== 'undefined' && object !== null) {
Object.keys(object).forEach(function (y) { Object.keys(object).forEach(function(y) {
var highlightLetters = object[y]; var highlightLetters = object[y];
highlightLetters.forEach(function (x) { highlightLetters.forEach(function(x) {
letters[y - 1][x - 1].addStyle(styleClass); letters[y - 1][x - 1].addStyle(styleClass);
}); });
}); });
@ -449,10 +449,10 @@
function parseTimeDefinition(letters, styleClass, definition) { function parseTimeDefinition(letters, styleClass, definition) {
if (typeof definition !== 'undefined' && definition !== null) { if (typeof definition !== 'undefined' && definition !== null) {
Object.keys(definition).forEach(function (listString) { Object.keys(definition).forEach(function(listString) {
var array = listString.split(','); var array = listString.split(',');
var highlightLetters = definition[listString]; var highlightLetters = definition[listString];
array.forEach(function (item) { array.forEach(function(item) {
parseArrayOrObject(letters, styleClass + item, highlightLetters); parseArrayOrObject(letters, styleClass + item, highlightLetters);
}); });
}); });
@ -461,7 +461,7 @@
this.parse = function parse() { this.parse = function parse() {
var letters = []; var letters = [];
layout.letters.forEach(function (string) { layout.letters.forEach(function(string) {
var line = []; var line = [];
for (var c = 0; c < string.length; c++) { for (var c = 0; c < string.length; c++) {
var character = new Letter(string[c]); var character = new Letter(string[c]);
@ -485,14 +485,14 @@
function Letter(value, style) { function Letter(value, style) {
var myValue = value; var myValue = value;
var myStyle = style || ''; var myStyle = style || '';
this.addStyle = function (style) { this.addStyle = function(style) {
if (myStyle === '') { if (myStyle === '') {
myStyle = style; myStyle = style;
} else { } else {
myStyle += ' ' + style; myStyle += ' ' + style;
} }
}; };
this.toString = function () { this.toString = function() {
return '<span class="item letter ' + myStyle + '">' + myValue + '</span>'; return '<span class="item letter ' + myStyle + '">' + myValue + '</span>';
}; };
} }

View File

@ -15,50 +15,50 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<html manifest="../manifest.appcache"> <html manifest="../manifest.appcache">
<head> <head>
<title>Bärneruhr - Die Zeit im Wort: Showcase</title> <title>Bärneruhr - Die Zeit im Wort: Showcase</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black" /> <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="apple-mobile-web-app-title" content="Bärneruhr" /> <meta name="apple-mobile-web-app-title" content="Bärneruhr"/>
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1" /> <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="../css/uhr.css" /> <link rel="stylesheet" type="text/css" href="../css/uhr.css"/>
<link rel="stylesheet" type="text/css" href="../css/uhr-black.css" data-class="black" data-name="Schwarz" /> <link rel="stylesheet" type="text/css" href="../css/uhr-black.css" data-class="black" data-name="Schwarz"/>
<link rel="stylesheet" type="text/css" href="../css/uhr-white.css" data-class="white" data-name="Weiss" /> <link rel="stylesheet" type="text/css" href="../css/uhr-white.css" data-class="white" data-name="Weiss"/>
<link rel="stylesheet" type="text/css" href="../css/uhr-red.css" data-class="red" data-name="Rot" /> <link rel="stylesheet" type="text/css" href="../css/uhr-red.css" data-class="red" data-name="Rot"/>
<link rel="stylesheet" type="text/css" href="../css/uhr-green.css" data-class="green" data-name="Grün" /> <link rel="stylesheet" type="text/css" href="../css/uhr-green.css" data-class="green" data-name="Grün"/>
<link rel="stylesheet" type="text/css" href="../css/uhr-yellow.css" data-class="yellow" data-name="Gelb" /> <link rel="stylesheet" type="text/css" href="../css/uhr-yellow.css" data-class="yellow" data-name="Gelb"/>
<link rel="stylesheet" type="text/css" href="../css/uhr-blue.css" data-class="blue" data-name="Blau" /> <link rel="stylesheet" type="text/css" href="../css/uhr-blue.css" data-class="blue" data-name="Blau"/>
<link rel="stylesheet" type="text/css" href="../css/uhr-pink.css" data-class="pink" data-name="Pink" /> <link rel="stylesheet" type="text/css" href="../css/uhr-pink.css" data-class="pink" data-name="Pink"/>
<link rel="shortcut icon" type="image/png" href="../resources/favicon.png" /> <link rel="shortcut icon" type="image/png" href="../resources/favicon.png"/>
<link rel="apple-touch-icon-precomposed" href="../resources/apple-touch-icon-precomposed.png" /> <link rel="apple-touch-icon-precomposed" href="../resources/apple-touch-icon-precomposed.png"/>
<script type="text/javascript" src="../lib/jquery-2.1.0.min.js"></script> <script type="text/javascript" src="../lib/jquery-2.1.0.min.js"></script>
<script type="text/javascript" src="../lib/jquery-ui-1.10.4.custom.min.js"></script> <script type="text/javascript" src="../lib/jquery-ui-1.10.4.custom.min.js"></script>
<script type="text/javascript" src="../lib/jquery-cookie-1.4.0.js"></script> <script type="text/javascript" src="../lib/jquery-cookie-1.4.0.js"></script>
<script type="text/javascript" src="../js/uhr.js"></script> <script type="text/javascript" src="../js/uhr.js"></script>
</head> </head>
<body style="padding:0;margin:0;"> <body style="padding:0;margin:0;">
<div id="uhr"></div> <div id="uhr"></div>
<p ><a href="..">Go back to the main page</a></p> <p><a href="..">Go back to the main page</a></p>
<script type="text/javascript" src="../js/uhr-de_CH.js"></script> <script type="text/javascript" src="../js/uhr-de_CH.js"></script>
<script type="text/javascript" src="../js/uhr-de_CH_genau.js"></script> <script type="text/javascript" src="../js/uhr-de_CH_genau.js"></script>
<script type="text/javascript" src="../js/uhr-de_CH-seconds.js"></script> <script type="text/javascript" src="../js/uhr-de_CH-seconds.js"></script>
<script type="text/javascript" src="../js/uhr-de.js"></script> <script type="text/javascript" src="../js/uhr-de.js"></script>
<script type="text/javascript" src="../js/uhr-en.js"></script> <script type="text/javascript" src="../js/uhr-en.js"></script>
<script type="text/javascript" src="../js/uhr-fr.js"></script> <script type="text/javascript" src="../js/uhr-fr.js"></script>
<script type="text/javascript" src="../js/uhr-it.js"></script> <script type="text/javascript" src="../js/uhr-it.js"></script>
<script type="text/javascript"> <script type="text/javascript">
(function($) { (function($) {
var width = $(window).width(); var width = $(window).width();
var height = $(window).height() - 150; var height = $(window).height() - 150;
var size = Math.min(width, height); var size = Math.min(width, height);
if (size < 200) { if (size < 200) {
size = 200; size = 200;
} }
$('#uhr').uhr({ $('#uhr').uhr({
width: size + 'px', width: size + 'px',
language: 'de_CH' language: 'de_CH'
}); });
})(jQuery); })(jQuery);
</script> </script>
</body> </body>
</html> </html>

View File

@ -22,7 +22,7 @@
<script> <script>
mocha.checkLeaks(); mocha.checkLeaks();
mocha.run(); mocha.run();
// $('#u').uhr({'width':'200px'}); // $('#u').uhr({'width':'200px'});
</script> </script>
</body> </body>
</html> </html>

View File

@ -1,8 +1,5 @@
/** suite('Bärneruhr', function() {
* Created by u203395 on 04.07.2014.
*/
suite('Bärneruhr', function () {
"use strict"; "use strict";
test('dummy', function () { test('dummy', function() {
}); });
}); });