From 15017dcfb30f5e8f82db8a2acb0c646adbd7b617 Mon Sep 17 00:00:00 2001 From: Max P Date: Wed, 27 Dec 2023 23:36:39 +0100 Subject: [PATCH] Github page added. Paths corrected. --- page/bundle.js | 2 + page/index.css | 170 ++++++++++++++++++++++++++++++++++++++++++++++ page/index.html | 129 +++++++++++++++++++++++++++++++++++ page/logo.svg | 41 +++++++++++ public/index.html | 6 +- 5 files changed, 345 insertions(+), 3 deletions(-) create mode 100644 page/bundle.js create mode 100644 page/index.css create mode 100644 page/index.html create mode 100644 page/logo.svg diff --git a/page/bundle.js b/page/bundle.js new file mode 100644 index 0000000..6332578 --- /dev/null +++ b/page/bundle.js @@ -0,0 +1,2 @@ +(()=>{"use strict";var e={953:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e,t,n){this.reminderPrefix="Erinnerung: ",this.icsContent=e,this.reminderDays=t,this.reminderHours=n}modifyEvents(){return this.icsContent.replace(/BEGIN:VEVENT.*?END:VEVENT/gs,(e=>{const t=e.match(/SUMMARY:(.*)\r\n/),n=t?t[1]:"",r=this.createTriggerValue(),o=this.createVAlarmString(this.reminderPrefix+n,r);return e.replace(/END:VEVENT/,o+"END:VEVENT")}))}createVAlarmString(e,t){let n="BEGIN:VALARM\r\n";return n+="ACTION:DISPLAY\r\n",n+=`DESCRIPTION:${e}\r\n`,n+=`TRIGGER:${t}\r\n`,n+="END:VALARM\r\n",n}createTriggerValue(){const e=0===this.reminderHours?0:24-this.reminderHours;return`-P${this.reminderDays}DT${e}H0M0S`}}},519:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(n(953));function s(e){!function(){const e=document.getElementById("download-area");e&&e.classList.remove("show-download-area")}();const t=document.getElementById("ical-upload"),n=document.getElementById("reminder-days-select"),r=document.getElementById("reminder-hours-select"),s=parseInt(n.value,10),d=parseInt(r.value,10),i=t.files?t.files[0]:null;if(i){console.log("File uploaded:",i.name);const e=new FileReader;e.onload=e=>{var t;const n=null===(t=e.target)||void 0===t?void 0:t.result;if("string"==typeof n){console.log("File content readable..");const e=new o.default(n,s,d).modifyEvents(),t=function(e){const t=e.lastIndexOf(".");return-1===t?e+" with reminders":e.substring(0,t)+" with reminders"+e.substring(t)}(i.name),r=new Blob([e],{type:"text/calendar"});!function(e,t){const n=document.getElementById("download-area"),r=document.getElementById("download-button");n&&r&&(r.href=t,r.download=e,setTimeout((()=>n.classList.add("show-download-area")),0),document.getElementById("work-button").disabled=!0)}(t,URL.createObjectURL(r))}},e.readAsText(i)}}document.addEventListener("DOMContentLoaded",(()=>{console.log("Loading the WebApp...");const e=document.getElementById("work-button");document.getElementById("ical-upload").addEventListener("change",(()=>{e.disabled=!1})),e.addEventListener("click",s)}))}},t={};!function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}(519)})(); +//# sourceMappingURL=bundle.js.map \ No newline at end of file diff --git a/page/index.css b/page/index.css new file mode 100644 index 0000000..7cb37a9 --- /dev/null +++ b/page/index.css @@ -0,0 +1,170 @@ +html { + min-height: 100vh; + min-width: 100vw; +} + +body { + margin: 0; + padding: 0; + width: 100vw; + min-height: 100vh; + height: auto; + display: flex; + align-items: center; + text-align: center; + font-family: Arial, sans-serif; +} + +#app-content { + width: 60%; + max-width: 880px; + padding: 30px 40px; + margin: auto; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + background-color: #ffffff; + background-image: linear-gradient(to right, #ffffff, #e6e6e6); + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); + border-radius: 25px; +} + +#app-content .header { + width: 90%; + height: auto; + margin-bottom: 10px; + font-size: xx-large; +} + +#app-content .logo { + width: 30%; + height: auto; + margin-bottom: 20px; +} + +#app-content .description { + margin-bottom: 20px; +} + +#working-area .areas { + margin-bottom: 25px; +} + +#reminder-setting-area .reminder-days, +#reminder-setting-area .reminder-hours { + margin-bottom: 10px; +} + +#upload-area .button, +#upload-area .file-input { + padding: 10px 15px; + margin-bottom: 15px; + border: none; + border-radius: 5px; + cursor: pointer; + font-size: 16px; + transition: background-color 0.3s, box-shadow 0.3s; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); + outline: none; +} + +#upload-area .button:hover, +#upload-area .file-input:hover { + background-color: #007BFF; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); +} + +#upload-area .file-input { + display: block; + width: 80%; + color: #555; + background-color: #f9f9f9; +} + +#upload-area .button { + background-color: #28a745; + color: white; +} + +#upload-area .button:disabled { + background-color: #cccccc; + cursor: not-allowed; +} + +#upload-area #ical-upload { + opacity: 0; + position: absolute; + z-index: -1; +} + +#upload-area #ical-upload-label { + background-color: #007bff; + color: white; + display: inline-block; + cursor: pointer; + text-align: center; +} + +#upload-area #ical-upload-label:hover { + background-color: #0056b3; +} + +#app-content #download-area { + display: block; + overflow: hidden; + height: 0; + opacity: 0; + transition: height 1.5s ease, opacity 0.5s ease; +} + +#app-content #download-area.show-download-area { + height: 175px; + opacity: 1; +} + +#app-content #download-button { + background-color: #4CAF50; + color: white; + padding: 10px 20px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 16px; + margin: 4px 2px; + cursor: pointer; + border: none; + border-radius: 5px; + transition: background-color 0.3s; +} + +#app-content #download-button:hover { + background-color: #45a049; +} + +#app-content #footer { + margin-top: 30px; +} + +h1, +a { + text-wrap: nowrap; +} + +@media (max-width: 768px) { + h1 { + font-size: 2rem; + } + + h2 { + font-size: 1.5rem; + } + + p { + font-size: 1rem; + } + + #app-content #download-area.show-download-area { + height: 290px; + } +} \ No newline at end of file diff --git a/page/index.html b/page/index.html new file mode 100644 index 0000000..c19d90a --- /dev/null +++ b/page/index.html @@ -0,0 +1,129 @@ + + + + + AbfallAlarm + + + + + + + + + + + +
+ +
+

Abfall Alarm

+
+ + + + + +
+

Abfall Alarm ist eine intuitive und benutzerfreundliche WebApp, die darauf abzielt, das Leben der + Bürger von Arnsberg zu vereinfachen, indem sie eine zuverlässige Erinnerungsfunktion für den städtischen + Abfallkalender bietet.

+ +

Mit dieser App können Nutzer ihre iCalendar (.ics) Dateien für den Abfallkalender der Stadt Arnsberg + hochladen und automatisch Erinnerungen für jeden Abholtermin hinzufügen.

+
+ + +
+ +
+

1. Erinnerung einstellen

+

Wählen Sie aus, wann Sie an die Abfuhr erinnert werden möchten.

+
+ + +
+
+ + +
+
+ + +
+

2. Abfallkalender hochladen

+

Wählen Sie Ihren Abfallkalender aus und klicken Sie danach auf den 'Kalender bearbeiten'-Button.

+ + + + +
+ + +
+

3. Abfallkalender inkl. Erinnerungen herunterladen

+

Wenn Sie Ihren Abfallkalender inkl. Erinnerungen herunterladen möchten, klicken Sie auf den + folgenden Button.

+ Herunterladen +
+
+ + + +
+ + + + + \ No newline at end of file diff --git a/page/logo.svg b/page/logo.svg new file mode 100644 index 0000000..7c04d67 --- /dev/null +++ b/page/logo.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/index.html b/public/index.html index 2426363..c19d90a 100644 --- a/public/index.html +++ b/public/index.html @@ -7,8 +7,8 @@ - - + + @@ -123,7 +123,7 @@ - + \ No newline at end of file