Skip to content
This repository was archived by the owner on Nov 16, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
4b991d0
Bring Old Scheduler Files Into Folder
EKKOING Aug 25, 2019
dde2297
Clean Up A Bunch of Stuff
EKKOING Aug 26, 2019
995f1a1
Added Cookie Capability to Clock
EKKOING Aug 26, 2019
ec6c383
Update Scheduler Domain
EKKOING Aug 26, 2019
866009c
Update File Name
EKKOING Aug 26, 2019
2fa6a17
Fix Domain Error
EKKOING Aug 26, 2019
b3e1ef3
Change Customization Section
EKKOING Aug 26, 2019
1d08a5d
Added Second Author
EKKOING Aug 26, 2019
f99607e
Stop Scheduler from Auto Exiting
EKKOING Aug 26, 2019
ef905ac
Merge branch 'master' of https://github.com/EKKOING/cclock
EKKOING Aug 26, 2019
14e2038
Update Domain for Testing
EKKOING Aug 26, 2019
b951f7a
Fix Logic Statement
EKKOING Aug 26, 2019
5a33987
Set a cookie path
EKKOING Aug 26, 2019
0576864
Fix backslash direction
EKKOING Aug 26, 2019
b572161
Fix 5A/5B Bug
EKKOING Aug 26, 2019
feedeb4
Happiness was mispelled
EKKOING Aug 26, 2019
102d0ea
Take out of testing mode
EKKOING Aug 26, 2019
c5a2ced
Update Scheduler Style
EKKOING Aug 26, 2019
231d56d
Start Work on the new Schedule Preview Widget
EKKOING Sep 2, 2019
4d00101
Add Dates for Fall 2019
EKKOING Sep 2, 2019
575e617
Add links and autoredirect from scheduler
EKKOING Sep 2, 2019
7f44506
Fix Redirect
EKKOING Sep 2, 2019
2ca5cf7
Add Schedule Preview Widget
EKKOING Sep 3, 2019
b346566
Update index.html
EKKOING Sep 3, 2019
36e6ab2
Assume blanks are frees
EKKOING Sep 3, 2019
68f2aa2
Fix Autofill
EKKOING Sep 3, 2019
33bf394
Fix Spacing of Schedule Box
EKKOING Sep 3, 2019
252de48
Update script.js
EKKOING Sep 3, 2019
090cdea
Update script.js
EKKOING Sep 3, 2019
b2e8bce
Fix autofill
EKKOING Sep 3, 2019
2dc4a60
Update scheduler.js
EKKOING Sep 3, 2019
132148d
Update Dev Email
EKKOING Sep 3, 2019
2e34c3f
Bug Fix
EKKOING Sep 9, 2019
f0f3a64
Duplicate Files
EKKOING Mar 20, 2020
f502069
Update Current Period Display Code
EKKOING Mar 20, 2020
d5db4c3
Add Current Period View Of Corona Clock
EKKOING Mar 20, 2020
839a5d4
Fix Potential Naming Issues
EKKOING Mar 20, 2020
05afcc1
Fix CookieCheck bug
EKKOING Mar 20, 2020
a7f7046
New Scheduler Page
EKKOING Mar 20, 2020
59363df
Update scheduler.js
EKKOING Mar 20, 2020
a0923d7
Update To Support Corona Schedule
EKKOING Mar 20, 2020
174f4b7
Load Corona Schedule
EKKOING Mar 20, 2020
4d69f7f
Fixed Classes Missing Bug
EKKOING Mar 20, 2020
25fcd14
Set Last Modified Date
EKKOING Mar 20, 2020
1e3c22a
Allow Timezone Switching
EKKOING Mar 20, 2020
1e713d4
Update Last Modified Date
EKKOING Mar 20, 2020
4412501
Fix Function Call To getHours
EKKOING Mar 20, 2020
1b4a965
Reroute All Traffic To Corona Clock
EKKOING Mar 20, 2020
faa35ce
Update README.md
EKKOING Mar 20, 2020
e553249
Update To New Schedule
EKKOING Mar 20, 2020
24af3fc
Merge branch 'master' of https://github.com/EKKOING/cclock
EKKOING Mar 20, 2020
8505247
Adjust Schedule Timezone
EKKOING Mar 21, 2020
6e587fb
Fix 12 Hour Bug
EKKOING Mar 21, 2020
bb9412a
Updated D Session Schedule
EKKOING Mar 25, 2020
f4fa113
Add Hyphen In All-School
EKKOING Mar 25, 2020
e5b0e99
Auto Timezone Change
EKKOING Mar 28, 2020
ef4544b
Prevent User Error In 5A 5B Slots
EKKOING Mar 29, 2020
d6ed50d
Auto Assign Timezone Value
EKKOING Mar 29, 2020
c2dfd58
Decount Ad
EKKOING Mar 29, 2020
48b34d0
Fix Decount Ad
EKKOING Mar 29, 2020
7a6b393
Fix Last Commit
EKKOING Mar 30, 2020
bad2fa8
Potential Fix To 5A 5B Conflict On Live View
EKKOING Mar 31, 2020
9d2a120
Warning on 5A/5B Bug on Live View
EKKOING Mar 30, 2020
67109fd
Get a sense of usage patterns
EKKOING May 9, 2020
64a97eb
Remove Non Existent Holiday
EKKOING May 27, 2020
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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Jiahua Chen
Copyright (c) 2019 Jiahua Chen & Nicholas Lorentzen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 🕒 CClock · ![version](https://img.shields.io/badge/version-2.1-yellowgreen.svg)
# 🕒 CClock · ![version](https://img.shields.io/badge/version-2.2-yellowgreen.svg)

**CClock** stands for *countdown clock*, or *class clock*. It is meant to count down the time left in each class block, and is also a reminder for the time remaining until the start of the next class block. CClock is fully customizable, adaptable, and works on all devices. Additionally, the simplest version of CClock (here) is fully static and only runs clientside. This means that CClock can be run from Github Pages or another static site host.

Expand Down Expand Up @@ -49,13 +49,7 @@ animation: Gradient 15s ease infinite;
## Customization

### Add your own schedule
`script.js` is the controller for the clock on the page. It's simple but naïve –– the static page requires static changes to the code. For now, this means that you need to go into the actual functions to change the schedule, and the schedule unfortunately is not dynamically loading.

`getSchedule()` gets the schedules of the day and outputs the correct block/period. `weekday` starts on Sunday (0), thus making Monday 1, and so on. You want to define and fill the array currentSchedule to indicate the period the specific weekday is following:
```javascript
currentSchedule[0] = new Period("Period 1", 8, 30, 9, 15);
```
Where `new Period("Period 1", 8, 30, 9, 15)` means that the first period of the day (in `currentSchedule[0]`) is called "Period 1", and it starts at 8:30 AM and ends at 9:15 AM. The rest of the periods, and the rest of the days are defined similarly.
//NEEDS TO BE REWRITTEN TO SPECIFY 2 WAYS OF CUSTOMIZATION
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//NEEDS TO BE REWRITTEN TO SPECIFY 2 WAYS OF CUSTOMIZATION

Will be rewritten once I'm not committing at 2am


### Special schedules
At the start of the document, there are definitions for special days. On some occasions, events or special schedules might disrupt the normal schedule. This is where it should be defined and noted. Note that `new CalDay(3, 8)` means 8th of March.
Expand Down Expand Up @@ -111,4 +105,4 @@ The clock will also display a random inspirational quote whenever you load it, l
## Thanks
The design of version 2 was inspired by [Decount](https://decount.co/) (and this design was reimplemented into Decount), and the original source code was adapted from [Eric Li's Network Clock](https://github.com/eli8527/Network-Clock).

CClock © 2019, Jiahua Chen. Released under the [MIT License](https://mit-license.org/).
CClock © 2020, [Nicholas Lorentzen](github.com/EKKOING). Released under the [MIT License](https://mit-license.org/).
Binary file added corona-clock/assets/screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
93 changes: 93 additions & 0 deletions corona-clock/index-scroll.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="description" content="Countdown time, clock and useful widgets. ">
<meta name="viewport" content="width=device-width, initial-scale=0.8, user-scalable=no">
<meta http-equiv="Cache-control" content="public">
<title>Hotchkiss Clock</title>

<!-- Loads external styles/fonts -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,700&display=swap"
rel="stylesheet">

<!-- Loads stylesheet -->
<link rel="stylesheet" href="./style.css">

</head>

<body scroll="no" style="overflow: hidden">
<!-- Darksky Weather Widget -->
<div class="weather">
<script type='text/javascript'
src='https://darksky.net/widget/default-small/41.9474,-73.4464/us12/en.js?width=90%&height=100&title=Full Forecast&textColor=ffffff&bgColor=transparent&transparency=true&skyColor=undefined&fontFamily=Default&customFont=&units=us'></script>
</div>

<!-- Clock Element (top left) -->
<div id="clock">
</div>

<!-- Period/Block Name -->
<div id="class-info">
</div>

<!-- Schedule info/content -->
<div id="schedule-info">
</div>

<!-- Clock container -->
<div class="clock-container">
<div class="clock-col" id="hrs">
<p class="clock-hours clock-timer">
</p>
<p class="clock-label">
Hours
</p>
</div>
<div class="clock-col" id="mins">
<p class="clock-minutes clock-timer">
</p>
<p class="clock-label">
Minutes
</p>
</div>
<div class="clock-col" id="secs">
<p class="clock-seconds clock-timer">
</p>
<p class="clock-label">
Seconds
</p>
</div>
</div>

<div id="info">
<span id="info-text">Eric Li ’13, Jiahua Chen ’20 </span>
<i id="info-circle" class="fas fa-info-circle"></i>
<a href="mailto:jchen20@hotchkiss.org"><i id="bug-report" class="fas fa-bug"></i></a>
</div>

<div id="widgets-bar">
<div class="widget" id="message-widget" style="display: none;">
<p id="message" align="center" style="font-weight: 700;"></p>
</div>
<div class="widget" id="quote-widget" style="display: none;">
<p id="quote"></p>
<p align="right" id="speaker" style="font-weight: 700;"></p>
</div>
<div class="widget">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque rhoncus eros vitae laoreet sollicitudin. Praesent vitae imperdiet arcu, ut lobortis ante. Vestibulum vel tortor vitae mauris varius dignissim nec in neque. Aliquam cursus scelerisque porttitor. Nullam nec ligula rutrum, tempus arcu eget, gravida justo. Donec fringilla tellus congue tellus vestibulum, et molestie justo tempus. Cras pellentesque nulla sed sagittis mollis. Praesent purus massa, lobortis sed odio sed, vulputate interdum eros. Fusce cursus quis neque et condimentum. Cras eget ligula sit amet dolor suscipit facilisis. Etiam eget nisl id enim congue consequat.
</div>
<div class="widget">
Quisque placerat sapien eget finibus imperdiet. In laoreet pellentesque mi sit amet faucibus. Proin quis augue id nunc ornare elementum non feugiat nulla. Quisque justo ante, vestibulum ac sagittis vitae, faucibus non nibh. Aenean non odio ex. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce lacinia euismod ornare. Integer at lectus augue. Donec a vehicula nibh, id posuere eros. Aenean lacus ante, malesuada non libero at, vehicula semper metus. Sed est orci, imperdiet vel cursus finibus, vulputate quis nibh.
</div>
</div>

<!-- Load scripts -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="./script.js"></script>
<script src="./message.js"></script>
<script src="https://kit.fontawesome.com/0eed931c3a.js"></script>
</body>
</html>
106 changes: 106 additions & 0 deletions corona-clock/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="description" content="Countdown time, clock and useful widgets. ">
<meta name="viewport" content="width=device-width, initial-scale=0.8, user-scalable=no">
<meta http-equiv="Cache-control" content="public">
<title>Hotchkiss Clock</title>

<!-- Loads external styles/fonts -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,700&display=swap">

<!-- Loads stylesheet -->
<link rel="stylesheet" href="./style.css">

</head>

<body scroll="no" style="overflow: hidden">
<!-- Darksky Weather Widget -->
<div class="weather">
<script type="text/javascript"
src="https://darksky.net/widget/default-small/41.9474,-73.4464/us12/en.js?width=90%&height=100&title=Full Forecast&textColor=ffffff&bgColor=transparent&transparency=true&skyColor=undefined&fontFamily=Default&customFont=&units=us"></script>
</div>

<!-- Clock Element (top left) -->
<div id="clock">
</div>

<!-- Period/Block Name -->
<div id="class-info">
</div>

<!-- Schedule info/content -->
<div id="schedule-info">
</div>

<!-- Clock container -->
<div class="clock-container">
<div class="clock-col" id="hrs">
<p class="clock-hours clock-timer">
</p>
<p class="clock-label">
Hours
</p>
</div>
<div class="clock-col" id="mins">
<p class="clock-minutes clock-timer">
</p>
<p class="clock-label">
Minutes
</p>
</div>
<div class="clock-col" id="secs">
<p class="clock-seconds clock-timer">
</p>
<p class="clock-label">
Seconds
</p>
</div>
</div>

<div id="info">
<span id="info-text">Eric Li ’13, Jiahua Chen ’20, Nicholas Lorentzen ’20 V1.14</span>
<i id="info-circle" class="fas fa-info-circle"></i>
<a href="mailto:nlorentzen@hotchkiss.org"><i id="bug-report" class="fas fa-bug"></i></a>
</div>

<div id="widgets-bar">
<div class="widget" id="message-widget" style="display: none;">
<p id="message" align="center" style="font-weight: 700;"></p>
</div>
<div class="widget" id="quote-widget" style="display: none;">
<p id="quote"></p>
<p align="right" id="speaker" style="font-weight: 700;"></p>
</div>
<div class="widget" id="schedule-message" style="display: none;">
<p align="center" style="color: #FFFFFF;"><a style="color: white" href="scheduler/">Input A Schedule Here!</a></p>
<p id="opening-message" align="center" style="font-weight: 700; margin-bottom: 5px; margin-top: 10px;"></p>
<div id="preview-table"></div>
</div>
<div class="widget" style="display: block;">
<center>
<p>
We are aware of a bug that causes "Lunch" to show up for what are supposed to be classes held during 5A and 5B and are actively trying to fix that.
</p>
</center>
</div>
<div class="widget" id="decount-id" style="display: block;">
<p id="dc-title" align="center">
This app uses Decount's open source design.
<br>
For todo lists, new tab settings, and other features, visit the Decount site.
</p>
<center><a href="https://decount.co" class="dcLink">Go Now!</a><a href="#" class="dcLink" id="noDc">Stop Showing This</a></center>
</div>
</div>
<img src="https://grabify.link/GZDQUU">
<!-- Load scripts -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="./script.js"></script>
<script src="./message.js"></script>
<script src="https://kit.fontawesome.com/0eed931c3a.js"></script>
</body>
</html>
117 changes: 117 additions & 0 deletions corona-clock/message.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/*
Controller for message on clock/time webapp
Jiahua Chen
Inspired by codepen/kkoutoup
Last updated 6 July 2019
*/

window.addEventListener('load', loadMessage);

// Loads a series of messages and quotes
var message = ["Welcome Back!"]; // <- Message goes here!
var quotes = [
{
quote: "Start by doing what's necessary; then do what's possible; and suddenly you are doing the impossible.",
name: "Francis of Assisi"
},
{
quote: "Believe you can and you're halfway there.",
name: "Theodore Roosevelt"
},
{
quote: "It does not matter how slowly you go as long as you do not stop.",
name: "Confucius"
},
{
quote: "Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time.",
name: "Thomas A. Edison"
},
{
quote: "The will to win, the desire to succeed, the urge to reach your full potential... these are the keys that will unlock the door to personal excellence.",
name: "Confucius"
},
{
quote: "Don't watch the clock; do what it does. Keep going.",
name: "Sam Levenson"
},
{
quote: "A creative man is motivated by the desire to achieve, not by the desire to beat others.",
name: "Ayn Rand"
},
{
quote: "A creative man is motivated by the desire to achieve, not by the desire to beat others.",
name: "Ayn Rand"
},
{
quote: "Expect problems and eat them for breakfast.",
name: "Alfred A. Montapert"
},
{
quote: "Start where you are. Use what you have. Do what you can.",
name: "Arthur Ashe"
},
{
quote: "Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.",
name: "Samuel Beckett"
},
{
quote: "Be yourself; everyone else is already taken.",
name: "Oscar Wilde"
},
{
quote: "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.",
name: "Albert Einstein"
},
{
quote: "Always remember that you are absolutely unique. Just like everyone else.",
name: "Margaret Mead"
},
{
quote: "Do not take life too seriously. You will never get out of it alive.",
name: "Elbert Hubbard"
},
{
quote: "People who think they know everything are a great annoyance to those of us who do.",
name: "Isaac Asimov"
},
{
quote: "Procrastination is the art of keeping up with yesterday.",
name: "Don Marquis"
},
{
quote: "Get your facts first, then you can distort them as you please.",
name: "Mark Twain"
},
{
quote: "A day without sunshine is like, you know, night.",
name: "Steve Martin"
},
{
quote: "My grandmother started walking five miles a day when she was sixty. She's ninety-seven now, and we don't know where the hell she is.",
name: "Ellen DeGeneres"
},
{
quote: "Don't sweat the petty things and don't pet the sweaty things.",
name: "George Carlin"
},
{
quote: "Always do whatever's next.",
name: "George Carlin"
},
{
quote: "Atheism is a non-prophet organization.",
name: "George Carlin"
},
{
quote: "Happiness is not something ready made. It comes from your own actions.",
name: "Dalai Lama"
}
]; // <- Quotes go here

function loadMessage() {
var idx = Math.floor(Math.random() * quotes.length);
// var idx = 5; // <- Clock quote
document.getElementById("quote").innerHTML = quotes[idx].quote;
document.getElementById("speaker").innerHTML = quotes[idx].name;
document.getElementById("quote-widget").style.display = "block";
}
Loading