Commit 5d79a10d authored by gijs's avatar gijs
Browse files

Trajectories

parent fd05d8af
...@@ -202,7 +202,7 @@ def generate (): ...@@ -202,7 +202,7 @@ def generate ():
for trajectory in trajectories.models: for trajectory in trajectories.models:
if not trajectory.produser.value: if not trajectory.produser.value:
output(os.path.join(outputdir, trajectory.prefix, '{}.html'.format(keyFilter(trajectory.title))), 'trajectory.html', lambda t: { 'trajectory': t }) output(os.path.join(outputdir, trajectory.prefix, '{}.html'.format(keyFilter(trajectory.title))), 'trajectory.html', { 'trajectory': trajectory })
## Questions ## Questions
output( output(
......
...@@ -826,6 +826,7 @@ class Produser (Model): ...@@ -826,6 +826,7 @@ class Produser (Model):
class Trajectory (Model): class Trajectory (Model):
contentType = 'trajectory' contentType = 'trajectory'
prefix = 'trajectories'
def _metadataFields (self): def _metadataFields (self):
return { return {
......
...@@ -546,15 +546,16 @@ a.tag { ...@@ -546,15 +546,16 @@ a.tag {
background: white; background: white;
} }
.trajectory-list section.trajectory--item h2,
.trajectory-list section.trajectory--item h2.produser { .trajectory-list section.trajectory--item h2.produser {
margin-top: 0;
text-align: left; text-align: left;
margin-bottom: auto; margin-bottom: auto;
display: block; display: block;
font-size: 1.1em; font-size: 1.1em;
letter-spacing: 0; letter-spacing: 0;
margin-bottom: 0.5em; margin-bottom: 0.5em;
text-transform: none;
padding-bottom: .25em; padding-bottom: .25em;
left: 0; left: 0;
margin-left: 0; margin-left: 0;
......
...@@ -47,10 +47,11 @@ ...@@ -47,10 +47,11 @@
{% for trajectory in trajectories %} {% for trajectory in trajectories %}
<section class="trajectory--item"> <section class="trajectory--item">
{% if trajectory.title.value %} {% if trajectory.title.value %}
<h2 class="produser"> <h2>
<a href="{{ trajectory.link }}">{{ trajectory }}</a>
</h2> </h2>
{% else %} {% else %}
<h2> <h2 class="produser">
<a href="{{ trajectory.produser.target.link }}">{{ trajectory.produser }}</a> <a href="{{ trajectory.produser.target.link }}">{{ trajectory.produser }}</a>
</h2> </h2>
{% endif %} {% endif %}
...@@ -59,7 +60,7 @@ ...@@ -59,7 +60,7 @@
{% else %} {% else %}
{{ trajectory.content|truncatewords_html:60 }} {{ trajectory.content|truncatewords_html:60 }}
{% endif %} {% endif %}
<a href="{{ trajectory.produser.target.link }}" class="read-further">read further</a> <a href="{{ trajectory.link }}" class="read-further">read further</a>
</section> </section>
{% endfor %} {% endfor %}
</section> </section>
......
Markdown is supported
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