optimize blog macro

This commit is contained in:
L3D 2022-01-16 04:53:54 +01:00
parent 5accab56e9
commit e533649962
Signed by: l3d
GPG key ID: CD08445BFF4313D1
6 changed files with 33 additions and 13 deletions

View file

@ -2,19 +2,22 @@ div.events {
margin: 0 auto;
padding: 20px 30px;
background: transparent;
p, a{
p{
color: $font_default;
font-size: $font_size_default;
}
a, a:link, a:visited {
text-decoration: none;
color: $font_accent_4;
}
a:hover, a:active {
color: $font_accent_3;
}
code {
color: $font_accent_4;
font-size: $font_size_code;
}
h1 {
color: $font_accent_3;
text-shadow: 0px 0px 1px black;
}
.headline a {
color: $font_accent_3;
font-size: $font_size_h2;
@ -35,4 +38,9 @@ div.events {
color: $font_accent_3;
text-shadow: 0px 0px 1px black;
}
img {
max-width: 94%;
margin: 3%;
box-shadow: 5px 5px 4px 3px grey;
}
}

View file

@ -2,10 +2,4 @@ body {
font-family: $main_font, sans-serif;
margin: 25px 25px 50px 25px;
background: $background_accent_2;
a {
color: $font_accent_2;
}
a:hover {
color: $font_accent_3;
}
}

View file

@ -16,6 +16,12 @@ header {
list-style: none;
margin: 0;
padding: 0;
a, a:link, a:visited {
color: $font_accent_2;
}
a:hover, a:active {
color: $font_accent_3;
}
li {
display: inline;
margin: 0 8px 0 0;

View file

@ -4,3 +4,9 @@
{% block body %}
{{ render_blog_post(this) }}
{% endblock %}
{%- block class -%}
events
{%- endblock -%}
{%- block scss -%}
css/events.min.css
{%- endblock -%}

View file

@ -9,3 +9,9 @@
{{ render_pagination(this.pagination) }}
{% endblock %}
{%- block class -%}
events
{%- endblock -%}
{%- block scss -%}
css/events.min.css
{%- endblock -%}

View file

@ -1,9 +1,9 @@
{% macro render_blog_post(post, from_index=false) %}
<div class="blog-post">
{% if from_index -%}
<h2><a href="{{ post|url }}">{{ post.title }}</a></h2>
<h2 class="headline"><a href="{{ post|url }}">{{ post.title }}</a></h2>
{% else -%}
<h2>{{ post.title }}</h2>
<h2 class="headline"><a>{{ post.title }}</a></h2>
{% endif -%}
<p class="meta">
{% if post.event_start_date != post.event_end_date -%}