From 5baacdd55aa04d4023d1f9cc8a1c32b0902a20cc Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Sat, 13 Feb 2021 18:01:45 +0100 Subject: [PATCH] =?UTF-8?q?Zobrazov=C3=A1n=C3=AD=20aktualit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/aktuality/_index.md | 3 +++ content/aktuality/ipsum.md | 16 ++++++++++++ content/aktuality/lorem.md | 16 ++++++++++++ sass/main.scss | 50 +++++++++++++++++++++++++++++++------ templates/index.html | 8 +++++- templates/macros.html | 12 +++++++++ templates/page.html | 6 +++++ 7 files changed, 103 insertions(+), 8 deletions(-) create mode 100644 content/aktuality/_index.md create mode 100644 content/aktuality/ipsum.md create mode 100644 content/aktuality/lorem.md create mode 100644 templates/page.html diff --git a/content/aktuality/_index.md b/content/aktuality/_index.md new file mode 100644 index 0000000..b3f542f --- /dev/null +++ b/content/aktuality/_index.md @@ -0,0 +1,3 @@ ++++ ++++ + diff --git a/content/aktuality/ipsum.md b/content/aktuality/ipsum.md new file mode 100644 index 0000000..2dac9dd --- /dev/null +++ b/content/aktuality/ipsum.md @@ -0,0 +1,16 @@ ++++ +title = "Lorem Ipsum" +date = 2021-02-03 ++++ + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas semper dapibus dui vel tristique. Fusce mauris magna, dapibus eget tortor a, condimentum fermentum lacus. Aliquam erat volutpat. + + + +Aliquam erat volutpat. Nullam sit amet libero feugiat lorem pharetra tincidunt nec vel tellus. Pellentesque purus ligula, scelerisque a dolor in, sagittis mattis diam. Suspendisse pharetra, augue eu aliquam aliquam, erat lectus dignissim dui, vel tempus ex nisl vel turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Sed orci nisl, facilisis non luctus vel, laoreet id quam. In vel consequat elit. Aenean eu egestas mi. Aliquam tempus eleifend dictum. + +Sed et molestie sem. Proin aliquet tortor non risus feugiat pellentesque. Sed ullamcorper volutpat mauris. Nam tincidunt augue libero, sed tempus ex maximus non. Phasellus fermentum, odio id pellentesque interdum, nibh tellus aliquam nulla, hendrerit dignissim ex est nec lectus. Pellentesque sem lorem, molestie vel molestie eu, viverra vel est. Cras vel erat vitae orci dignissim iaculis non id dolor. Pellentesque ac nulla sem. Pellentesque fermentum leo sapien, id imperdiet velit lacinia eget. + +Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus posuere nulla sed massa porta pretium vitae sit amet risus. Duis maximus rhoncus vestibulum. Aenean tempor sapien augue. Donec nec risus placerat magna imperdiet eleifend. Nullam massa risus, egestas at justo tristique, rhoncus volutpat purus. Fusce sit amet pretium justo. Morbi facilisis sapien quis augue aliquet laoreet. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vestibulum consequat nulla a accumsan ullamcorper. Aliquam ultricies vel ex ullamcorper tincidunt. Sed sed maximus erat, aliquam efficitur velit. + +Quisque fermentum scelerisque turpis, sed pellentesque quam lobortis et. Aliquam ultricies nec velit mollis blandit. Mauris convallis leo et hendrerit commodo. Praesent mollis, nunc at molestie pulvinar, augue ligula fermentum purus, consequat dictum justo odio sit amet arcu. Nullam non semper tellus, et accumsan tortor. Phasellus imperdiet odio nec velit semper, quis ornare massa lacinia. Integer dictum justo non augue feugiat interdum. Sed ac tempor elit, nec porta eros. Nulla posuere libero nec lectus consequat sagittis. In nec orci orci. Cras eu mauris id risus fermentum rhoncus. Quisque vitae vehicula turpis. In tortor metus, scelerisque euismod sodales id, ultricies eu ligula. Duis non imperdiet sem. Curabitur ultricies velit non eros mollis, id tempor neque egestas. diff --git a/content/aktuality/lorem.md b/content/aktuality/lorem.md new file mode 100644 index 0000000..2dac9dd --- /dev/null +++ b/content/aktuality/lorem.md @@ -0,0 +1,16 @@ ++++ +title = "Lorem Ipsum" +date = 2021-02-03 ++++ + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas semper dapibus dui vel tristique. Fusce mauris magna, dapibus eget tortor a, condimentum fermentum lacus. Aliquam erat volutpat. + + + +Aliquam erat volutpat. Nullam sit amet libero feugiat lorem pharetra tincidunt nec vel tellus. Pellentesque purus ligula, scelerisque a dolor in, sagittis mattis diam. Suspendisse pharetra, augue eu aliquam aliquam, erat lectus dignissim dui, vel tempus ex nisl vel turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Sed orci nisl, facilisis non luctus vel, laoreet id quam. In vel consequat elit. Aenean eu egestas mi. Aliquam tempus eleifend dictum. + +Sed et molestie sem. Proin aliquet tortor non risus feugiat pellentesque. Sed ullamcorper volutpat mauris. Nam tincidunt augue libero, sed tempus ex maximus non. Phasellus fermentum, odio id pellentesque interdum, nibh tellus aliquam nulla, hendrerit dignissim ex est nec lectus. Pellentesque sem lorem, molestie vel molestie eu, viverra vel est. Cras vel erat vitae orci dignissim iaculis non id dolor. Pellentesque ac nulla sem. Pellentesque fermentum leo sapien, id imperdiet velit lacinia eget. + +Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus posuere nulla sed massa porta pretium vitae sit amet risus. Duis maximus rhoncus vestibulum. Aenean tempor sapien augue. Donec nec risus placerat magna imperdiet eleifend. Nullam massa risus, egestas at justo tristique, rhoncus volutpat purus. Fusce sit amet pretium justo. Morbi facilisis sapien quis augue aliquet laoreet. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vestibulum consequat nulla a accumsan ullamcorper. Aliquam ultricies vel ex ullamcorper tincidunt. Sed sed maximus erat, aliquam efficitur velit. + +Quisque fermentum scelerisque turpis, sed pellentesque quam lobortis et. Aliquam ultricies nec velit mollis blandit. Mauris convallis leo et hendrerit commodo. Praesent mollis, nunc at molestie pulvinar, augue ligula fermentum purus, consequat dictum justo odio sit amet arcu. Nullam non semper tellus, et accumsan tortor. Phasellus imperdiet odio nec velit semper, quis ornare massa lacinia. Integer dictum justo non augue feugiat interdum. Sed ac tempor elit, nec porta eros. Nulla posuere libero nec lectus consequat sagittis. In nec orci orci. Cras eu mauris id risus fermentum rhoncus. Quisque vitae vehicula turpis. In tortor metus, scelerisque euismod sodales id, ultricies eu ligula. Duis non imperdiet sem. Curabitur ultricies velit non eros mollis, id tempor neque egestas. diff --git a/sass/main.scss b/sass/main.scss index ce10c63..a9453b5 100644 --- a/sass/main.scss +++ b/sass/main.scss @@ -1,6 +1,11 @@ @import "minireset"; @import "fonts"; +a { + text-decoration: none; + color: inherit; +} + body { min-height: 100vh; display: flex; @@ -42,11 +47,7 @@ header { ul { display: flex; - a { - text-decoration: none; - color: inherit; - padding: .9rem; - } + a { padding: .9rem } } } @@ -92,6 +93,43 @@ main { line-height: 1.5; margin: 1em 0; } + + .blocks { + display: grid; + grid-template-columns: 1fr 1fr 1fr 1fr; + grid-column-gap: 1rem; + + article { + padding: 1em; + border-top: 5px solid #5E81AC; + + &:hover { + box-shadow: 0px 1px 9px #00000033; + } + + .title { + font-weight: bold; + font-size: 1.3em; + margin: .5em 0; + } + + .date { + display: block; + width: 100%; + text-align: right; + font-size: 0.8em; + color: #81A1C1; + } + } + } + + .aktuality { + grid-template-columns: 1fr 1fr; + } + + .centering { + text-align: center; + } } footer { @@ -141,8 +179,6 @@ div.rambotron { display: block; padding: 1.1rem; margin: 0 1rem; - color: inherit; - text-decoration: none; &:hover { background-color: #2E3440; diff --git a/templates/index.html b/templates/index.html index cd36d52..27656bf 100644 --- a/templates/index.html +++ b/templates/index.html @@ -11,5 +11,11 @@ {% endblock extra %} {% block content %} - {{ section.content | safe }} +
+

Aktuality

+
+ {% set section = get_section(path="aktuality/_index.md") %} + {{ macro::list_posts(section=section) }} +
+
{% endblock content %} diff --git a/templates/macros.html b/templates/macros.html index eaa4ee2..eb8db8e 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -7,3 +7,15 @@ {% endif %} {% endmacro list_items %} + +{% macro list_posts(section) %} + {% for post in section.pages %} + +
+
{{ post.title }}
+

{{ post.summary | safe }}

+
{{ post.date | date(format="%d.%m.%Y")}}
+
+
+ {% endfor %} +{% endmacro list_posts %} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..452a1ab --- /dev/null +++ b/templates/page.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} + +{% block content %} +

{{ page.title }}

+ {{ page.content | safe }} +{% endblock content %}