Skip to content

Commit

Permalink
init setup websites
Browse files Browse the repository at this point in the history
  • Loading branch information
littleprojects committed Jul 27, 2015
1 parent 87e1ddc commit 607bc30
Show file tree
Hide file tree
Showing 12 changed files with 10,260 additions and 0 deletions.
53 changes: 53 additions & 0 deletions www/binary_config.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html>
<head>
<title>Binary Circuit Configuration</title>
</head>
<body>
<h1>Binary Circuit Config</h1>
<p>Choose watchface settings</p>

<p><b>Mode:</b>
<select id="mode_select">
<option value="day">Day</option>
<option value="night">Night</option>
<option value="auto" selected>Auto</option>
</select>
</p>

<p>
<button id="save_button">Save</button>
</p>

<p>
<b>Mode Day:</b> The background is black. <br><br>
<b>Mode Night:</b> The background is white. <br><br>
<b>Mode Auto:</b> The background turns at 8 clock in the morning in the day mode. From 8 clock in the evening he switches to night mode for better readability in the dark.<br><br>
</p>

<script>
//Setup to allow easy adding more options later
function saveOptions() {
var modeSelect = document.getElementById("mode_select");

var options = {
"mode": modeSelect.options[modeSelect.selectedIndex].value
}

return options;
};

var submitButton = document.getElementById("save_button");
submitButton.addEventListener("click",
function() {
console.log("Submit");

var options = saveOptions();
var location = "pebblejs://close#" + encodeURIComponent(JSON.stringify(options));

document.location = location;
},
false);
</script>
</body>
</html>
153 changes: 153 additions & 0 deletions www/binary_config_v2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<!DOCTYPE html>
<html>
<head>
<title>Binary Circuit Configuration</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-theme.min.css" rel="stylesheet">

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
</head>
<body>
<center>
<div class="container">

<h1>Binary Circuit</h1>
<div class="form-configure well">

<p>Choose watchface settings</p>

<p><b>Mode:</b><br>
<select id="mode_select">
<option value="day">Day</option>
<option value="night">Night</option>
<option value="auto">Auto</option>
</select>
</p>

<p><b>Day starts at:</b> (Auto Mode)<br>
<select id="day_start">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
o'clock
</p>

<p><b>Night starts at:</b> (Auto Mode)<br>
<select id="day_end">
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="0">24</option>
</select>
o'clock
</p>

<p><b>Numbers:</b><br>
<select id="show_numbers">
<option value="show">Show numbers</option>
<option value="hide">Hide numbers</option>
</select>
</p>

<p>
<button class="btn btn-lg btn-primary btn-block" id="save_button">Save</button>
</p>
</div>
</center>
<div class="footer container">

<p>
<b>Mode Day:</b><br> The background is black. <br><br>
<b>Mode Night:</b><br> The background is white. <br><br>
<b>Mode Auto:</b><br> The background turns at 8 clock in the morning in the day mode. From 20 clock in the evening, he switches to night mode for better readability in the dark.<br><br>
</p>

<p>
<b>Feedback:</b><br>
<br>
If you like the watch face or do you have any ideas: Feel free and send me a message.<br> It's a good feeling if you know somebody likes your work.
</p>
</div>
</div>
<script>
//Setup to allow easy adding more options later

var modeSelect = document.getElementById("mode_select");
var startSelect = document.getElementById("day_start");
var endSelect = document.getElementById("day_end");
var numberSelect = document.getElementById("show_numbers");

var mMode;
var mStart;
var mEnd;
var mNumber;

$().ready(function () {
mMode = localStorage.getItem("mode");
mStart = localStorage.getItem("start");
mEnd = localStorage.getItem("end");
mNumber = localStorage.getItem("number");

if(isNaN(mMode)) {mMode = 2;}
if(isNaN(mStart)) {mStart = 7;}
if(isNaN(mEnd)) {mEnd = 8;}
if(isNaN(mNumber)) {mNumber = 0;}

modeSelect.options[mMode].selected = true;
startSelect.options[mStart].selected = true;
endSelect.options[mEnd].selected = true;
numberSelect.options[mNumber].selected = true;
});

function saveOptions() {

localStorage.setItem ('mode', modeSelect.selectedIndex);
localStorage.setItem ('start', startSelect.selectedIndex);
localStorage.setItem ('end', endSelect.selectedIndex);
localStorage.setItem ('number', numberSelect.selectedIndex);

var options = {
"mode": modeSelect.options[modeSelect.selectedIndex].value,
"start": parseInt(startSelect.options[startSelect.selectedIndex].value),
"number": numberSelect.options[numberSelect.selectedIndex].value,
"end": parseInt(endSelect.options[endSelect.selectedIndex].value)
}

return options;
};

var submitButton = document.getElementById("save_button");
submitButton.addEventListener("click",
function() {
console.log("Submit");

var options = saveOptions();
var location = "pebblejs://close#" + encodeURIComponent(JSON.stringify(options));

document.location = location;
},
false);
</script>
</body>
</html>
108 changes: 108 additions & 0 deletions www/binary_config_v2_old.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<!DOCTYPE html>
<html>
<head>
<title>Binary Circuit Configuration</title>
</head>
<body>
<h1>Binary Circuit Config</h1>
<p>Choose watchface settings</p>

<p><b>Mode:</b><br>
<select id="mode_select">
<option value="day">Day</option>
<option value="night">Night</option>
<option value="auto" selected>Auto</option>
</select>
</p>

<p><b>Day starts at:</b> (Auto Mode)<br>
<select id="day_start">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8" selected>8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
o'clock
</p>

<p><b>Night starts at:</b> (Auto Mode)<br>
<select id="day_end">
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18" selected>18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="0">24</option>
</select>
o'clock
</p>

<p><b>Numbers:</b><br>
<select id="show_numbers">
<option value="show" selected>Show numbers</option>
<option value="hide">Hide numbers</option>
</select>
</p>

<p>
<button id="save_button">Save</button>
</p>

<p>
<b>Mode Day:</b> The background is black. <br><br>
<b>Mode Night:</b> The background is white. <br><br>
<b>Mode Auto:</b> The background turns at 8 clock in the morning in the day mode. From 20 clock in the evening, he switches to night mode for better readability in the dark.<br><br>
</p>

<p>
<b>Feedback:</b><br>
<br>
If you like the watch face or do you have any ideas: Feel free and send me a message.<br> It's a good feeling if you know somebody likes your work.
</p>

<script>
//Setup to allow easy adding more options later
function saveOptions() {
var modeSelect = document.getElementById("mode_select");
var startSelect = document.getElementById("day_start");
var endSelect = document.getElementById("day_end");
var numberSelect = document.getElementById("show_numbers");

var options = {
"mode": modeSelect.options[modeSelect.selectedIndex].value,
"start": parseInt(startSelect.options[startSelect.selectedIndex].value),
"number": numberSelect.options[numberSelect.selectedIndex].value,
"end": parseInt(endSelect.options[endSelect.selectedIndex].value)
}

return options;
};

var submitButton = document.getElementById("save_button");
submitButton.addEventListener("click",
function() {
console.log("Submit");

var options = saveOptions();
var location = "pebblejs://close#" + encodeURIComponent(JSON.stringify(options));

document.location = location;
},
false);
</script>
</body>
</html>
Loading

0 comments on commit 607bc30

Please sign in to comment.