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; margin: 0 auto;
padding: 20px 30px; padding: 20px 30px;
background: transparent; background: transparent;
p, a{ p{
color: $font_default; color: $font_default;
font-size: $font_size_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 { code {
color: $font_accent_4; color: $font_accent_4;
font-size: $font_size_code; font-size: $font_size_code;
} }
h1 {
color: $font_accent_3;
text-shadow: 0px 0px 1px black;
}
.headline a { .headline a {
color: $font_accent_3; color: $font_accent_3;
font-size: $font_size_h2; font-size: $font_size_h2;
@ -35,4 +38,9 @@ div.events {
color: $font_accent_3; color: $font_accent_3;
text-shadow: 0px 0px 1px black; 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; font-family: $main_font, sans-serif;
margin: 25px 25px 50px 25px; margin: 25px 25px 50px 25px;
background: $background_accent_2; 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; list-style: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
a, a:link, a:visited {
color: $font_accent_2;
}
a:hover, a:active {
color: $font_accent_3;
}
li { li {
display: inline; display: inline;
margin: 0 8px 0 0; margin: 0 8px 0 0;

View file

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

View file

@ -9,3 +9,9 @@
{{ render_pagination(this.pagination) }} {{ render_pagination(this.pagination) }}
{% endblock %} {% 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) %} {% macro render_blog_post(post, from_index=false) %}
<div class="blog-post"> <div class="blog-post">
{% if from_index -%} {% if from_index -%}
<h2><a href="{{ post|url }}">{{ post.title }}</a></h2> <h2 class="headline"><a href="{{ post|url }}">{{ post.title }}</a></h2>
{% else -%} {% else -%}
<h2>{{ post.title }}</h2> <h2 class="headline"><a>{{ post.title }}</a></h2>
{% endif -%} {% endif -%}
<p class="meta"> <p class="meta">
{% if post.event_start_date != post.event_end_date -%} {% if post.event_start_date != post.event_end_date -%}