Merge branch 'develop' into feature/splashscreen
This commit is contained in:
commit
5ccc66da8c
5 changed files with 18 additions and 17 deletions
|
@ -6,8 +6,8 @@ Du willst Bärneruhr auf deiner Website verwenden? Dank des jQuery-Plugins geht
|
|||
1. Benötigte Dateien einbinden
|
||||
------------------------------
|
||||
* Binde folgende Javascript-Dateien im HTML-Dokument ein:
|
||||
* jquery-2.0.3.min.js (Falls nicht bereits vorhanden)
|
||||
* jquery-ui-1.10.3.custom.min.js (Falls nicht bereits vorhanden)
|
||||
* jquery-2.1.0.min.js (Falls nicht bereits vorhanden)
|
||||
* jquery-ui-1.10.4.custom.min.js (Falls nicht bereits vorhanden)
|
||||
* Von jquery-ui werden die Komponenten 'core' und 'widget' benötigt.
|
||||
* jquery-cookie-1.4.0.js (Falls nicht bereits vorhanden)
|
||||
* uhr.js
|
||||
|
@ -29,6 +29,7 @@ Du willst Bärneruhr auf deiner Website verwenden? Dank des jQuery-Plugins geht
|
|||
Erstelle ein leeres `<div>` mit einer ID:
|
||||
|
||||
<div id="uhrcontainer"></div>
|
||||
|
||||
3. Uhr per Javascript konfigurieren
|
||||
-----------------------------------
|
||||
Initialisiere die Uhr mit einer einzigen Zeile Javascript:
|
||||
|
@ -49,7 +50,7 @@ Es kann natürlich auch eine Collection von Elementen übergeben werden. Mit
|
|||
|
||||
jQuery('div').uhr();
|
||||
|
||||
würde also jedes `<div>`-Element der Seite in eine Uhr umgewandelt
|
||||
würde also jedes `<div>`-Element der Seite in eine Uhr umgewandelt.
|
||||
|
||||
4. Weitere Optionen
|
||||
-------------------
|
||||
|
|
|
@ -29,16 +29,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
<link rel="shortcut icon" type="image/png" href="favicon.png" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<link rel="apple-touch-icon" href="icon.png" />
|
||||
<!-- <link rel="apple-touch-startup-image" href="" />--><!--320x460px-->
|
||||
<link rel="apple-touch-startup-image" href="splash.png" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no" />
|
||||
<meta name="apple-mobile-web-app-title" content="Bärneruhr" />
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1" />
|
||||
</head>
|
||||
<body style="padding:0;margin:0;">
|
||||
<a href="info/">
|
||||
<div id="uhr"></div>
|
||||
</a>
|
||||
<p id="disclaimer">Created by <a href="http://www.fritteli.ch/">fritteli</a>, inspired by <a href="http://www.qlocktwo.com/">QLOCKTWO</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 href="info/">Read more!</a></p>
|
||||
<script type="text/javascript" src="uhr-de_CH.js"></script>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CACHE MANIFEST
|
||||
# 5.0-alpha2
|
||||
# 5.0-beta
|
||||
|
||||
COPYING
|
||||
README.md
|
||||
|
@ -9,6 +9,7 @@ index.html
|
|||
jquery-2.1.0.min.js
|
||||
jquery-cookie-1.4.0.js
|
||||
jquery-ui-1.10.4.custom.min.js
|
||||
splash.png
|
||||
uhr-black.css
|
||||
uhr-blue.css
|
||||
uhr-de.js
|
||||
|
|
BIN
splash.png
Normal file
BIN
splash.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
14
uhr.js
14
uhr.js
|
@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
window._uhr = {
|
||||
id: 0,
|
||||
languages: new Array()
|
||||
languages: []
|
||||
};
|
||||
$.widget("fritteli.uhr", {
|
||||
options: {
|
||||
|
@ -196,7 +196,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
e.append('<div class="letterarea"></div>');
|
||||
e.append('<div class="reflection"></div>');
|
||||
e.css('width', this.options.width);
|
||||
var realWidth = e.width()
|
||||
var realWidth = e.width();
|
||||
e.width(realWidth);
|
||||
e.height(realWidth);
|
||||
e.css('font-size', (realWidth / 40) + 'px');
|
||||
|
@ -212,7 +212,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
e.after(toggleSwitch);
|
||||
|
||||
// language chooser
|
||||
var languageChooser = $('<select id="uhr-languagechooser' + this._id + '"></select>')
|
||||
var languageChooser = $('<select id="uhr-languagechooser' + this._id + '"></select>');
|
||||
for (var code in window._uhr.languages) {
|
||||
if (window._uhr.languages.hasOwnProperty(code)) {
|
||||
var language = window._uhr.languages[code];
|
||||
|
@ -232,7 +232,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
}
|
||||
},
|
||||
_wireFunctionality: function() {
|
||||
var e = this.element;
|
||||
var uhr = this;
|
||||
|
||||
// on/off switch
|
||||
|
@ -307,7 +306,7 @@ UhrRenderer.prototype.render = function(uhr, beforeshow) {
|
|||
}
|
||||
renderer.renderarea.fadeIn('fast');
|
||||
});
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Ein Buchstabe. Hilfsklasse für den Renderer und Inhalt der Layout-Arrays.
|
||||
* @param value Der Buchstabe, der Dargestellt werden soll.
|
||||
|
@ -318,18 +317,19 @@ function Letter(value, style) {
|
|||
this.style = style || '';
|
||||
this.getStyle = function() {
|
||||
return 'item letter ' + style;
|
||||
}
|
||||
};
|
||||
this.getValue = function() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
Letter.prototype.toString = function letterToString() {
|
||||
return '<span class="' + this.getStyle() + '">' + this.getValue() + '</span>';
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Hilfsfunktion, um einen Buchstaben zu erzeugen.
|
||||
*
|
||||
* @param letter string: Der Buchstabe, der angezeigt werden soll
|
||||
* @param style string: CSS-Klasse(n) als String
|
||||
* @example l('I', 'is') erzeugt den Buchstaben 'I' mit der CSS-Styleklasse 'is'
|
||||
*/
|
||||
function l(letter, style) {
|
||||
|
|
Loading…
Reference in a new issue