Commit a3d054d8 authored by sarah's avatar sarah
Browse files

Merge branch 'pad-management' of gitlab.constantvzw.org:osp/tools.ethertoff into pad-management

parents 6b22e4a5 3ba04ec6
......@@ -3,6 +3,7 @@
import os
import os.path
import shutil
import re
from math import inf
from generator.index import make_index
......@@ -167,10 +168,12 @@ def generate ():
# output(os.path.join(outputdir, 'produsers.layout.html'), 'produsers.layout.html', { 'produsers': sorted(produsers.models, key=lambda r: str(r.key)), 'grouped_produsers': grouped_produsers })
## Tags
sorted_tags = sorted(tags.models, key=lambda m: re.subn(r'\W', '', str(m))[0].lower())
grouped_tags = regroup(sorted_tags, key=lambda m: re.subn(r'\W', '', str(m))[0].lower()[0])
output(
os.path.join(outputdir, 'tags.html'),
'tags.html',
{ 'tags': sorted(tags.models, key=getLabelAsSortKey) })
{ 'tags': sorted_tags, 'grouped_tags': grouped_tags })
## Bibliography
output(
......
......@@ -5,7 +5,7 @@ MENU_ITEMS = [
('Produsers', 'produsers.html' ),
# ('Bibliography', 'bibliography.html' ),
# ('Related Projects', 'external-projects.html'),
# ('Tags', 'tags.html' ),
('Tags', 'tags.html' ),
# ('Contact', 'pages/contact.html')
]
......
......@@ -71,7 +71,7 @@
{% endif %}
{% if produser.notes %}
<h2>Notes</h2>
<ul>
<ul class="simplelist">
{% for note in produser.notes.targets %}
<li>
<a href="{{ note.link }}" class="note">{{ note }}</a>
......
......@@ -299,13 +299,15 @@ code {
body {
position: absolute;
top: 0;
right: 0;
right: 20px;
bottom: 0;
left: 0;
left: 20px;
overflow: hidden;
display: grid;
grid-template-columns: [left sidebar-start] 1fr [sidebar-end content-start] 1fr [content-middle] 1fr [content-end right];
grid-template-rows: [top] repeat(2, 1fr) [footer] min-content [bottom];
border-left: 2px solid black;
border-right: 2px solid black;
}
main, footer {
......@@ -664,4 +666,35 @@ section.audio {
.trajectory-list .trajectory--item:nth-child(-n+2) {
border-top: 0px;
}
.taglist {
column-width: 12.5em;
column-gap: 1.5em;
line-height: 140%;
list-style-type: none;
margin: 0;
padding: 0;
}
.taglist h3 {
margin-top: 1em;
}
.taglist :first-child h3 {
margin-top: 0;
}
.taglist li {
padding-left: .5em;
position: relative;
}
.taglist li:before {
content: '-';
position: absolute;
left: 0em;
margin-left: 0;
}
.taglist li.letter {
padding-left: 0;
}
.taglist li.letter:before {
content: '';
}
\ No newline at end of file
......@@ -15,43 +15,43 @@
{{ tag.content }}
{% endif %}
{% if tag.produsers %}
<h2>Produsers</h2>
<h3>Produsers</h3>
<ul class="simplelist">
{% for link, _, produser in tag.produsers|link_iterator %}
<li><a href="{{ produser.link }}#{{ link.id }}">{% if link.label %}{{ link.label }} → {% endif %}{{ produser }}</a></li>
<li><a href="{{ produser.link }}#{{ link.id }}">{% if link.label %}<span class="tag">{{ link.label }}</span> → {% endif %}{{ produser }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% if tag.trajectories %}
<h2>Trajectories</h2>
<h3>Trajectories</h3>
<ul class="simplelist">
{% for link, _, trajectory in tag.trajectories|link_iterator %}
<li><a href="{{ trajectory.produser.value.target.link }}#{{ link.id }}">{% if link.label %}{{ link.label }} → {% endif %}{{ trajectory.produser }}</a></li>
<li><a href="{{ trajectory.produser.value.target.link }}#{{ link.id }}">{% if link.label %}<span class="tag">{{ link.label }}</span> → {% endif %}{{ trajectory.produser }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% if tag.events %}
<h2>Activities</h2>
<h3>Activities</h3>
<ul class="simplelist">
{% for link, _, event in tag.events|link_iterator %}
<li><a href="{{ event.link }}#{{ link.id }}">{% if link.label %}{{ link.label }} → {% endif %}{{ event }}</a></li>
<li><a href="{{ event.link }}#{{ link.id }}">{% if link.label %}<span class="tag">{{ link.label }}</span> → {% endif %}{{ event }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% if tag.bibliography %}
<h2>Bibliography</h2>
<h3>Bibliography</h3>
<ul class="simplelist">
{% for link, _, bibliography in tag.bibliography|link_iterator %}
<li>{% if link.label %}{{ link.label }} → {% endif %}{{ bibliography }}</li>
<li>{% if link.label %}<span class="tag">{{ link.label }}</span> → {% endif %}{{ bibliography }}</li>
{% endfor %}
</ul>
{% endif %}
{% if tag.video %}
<h2>Video</h2>
<h3>Video</h3>
<ul class="simplelist">
{% for video in tag.video|link_target_iterator %}
<li>
......@@ -64,7 +64,7 @@
{% endif %}
{% if tag.audio %}
<h2>Audio</h2>
<h3>Audio</h3>
<ul class="simplelist">
{% for audio in tag.audio|link_target_iterator %}
<li>
......@@ -76,11 +76,11 @@
</ul>
{% endif %}
{% if tag.notes %}
<h2>Notes</h2>
<ul>
<h3>Notes</h3>
<ul class="simplelist">
{% for link, _, note in tag.notes|link_iterator %}
<li>
<a href="{{ note.link }}#{{ link.id }}" class="note">{% if link.label %}{{ link.label }} → {% endif %}{{ note }}</a>
<a href="{{ note.link }}#{{ link.id }}" class="note">{% if link.label %}<span class="tag">{{ link.label }}</span> → {% endif %}{{ note }}</a>
</li>
{% endfor %}
</ul>
......
......@@ -4,9 +4,12 @@
{% block content %}
<h1>Tags</h1>
<ul>
{% for tag in tags %}
<li><a href="{{ tag.link }}">{{ tag }} ({{ tag.link_count }})</a></li>
<ul class="taglist">
{% for letter, tags in grouped_tags %}
<li id="{{ letter }}" class="letter"><h3>{{ letter|upper }}</h3></li>
{% for tag in tags %}
<li><a href="{{ tag.link }}">{{ tag }}&nbsp;({{ tag.link_count }})</a></li>
{% endfor %}
{% endfor %}
</ul>
{% endblock %}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment