Skip to content

Commit 21868fb

Browse files
committed
Improve shortcodes, change to cover_image
1 parent c4ecedc commit 21868fb

9 files changed

Lines changed: 26 additions & 20 deletions

File tree

content/posts/c64-puzzle/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description = "A fun Commodore 64 Puzzle"
44
date = 2020-02-27
55
slug = "c64-puzzle"
66
[extra]
7-
image = "problem.webp"
7+
cover_image = "problem.webp"
88
+++
99

1010
My college professor posted this image with the question

content/posts/home-assistant-dashboard-tablet/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ slug = "home-assistant-dashboard-tablet"
66
[taxonomies]
77
tags = ["Linux", "Home Assistant"]
88
[extra]
9-
image = "tablet_small.webp"
9+
cover_image = "tablet_small.webp"
1010
+++
1111

1212
Turning an Intel Atom based Lenovo Tablet 10 (20E4) into a Home Assistant dashboard and voice assistant. Most tutorials for dashboard displays are using Android tablets, but I had this old tablet laying around and figured out how to use it with Home Assistant.

themes/doingstuff-zola/sass/doingstuff/_base.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ img {
8787
border-radius: 5px;
8888
}
8989

90+
video {
91+
display: block;
92+
max-width: 100%;
93+
height: auto;
94+
margin: 0 auto 1rem;
95+
border-radius: 5px;
96+
}
97+
98+
9099
table {
91100
margin-bottom: 1rem;
92101
width: 100%;

themes/doingstuff-zola/sass/doingstuff/_list.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010

1111
.post-list-item {
12-
margin-bottom: 2em;
12+
margin-bottom: 1.5em;
1313
}
1414

1515
.item-title-big {
@@ -30,8 +30,8 @@
3030
margin-top: .2rem;
3131
}
3232

33-
.item-summary {
34-
p {
35-
margin-bottom: 0;
36-
}
37-
}
33+
// .item-summary {
34+
// p {
35+
// margin-bottom: 0;
36+
// }
37+
// }

themes/doingstuff-zola/sass/doingstuff/_post.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.page,
22
.post {
33
margin-bottom: 4em;
4+
margin-top: 1em;
45

56
li + li {
67
margin-top: .25rem;

themes/doingstuff-zola/sass/doingstuff/_shortcodes.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,4 @@
4444
.danger-icon {
4545
color: #df3c30;
4646
@extend %noteicon;
47-
}
48-
49-
video {
50-
max-width: 100%;
5147
}

themes/doingstuff-zola/templates/base.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
<meta content="{{ config.title }}" property="og:site_name"/>
2626
<meta content="{{ config.base_url | safe }}" property="og:url"/>
2727
<meta content="{{ config.base_url | safe }}" property="twitter:url"/>
28-
{% if section.title %}
28+
{%- if section.title %}
2929
<meta content="{{ section.title }}" property="og:title"/>
3030
<meta content="{{ section.title }}" property="twitter:title"/>
31-
{% endif %}
32-
{% if section.description %}
31+
{%- endif %}
32+
{%- if section.description %}
3333
<meta content="{{ section.description }}" property="og:description"/>
3434
<meta content="{{ section.description }}" property="description"/>
3535
<meta content="{{ section.description }}" property="twitter:description"/>
36-
{% endif %}
36+
{%- endif %}
3737
{% endblock metadata %}
3838
{# CSS #}
3939
{% block css %}

themes/doingstuff-zola/templates/page.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
<meta content="{{ page.description }}" property="description"/>
1919
<meta content="{{ page.description }}" property="twitter:description"/>
2020
{% endif %}
21-
{% if page.extra.image %}
22-
<meta content="{{ get_url(path=page.colocated_path ~ page.extra.image) }}" property="og:image"/>
23-
<meta content="{{ get_url(path=page.colocated_path ~ page.extra.image) }}" property="twitter:image"/>
21+
{% if page.extra.cover_image %}
22+
<meta content="{{ get_url(path=page.colocated_path ~ page.extra.cover_image) }}" property="og:image"/>
23+
<meta content="{{ get_url(path=page.colocated_path ~ page.extra.cover_image) }}" property="twitter:image"/>
2424
{% endif %}
2525
{% endblock metadata %}
2626

themes/doingstuff-zola/templates/shortcodes/img.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<figure {% if align %}class="{{ align }}"{% endif %}>
1+
<figure {% if align %}class="{{ align }}"{% else %}class="center"{% endif %}>
22
{% if link %}<a href="{{ link }}">{% endif %}
33
{%- set image_path = page.colocated_path ~ src %}
44
{%- set image_meta = get_image_metadata(path=image_path) %}

0 commit comments

Comments
 (0)