all repos — gears @ 6a4e44c99d5c9fa692565da48c77b1c597a810e2

lightweight world clock webapp with jquery, moment-timezone, and fuse.js

minor visual tweaks
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE-----

iQJDBAABCAAtFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAl3IyZUPHG5pbGl4QG5p
bGZtLmNjAAoJEDt/vCIUTmOYRJYP/RVX1IkqFYV8DObRRLLko+JdBTsCEjp4r2MK
81cLYmbICJEeVCNDZX4xYsNG/L4W8BzkEtFsyjTETB1BKEShgcaC0F6Nbx5bF77P
nYVvgZMhPAhfeN16Tc1/9SCtqaMAGIu18orRDm/U/yPPyz11WF0IT4PQV4ENsFd9
gZlC4tCD++PhfnDtsFNZhNR4xbF4IM5lD3n3UzVUIivkR1+Or7HV4HD3j2qXZilP
js67BYpRIOEiHr1QXVm6EQw0JaS0iy5mYb28wmPyLftztYo/qsAvu6TZL/jA+gq7
coniBYWvgcWR3uPUug4NnGBixpq/sG3CLEVv8YN9l8EVS74uOullVtwUDr1jhnyc
ms0FpPe+viqaz+gNkskpM5cCGFLyq0NExn5J3cPWO6eLNtersr/ohZASTzWwQHgb
/5ZCw52Ldb4yqvR2bU+aC5C3z9E1VzOcbqsrhgPOB656h8U2Gwl6QK0lb2lMuU0G
6rZJcKKn5s1Gx77J+K70eqe/FzpLEz1IdAq1Ua9cmUZwAwVpTsPWP4dJ4gz7N4hX
KDFyYmX+sHiTnWxSiKxwisBoHhwX7XrgTfGZdeLybfyy5WXuGXEKfNMvnNWSHiPC
r7y/k7zrolK1m/tcWcc7EEl5zQoyvljR94HPBs7Nqbs/vAV0FiDxl/jiwv6RXDSB
3c+NzC9l
=XeJ+
-----END PGP SIGNATURE-----
commit

6a4e44c99d5c9fa692565da48c77b1c597a810e2

parent

3816965f05fe8c5cb3ce82bd53f3c2e97c512a03

3 files changed, 64 insertions(+), 6 deletions(-)

jump to
M index.htmlindex.html

@@ -36,7 +36,7 @@ <h5>Universal Coordinated Time</h5>

</div> <form id="searchBox"> - <input type="text" id="tzSearchBox" name="tzSearch" autocomplete="off" placeholder="search for a timezone or location..."> + <input type="text" id="tzSearchBox" name="tzSearch" autocomplete="off" placeholder="search for a timezone to add to the table..."> <input type="button" id="tzSearchButton" name="tzButton" value="go"> <div id="tzSearchResults"></div> </form>
M style.cssstyle.css

@@ -282,7 +282,7 @@ }

label { - font-size: 10px; + font-size: 12px; } input[type=number], select

@@ -394,14 +394,14 @@

table th { position: relative; - margin-top: -1px; - margin-bottom: 6px; + margin-bottom: 2px; border-style: solid; border-color: #797979; border-width: 1px; border-collapse: collapse; padding: 4px; border-radius: 4px; + margin-top: 2px } table td

@@ -421,7 +421,7 @@ display: grid;

grid-gap: 0px; grid-template-rows: 13px 14px 13px; grid-templates-columns: 13px 1fr; - font-size: 12px; + font-size: 14px; line-height: 40px; padding: 4px; }

@@ -516,6 +516,29 @@ background: #ff980044 !important;

color: black; } +.workingEven +{ + background: #eeffffff !important; +} + +.earlyEven +{ + background: #eeffff33 !important; + color: black; +} + +.lateEven +{ + background: #5b91ecff !important; + color: white; +} + +.weekendEven +{ + background: #ffc94744 !important; + color: black; +} + input[type=button]:disabled { color: #797979;

@@ -620,3 +643,8 @@ {

width: 50px; } +#shareRawText +{ + padding: 8px; + font-size:12px; +}
M table.jstable.js

@@ -300,7 +300,7 @@ {

if (options.colorCoding) { var rows = $("#zoneTable table tr"); - rows.each(function(){ + rows.filter(":even").each(function(){ $(this).children("td").each(function(){ var time = $(this).children("time").html();

@@ -324,6 +324,36 @@ if ($(this).children(".day").text() == "Sat" || $(this).children(".day").text() == "Sun")

{ $(this).removeClass(); $(this).addClass("weekend"); + } + }) + + }) + rows.filter(":odd").each(function(){ + + $(this).children("td").each(function(){ + var time = $(this).children("time").html(); + switch (options.formatSelector) + { + case "24H": + $(this).addClass("workingEven"); + if (time.split(":")[0] < 8 && time.split(":")[0] != 0) + $(this).addClass("earlyEven"); + if (time.split(":")[0] >= 17 || time.split(":")[0] == 0) + $(this).addClass("lateEven"); + break; + + case "12H": + $(this).addClass("workingEven"); + if ((time.split(":")[0] < 8 || time.split(":")[0] == 12) && time.split(" ")[1] == "AM") + $(this).addClass("earlyEven") + if ((time.split(":")[0] >= 5 && time.split(" ")[1] == "PM" && time.split(":")[0] != 12) || (time.split(":")[0] == 12 && time.split(" ")[1] == "AM")) + $(this).addClass("lateEven") + break; + } + if ($(this).children(".day").text() == "Sat" || $(this).children(".day").text() == "Sun") + { + $(this).removeClass(); + $(this).addClass("weekendEven"); } })