summaryrefslogtreecommitdiff
path: root/src/templates
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates')
-rw-r--r--src/templates/base.html29
-rw-r--r--src/templates/index.html26
-rw-r--r--src/templates/program.html18
3 files changed, 53 insertions, 20 deletions
diff --git a/src/templates/base.html b/src/templates/base.html
index 54c9c5e..ead738b 100644
--- a/src/templates/base.html
+++ b/src/templates/base.html
@@ -1,24 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
- {% block head %}
- <link rel="stylesheet" href="/main.css"/>
- <title>Text TV - Bornhack 25</title>
- <link rel="icon" type="image/x-icon" href="favicon.ico">
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <script src="main.js" defer></script>
- {% endblock %}
- <meta http-equiv="refresh" content="10">
+ {% block head %}
+ <link rel="stylesheet" href="/main.css"/>
+ <title>Text TV - Bornhack 25</title>
+ <link rel="icon" type="image/x-icon" href="favicon.ico">
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <script src="main.js" defer></script>
+ {% endblock %}
</head>
<body>
-
- <div id="root-container">
-
- {% block content %}
- {% endblock %}
- <div>
+ <div id="root-container">
+
+ {% block content %}
+ {% endblock %}
+
+ <div>
</body>
</html>
diff --git a/src/templates/index.html b/src/templates/index.html
index 971bafd..a637300 100644
--- a/src/templates/index.html
+++ b/src/templates/index.html
@@ -3,13 +3,13 @@
{% block content %}
<pre class="content grey" id="top">{{parts.top}}</pre>
-
+
<img src="title_headline.png">
- <pre class="content" id="program">{% for event in parts.program %}{% if loop.previtem and loop.previtem.day != event.day %}<br>{{ event.day }}<hr style="margin-bottom: 1em">{% endif %}<div style="position: relative"><div style="display: inline-block; background: #006688; height: 1.2em; width: {{event.progress}}%; position: absolute; left: 0"></div><div style="position: absolute; top: 0px; left: 0px;">{{event.title}} {{ event.time}} {{ event.icon }}</div></div><br style="margin-bottom: 0.25em">{% endfor %}</pre>
+ {% include 'program.html' %}
{#
<img src="news_headline.png">
-
+
<pre class="content" id="news">{{parts.news}}</pre>
-->
<br>
@@ -18,11 +18,11 @@
<label id="news_input_label" for="news_input">Post your own news, or anything you'd like here:</label><br>
<input type="text" id="news_input" name="news_input" maxlength="{{ news_max_length }}" placeholder="Type text here">
<input type="submit" value="Post" />
- </form>
+ </form>
#}
<div style="position: relative">
- <div style="z-index: 100; position: absolute; left: 0">
+ <div style="z-index: 100; position: absolute; left: 0; width: 100%">
<h1 style="text-align: center">Thanks for this year<br>
Cya next year</h1>
</div>
@@ -31,4 +31,20 @@
</div>
</div>
+<style>
+ {% if scale == "fit" %}
+ body {
+ font-size: 3vw;
+ }
+ {% else %}
+ body {
+ zoom: {{ scale }};
+ }
+ {% endif %}
+
+ :root {
+ --line-height: {{ line_height }};
+ }
+</style>
+
{% endblock %}
diff --git a/src/templates/program.html b/src/templates/program.html
new file mode 100644
index 0000000..377078f
--- /dev/null
+++ b/src/templates/program.html
@@ -0,0 +1,18 @@
+<pre class="content" id="program">
+ {%- for event in parts.program -%}
+ {%- if loop.previtem and loop.previtem.day != event.day -%}
+ <br>{{ event.day }}<hr>
+ {%- endif -%}
+ <div class="program-entry">{#
+ #}<div style="width: {{event.progress}}%" {#
+ #}class="program-progress{%- for class in event.classes-%} {{' ' + class }} {%- endfor -%}"></div>{#
+ #}<div class="program-text">{#
+ #}<span class="program-title">{{ event.short }}</span>{#
+ #}<span class="program-spacer">{{ event.spacer }} </span>{#
+ #}<span class="program-time">{{ event.time}}</span>{#
+ #}<span class="program-icon"> {{ event.icon }}</span>
+ </div>{#
+ #}</div>{#
+ #}<br class="program-divider">
+ {%- endfor -%}
+</pre>