summaryrefslogtreecommitdiff
path: root/src/static
diff options
context:
space:
mode:
authoruser <user@node5.net>2024-07-19 23:32:40 +0200
committeruser <user@node5.net>2024-07-19 23:32:40 +0200
commit78e3f6ea427a10edaeac1c056f8a3ab5640e2a0c (patch)
tree0bd7a010f00fb07c15577e7fea9fb2128239b82f /src/static
Initial commit - displays events
Diffstat (limited to 'src/static')
-rw-r--r--src/static/favicon.icobin0 -> 15406 bytes
-rw-r--r--src/static/main.css72
-rw-r--r--src/static/main.js31
-rw-r--r--src/static/news_headline.pngbin0 -> 2597 bytes
-rw-r--r--src/static/title_headline.pngbin0 -> 2255 bytes
5 files changed, 103 insertions, 0 deletions
diff --git a/src/static/favicon.ico b/src/static/favicon.ico
new file mode 100644
index 0000000..653155d
--- /dev/null
+++ b/src/static/favicon.ico
Binary files differ
diff --git a/src/static/main.css b/src/static/main.css
new file mode 100644
index 0000000..e4d5aef
--- /dev/null
+++ b/src/static/main.css
@@ -0,0 +1,72 @@
+body {
+ color: white;
+ background: black;
+ image-rendering: pixelated;
+ zoom: 2;
+}
+
+#root-container {
+ margin: auto;
+ text-align: center;
+ width: min-content;
+}
+
+.content {
+ margin-top: 0.1em;
+}
+
+#top {
+ font-size: 1.36em;
+ color: grey;
+}
+
+#program {
+ font-size: 1.64em;
+}
+
+#news {
+ font-size: 1.36em;
+ text-align: left;
+}
+
+.grey {
+ color: grey !important;
+}
+
+input {
+ width: 80%;
+ height: 200%;
+ font-size: 1em;
+}
+
+#news_input_label {
+ font-size: 0.7em;
+}
+
+input[type=submit] {
+ width: fit-content;
+}
+
+
+progress {
+ -webkit-appearance: none;
+ background: #000;
+ border: none;
+ width: 93%;
+}
+
+progress::-moz-progress-bar { background: #006688; }
+
+#progress-bar span {
+ position: absolute;
+ display: inline-block;
+ color: #fff;
+ text-align: right;
+}
+
+#progress-bar {
+ display: block;
+ position: relative;
+ width: 100%;
+}
+
diff --git a/src/static/main.js b/src/static/main.js
new file mode 100644
index 0000000..7bea389
--- /dev/null
+++ b/src/static/main.js
@@ -0,0 +1,31 @@
+const url = '/text';
+const parts = ["top", "program"];
+const elements = {};
+
+function get_element(part){
+ elements[part] = document.getElementById(part);
+}
+
+const program_element = parts.forEach(get_element);
+
+function set_element_text(part, text){
+ elements[part].innerHTML = text;
+}
+
+async function getEvents() {
+ try {
+ const response = await fetch(url);
+ if (!response.ok) {
+ throw new Error(`Response status: ${response.status}`);
+ }
+
+ const events = await response.json();
+ console.log(events)
+
+ } catch (error) {
+ console.error(error.message);
+ }
+}
+
+getEvents();
+
diff --git a/src/static/news_headline.png b/src/static/news_headline.png
new file mode 100644
index 0000000..f9876a1
--- /dev/null
+++ b/src/static/news_headline.png
Binary files differ
diff --git a/src/static/title_headline.png b/src/static/title_headline.png
new file mode 100644
index 0000000..dec80be
--- /dev/null
+++ b/src/static/title_headline.png
Binary files differ