wechsel des layouts ist nun möglich

This commit is contained in:
Manuel Friedli 2013-11-25 13:25:02 +01:00
parent 5b051230c9
commit 57365c23e6
5 changed files with 52 additions and 30 deletions

View file

@ -5,6 +5,7 @@
<script type="text/javascript" src="jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="uhr.js"></script>
<script type="text/javascript" src="uhr-de_CH.js"></script>
<script type="text/javascript" src="uhr-de.js"></script>
<link rel="stylesheet" type="text/css" href="uhr.css" />
<link rel="stylesheet" type="text/css" href="uhr-black.css" id="theme" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
@ -19,13 +20,17 @@
<!-- glossy reflection -->
<span id="reflection"></span>
</div>
<div id="themeswitcher">
<input type="radio" name="theme" id="theme-black" value="black" checked="checked" /><label for="theme-black">BLACK</label>
<input type="radio" name="theme" id="theme-red" value="red" /><label for="theme-red">RED</label>
<input type="radio" name="theme" id="theme-blue" value="blue" /><label for="theme-blue">BLUE</label>
<input type="radio" name="theme" id="theme-green" value="green" /><label for="theme-green">GREEN</label>
<input type="radio" name="theme" id="theme-white" value="white" /><label for="theme-white">WHITE</label>
</div>
<select id="themeswitcher">
<option value="black">Schwarz</option>
<option value="red">Rot</option>
<option value="blue">Blau</option>
<option value="green">Grün</option>
<option value="white">Weiss</option>
</select>
<select id="layoutswitcher">
<option value="de_CH">Bärndütsch</option>
<option value="de">Hochdeutsch</option>
</select>
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="onoffswitch" checked="checked" onclick="updateClockState()" />
<label class="onoffswitch-label" for="onoffswitch">
@ -36,10 +41,14 @@
<p id="disclaimer">Created by fritteli, inspired by <a href="http://www.qlocktwo.com/">QLOCKTWO</a>.
<script type="text/javascript">
$(document).ready(function() {
render(layout);
$('input[name=theme]').on('click', function() {
switchTheme(this);
$('#themeswitcher').on('change', function() {
switchTheme(this.value);
});
$('#layoutswitcher').on('change', function() {
switchLayout(this.value);
});
currentLayout = layout['de_CH'];
renderLayout();
startClock();
});
</script>