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.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
"node" : false,
"rhino" : false,
"couch" : false,
"wsh" : true, // Windows Scripting Host.
"jquery" : true,
"ender" : true,
"prototypejs" : false,
"mootools" : false,
"dojo" : false,
"predef" : [
"suite",
@ -28,16 +19,13 @@
"debug" : false, // Allow debugger statements e.g. browser breakpoints.
"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.
"globalstrict" : false, // Allow global "use strict" (also enables 'strict').
// The Good Parts.
"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.).
"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.
@ -50,8 +38,6 @@
"latedef" : true, // Prohipit variable use before definition.
"loopfunc" : false, // Allow functions to be defined within loops.
"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.
"shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
"supernew" : false, // Tolerate `new function () { ... };` and `new Object;`.
@ -67,6 +53,6 @@
"plusplus" : false, // Prohibit use of `++` & `--`.
"sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
"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
}

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/>.
*/
.uhr.black {
background-color: #111;
background-color: #111;
}
.black .onoffswitch-inner:before {
background-color: #111;
background-color: #111;
}
.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);
border-color: rgba(255, 255, 255, 0.1);
box-shadow: 0 0 0.1em rgba(255, 255, 255, 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);
color: 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/>.
*/
.uhr.blue {
background-color: #00a;
background-color: #00a;
}
.blue .onoffswitch-inner:before {
background-color: #00a;
background-color: #00a;
}
.uhr.blue .dot:not(.active) {
border-color: rgba(255,255,255,0.1);
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.blue .letter:not(.active) {
color: rgba(255,255,255,0.1);
text-shadow: 0 0 0.1em 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);
}

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/>.
*/
.uhr.green {
background-color: #0c0;
background-color: #0c0;
}
.green .onoffswitch-inner:before {
background-color: #0c0;
background-color: #0c0;
}
.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);
border-color: rgba(0, 0, 0, 0.1);
box-shadow: 0 0 0.1em rgba(0, 0, 0, 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);
color: 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/>.
*/
.uhr.pink {
background-color: #f0a;
background-color: #f0a;
}
.uhr.pink .dot.active{
border-color: #fff;
box-shadow: 0 0 0.1em #fff;
.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;
.uhr.pink .letter.active {
color: #fff;
text-shadow: 0 0 0.1em #fff;
}
.pink .onoffswitch-inner:before {
background-color: #f0a;
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);
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);
color: 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/>.
*/
.uhr.red {
background-color: #700;
background-color: #700;
}
.red .onoffswitch-inner:before {
background-color: #700;
background-color: #700;
}
.uhr.red .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 .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) {
color: rgba(255,255,255,0.1);
text-shadow: 0 0 0.1em 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);
}

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/>.
*/
.uhr.white {
background-color: #ccc;
background-color: #ccc;
}
.uhr.white .dot.active{
border-color: #fff;
box-shadow: 0 0 0.1em #fff;
.uhr.white .dot.active {
border-color: #fff;
box-shadow: 0 0 0.1em #fff;
}
.uhr.white .letter.active{
color: #fff;
text-shadow: 0 0 0.1em #fff;
.uhr.white .letter.active {
color: #fff;
text-shadow: 0 0 0.1em #fff;
}
.white .onoffswitch-inner:before {
background-color: #ccc;
background-color: #ccc;
}
.uhr.white .dot:not(.active) {
border-color: rgba(0,0,0,0.1);
box-shadow: 0 0 0.1em 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);
}
.uhr.white .letter:not(.active) {
color: rgba(0,0,0,0.1);
text-shadow: 0 0 0.1em 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);
}

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/>.
*/
.uhr.yellow {
background-color: #fd0;
background-color: #fd0;
}
.uhr.yellow .dot.active{
border-color: #fff;
box-shadow: 0 0 0.1em #fff;
.uhr.yellow .dot.active {
border-color: #fff;
box-shadow: 0 0 0.1em #fff;
}
.uhr.yellow .letter.active{
color: #fff;
text-shadow: 0 0 0.1em #fff;
.uhr.yellow .letter.active {
color: #fff;
text-shadow: 0 0 0.1em #fff;
}
.yellow .onoffswitch-inner:before {
background-color: #fd0;
background-color: #fd0;
}
.uhr.yellow .dot:not(.active) {
border-color: rgba(0,0,0,0.05);
box-shadow: 0 0 0.1em 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);
}
.uhr.yellow .letter:not(.active) {
color: rgba(0,0,0,0.05);
text-shadow: 0 0 0.1em 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);
}

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/>.
*/
@font-face {
font-family: 'Uhrenfont';
src: url('../resources/uhr.woff') format('woff');
font-family: 'Uhrenfont';
src: url('../resources/uhr.woff') format('woff');
}
body {
font-family: 'Uhrenfont', sans-serif;
font-family: 'Uhrenfont', sans-serif;
}
.uhr {
position: relative;
margin: 0;
transition: background-color 0.5s;
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;
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;
}
#themeswitcher {
}
.uhr .letterarea {
display: block;
position: absolute;
top: 12%;
bottom: 12%;
left: 12%;
right: 12%;
overflow: hidden;
font-size: 200%;
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;
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;
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;
border-color: #eee;
box-shadow: 0 0 0.2em #eee;
}
.dot1 {
top: 3.75%;
left: 3.75%;
top: 3.75%;
left: 3.75%;
}
.dot2 {
top: 3.75%;
right: 3.75%;
top: 3.75%;
right: 3.75%;
}
.dot3 {
bottom: 3.75%;
right: 3.75%;
bottom: 3.75%;
right: 3.75%;
}
.dot4 {
bottom: 3.75%;
left: 3.75%;
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%;
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;
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;
position: relative;
width: 86px;
margin: 1em;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
.onoffswitch-checkbox {
display: none;
display: none;
}
.onoffswitch-label {
display: block;
overflow: hidden;
cursor: pointer;
border: 2px solid #999;
border-radius: 50px;
display: block;
overflow: hidden;
cursor: pointer;
border: 2px solid #999;
border-radius: 50px;
}
.onoffswitch-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;
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 {
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;
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;
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;
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;
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 {
margin-left: 0;
margin-left: 0;
}
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
right: 0;
right: 0;
}
a.uhr-configlink {
@ -175,34 +196,39 @@ a.uhr-configlink {
display: inline-block;
margin: 2px;
}
.uhr-controlpanel {
background-color: rgba(0,0,0,0.5);
background-color: rgba(0, 0, 0, 0.5);
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
@media (max-width: 400px) {
.uhr-controlpanel .content {
height: 100%;
}
}
@media (min-width: 401px) {
.uhr-controlpanel .content {
margin-left: auto;
margin-right: auto;
width: 10em;
top : 1em;
top: 1em;
border-radius: 0.5em;
box-shadow: 0 0 1em black;
}
}
.uhr-controlpanel .content {
background-color: #fff;
padding: 2em;
position: relative;
}
a.uhr-closecontrolpanel {
cursor: pointer;
display: inline-block;
@ -213,10 +239,12 @@ a.uhr-closecontrolpanel {
height: 24px;
background: url("../resources/close.png") no-repeat;
}
#disclaimer {
font-size: 0.5em;
font-size: 0.5em;
}
#disclaimer a {
color: #444;
text-decoration: underline;
color: #444;
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">
<head>
<title>Bärneruhr - Die Zeit im Wort</title>
<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-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="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-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-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-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="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="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-cookie-1.4.0.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_genau.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-en.js"></script>
<script type="text/javascript" src="js/uhr-fr.js"></script>
<script type="text/javascript" src="js/uhr-it.js"></script>
<title>Bärneruhr - Die Zeit im Wort</title>
<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-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="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-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-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-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="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="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-cookie-1.4.0.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_genau.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-en.js"></script>
<script type="text/javascript" src="js/uhr-fr.js"></script>
<script type="text/javascript" src="js/uhr-it.js"></script>
</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 href="info/">Read more!</a> - <a href="showcase">View full showcase!</a></p>
<script type="text/javascript">
(function($) {
var width = $(window).width();
var height = $(window).height();
var size = Math.min(width, height) + 'px';
$('#uhr').uhr({
width: size,
color: 'black',
language: 'de_CH',
controls: true
});
})(jQuery);
</script>
<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>
<script type="text/javascript">
(function($) {
var width = $(window).width();
var height = $(window).height();
var size = Math.min(width, height) + 'px';
$('#uhr').uhr({
width: size,
color: 'black',
language: 'de_CH',
controls: true
});
})(jQuery);
</script>
</body>
</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 {
font-size: 120%;
font-size: 120%;
}
code {
white-space: pre-line;
white-space: pre-line;
display: inline-block;
}
code.inline {
display: inline;
}
ol {
counter-reset: item;
padding-left: 1em;
counter-reset: item;
padding-left: 1em;
}
ol li {
display: block;
display: block;
}
ol li:before {
content: counters(item, ".") ". ";
counter-increment: item;
content: counters(item, ".") ". ";
counter-increment: item;
}
a.toclink {
font-size: 25%;
}
a.toclink:before {
content: "▲ ";
}

View file

@ -12,7 +12,7 @@
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 () {
(function() {
'use strict';
var es_ist = {1: [1, 2, 4, 5, 6]};
var uhr = {10: [9, 10, 11]};

View file

@ -16,7 +16,7 @@
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 () {
(function() {
'use strict';
var vorne0 = {
3: [2, 3, 4],
@ -73,86 +73,86 @@
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]
};
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]
};
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]
};
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]
};
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]
};
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]
};
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]
};
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]
};
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]
};
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],
@ -239,7 +239,7 @@
"58": [vorne5, hinten8],
"59": [vorne5, hinten9]
},
"getDotMinute": function (time) {
"getDotMinute": function() {
return 0;
}
};

View file

@ -12,7 +12,7 @@
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 () {
(function() {
'use strict';
// hilfsvariablen
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
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
(function () {
(function() {
'use strict';
var es_isch = {1: [1, 2, 4, 5, 6, 7]};
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
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
(function () {
(function() {
'use strict';
var it_is = {1: [1, 2, 4, 5]};
var half = {4: [1, 2, 3, 4]};
@ -69,7 +69,7 @@
"10,22": {10: [1, 2, 3]},
"11,23": {8: [6, 7, 8, 9, 10, 11]}
},
"getHour": function (date) {
"getHour": function(date) {
var hour = date.getHours();
if (date.getMinutes() >= 35) {
return (hour + 1) % 24;

View file

@ -12,7 +12,7 @@
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 () {
(function() {
'use strict';
var il_est = {1: [1, 2, 4, 5, 6]};
var et = {8: [1, 2]};
@ -57,20 +57,53 @@
},
"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],
"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) {
"getHour": function(date) {
var hour = date.getHours();
if (date.getMinutes() >= 35) {
return (hour + 1) % 24;

View file

@ -12,7 +12,7 @@
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 () {
(function() {
'use strict';
var sono_le = {1: [1, 2, 3, 4, 6, 7]};
var e_l = {2: [1, 3, 4]};
@ -68,7 +68,7 @@
"10,22": [sono_le, {4: [1, 2, 3, 4, 5]}],
"11,23": [sono_le, {4: [6, 7, 8, 9, 10, 11]}]
},
"getHour": function (date) {
"getHour": function(date) {
var hour = date.getHours();
if (date.getMinutes() >= 35) {
return (hour + 1) % 24;

View file

@ -12,16 +12,17 @@
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 ($) {
(function($) {
'use strict';
var uhrGlobals = {
"id": 0,
"languages": [],
"themes": [],
registerLanguage: function registerLanguage(code, language) {
var alreadyExists = uhrGlobals.languages.some(function (element) {
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 + "'!");
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;
@ -34,7 +35,7 @@
};
// auto-detect themes
$('link[rel=stylesheet]').each(function (index, item) {
$('link[rel=stylesheet]').each(function(index, item) {
var styleSheet = $(item);
var styleClass = styleSheet.attr('data-class');
if (styleClass !== undefined) {
@ -53,7 +54,7 @@
// public interface methods (exported later)
var start = function start() {
if (!isOn.bind(this)()) {
this.timer = window.setInterval(function () {
this.timer = window.setInterval(function() {
this.options.time = new Date();
update.bind(this)();
}.bind(this), 1000);
@ -80,7 +81,7 @@
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 () {
renderer.render.bind(this)(function() {
this.currentMinute = -1;
update.bind(this)();
}.bind(this));
@ -152,7 +153,7 @@
if (this.options.controls) {
var configlink = $('<a class="uhr-configlink" id="uhr-configlink' + this.id + '"></a>');
configlink.on('click', function () {
configlink.on('click', function() {
showConfigScreen.bind(this)();
}.bind(this));
e.after(configlink);
@ -161,17 +162,16 @@
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>');
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);
// language chooser
if (uhrGlobals.languages.length > 1) {
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>');
});
content.append(languageChooser);
@ -180,13 +180,13 @@
// theme chooser
if (uhrGlobals.themes.length > 1) {
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>');
});
content.append(themeChooser);
}
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');
}.bind(this));
content.append(closebutton);
@ -197,7 +197,7 @@
var wireFunctionality = function wireFunctionality() {
// on/off switch
var toggleSwitch = $('#uhr-onoffswitch-checkbox' + this.id);
toggleSwitch.on('click', function () {
toggleSwitch.on('click', function() {
this.toggle();
}.bind(this));
var status = $.cookie('uhr-status' + this.id);
@ -213,7 +213,7 @@
// language chooser
var languageChooser = $('#uhr-languagechooser' + this.id);
languageChooser.on('change', function () {
languageChooser.on('change', function() {
var languageKey = $('#uhr-languagechooser' + this.id).val();
this.language(languageKey);
}.bind(this));
@ -221,7 +221,7 @@
if (selectedLanguage === undefined || this.options.force) {
selectedLanguage = this.options.language;
}
var found = uhrGlobals.languages.some(function (item) {
var found = uhrGlobals.languages.some(function(item) {
return selectedLanguage === item.code;
});
if (!found) {
@ -240,7 +240,7 @@
// theme chooser
var themeChooser = $('#uhr-themechooser' + this.id);
themeChooser.on('change', function () {
themeChooser.on('change', function() {
var themeKey = $('#uhr-themechooser' + this.id).val();
this.theme(themeKey);
}.bind(this));
@ -248,7 +248,7 @@
if (selectedTheme === undefined || this.options.force) {
selectedTheme = this.options.theme;
}
found = uhrGlobals.themes.some(function (item) {
found = uhrGlobals.themes.some(function(item) {
return selectedTheme === item.styleClass;
});
if (!found) {
@ -260,7 +260,7 @@
this.options.theme = "";
this.theme(selectedTheme);
if (this.options.autoresize) {
$(window).on('resize', function () {
$(window).on('resize', function() {
var $e = this.element;
var $parent = $e.parent();
var $window = $(window);
@ -353,7 +353,7 @@
};
var language = function language() {
var matchingLanguages = uhrGlobals.languages.filter(function (element) {
var matchingLanguages = uhrGlobals.languages.filter(function(element) {
return (element.code === this.options.language);
}, this);
if (matchingLanguages.length > 0) {
@ -394,21 +394,21 @@
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;
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.fadeOut('fast', function() {
renderarea.empty();
letters.forEach(function (line, index, array) {
line.forEach(function (letter) {
letters.forEach(function(line, index, array) {
line.forEach(function(letter) {
renderarea.append(letter.toString());
});
if (index < array.length - 1) {
@ -427,7 +427,7 @@
function parseArrayOrObject(letters, styleClass, input) {
if (typeof input !== 'undefined' && input !== null) {
if (Array.isArray(input)) {
input.forEach(function (item) {
input.forEach(function(item) {
parseObject(letters, styleClass, item);
});
} else {
@ -438,9 +438,9 @@
function parseObject(letters, styleClass, object) {
if (typeof object !== 'undefined' && object !== null) {
Object.keys(object).forEach(function (y) {
Object.keys(object).forEach(function(y) {
var highlightLetters = object[y];
highlightLetters.forEach(function (x) {
highlightLetters.forEach(function(x) {
letters[y - 1][x - 1].addStyle(styleClass);
});
});
@ -449,10 +449,10 @@
function parseTimeDefinition(letters, styleClass, definition) {
if (typeof definition !== 'undefined' && definition !== null) {
Object.keys(definition).forEach(function (listString) {
Object.keys(definition).forEach(function(listString) {
var array = listString.split(',');
var highlightLetters = definition[listString];
array.forEach(function (item) {
array.forEach(function(item) {
parseArrayOrObject(letters, styleClass + item, highlightLetters);
});
});
@ -461,7 +461,7 @@
this.parse = function parse() {
var letters = [];
layout.letters.forEach(function (string) {
layout.letters.forEach(function(string) {
var line = [];
for (var c = 0; c < string.length; c++) {
var character = new Letter(string[c]);
@ -485,14 +485,14 @@
function Letter(value, style) {
var myValue = value;
var myStyle = style || '';
this.addStyle = function (style) {
this.addStyle = function(style) {
if (myStyle === '') {
myStyle = style;
} else {
myStyle += ' ' + style;
}
};
this.toString = function () {
this.toString = function() {
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">
<head>
<title>Bärneruhr - Die Zeit im Wort: Showcase</title>
<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-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="../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-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-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-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="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="../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-cookie-1.4.0.js"></script>
<script type="text/javascript" src="../js/uhr.js"></script>
<title>Bärneruhr - Die Zeit im Wort: Showcase</title>
<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-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="../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-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-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-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="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="../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-cookie-1.4.0.js"></script>
<script type="text/javascript" src="../js/uhr.js"></script>
</head>
<body style="padding:0;margin:0;">
<div id="uhr"></div>
<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_genau.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-en.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">
(function($) {
var width = $(window).width();
var height = $(window).height() - 150;
var size = Math.min(width, height);
if (size < 200) {
size = 200;
}
$('#uhr').uhr({
width: size + 'px',
language: 'de_CH'
});
})(jQuery);
</script>
<div id="uhr"></div>
<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_genau.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-en.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">
(function($) {
var width = $(window).width();
var height = $(window).height() - 150;
var size = Math.min(width, height);
if (size < 200) {
size = 200;
}
$('#uhr').uhr({
width: size + 'px',
language: 'de_CH'
});
})(jQuery);
</script>
</body>
</html>

View file

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

View file

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