Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for Timezones #12

Closed
wants to merge 48 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
d3d722b
remove extraneous </html>
MoralCode Dec 29, 2018
c21b292
add schoolIsInSession() function
MoralCode Dec 29, 2018
f168fb6
add state flags
MoralCode Dec 29, 2018
426c81b
remove passing periods from the schedule
MoralCode Dec 29, 2018
76a8b68
re-organise updateText using state flags
MoralCode Dec 29, 2018
a0af5a6
continue to update the time even if schedule data is not available
MoralCode Jan 1, 2019
bd0c146
Add flash function
MoralCode Jan 2, 2019
53d8eea
Change data structure to support multiple hardcoded schools
MoralCode Jan 31, 2019
4a608cf
add function to get an index from localStorage
MoralCode Jan 31, 2019
437b16d
Add School Name
MoralCode Jan 2, 2019
d775a8b
fix close spacing on settings page
MoralCode Jan 2, 2019
5fde3c6
continue to update date and time even if a school isn't selected
MoralCode Jan 2, 2019
516b99e
move nav button HTML to a more sensible place
MoralCode Jan 2, 2019
2249dd7
group elements that are schedule-based together for easier hiding
MoralCode Jan 2, 2019
e8fec35
hide schedule-based elements when there is no schedule selected
MoralCode Jan 2, 2019
cfac59c
move flash messages above the whole page rather than over the top of it
MoralCode Jan 2, 2019
e037d9e
Documentation and cleanup
MoralCode Jan 2, 2019
cc3af4a
fix flashing so that the layouts dont break on mobile
MoralCode Jan 2, 2019
12eedae
add school name to summary for clarity
MoralCode Jan 2, 2019
5fcc0fa
add slack link instead of github issues link
MoralCode Jan 2, 2019
5c2188c
Add a tracking metric for the school someone has selected
MoralCode Jan 2, 2019
9cae0b8
Move "View Schedule" link
MoralCode Jan 2, 2019
5cfa996
re-configure display of school name on homepage
MoralCode Jan 2, 2019
359ff24
fix flash messages taking up half the screen sometimes
MoralCode Jan 2, 2019
a7eb69c
add tracking for usage of time display setting
MoralCode Jan 2, 2019
96eadf6
refactor getClassName()
MoralCode Jan 5, 2019
d3a8978
replace time globals with a method to get the current time object
MoralCode Feb 1, 2019
8a7fdbf
add proper time comparison methods
MoralCode Feb 1, 2019
7ad2861
implement new time methods
MoralCode Feb 1, 2019
8bfd994
fix centered links extending all the way across the page
MoralCode Feb 3, 2019
c1d7049
fix missing "...which ends in:" data on main page
MoralCode Feb 3, 2019
2c66a1f
refactor compareTimes() to include minutes in it's calculation
MoralCode Feb 7, 2019
2e07244
Add sanitizeTimeObject()
MoralCode Feb 7, 2019
f424879
add getMostRecentlyStartedClassIndex()
MoralCode Feb 7, 2019
854c7ea
make getTimeDelta() more flexible
MoralCode Feb 7, 2019
d9878b4
samitize times before comparing them so it doesnt skip seconds
MoralCode Feb 7, 2019
50a3ba1
add passing period name to school data
MoralCode Feb 7, 2019
3b358a2
add getTimeTo() shortcut
MoralCode Feb 7, 2019
db6d769
remove getTimeToEndOfCurrentClassString() and getTimeToStartOfSchoolS…
MoralCode Feb 7, 2019
ce25c98
update documentation and comments
MoralCode Feb 7, 2019
00893bf
replace tracking code with matomo tag manager
MoralCode Feb 7, 2019
6bfbc2b
hide labels on no school days
MoralCode Feb 10, 2019
6b485dd
add styles for links in flash messages
MoralCode Feb 10, 2019
1f49a7a
remove links from readme
MoralCode Feb 10, 2019
97e7ab5
update domain name on dev branch
MoralCode Feb 13, 2019
f611fc0
fix an instance of the old name
MoralCode Feb 14, 2019
0ae2bd8
Update README file
MoralCode Feb 14, 2019
4c37921
Add support for Timezones.
Feb 25, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ Here are some features to look forward to in a future version:

## How to install?

ClassTime is a web-based app that can be saved to your phone's home screen or bookmarked in your browser for easy access.
ClassClock is a web-based app that can be saved to your phone's home screen or bookmarked in your browser for easy access.

### iOS

1. Navigate to https://classclock.app in Safari (not tested on other browsers)
1. Navigate to ClassClock in Safari (not tested on other browsers)
2. Click the "Share" or "Action" button (it looks like a square with an arrow pointing up out of the top)
3. Click "Add to Home Screen" on the bottom row (you might have to scroll sideways to see it)
4. Click "Done" in the top corner of the screen to add it to your home screen.


### Android

1. Navigate to https://classclock.app (instructions for Google Chrome)
1. Navigate to ClassClock (instructions for Google Chrome)
2. Click the "Overflow" button on the top right of your screen (it looks like three vertical dots)
3. Click "Add to Home Screen" button in the menu (it's about 2/3 of the way down)
4. Click "Add" in the dialog box that pops up to add it to your home screen.
30 changes: 13 additions & 17 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<html>
<head>
<!-- Matomo Tag Manager -->
<script type="text/javascript">
var _mtm = _mtm || [];
_mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src='https://analytics.adriancedwards.com/js/container_b9i4lGUG.js'; s.parentNode.insertBefore(g,s);
</script>
<!-- End Matomo Tag Manager -->

<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
Expand All @@ -17,22 +26,9 @@

</head>
<body onload="{{ page.onload |default: "" }}">
{{ content }}
<p id="flash"></p>
<div id="page">
{{ content }}
</div>
</body>
<!-- Matomo -->
<script type="text/javascript" async>
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//analytics.adriancedwards.com/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '3']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//analytics.adriancedwards.com/piwik.php?idsite=3&amp;rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Matomo Code -->
</html>
Loading