From 3fb86482404e11942cd83c3500a297a3991db0e4 Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Wed, 13 Sep 2017 16:28:53 +0200 Subject: Restructure project --- src/client/static/.well-known/keybase.txt | 54 +++ src/client/static/apple-touch-icon.png | Bin 0 -> 6447 bytes src/client/static/browserconfig.xml | 9 + src/client/static/favicon-16x16.png | Bin 0 -> 1293 bytes src/client/static/favicon-32x32.png | Bin 0 -> 2103 bytes src/client/static/favicon.ico | Bin 0 -> 15086 bytes src/client/static/icons/mml-logo.png | Bin 0 -> 12508 bytes .../static/icons/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 6503 bytes .../static/icons/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 3854 bytes .../static/icons/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 9631 bytes .../static/icons/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 15315 bytes .../icons/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 23445 bytes src/client/static/manifest.beta.webmanifest | 29 ++ src/client/static/manifest.webmanifest | 29 ++ src/client/static/mstile-150x150.png | Bin 0 -> 3995 bytes src/client/static/safari-pinned-tab.svg | 34 ++ src/client/static/stylesheets/hello.css | 23 ++ src/client/static/stylesheets/print.css | 63 ++++ src/client/static/stylesheets/style.css | 392 +++++++++++++++++++++ src/client/static/sw.js | 29 ++ src/client/static/untisinfo.css | 11 + 21 files changed, 673 insertions(+) create mode 100644 src/client/static/.well-known/keybase.txt create mode 100644 src/client/static/apple-touch-icon.png create mode 100644 src/client/static/browserconfig.xml create mode 100644 src/client/static/favicon-16x16.png create mode 100644 src/client/static/favicon-32x32.png create mode 100644 src/client/static/favicon.ico create mode 100644 src/client/static/icons/mml-logo.png create mode 100644 src/client/static/icons/res/mipmap-hdpi/ic_launcher.png create mode 100644 src/client/static/icons/res/mipmap-mdpi/ic_launcher.png create mode 100644 src/client/static/icons/res/mipmap-xhdpi/ic_launcher.png create mode 100644 src/client/static/icons/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 src/client/static/icons/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 src/client/static/manifest.beta.webmanifest create mode 100644 src/client/static/manifest.webmanifest create mode 100644 src/client/static/mstile-150x150.png create mode 100644 src/client/static/safari-pinned-tab.svg create mode 100644 src/client/static/stylesheets/hello.css create mode 100644 src/client/static/stylesheets/print.css create mode 100644 src/client/static/stylesheets/style.css create mode 100644 src/client/static/sw.js create mode 100644 src/client/static/untisinfo.css (limited to 'src/client/static') diff --git a/src/client/static/.well-known/keybase.txt b/src/client/static/.well-known/keybase.txt new file mode 100644 index 0000000..7e11526 --- /dev/null +++ b/src/client/static/.well-known/keybase.txt @@ -0,0 +1,54 @@ +================================================================== +https://keybase.io/nloomans +-------------------------------------------------------------------- + +I hereby claim: + + * I am an admin of https://rooster.hetmml.nl + * I am nloomans (https://keybase.io/nloomans) on keybase. + * I have a public key ASCCV4aRFiMkEv7inJTf34RgxZ6IK0wQ-wTH2ZfSIu3OzAo + +To do so, I am signing this object: + +{ + "body": { + "key": { + "eldest_kid": "0101bbdb28841b169de6538a51d17ca94b30088ba2914e56fd19121eec05f7a389cc0a", + "host": "keybase.io", + "kid": "01208257869116232412fee29c94dfdf8460c59e882b4c10fb04c7d997d222edcecc0a", + "uid": "7a52ddabf92293dd59f8fbf3774ea319", + "username": "nloomans" + }, + "service": { + "hostname": "rooster.hetmml.nl", + "protocol": "https:" + }, + "type": "web_service_binding", + "version": 1 + }, + "client": { + "name": "keybase.io go client", + "version": "1.0.20" + }, + "ctime": 1492017398, + "expire_in": 504576000, + "merkle_root": { + "ctime": 1492017367, + "hash": "463e597079ce3829ccc1f1aa7b15533c0848f9e13cdb55407af490a87bf4ac1b2d64e8235518ada07d93003b889157b576aad02eda294ccd594dc0dcbf8862ef", + "seqno": 1015311 + }, + "prev": "36959cd282a98f651138068f8695b07480a016f02ba99a0acbde277e0cf4ca30", + "seqno": 19, + "tag": "signature" +} + +which yields the signature: + +hKRib2R5hq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ZGUyNzdlMGNmNGNhMzAiLCJzZXFubyI6MTksInRhZyI6InNpZ25hdHVyZSJ9o3NpZ8RAcP5FuvbGM9nXBzWqChr9zdj452IpBzrVbd6YvcktLyKjaUaRg51BOWsyHmYQ+uxmZ2ZCUI6xZbbJ1SIAnWqvC6hzaWdfdHlwZSCkaGFzaIKkdHlwZQildmFsdWXEING7Z+BlY2sOTnQqQJo/PUBashy75VL9UU4tGIEvMXbco3RhZ80CAqd2ZXJzaW9uAQ== + +And finally, I am proving ownership of this host by posting or +appending to this document. + +View my publicly-auditable identity here: https://keybase.io/nloomans + +================================================================== diff --git a/src/client/static/apple-touch-icon.png b/src/client/static/apple-touch-icon.png new file mode 100644 index 0000000..5adfc69 Binary files /dev/null and b/src/client/static/apple-touch-icon.png differ diff --git a/src/client/static/browserconfig.xml b/src/client/static/browserconfig.xml new file mode 100644 index 0000000..b3930d0 --- /dev/null +++ b/src/client/static/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #da532c + + + diff --git a/src/client/static/favicon-16x16.png b/src/client/static/favicon-16x16.png new file mode 100644 index 0000000..1df47d3 Binary files /dev/null and b/src/client/static/favicon-16x16.png differ diff --git a/src/client/static/favicon-32x32.png b/src/client/static/favicon-32x32.png new file mode 100644 index 0000000..36cd5da Binary files /dev/null and b/src/client/static/favicon-32x32.png differ diff --git a/src/client/static/favicon.ico b/src/client/static/favicon.ico new file mode 100644 index 0000000..c201043 Binary files /dev/null and b/src/client/static/favicon.ico differ diff --git a/src/client/static/icons/mml-logo.png b/src/client/static/icons/mml-logo.png new file mode 100644 index 0000000..fa5ae11 Binary files /dev/null and b/src/client/static/icons/mml-logo.png differ diff --git a/src/client/static/icons/res/mipmap-hdpi/ic_launcher.png b/src/client/static/icons/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..514ad14 Binary files /dev/null and b/src/client/static/icons/res/mipmap-hdpi/ic_launcher.png differ diff --git a/src/client/static/icons/res/mipmap-mdpi/ic_launcher.png b/src/client/static/icons/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..59bab1d Binary files /dev/null and b/src/client/static/icons/res/mipmap-mdpi/ic_launcher.png differ diff --git a/src/client/static/icons/res/mipmap-xhdpi/ic_launcher.png b/src/client/static/icons/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..908a6e8 Binary files /dev/null and b/src/client/static/icons/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/src/client/static/icons/res/mipmap-xxhdpi/ic_launcher.png b/src/client/static/icons/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..f12048f Binary files /dev/null and b/src/client/static/icons/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/src/client/static/icons/res/mipmap-xxxhdpi/ic_launcher.png b/src/client/static/icons/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..7a0462e Binary files /dev/null and b/src/client/static/icons/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/src/client/static/manifest.beta.webmanifest b/src/client/static/manifest.beta.webmanifest new file mode 100644 index 0000000..a1fdd92 --- /dev/null +++ b/src/client/static/manifest.beta.webmanifest @@ -0,0 +1,29 @@ +{ + "name": "BETA Metis Rooster", + "short_name": "BETA Rooster", + "start_url": "/", + "display": "standalone", + "background_color": "#ececec", + "description": "Een verbeterde rooster pagina voor het metis", + "icons": [{ + "src": "/icons/res/mipmap-mdpi/ic_launcher.png", + "sizes": "48x48", + "type": "image/png" + }, { + "src": "/icons/res/mipmap-hdpi/ic_launcher.png", + "sizes": "72x72", + "type": "image/png" + }, { + "src": "/icons/res/mipmap-xhdpi/ic_launcher.png", + "sizes": "96x96", + "type": "image/png" + }, { + "src": "/icons/res/mipmap-xxhdpi/ic_launcher.png", + "sizes": "144x144", + "type": "image/png" + }, { + "src": "/icons/res/mipmap-xxxhdpi/ic_launcher.png", + "sizes": "192x192", + "type": "image/png" + }] +} diff --git a/src/client/static/manifest.webmanifest b/src/client/static/manifest.webmanifest new file mode 100644 index 0000000..d33ee8e --- /dev/null +++ b/src/client/static/manifest.webmanifest @@ -0,0 +1,29 @@ +{ + "name": "Metis Rooster", + "short_name": "Rooster", + "start_url": "/", + "display": "standalone", + "background_color": "#ececec", + "description": "Een verbeterde rooster pagina voor het metis", + "icons": [{ + "src": "/icons/res/mipmap-mdpi/ic_launcher.png", + "sizes": "48x48", + "type": "image/png" + }, { + "src": "/icons/res/mipmap-hdpi/ic_launcher.png", + "sizes": "72x72", + "type": "image/png" + }, { + "src": "/icons/res/mipmap-xhdpi/ic_launcher.png", + "sizes": "96x96", + "type": "image/png" + }, { + "src": "/icons/res/mipmap-xxhdpi/ic_launcher.png", + "sizes": "144x144", + "type": "image/png" + }, { + "src": "/icons/res/mipmap-xxxhdpi/ic_launcher.png", + "sizes": "192x192", + "type": "image/png" + }] +} diff --git a/src/client/static/mstile-150x150.png b/src/client/static/mstile-150x150.png new file mode 100644 index 0000000..5e381e6 Binary files /dev/null and b/src/client/static/mstile-150x150.png differ diff --git a/src/client/static/safari-pinned-tab.svg b/src/client/static/safari-pinned-tab.svg new file mode 100644 index 0000000..97ce8bf --- /dev/null +++ b/src/client/static/safari-pinned-tab.svg @@ -0,0 +1,34 @@ + + + + +Created by potrace 1.11, written by Peter Selinger 2001-2013 + + + + + + diff --git a/src/client/static/stylesheets/hello.css b/src/client/static/stylesheets/hello.css new file mode 100644 index 0000000..edcbc92 --- /dev/null +++ b/src/client/static/stylesheets/hello.css @@ -0,0 +1,23 @@ +* { + box-sizing: border-box; +} + +html, body { + margin: 0; + font-family: 'Roboto', sans-serif; + display: flex; + flex-direction: column; + justify-content: center; + text-align: center; + width: 100vw; + height: 100vh; + color: gray; +} + +.ideas { + font-size: 0.8em; +} + +a { + color: #3f51b5; +} diff --git a/src/client/static/stylesheets/print.css b/src/client/static/stylesheets/print.css new file mode 100644 index 0000000..0e09533 --- /dev/null +++ b/src/client/static/stylesheets/print.css @@ -0,0 +1,63 @@ +#search, #week-selector { + background-color: inherit; + box-shadow: inherit; +} + +#search { + border-bottom: 1px solid black; + position: absolute; +} + +#search .top-bar, #week-selector .week-wrapper { + max-width: inherit; +} + +#search input[type="search"] { + background-color: inherit; + color: black; + font-weight: bold; +} + +#search .fav { + display: none !important; +} + +#search #overflow-button { + display: none; +} + +#week-selector .week-wrapper { + display: block; +} + +#week-selector button { + display: none; +} + +#week-selector .current { + color: black; + padding: 16px; + font-size: 1.1em; + float: right; +} + +#search-space-filler { + display: none; +} + +.mdl-menu__container { + display: none !important; +} + +#schedule { + padding-top: 16px; + width: 100%; +} + +.no-print { + display: none; +} + +.print { + display: initial; +} diff --git a/src/client/static/stylesheets/style.css b/src/client/static/stylesheets/style.css new file mode 100644 index 0000000..830b007 --- /dev/null +++ b/src/client/static/stylesheets/style.css @@ -0,0 +1,392 @@ +* { + box-sizing: border-box; +} + +html, body { + margin: 0; + font-family: 'Roboto', sans-serif; +} + +.other { + color: gray; + font-style: italic; + margin-left: 5px; +} + +#search { + z-index: 2; + background-color: #F44336; + margin: 0 auto; + width: 100%; + position: fixed; + box-shadow: 0 0.5px 1.5px rgba(0,0,0,0.06), 0 0.5px 1px rgba(0,0,0,0.12); +} + +#search .top-bar { + position: relative; + margin: 0 auto; + max-width: 600px; + padding: 10px; + display: flex; +} + +#search .input-wrapper { + position: relative; + flex-grow: 1; + color: #FFFFFF; +} + +#search input[type='search'] { + display: block; + background-color: #f6695e; + color: inherit; + border-radius: 2px; + width: 100%; + display: block; + outline: none; + border: 0; + padding: 16px; + font-size: 16px; + transition: box-shadow 200ms ease-in-out; +} + +#search input[type='search']:focus { + background-color: #FFFFFF; + color: #212121; + box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); +} + +#search input[type='search']:focus + button { + color: #212121; +} + +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-results-button, +input[type="search"]::-webkit-search-results-decoration { + display: none; +} + +input[type="search"]::-ms-clear { + width: 0; + height: 0; +} + +button::-moz-focus-inner { + border: 0; +} + + +/* WebKit, Blink, Edge */ +input::-webkit-input-placeholder { + color: #FFCDD2; +} +input:focus::-webkit-input-placeholder { + color: #757575; +} + +/* Mozilla Firefox 4 to 18 */ +input:-moz-placeholder { + color: #FFCDD2; + opacity: 1; +} +input:focus:-moz-placeholder { + color: #757575; +} + +/* Mozilla Firefox 19+ */ +input::-moz-placeholder { + color: #FFCDD2; + opacity: 1; +} +input:focus::-moz-placeholder { + color: #757575; +} + +/* Internet Explorer 10-11 */ +input:-ms-input-placeholder { + color: #FFCDD2; +} +input:focus:-ms-input-placeholder { + color: #757575; +} + +li:hover { + background-color: lightgray; + cursor: pointer; +} + +.selected { + background-color: lightgray; +} + +#schedule { + overflow: auto; +} + +body.searched #search-space-filler { + height: 70px; +} + +.autocomplete-wrapper { + background-color: white; +} + +.autocomplete { + max-width: 600px; + margin: 0 auto; + padding: 0; +} + +.autocomplete li { + list-style: none; + padding: 10px; +} + +#week-selector { + z-index: 1; + background-color: #F44336; + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); + color: white; +} + +#week-selector .week-wrapper { + max-width: 600px; + padding: 10px !important; + margin: 0 auto; + display: flex; + -js-display: flex; + padding: 10px 0; +} + +#week-selector .current { + display: flex; + flex-grow: 1; + align-items: center; + justify-content: center; +} + +#week-selector .current.changed { + font-weight: bold; +} + +#week-selector button { + background: transparent; + color: white; + border: 0px; + padding: 5px 10px; + border-radius: 2px; +} + +input { + -webkit-appearance: none; +} + +#search .fav { + position: absolute; + font-size: 1.8em; + color: inherit; + right: 8.5px; + top: 8.5px; + border: 0; + padding: 4px; + border-radius: 2px; + background: none; + + display: none; +} + +body.searched #search .fav { + display: block; +} + +#week-selector button:focus, #search #overflow-button:focus, #search .fav:focus { + outline: none; + background-color: #D32F2F; +} + +#search #overflow-button { + background: none; + border: none; + padding: 3px 9px; + color: white; + border-radius: 2px; +} + +.hidden { + display: none !important; +} + +ul a { + color: inherit; + text-decoration: none; +} + +#search .title { + display: none; +} + +body:not(.no-input) { + overflow-y: scroll; +} + +body.no-input #week-selector { + display: none; +} + +@media screen and (min-height: 400px) { + body.no-input { + background-color: #ececec; + } + + body.no-input #search { + height: 100%; + background-color: #ececec; + box-shadow: none; + } + + body.no-input #search button { + display: none; + } + + body.no-input #search #overflow-button { + position: absolute; + display: block; + top: 0; + right: 0; + color: #757575; + } + + body.no-input #search .print-page { + display: none; + } + + body.no-input #search #overflow-button:focus { + background-color: inherit; + color: #212121; + } + + body.no-input #search .logo { + background-image: url(/icons/mml-logo.png); + background-position: center; + background-repeat: no-repeat; + background-size: contain; + height: 100px; + width: 100px; + + /* virtual center: http://javier.xyz/visual-center/ */ + transform: translate(-8%,-3%); + margin: 0 auto; + } + + body.no-input #search .title { + display: block; + font-size: 55px; + padding-bottom: 32px; + } + + body.no-input #search .title .text { + text-align: center; + line-height: 55px; + } + + body.no-input #search .top-bar { + position: static; + display: block; + margin-top: 50vh; + transform: translateY(-75%); + } + + body.no-input #search input[type='search'] { + background-color: #FFF; + } + + /* WebKit, Blink, Edge */ + body.no-input #search input::-webkit-input-placeholder { + color: #757575; + } + + /* Mozilla Firefox 4 to 18 */ + body.no-input #search input:-moz-placeholder { + color: #757575; + opacity: 1; + } + + /* Mozilla Firefox 19+ */ + body.no-input #search input::-moz-placeholder { + color: #757575; + opacity: 1; + } + + /* Internet Explorer 10-11 */ + body.no-input #search input:-ms-input-placeholder { + color: #757575; + } + + body.no-input .tooltip { + display: block; + position: absolute; + background-color: white; + padding: 15px; + margin: 32px 8px; + border-radius: 2px; + + left: 16px; + right: 16px; + } + + body.no-input .tooltip::before { + content: ''; + width: 24px; + height: 24px; + background-color: white; + top: -12px; + position: absolute; + transform: rotate(45deg); + z-index: -1; + } +} + +.tooltip { + display: none; +} + +.error { + text-align: center; + margin-top: 100px; + padding: 16px; +} + +body.week-selector-not-visible #search { + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); +} + +body.week-selector-not-visible #week-selector { + box-shadow: inherit; +} + +.print { + display: none; +} + +#notification { + max-width: 600px; + padding: 10px; + margin: 0 auto; +} + +#notification .box { + display: flex; + background-color: #e0e0e0; + padding: 8px; + border-radius: 2px; + align-items: center; +} + +#notification .text { + padding-left: 8px; +} + +.grow { + flex-grow: 1; +} diff --git a/src/client/static/sw.js b/src/client/static/sw.js new file mode 100644 index 0000000..bd43805 --- /dev/null +++ b/src/client/static/sw.js @@ -0,0 +1,29 @@ +/* global importScripts toolbox self */ + +(global => { + 'use strict' + + // Load the sw-toolbox library. + importScripts('/components/sw-toolbox/sw-toolbox.js') + + // Ensure that our service worker takes control of the page as soon as possible. + global.addEventListener('install', event => event.waitUntil(global.skipWaiting())) + global.addEventListener('activate', event => event.waitUntil(global.clients.claim())) + + toolbox.precache([ + '/', + '/hello', + '/untisinfo.css', + '/javascripts/bundle.js', + '/stylesheets/style.css', + '/stylesheets/hello.css' + ]) + + toolbox.router.get('/', toolbox.fastest) + toolbox.router.get('/hello', toolbox.fastest) + + toolbox.router.get('/javascripts/bundle.js', toolbox.fastest) + toolbox.router.get('/stylesheets/*', toolbox.fastest) + toolbox.router.get('/untisinfo.css', toolbox.fastest) + toolbox.router.get('/meetingpointProxy/*', toolbox.networkFirst) +})(self) diff --git a/src/client/static/untisinfo.css b/src/client/static/untisinfo.css new file mode 100644 index 0000000..d74a7aa --- /dev/null +++ b/src/client/static/untisinfo.css @@ -0,0 +1,11 @@ +html, body { + overflow: auto; + width: 100vw; + height: 100vh; + margin: 0; + -webkit-overflow-scrolling: touch; +} + +center { + margin: 5px; +} -- cgit v1.1