Skip to content

Commit 34273eb

Browse files
committed
fix the no picture problem
1 parent 0b1bcb2 commit 34273eb

File tree

6 files changed

+88
-17
lines changed

6 files changed

+88
-17
lines changed
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
{% extends "layout.html" %}
2+
23
{% 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 %}
4+
55
{% block body %}
6-
<h2>Categories</h2>
7-
{{ render_categories(this) }}
6+
<div class="all-categories">
7+
<div class="title">
8+
<h1 class="container">Categories</h1>
9+
</div>
10+
<div class="categories-list container">
11+
{{ render_categories(this) }}
12+
</div>
13+
</div>
814
{% endblock %}
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: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{% from "macros/posts.html" import render_posts %}
22

33
{% macro render_categories(categories) %}
4-
<ul class="list-unstyled">
54
{% for category in site.query(categories.path) %}
6-
<li><a href="{{ category|url }}">{{ category.name }}</a></li>
5+
<a class="button tag margin-vertical-small margin-horizontal-smaller" href="{{ category|url }}">{{ category.name }}</a>
76
{% endfor %}
8-
</ul>
97
{% endmacro %}

themes/vocabulary_theme/templates/macros/posts.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
<article class="card entry-post horizontal no-border blog-entry column is-one-third">
88
<header>
99
<figure class="image blog-image">
10-
{% if author.about %}
11-
{% if author.md5_hashed_email %}
12-
<img class="profile" src="https://secure.gravatar.com/avatar/{{ author.md5_hashed_email }}?size=200"
13-
alt="gravatar" />
10+
{% if author.about %}
11+
{% if author.md5_hashed_email %}
12+
<img class="profile" src="https://secure.gravatar.com/avatar/{{ author.md5_hashed_email }}?size=200" alt="gravatar" />
13+
{% else %}
14+
<img class="profile" src="./blank_profile.svg" alt="gravatar" />
15+
{% endif %}
1416
{% endif %}
15-
{% endif %}
1617
</figure>
1718
</header>
1819
<div class="blog-content">
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: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,3 +264,56 @@ a {
264264
@extend .padding-bottom-xxl;
265265
}
266266
}
267+
268+
.all-series {
269+
.title {
270+
background-color: $color-lighter-gray;
271+
272+
.container {
273+
@extend .padding-horizontal-big;
274+
@extend .padding-bottom-xl;
275+
}
276+
}
277+
278+
.series-list {
279+
@extend .padding-horizontal-big;
280+
@extend .padding-top-xl;
281+
@extend .padding-bottom-xxl;
282+
283+
.series-link {
284+
.link {
285+
@extend .has-color-dark-slate-gray;
286+
}
287+
288+
@extend .padding-bottom-big;
289+
290+
&:not(:last-of-type)::after {
291+
@extend .padding-top-big;
292+
293+
display: block;
294+
295+
content: '';
296+
297+
border-bottom: 0.1875rem solid $color-light-gray;
298+
}
299+
}
300+
}
301+
}
302+
303+
.all-categories {
304+
.title {
305+
background-color: $color-lighter-gray;
306+
overflow-wrap: break-word;
307+
308+
.container {
309+
@extend .padding-horizontal-big;
310+
@extend .padding-bottom-xl;
311+
}
312+
}
313+
314+
.categories-list {
315+
@extend .padding-horizontal-big;
316+
@extend .padding-top-xl;
317+
@extend .padding-bottom-xxl;
318+
}
319+
}

0 commit comments

Comments
 (0)