summaryrefslogtreecommitdiffstats
path: root/assets/root
diff options
context:
space:
mode:
authorrstular <rok@stular.eu>2020-05-20 21:47:41 +0200
committerGitHub <noreply@github.com>2020-05-20 21:47:41 +0200
commit9e63ad7fd187b5eea9f2e3d3a1e1fa9a2d1ec1d2 (patch)
treec96e2c622aeb56000d4736ba1932269f2dfd217b /assets/root
parentMerge pull request #8 from beziapp/dev (diff)
parentMerge branch 'dev' of ssh://github.com/beziapp/beziapp.github.io into dev (diff)
downloadbeziapp-9e63ad7fd187b5eea9f2e3d3a1e1fa9a2d1ec1d2.tar
beziapp-9e63ad7fd187b5eea9f2e3d3a1e1fa9a2d1ec1d2.tar.gz
beziapp-9e63ad7fd187b5eea9f2e3d3a1e1fa9a2d1ec1d2.tar.bz2
beziapp-9e63ad7fd187b5eea9f2e3d3a1e1fa9a2d1ec1d2.tar.lz
beziapp-9e63ad7fd187b5eea9f2e3d3a1e1fa9a2d1ec1d2.tar.xz
beziapp-9e63ad7fd187b5eea9f2e3d3a1e1fa9a2d1ec1d2.tar.zst
beziapp-9e63ad7fd187b5eea9f2e3d3a1e1fa9a2d1ec1d2.zip
Diffstat (limited to '')
-rw-r--r--assets/root/directory.json4
-rw-r--r--assets/root/favicon.png (renamed from favicon.png)bin8311 -> 8311 bytes
-rw-r--r--assets/root/index.html27
-rw-r--r--assets/root/login.html67
-rw-r--r--assets/root/logout.html26
-rw-r--r--assets/root/manifest.json59
-rw-r--r--assets/root/sw.js.bvr150
7 files changed, 333 insertions, 0 deletions
diff --git a/assets/root/directory.json b/assets/root/directory.json
new file mode 100644
index 0000000..6a50675
--- /dev/null
+++ b/assets/root/directory.json
@@ -0,0 +1,4 @@
+{
+ "Anton Luka Šijanec": 6326,
+ "Rok Štular": 5313
+} \ No newline at end of file
diff --git a/favicon.png b/assets/root/favicon.png
index 5c1f4b1..5c1f4b1 100644
--- a/favicon.png
+++ b/assets/root/favicon.png
Binary files differ
diff --git a/assets/root/index.html b/assets/root/index.html
new file mode 100644
index 0000000..2a861a1
--- /dev/null
+++ b/assets/root/index.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <meta name="google" content="notranslate">
+ <title>BežiApp</title>
+
+ <script type="text/javascript" src="/js/lib/localforage.min.js"></script>
+ <script type="text/javascript" src="/js/setup-storage.js"></script>
+ <script type="text/javascript" src="/js/initialize.js"></script>
+
+ <link rel="manifest" href="/manifest.json">
+ <script src="/js/app.js"></script>
+ <link rel="shortcut icon" type="image/png" href="/favicon.png" />
+
+ <!-- iOS support -->
+ <link rel="apple-touch-icon" href="/img/icons/icon_96.png">
+ <link rel="apple-touch-icon" href="/img/icons/icon_512.png">
+ <meta name="apple-mobile-web-app-status-bar" content="#004d32">
+</head>
+
+<body>
+</body>
+
+</html>
diff --git a/assets/root/login.html b/assets/root/login.html
new file mode 100644
index 0000000..542b157
--- /dev/null
+++ b/assets/root/login.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <meta name="google" content="notranslate">
+ <title>Login &laquo; BežiApp</title>
+
+ <!-- Materialize -->
+ <link type="text/css" href="/css/materialize.min.css" rel="stylesheet">
+ <link href="/css/materialicons.css" rel="stylesheet">
+ <script type="text/javascript" src="/js/lib/materialize.min.js"></script>
+
+ <script src="/js/lib/jquery.min.js"></script>
+ <script type="text/javascript" src="/js/lib/localforage.min.js"></script>
+
+ <link type="text/css" href="/css/styles.css" rel="stylesheet">
+ <script type="text/javascript" src="/js/gsec.js"></script> <!-- gimsisextclient -->
+ <script type="text/javascript" src="/js/login.js"></script>
+
+ <link rel="manifest" href="/manifest.json">
+ <script src="/js/app.js"></script>
+ <script src="/js/lib/themes.js"></script>
+ <script src="/js/lang/bundle.js"></script>
+ <link rel="shortcut icon" type="image/png" href="/favicon.png" />
+
+ <!-- iOS support -->
+ <link rel="apple-touch-icon" href="/img/icons/icon_96.png">
+ <link rel="apple-touch-icon" href="/img/icons/icon_512.png">
+ <meta name="apple-mobile-web-app-status-bar" content="#004d32">
+</head>
+
+<body>
+ <div class="container">
+ <div class="row center-align">
+ <div class="row">
+ <div class="col s12">
+ <h3 class="center-align"><b class="title-secondary">Beži</b><span class="title-primary">App</span>
+ </h3>
+ </div>
+ </div>
+ <div class="row">
+ <div class="input-field col s12">
+ <input id="username" type="text" class="validate">
+ <label for="username">GimSIS <x-sl>username</x-sl></label>
+ </div>
+ </div>
+ <div class="row">
+ <div class="input-field col s12">
+ <input autocomplete="new-password" id="password" type="password" class="validate">
+ <label for="password"><x-su>password</x-su></label>
+ </div>
+ </div>
+ <div class="row">
+ <button id="login-button" class="btn waves-effect waves-light"><x-sl>signIn</x-sl></button>
+ </div>
+ <div class="row">
+ <p class="grey-text text-darken-2"><x-su>bySigningInYouAgreeTo</x-su> <a href="/pages/tos.html"><x-sl>theToS</x-sl></a> <x-sl>and</x-sl>
+ <a href="/pages/privacypolicy.html"><x-dl>thePrivacyPolicy</x-dl></a>
+ </p>
+ </div>
+ </div>
+ </div>
+</body>
+
+</html>
diff --git a/assets/root/logout.html b/assets/root/logout.html
new file mode 100644
index 0000000..c3f9b41
--- /dev/null
+++ b/assets/root/logout.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <meta name="google" content="notranslate">
+ <title>Logout &laquo; BežiApp</title>
+
+ <script type="text/javascript" src="/js/lib/localforage.min.js"></script>
+ <script type="text/javascript" src="/js/logout.js"></script>
+
+ <link rel="manifest" href="/manifest.json">
+ <script src="/js/app.js"></script>
+ <link rel="shortcut icon" type="image/png" href="/favicon.png" />
+
+ <!-- iOS support -->
+ <link rel="apple-touch-icon" href="/img/icons/icon_96.png">
+ <link rel="apple-touch-icon" href="/img/icons/icon_512.png">
+ <meta name="apple-mobile-web-app-status-bar" content="#004d32">
+</head>
+
+<body>
+</body>
+
+</html>
diff --git a/assets/root/manifest.json b/assets/root/manifest.json
new file mode 100644
index 0000000..b8bf5da
--- /dev/null
+++ b/assets/root/manifest.json
@@ -0,0 +1,59 @@
+{
+ "name": "BežiApp",
+ "short_name": "BežiApp",
+ "description": "Unofficial app for GimB students",
+
+ "start_url": "/index.html",
+ "scope": "/",
+
+ "display": "standalone",
+ "orientation": "portrait-primary",
+
+ "background_color": "#008053",
+ "theme_color": "#004d32",
+ "icons": [
+ {
+ "src": "/img/icons/icon_48.png",
+ "type": "image/png",
+ "sizes": "48x48"
+ },
+ {
+ "src": "/img/icons/icon_72.png",
+ "type": "image/png",
+ "sizes": "72x72"
+ },
+ {
+ "src": "/img/icons/icon_96.png",
+ "type": "image/png",
+ "sizes": "96x96"
+ },
+ {
+ "src": "/img/icons/icon_144.png",
+ "type": "image/png",
+ "sizes": "144x144"
+ },
+ {
+ "src": "/img/icons/icon_192.png",
+ "type": "image/png",
+ "sizes": "192x192"
+ },
+ {
+ "src": "/img/icons/icon_384.png",
+ "type": "image/png",
+ "sizes": "384x384"
+ },
+ {
+ "src": "/img/icons/icon_512.png",
+ "type": "image/png",
+ "sizes": "512x512"
+ }
+ ],
+
+ "dir": "auto",
+ "lang": "en-US",
+ "categories": [
+ "education",
+ "productivity",
+ "utilities"
+ ]
+} \ No newline at end of file
diff --git a/assets/root/sw.js.bvr b/assets/root/sw.js.bvr
new file mode 100644
index 0000000..a44a6fc
--- /dev/null
+++ b/assets/root/sw.js.bvr
@@ -0,0 +1,150 @@
+<@?i global@>
+// Change version to cause cache refresh
+const static_cache_name = "site-static-<@?g app_version@>-<@?u 0 7 ?g latest_commit@>";
+// commit before the latest is <@?g latest_commit@>
+// Got them with find . -not -path '*/\.*' | sed "s/.*/\"&\",/" | grep -v sw.js
+// sw.js NE SME BITI CACHAN, ker vsebuje verzijo!
+
+const assets = [
+ "/css/materialize.min.css",
+ "/css/fontawesome.min.css",
+ "/css/materialicons.css",
+ "/css/styles.css",
+ "/css/fullcalendar/custom.css",
+ "/css/fullcalendar/daygrid/main.min.css",
+ "/css/fullcalendar/core/main.min.css",
+ "/css/fullcalendar/timegrid/main.min.css",
+
+ "/fonts/fa-solid-900.eot",
+ "/fonts/fa-solid-900.woff2",
+ "/fonts/fa-brands-400.woff2",
+ "/fonts/fa-regular-400.eot",
+ "/fonts/fa-regular-400.woff2",
+ "/fonts/fa-brands-400.eot",
+ "/fonts/materialicons.woff2",
+
+ "/img/avatars/asijanec.png",
+ "/img/avatars/rstular.png",
+ "/img/icons/icon_384.png",
+ "/img/icons/icon_192.png",
+ "/img/icons/icon_72.png",
+ "/img/icons/icon_144.png",
+ "/img/icons/icon_512.png",
+ "/img/icons/icon_96.png",
+ "/img/icons/icon_48.png",
+
+ "/js/timetable.js",
+ "/js/gradings.js",
+ "/js/messaging.js",
+ "/js/privacypolicy.js",
+ "/js/teachers.js",
+ "/js/tos.js",
+ "/js/login.js",
+ "/js/app.js",
+ "/js/meals.js",
+ "/js/settings.js",
+ "/js/lang/bundle.js",
+ "/js/setup-storage.js",
+
+ "/js/lib/materialize.min.js",
+ "/js/lib/jquery.min.js",
+ "/js/lib/localforage.min.js",
+ "/js/lib/xss.js",
+ "/js/lib/mergedeep.js",
+
+ "/js/lib/fullcalendar/daygrid/main.min.js",
+ "/js/lib/fullcalendar/core/main.min.js",
+ "/js/lib/fullcalendar/timegrid/main.min.js",
+ "/js/grades.js",
+ "/js/about.js",
+ "/js/logout.js",
+ "/js/initialize.js",
+ "/js/absences.js",
+ "/js/changelog.js",
+
+ "/pages/timetable.html",
+ "/pages/teachers.html",
+ "/pages/absences.html",
+ "/pages/about.html",
+ "/pages/changelog.html",
+ "/pages/messaging.html",
+ "/pages/gradings.html",
+ "/pages/grades.html",
+ "/pages/privacypolicy.html",
+ "/pages/tos.html",
+ "/pages/meals.html",
+ "/pages/settings.html",
+
+ "/manifest.json",
+ "/index.html",
+ "/login.html",
+ "/logout.html",
+ "/favicon.png",
+ "/pages/jitsi.html",
+ "/js/jitsi.js",
+ "/pages/chats.html",
+ "/js/chats.js",
+ "/css/bubbles.css",
+
+ "/js/gsec.js",
+ "/js/gsec.js?ajaxload"
+];
+
+importScripts("/js/lib/localforage.min.js");
+importScripts("/js/setup-storage.js");
+self.addEventListener("install", (evt) => {
+ // Add localforage.clear() if storage purge is required
+ evt.waitUntil(
+ // localforage.clear()
+ setupStorage()
+ );
+
+ evt.waitUntil(
+ caches.open(static_cache_name).then((cache) => {
+ cache.addAll(assets);
+ })
+ );
+});
+
+// Delete old caches
+self.addEventListener("activate", evt => {
+ evt.waitUntil(
+ caches.keys().then((keys) => {
+ return Promise.all(keys
+ .filter(key => key !== static_cache_name)
+ .map(key => caches.delete(key))
+ );
+ })
+ );
+});
+
+self.addEventListener("message", event => {
+
+ if (event.data) {
+ let data = JSON.parse(event.data); // parse the message back to JSON
+ if (data.action == "addtocache") { // check the action
+ event.waitUntil(
+ caches.open(static_cache_name).then(function (cache) {
+ try {
+ return cache.add([data.url]);
+ }
+ catch (error) {
+ console.error("[sw.js] error: " + error);
+ }
+ })
+ );
+ } else if (data.action == "deletecaches") {
+ caches.keys().then(function (names) {
+ for (let name of names)
+ console.log("[sw.js] deleting cache named " + name);
+ caches.delete(name);
+ });
+ }
+ }
+});
+
+self.addEventListener("fetch", (evt) => {
+ evt.respondWith(caches.match(evt.request).then((cache_res) => {
+ return cache_res || fetch(evt.request);
+ }))
+});