on master help sign in
essays/list.html: add images
commit1977a608361cb9ffef70bef2bd3bced8d92144df authorMatilde Park <matilde@tlon.io> dateTue 21 Jan 2020, 17:30 (7 years ago) parent8d9208f
2 files changed+26−15
sass/_main.scss+6 templates/essays/list.html+20−15
sass/_main.scss+6
@@ -97,6 +97,12 @@ figcaption.home {
9797 margin: 0 auto;
9898}
9999
100+// obj-fit contain util
101+
102+.obj-cover {
103+ object-fit: cover;
104+}
105+
100106a {
101107 color: inherit;
102108 text-decoration: none;
templates/essays/list.html+20−15
@@ -1,17 +1,17 @@
11{% extends "base.html" %}
22
3−{% block title %}
4− <meta name="og:title" content="Blog - {{ config.title }}">
5− <title>Blog - {{ config.title }}</title>
3+{% block title %}
4+<meta name="og:title" content="Blog - {{ config.title }}">
5+<title>Blog - {{ config.title }}</title>
66{% endblock title %}
77
8−{% block description %}
9− <meta name="og:description" content="Directory for the Urbit Blog.">
10− <meta name="description" content="Directory for the Urbit Blog.">
8+{% block description %}
9+<meta name="og:description" content="Directory for the Urbit Blog.">
10+<meta name="description" content="Directory for the Urbit Blog.">
1111{% endblock description %}
1212
1313{% block image %}
14− <meta name="twitter:image" content="https://media.urbit.org/logo/urbit-logo-card.png">
14+<meta name="twitter:image" content="https://media.urbit.org/logo/urbit-logo-card.png">
1515{% endblock image %}
1616
1717{% block content %}
@@ -29,14 +29,19 @@
2929 <ul class="posts measure-wide">
3030 {% set posts = get_section(path="blog/_index.md") %}
3131 {% for page in posts.pages %}
32− <li class="mb4">
33− <h2 class="f5 fw6 mt0 mb1"><a class="bb-0" href="{{ page.permalink }}">{{ page.title }}</a></h2>
34− <p class="mt0">{{ page.description }}</p>
35− <time class="mono f6">{{ page.date | date(format="~%Y.%-m.%-d") }}</time>
36− <span class="mono f6">
37− {% if page.extra.ship %}<address class="mono f6 ml2">{{ page.extra.ship }}</address> {% endif %}
38− </span>
39− </li>
32+ <a class="bb-0" href="{{ page.permalink }}">
33+ <li class="mb4">
34+ <h2 class="f5 fw6 mt0 mb1">{{ page.title }}</h2>
35+ <p class="mt0">{{ page.description }}</p>
36+ {% if page.extra.image %}
37+ <img class="pv2 obj-cover h5 w-100" src="{{ page.extra.image }}"/>
38+ {% endif %}
39+ <time class="mono f6">{{ page.date | date(format="~%Y.%-m.%-d") }}</time>
40+ <span class="mono f6">
41+ {% if page.extra.ship %}<address class="mono f6 ml2">{{ page.extra.ship }}</address> {% endif %}
42+ </span>
43+ </li>
44+ </a>
4045 {% endfor %}
4146 </ul>
4247</article>