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

Trajectories

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