Create basic front matter

This commit is contained in:
Christian Wolf 2023-10-08 20:10:42 +02:00
parent 67f5f175e7
commit ffc70d00d3
5 changed files with 80 additions and 5 deletions

View File

@ -303,6 +303,50 @@ h1 {
}
}
.news-blog {
.blog-entry {
.header {
a {
&::before {
content: '' !important;
}
font-size: larger;
}
}
.details {
display: flex;
min-height: 240px;
.teaser-image {
flex: 33% 1 0;
background-color: lightcyan;
}
.intro {
flex: 66% 1 1;
}
.teaser-image, .intro {
// display: ;
}
}
}
.pagination {
display: flex;
list-style: none;
.page-item {
padding: 0px 5px;
a {
padding: 10px 20px;
display: inline-block;
}
}
.disabled {
visibility: hidden;
}
}
}
@font-face{
font-family: 'Open Sans Condensed';
font-style: normal;

View File

@ -2,6 +2,7 @@
title: "Aktuell"
date: 2023-01-20T16:27:40+01:00
draft: false
# type: home
url: /
menu:
main:

View File

@ -5,9 +5,11 @@
<div id="wrapper">
{{- partial "page/header.html" . -}}
<div class="main">
{{ block "left" . }}
<div class="left-menu">
{{- partial "page/left_menu" . -}}
</div>
{{ end }}
<div id="content">
{{- block "main" . -}}{{- end -}}
</div>

View File

@ -0,0 +1,33 @@
{{ define "main" }}
<a name="top">
<h1>{{ .Title }}</h1>
</a>
<div class="news-blog">
{{ range (.Paginate (first 10 ( where .Site.RegularPages "Section" "==" "news")) 5 ).Pages }}
<div class="blog-entry">
<div class="header">
{{ .Date.Format "02.01.2006" }}
<a href="{{ .Permalink }}">{{ .Title }}</a>
</div>
<div class="details">
<div class="teaser-image">
{{ $page := . }}
{{ if .Params.Image }}
<img src="{{ (.Resources.GetMatch (.Params.Image)).RelPermalink }}">
{{ end }}
</div>
<div class="intro">
{{ with .Summary }}
{{ . }}
{{ end }}
</div>
</div>
</div>
{{ end }}
{{ template "_internal/pagination.html" . }}
</div>
{{ .Content }}
{{ partial "totop" }}
{{ end }}
{{ define "left" }}<!-- No left side menu -->{{ end }}

View File

@ -1,5 +0,0 @@
{{ define "main" }}
<div id="home-jumbotron" class="jumbotron text-center">
<h1 class="title">{{ .Site.Title }}</h1>
</div>
{{ end }}