created news template
This commit is contained in:
parent
61f87b6bc1
commit
740b2dcc72
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Neuigkeiten
|
||||
template: news
|
||||
slug: neues
|
||||
---
|
||||
@ -3,7 +3,6 @@ title: Meine neue Webseite ist live
|
||||
date: 2025-03-07 10:47
|
||||
category: Neues
|
||||
author: Tobias Radloff
|
||||
summary: Ich habe meine Webseite von Grund auf neu gestaltet
|
||||
lang: de
|
||||
featured_image:
|
||||
- pic: ../images/neues/pelican.webp
|
||||
|
||||
@ -54,14 +54,14 @@ CATEGORY_SAVE_AS = ''
|
||||
CATEGORIES_SAVE_AS = ''
|
||||
|
||||
DEFAULT_PAGINATION = 5
|
||||
PAGINATED_TEMPLATES = {}
|
||||
PAGINATED_TEMPLATES = {'news'}
|
||||
|
||||
DEFAULT_DATE = "fs"
|
||||
|
||||
# Uncomment following line if you want document-relative URLs when developing
|
||||
RELATIVE_URLS = True
|
||||
|
||||
SUMMARY_MAX_LENGTH = 25
|
||||
SUMMARY_MAX_LENGTH = 50
|
||||
|
||||
FORMATTED_FIELDS = ['summary', 'klappentext', 'footer_line']
|
||||
|
||||
|
||||
@ -238,7 +238,6 @@ h1, h2, h3, h4, h5, h6 {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* make hamburger icon bigger */
|
||||
#hamburger-label {
|
||||
font-size: 1.77rem;
|
||||
@ -295,11 +294,7 @@ h1, h2, h3, h4, h5, h6 {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#content-header h1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.featured-image {
|
||||
#content-header h1, .featured-image {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@ -565,7 +560,7 @@ article:not(:has(> form:first-child)) > header.card-header {
|
||||
flex-flow: wrap;
|
||||
column-gap: calc(var(--pico-nav-element-spacing-horizontal) * 2);
|
||||
|
||||
.wcard-gallery, .tag-content {
|
||||
.wcard-gallery, .tag-content, .news-item {
|
||||
flex: 1 0 calc((100% - (2 * var(--pico-nav-element-spacing-horizontal))) * 0.618);
|
||||
min-width: 300px;
|
||||
}
|
||||
@ -691,9 +686,3 @@ img.impr {
|
||||
.heart {
|
||||
color: var(--tr-accent-color);
|
||||
}
|
||||
|
||||
/*
|
||||
.article-footer {
|
||||
margin-left: calc(var(--pico-nav-element-spacing-horizontal) * -1);
|
||||
margin-right: calc(var(--pico-nav-element-spacing-horizontal) * -1);
|
||||
}*/
|
||||
37
theme/templates/news.html
Normal file
37
theme/templates/news.html
Normal file
@ -0,0 +1,37 @@
|
||||
{% extends "page.html" %}
|
||||
|
||||
{% block content_all%}
|
||||
|
||||
{% block content_header %}
|
||||
{{ super.super() }}
|
||||
{% endblock content_header %}
|
||||
|
||||
{% block content_body %}
|
||||
{% from 'includes/macros.html' import ci %}
|
||||
{% set news = articles | selectattr("category", "==", "Neues") | list | sort(reverse=true, attribute="date") %}
|
||||
{% for n in news %}
|
||||
<article class="news">
|
||||
<div class="wcard" style="flex-direction: {{ loop.cycle('row', 'row-reverse') }};">
|
||||
<div class="news-item">
|
||||
<h3><a href="{{ SITEURL }}/{{ n.url }}" title="{{ n.title }}">{{ n.title }}</a></h3> <p>{{ n.summary }}</p>
|
||||
<p><a href="{{ n.url }}">Weiterlesen →</a></p>
|
||||
</div>
|
||||
<div class="wcard-title">
|
||||
{% if n.featured_image %}
|
||||
{% set i = n.featured_image[0] %}
|
||||
{{ ci(i.pic, SITEURL + "/" + n.url, i.text, i.alt, i.credit, i.credit_link) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<footer>veröffentlicht am {{ n.date | strftime("%d.%m.%y") }}</footer>
|
||||
</article>
|
||||
{% endfor %}
|
||||
{% endblock content_body %}
|
||||
|
||||
{% block content_footer %}
|
||||
<footer class="content-footer">
|
||||
<a href="/">← zur Startseite</a>
|
||||
</footer>
|
||||
{% endblock content_footer %}
|
||||
|
||||
{% endblock content_all%}
|
||||
Loading…
Reference in New Issue
Block a user