Skip to content

Commit faff707

Browse files
authored
Merge pull request creativecommons#326 from creativecommons/update_all_series
update all series page
2 parents ac2f087 + d0b6308 commit faff707

File tree

3 files changed

+53
-5
lines changed

3 files changed

+53
-5
lines changed
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
{% extends "layout.html" %}
2-
{% from "macros/categories.html" import render_categories %}
3-
{% block title %}{{ this.parent.children.get('entries').title }}{% endblock %}
4-
{% block header %}{{ this.parent.children.get('entries').title }}{% endblock %}
2+
3+
{% from "macros/series.html" import render_series %}
4+
55
{% block body %}
6-
<h2>All Series</h2>
7-
{{ render_categories(this) }}
6+
<div class="all-series">
7+
<div class="title">
8+
<h1 class="container">All Series</h1>
9+
</div>
10+
<div class="series-list container">
11+
{{ render_series(this) }}
12+
</div>
13+
</div>
814
{% endblock %}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{% from "macros/posts.html" import render_posts %}
2+
3+
{% macro render_series(series) %}
4+
{% for serie in site.query(series.path) %}
5+
<h4 class="series-link"><a class="link" href="{{ serie|url }}">{{ serie.name }}</a></h4>
6+
{% endfor %}
7+
{% endmacro %}

webpack/sass/main.scss

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,38 @@ a {
223223
@extend .padding-bottom-xxl;
224224
}
225225
}
226+
227+
.all-series {
228+
.title {
229+
background-color: $color-lighter-gray;
230+
231+
.container {
232+
@extend .padding-horizontal-big;
233+
@extend .padding-bottom-xl;
234+
}
235+
}
236+
237+
.series-list {
238+
@extend .padding-horizontal-big;
239+
@extend .padding-top-xl;
240+
@extend .padding-bottom-xxl;
241+
242+
.series-link {
243+
.link {
244+
@extend .has-color-dark-slate-gray;
245+
}
246+
247+
@extend .padding-bottom-big;
248+
249+
&:not(:last-of-type)::after {
250+
@extend .padding-top-big;
251+
252+
display: block;
253+
254+
content: '';
255+
256+
border-bottom: 0.1875rem solid $color-light-gray;
257+
}
258+
}
259+
}
260+
}

0 commit comments

Comments
 (0)