Refactor list of posts, change font
This commit is contained in:
parent
8dde505150
commit
20bf4eb41f
@ -15,7 +15,7 @@ theme = "swr"
|
||||
weight = 2
|
||||
[[menu.main]]
|
||||
name = 'News'
|
||||
url = '/news/'
|
||||
url = '/posts/'
|
||||
weight = 3
|
||||
[[menu.main]]
|
||||
name = 'About'
|
||||
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "haha"
|
||||
date = "2022-10-20"
|
||||
+++
|
||||
|
||||
horosho
|
8
content/posts/Test 1.md
Normal file
8
content/posts/Test 1.md
Normal file
@ -0,0 +1,8 @@
|
||||
+++
|
||||
title = "Test 1"
|
||||
date = "2022-10-20"
|
||||
+++
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
6
content/posts/Test 2.md
Normal file
6
content/posts/Test 2.md
Normal file
@ -0,0 +1,6 @@
|
||||
+++
|
||||
title = "Test 2"
|
||||
date = "2022-11-10"
|
||||
+++
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -1,10 +1,5 @@
|
||||
@font-face {
|
||||
font-family: 'ShareTechMono';
|
||||
src: url('../fonts/ShareTechMono-Regular.ttf');
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'ShareTechMono';
|
||||
font: 14px/1.5 monospace;
|
||||
background-color: #24202b;
|
||||
color: white;
|
||||
font-size: 14pt;
|
||||
@ -43,6 +38,7 @@ aside {
|
||||
#content {
|
||||
border: 1px solid;
|
||||
padding: 16px;
|
||||
max-width: 50%;
|
||||
// min-width: 40em;
|
||||
}
|
||||
|
||||
@ -55,6 +51,22 @@ a {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
h1 {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
p {
|
||||
display: block;
|
||||
margin-inline-start: 0px;
|
||||
margin-inline-end: 0px;
|
||||
margin-block-start: 1em;
|
||||
margin-block-end: 1em;
|
||||
}
|
||||
|
||||
article {
|
||||
padding-bottom: 24px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
#wrapper {
|
||||
flex-direction: column;
|
||||
|
@ -1,38 +1,16 @@
|
||||
{{ define "main" }}
|
||||
<content>
|
||||
{{ if .Data.Singular }}
|
||||
<h3 style="margin-bottom:0">Filtering for "{{ .Title }}"</h3>
|
||||
<small>
|
||||
<a href="{{ "/news" | relURL }}">Remove filter</a>
|
||||
</small>
|
||||
{{ end }}
|
||||
<ul class="blog-posts">
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
<span>
|
||||
<i>
|
||||
<time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
|
||||
{{ .Date.Format (default "02 Jan, 2006" .Site.Params.dateFormat) }}
|
||||
</time>
|
||||
</i>
|
||||
</span>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li>
|
||||
No posts yet
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ if .Data.Singular }}
|
||||
{{else}}
|
||||
<small>
|
||||
<div>
|
||||
{{ range .Site.Taxonomies.tags }}
|
||||
<a href="{{ .Page.Permalink }}">#{{ .Page.Title }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</small>
|
||||
{{ end }}
|
||||
</content>
|
||||
{{ end }}
|
||||
<div id="posts">
|
||||
{{ $listtitle := .Title }}
|
||||
{{ if or .Title .Content }}
|
||||
<div>
|
||||
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
|
||||
{{ with .Content }}<div>{{ . }}</div>{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ range .Paginator.Pages }}
|
||||
{{ partial "summary.html" . }}
|
||||
{{ end }}
|
||||
{{ partial "pagination.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
9
themes/swr/layouts/partials/pagination.html
Normal file
9
themes/swr/layouts/partials/pagination.html
Normal file
@ -0,0 +1,9 @@
|
||||
<div>
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<a href="{{ .Paginator.Prev.URL }}">Previous Page</a>
|
||||
{{ end }}
|
||||
{{ .Paginator.PageNumber }} of {{ .Paginator.TotalPages }}
|
||||
{{ if .Paginator.HasNext }}
|
||||
<a href="{{ .Paginator.Next.URL }}">Next Page</a>
|
||||
{{ end }}
|
||||
</div>
|
13
themes/swr/layouts/partials/summary.html
Normal file
13
themes/swr/layouts/partials/summary.html
Normal file
@ -0,0 +1,13 @@
|
||||
<article>
|
||||
<h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
|
||||
<b><time>{{ .Date.Format (default "02.01.2006" .Site.Params.dateFmt) }}</time></b>
|
||||
{{ range .Params.tags }}
|
||||
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
<div>
|
||||
<p>{{ .Summary }}</p>
|
||||
{{ if .Truncated }}
|
||||
<a href="{{ .Permalink }}">Read more...</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user