more images, more content

This commit is contained in:
Jan Krutisch 2022-10-20 22:28:47 +02:00
parent 459e385622
commit d5bfc60bef
9 changed files with 130 additions and 6 deletions

66
_layouts/home.html Normal file
View file

@ -0,0 +1,66 @@
---
layout: default
---
<!-- Page Header -->
{% if page.background %}
<header class="masthead" style="background-image: url('{{ page.background | prepend: site.baseurl | replace: '//', '/' }}')">
{% else %}
<header class="masthead">
{% endif %}
<div class="overlay"></div>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<div class="page-heading">
<h1>{{ site.title }}</h1>
{% if site.description %}
<span class="subheading">{{ site.description }}</span>
{% endif %}
</div>
</div>
</div>
</div>
</header>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
{{ content }}
<!-- Home Post List -->
{% for post in site.posts limit : 5 %}
<article class="post-preview">
<a href="{{ post.url | prepend: site.baseurl | replace: '//', '/' }}">
<h2 class="post-title">{{ post.title }}</h2>
{% if post.subtitle %}
<h3 class="post-subtitle">{{ post.subtitle }}</h3>
{% else %}
<h3 class="post-subtitle">{{ post.excerpt | strip_html | truncatewords: 15 }}</h3>
{% endif %}
</a>
<p class="post-meta">Geschrieben von
{% if post.author %}
{{ post.author }}
{% else %}
{{ site.author }}
{% endif %}
am
{{ post.date | date: '%d.%m.%Y' }}
</p>
</article>
<hr>
{% endfor %}
<!-- Pager -->
<div class="clearfix">
<a class="btn btn-primary float-right" href="{{"/posts" | relative_url }}">Alle Artikel ansehen &rarr;</a>
</div>
</div>
</div>
</div>

53
_layouts/post.html Normal file
View file

@ -0,0 +1,53 @@
---
layout: default
---
<!-- Page Header -->
{% if page.background %}
<header class="masthead" style="background-image: url('{{ page.background | prepend: site.baseurl | replace: '//', '/' }}')">
{% else %}
<header class="masthead">
{% endif %}
<div class="overlay"></div>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<div class="post-heading">
<h1>{{ page.title }}</h1>
{% if page.subtitle %}
<h2 class="subheading">{{ page.subtitle }}</h2>
{% endif %}
<span class="meta">Geschrieben von
<a href="#">{% if page.author %}{{ page.author }}{% else %}{{ site.author }}{% endif %}</a>
am {{ page.date | date: '%d.%m.%Y' }}
</span>
</div>
</div>
</div>
</div>
</header>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
{{ content }}
<hr>
<div class="clearfix">
{% if page.previous.url %}
<a class="btn btn-primary float-left" href="{{ page.previous.url | prepend: site.baseurl | replace: '//', '/' }}" data-toggle="tooltip" data-placement="top" title="{{ page.previous.title }}">&larr; Previous<span class="d-none d-md-inline">
Post</span></a>
{% endif %}
{% if page.next.url %}
<a class="btn btn-primary float-right" href="{{ page.next.url | prepend: site.baseurl | replace: '//', '/' }}" data-toggle="tooltip" data-placement="top" title="{{ page.next.title }}">Next<span class="d-none d-md-inline">
Post</span> &rarr;</a>
{% endif %}
</div>
</div>
</div>
</div>