You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

223 lines
7.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Post it</title>
<link rel="stylesheet" href="{{url_for('static', filename='css/global.css')}}" />
<link rel="stylesheet" href="{{url_for('static', filename='css/postit.css')}}" />
<link rel="stylesheet" href="{{url_for('static', filename='css/contents.css')}}" />
{% if print %}
<script src="https://unpkg.com/pagedjs/dist/paged.polyfill.js"></script>
<script src="{{url_for('static', filename='js/bleed.js')}}"></script>
{% endif %}
</head>
<style>
:root {
--color: var(--{{color}});
--background: var(--{{color}}-bg);
}
</style>
<body>
{%for contribution, contents in contributions.items()%} {% for content in contents %}
<!-- Parsing postit -->
<div
class="post-it {{contribution}}
{% if content['card'] %} leader-card {%endif%}"
>
<!-- post-it with pic attribute are graphics that follow the color scheme! -->
<!-- there is a version that matches the color in a folder with the name of the color -->
<!-- ex: a purple cover in the intro contribution will be something like /intro/purple/cover.jpg -->
<!-- ex: the same cover in the orange version will be in /intro/orange/cover.jpg -->
<!-- in order to make it works, the files need to share the same name! -->
{%if content['pic'] %}
<img
src="{{url_for('static', filename='contents/' + contribution + '/' + color + '/' + content['pic'] )}}"
{% if content["alt"] %}
alt="{{content['alt']}}"
{% endif %}
/>
{% if content["alt"] %}
<figcaption>{{content['alt']}}</figcaption>
{% endif %}
{% if contribution == 'karaoke' and loop.index == 1 %}
<footer>
<h2 class="title">{{content['title']}}</h2>
<h2 class="title fill" style="clip-path: polygon(0 0, {{ 100 / contents|length * loop.index}}% 0, {{ 100 / contents|length * loop.index}}% 100%, 0% 100%)">{{content['title']}}</h2>
</footer>
{%endif%}
<!-- post-it with img attribute it's a image that doesn't follow the color scheme -->
{%elif content['img'] %}
<img
src="{{url_for('static', filename='contents/' + contribution + '/' + content['img'] )}}"
{% if content["alt"] %}
alt="{{content['alt']}}" {% endif %}
/>
{% if content["alt"]%}
<figcaption>{{content['alt']}}</figcaption>
{% endif %}
<!-- post-it with card attribute are the card for The Leader game -->
{%elif content['card']%}
<div class="card">{{content['card']}}</div>
<blockquote class="quote">
{{content['quote']}} <span class="leader">The&nbsp;Leader</span>
</blockquote>
<dl>
<dt class="row-bg"><span>Motivation</span></dt>
<dd class="row-bg"><span>{{content['motivation']}}</span></dd>
<dt><span>Empathy</span></dt>
<dd><span>{{content['empathy']}}</span></dd>
<dt class="row-bg"><span>Vision</span></dt>
<dd class="row-bg"><span>{{content['vision']}}</span></dd>
<dt><span>Positivity</span></dt>
<dd><span>{{content['positivity']}}</span></dd>
</dl>
<!-- post-it with definition attribute are for the crossword game -->
<!-- we use the same template both for the definitions and the imaginary grid cells -->
<!-- for the cells the definition attribute is a space charachter, so it's invisible but present eh eh -->
<!-- templates ecology -->
{%elif content['definition']%}
<div class="info">
{{content['start']}} <span class="category">{{content['category']}}</span>
</div>
<p class="description {% if content['definition']|length > 200 %} long-text {%endif%}">
{{content['definition']}}
</p>
<footer>
<h2 class="title">{{content['title']}}</h2>
<span
class="progress-bar"
style="width: {{ 100 / contents|length * loop.index}}%"
></span>
</footer>
<!-- mimic colophon, with a nice code style -->
<!-- not really a reusable module sorry aha -->
{%elif content['type'] == 'mimic-colophon'%}
<div class="description">
<div class="colophon">{{content['original']}}</div>
<div>{{content['original-credits']}}</div>
<div class="action">{{content['original-action']}}</div>
<div>{{content['original-date']}}</div>
<br />
<div class="colophon">{{content['current']}}</div>
<div>{{content['current-credits']}}</div>
<code>{{content['current-action']}}</code>
<div>{{content['current-date']}}</div>
</div>
<footer>
<h2 class="title">{{content['title']}}</h2>
<span
class="progress-bar"
style="width: {{ 100 / contents|length * loop.index}}%"
></span>
</footer>
<!-- postit with cardinal directions are for corner layout -->
<!-- you can set the contents at: -->
<!-- top left (nw) -->
<!-- top right (ne) -->
<!-- bottom left (sw) -->
<!-- bottom right (se) -->
<!-- used in the nim dialogue and in some other 1 word post-its -->
{%elif 'nw' in content or 'ne' in content or 'se' in content or 'sw' in content%}
<p
class="description dialogue {%if content['nw']%}nw{%endif%} {%if content['ne']%}ne{%endif%}"
>
{%if content['ne']%}{{content['ne']}}{%endif%} {%if
content['nw']%}{{content['nw']}}{%endif%}
</p>
<p
class="description dialogue {%if content['sw']%}sw{%endif%} {%if content['se']%}se{%endif%}"
>
{%if content['se']%}{{content['se']}}{%endif%} {%if
content['sw']%}{{content['sw']}}{%endif%}
</p>
<footer>
<h2 class="title">{{content['title']}}</h2>
<span
class="progress-bar"
style="width: {{ 100 / contents|length * loop.index}}%"
></span>
</footer>
<!-- progress bar with cursor easter egg -->
{%elif content['cursor']%}
<p class="description {% if content['cursor']|length > 200 %} long-text {%endif%}">
{{content['cursor']}}
</p>
<footer>
<h2 class="title">{{content['title']}}</h2>
{% if content['cursor']%}
<img class="cursor" src="{{url_for('static', filename='img/cursor.svg')}}" style="left: {{ 100 / contents|length * loop.index}}%" data-nobleed />
{% endif%}
<span
class="progress-bar"
style="width: {{ 100 / contents|length * loop.index}}%"
></span>
</footer>
<!-- standard text postit -->
{%else%}
<p class="description {% if content['description']|length > 200 %} long-text {%endif%}">
{{content['description']}}
</p>
<!-- Karaoke style progress bar -->
{% if contribution == 'karaoke' %}
<footer>
<h2 class="title">{{content['title']}}</h2>
<h2 class="title fill" style="clip-path: polygon(0 0, {{ 100 / contents|length * loop.index}}% 0, {{ 100 / contents|length * loop.index}}% 100%, 0% 100%)">{{content['title']}}</h2>
</footer>
{% else %}
<!-- Regular progress bar, using the length of each contribution to calculate the percentage -->
<footer>
<h2 class="title">{{content['title']}}</h2>
<span
class="progress-bar"
style="width: {{ 100 / contents|length * loop.index}}%"
></span>
</footer>
{%endif%}
{%endif%}
</div>
{% endfor %}
{%endfor%}
</body>
</html>