Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
c737af2
update like... everything
Mar 22, 2019
9d9131d
fix overflow momentum scrolling
Mar 22, 2019
b390945
fix notices title/tooltip
Mar 22, 2019
f3c8057
forgot to minify
Mar 22, 2019
b7eed04
untrack dist files
Mar 23, 2019
afd53a3
refactor styles into common style loader
Mar 23, 2019
89d3684
refactor styles into common style loader
Mar 23, 2019
7356c22
refactor styles into common style loader
Mar 23, 2019
bb75e86
add scheduled alternative teachers to today view
Mar 23, 2019
3f9947a
show breaks (ie lunch recess) in today view
Mar 23, 2019
b71d13e
overhaul. added assessments + popup notices
Apr 8, 2019
4f3936b
overhaul. added assessments + popup notices
Apr 8, 2019
ff0b759
fixes & ready to deploy
Apr 8, 2019
cb8af92
fixes & ready to deploy
Apr 8, 2019
a21137b
added assessments to timetable
Apr 8, 2019
e4b3ef2
fixes
Apr 8, 2019
c1852ec
improvements to popup (destroy nodes after exit)
Apr 8, 2019
195643c
fixes for safari private browsing
Apr 8, 2019
70eba97
fixes for safari private browsing
Apr 8, 2019
c16051a
add license, update readme, package.json
Apr 8, 2019
bf5a20d
fixes, fixes, fixes
Apr 9, 2019
bd2d54c
fixes + improvements to end of day timer
Apr 10, 2019
8cb1938
dodgy date param
Apr 10, 2019
c626858
fix lunch disappearing
Apr 30, 2019
88bd139
fixes to assessments & improvements to timer
May 1, 2019
b0eb7fd
fix terms fetching
May 2, 2019
5760087
fix terms fetching
May 2, 2019
9468db3
added load next day
May 3, 2019
3cf35bc
better timer
May 3, 2019
4c6d8b5
load next school day improvements
May 3, 2019
3a35334
fixes
May 28, 2019
2573458
fixes
May 28, 2019
ddceecd
add support for when classes have no substitute teacher
May 28, 2019
993b037
countdown updates faster when loading next day
May 28, 2019
d5c0fab
fix notices
May 28, 2019
9564678
add google analytics + redirect www to non-www on root
Jun 10, 2019
98020cd
revamp popups/toast notifications
Jun 20, 2019
bddc600
now a progressive web app!
Jun 20, 2019
43ebdfb
fixes notification queueing & service worker caching
Jun 20, 2019
2b6c467
add animation on popup mount
Jun 21, 2019
1b2e738
getting progressive web app ready for production
Jun 21, 2019
e59c8b5
starting to implement dark theme
Jun 21, 2019
1ae99ce
global state w/ custom hook + context for dark theme
Jun 21, 2019
1d92cd4
finished dark mode!
Jun 21, 2019
75d3e39
deployment
Jun 21, 2019
346a49f
fixes for ios
Jun 21, 2019
6d64fae
backend fixes for www redirection
Jun 23, 2019
e2806eb
backend fixes for www redirection
Jun 23, 2019
f620fe9
fixes
Jul 30, 2019
1198f01
improvements to assessments + fixes
Aug 13, 2019
fe3eca7
improvements to assessments & popups/toasts
Aug 14, 2019
45dab99
improvements to assessments
Aug 16, 2019
483e834
rewrite settings + misc improvements
Aug 23, 2019
06b987b
updates to media query + tooltips
Aug 23, 2019
5d1a174
for graduation
Sep 13, 2019
40ee058
backend updates
Sep 13, 2019
b5c9196
user authorisation
Sep 13, 2019
a9b9589
popups
Sep 13, 2019
9af0088
improvements to popups + fixes to auth
Sep 13, 2019
7fe8307
fixes
Sep 13, 2019
cc0c6aa
fixes
Sep 13, 2019
4b37bea
fixes
Sep 13, 2019
32b5878
add ToS
Sep 13, 2019
3cababc
add ToS
Sep 13, 2019
1fe06fd
add colours! update ToS
Sep 15, 2019
1f87534
add colours!
Sep 15, 2019
2bee6a9
junior day
Sep 15, 2019
03ec4bf
junior day
Sep 15, 2019
ac593f8
fix toggle settings
delilahw Sep 16, 2019
ceaad80
fixes
Sep 17, 2019
9e8908b
coloured toggles
Sep 17, 2019
70d52c6
add persistent popups
Sep 23, 2019
bcfcd55
add persistent popups
Sep 23, 2019
d059043
Revert "junior day" (commit 2bee6a95)
Sep 27, 2019
46e38b8
minor fixes
Oct 14, 2019
2025bf5
add page tracking to analytics
Nov 26, 2019
f5bb984
add grade to analytics dimensions
Nov 27, 2019
97984b6
fixes to tabs
Nov 29, 2019
3dbc3f1
fix analytics pathname
Nov 29, 2019
8ff92f5
add app version + ui fixes
Jan 22, 2020
a80be00
remove assessments disclaimer
Jan 22, 2020
4835454
use sass + style clear data button + style notices filter dropdown
Jan 23, 2020
5e903d6
use sass + style clear data button + style notices filter dropdown
Jan 23, 2020
82ae673
fix dark theme event listener
Jan 23, 2020
c884571
send app version to analytics
Jan 23, 2020
acd98b4
fix typo
delilahw May 1, 2020
962a3ea
add license, hero image
Sep 3, 2020
cb2ad02
clean up, bump version
Sep 3, 2020
5be166a
update pg session dependency
Sep 3, 2020
b765d9b
update readme
Sep 3, 2020
3c684f8
Merge pull request #1 from hellodavie/add-license
delilahw Sep 3, 2020
c6b7833
license hero image, add ci
Sep 3, 2020
e2441ec
add ci badge
Sep 3, 2020
0b03a77
Merge pull request #2 from hellodavie/add-license
delilahw Sep 3, 2020
2e0d7a4
add content security policy
Sep 13, 2020
b37c96f
add more badges to readme
Sep 13, 2020
f8cc52d
Merge pull request #3 from hellodavie/add-csp
delilahw Sep 13, 2020
281de87
update packages
Sep 13, 2020
0ff8705
Merge pull request #6 from hellodavie/bump-dependencies
delilahw Sep 13, 2020
dee619c
change domain
Jan 25, 2021
032fc17
change domain
Jan 25, 2021
06f5c60
ignore api calls in redirects
Jan 25, 2021
e9bccc5
easter egg but not really
Jan 25, 2021
e62bcd0
Merge pull request #7 from hellodavie/change-domain
delilahw Jan 25, 2021
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
21 changes: 21 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
[
"react-css-modules",
{
"generateScopedName": "[name]__[local]--[hash:base64]",
"filetypes": {
".scss": {
"syntax": "postcss-scss"
}
}
}
],

["@babel/plugin-proposal-class-properties"]
]
}
104 changes: 36 additions & 68 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,83 +1,51 @@
# Created by https://www.gitignore.io/api/windows,osx,node
### suredavid ###
*.psd

### Windows ###
# Windows image file caches
Thumbs.db
ehthumbs.db
## Development
/public/app.js.map
/public/app.js
/public/asset-manifest.json
/public/service-worker.js

# Folder config file
Desktop.ini
### IDEs ###
/.idea/
/.vscode/

# Recycle Bin used on file shares
$RECYCLE.BIN/
### Node ###
pids
*.pid
*.seed
*.pid.lock
lib-cov
coverage
.nyc_output
.grunt
bower_components
.lock-wscript
build/Release

# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Dependency directories
node_modules/
jspm_packages/
.npm
.eslintcache
.node_repl_history
.yarn-integrity

# Windows shortcuts
*.lnk
# dotenv environment variables file
.env


### OSX ###
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk


### Node ###
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
node_modules

# Custom build script
start.sh
### Windows ###
Thumbs.db
[Dd]esktop.ini
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: node_js
node_js:
- 10
- 12
cache: npm
script:
- npm run build
25 changes: 25 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
MIT License

Copyright (c) 2020 David Wu

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

N.B:
Images within the README file, or the media folder, (e.g. hero.png) are licensed separately,
under a [Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License](https://creativecommons.org/licenses/by-nc-nd/4.0/).
82 changes: 62 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,62 @@
Classes
=======

Config
------
Configuration is done through the following environment variables:
```js
// Session
DATABASE_URL // Optional with OpenShift.
COOKIE_SECRET

// OAuth2
CLIENT_ID
CLIENT_SECRET
REDIRECT_URI

// Server
PORT // Optional with OpenShift.
IP // Optional with OpenShift.
```
# Classes
[![Build Status](https://travis-ci.com/hellodavie/shs_classes.svg?branch=master)](https://travis-ci.com/hellodavie/shs_classes)
![License](https://img.shields.io/badge/license-MIT-green)
![GitHub package.json version](https://img.shields.io/github/package-json/v/hellodavie/shs_classes)
[![Server Status](https://img.shields.io/website?label=status&url=https%3A%2F%2Fshsclasses.hellodavie.com)](https://shsclasses.hellodavie.com/)
![Mozilla HTTP Observatory Grade](https://img.shields.io/mozilla-observatory/grade/shsclasses.hellodavie.com?publish)


A blazing fast, modern, tested, and trusted timetable app for Sydney Boys High School.
Previously known as [lordhelix.tk](https://shsclasses.hellodavie.com/).

<div align="center">
<br>
<a href="https://shsclasses.hellodavie.com/">
<img src="media/hero.png">
</a>
<br>
<br>
</div>

## At a glance
- Offline support
- Hide or show lunch breaks
- Dark theme with customizable accent colours
- Shows tomorrow's classes when you have free periods for the rest of the day
- Exams are given priority when they overlap with your normal scheduled classes
- Cross platform, automatic updates

## Functionality
A customizable dashboard for your classes;
Classes provides detailed information in a convenient manner to help students go about their day.
Displays teachers, casuals/subtitute teachers, shared classes, room variations, and assessments in the daily overview.
Also includes your full timetable, upcoming exams, daily notices, and settings for personalisation and flexibility.
No internet? No worries! Built as a progressive web app, offline support is automatically enabled by caching your timetable.
Change your primary colour, notices filter, or enable dark mode using the settings page.

## Building
To build a production release of the frontend, use the following command
```sh
$ npm build
```

## Deployment
Configuration of the backend is done through the following environment variables
```
DATABASE_URL=
COOKIE_SECRET=
CLIENT_ID=
CLIENT_SECRET=
REDIRECT_URI=
```

Set up Postgres with the [connect-pg-simple schema](https://github.com/voxpelli/node-connect-pg-simple/blob/fc163b26511d746452ef42c798ab766caca2a5ac/table.sql) to enable user sessions.
Notices and patch notes schemas are set up with `knex.js` migrations. Use `npx knex migrate` to create the tables.
Finally, use `npm start` to fire up the backend.

## License
Based on the original lordhelix app (MIT License), &copy; 2016 Ram Kaniyur. All Rights Reserved.
Maintained by Eddie Qi over the period of 2017-18.

New classes app and modifications are under the MIT License. &copy; 2020 David Wu. All Rights Reserved. \
See LICENSE for further information and licensing for images in this readme.
20 changes: 20 additions & 0 deletions app/components/analytics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import ReactGA from 'react-ga';

const GA_TRACKING_ID = 'UA-130596833-2';

export function initialiseAnalytics() {
ReactGA.initialize(GA_TRACKING_ID);
setDimension('dimension2', APP_VERSION);
}

export function pageView(pathname) {
ReactGA.pageview((pathname || window.location.pathname) + window.location.search);
}

function setDimension(dimensionName, data) {
ReactGA.set({[dimensionName]: data});
}

export function collectUserGrade(grade) {
setDimension('dimension1', grade);
}
93 changes: 0 additions & 93 deletions app/components/app/index.js

This file was deleted.

Loading