Refactor list of posts, change font
This commit is contained in:
parent
8dde505150
commit
20bf4eb41f
@ -15,7 +15,7 @@ theme = "swr"
|
|||||||
weight = 2
|
weight = 2
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
name = 'News'
|
name = 'News'
|
||||||
url = '/news/'
|
url = '/posts/'
|
||||||
weight = 3
|
weight = 3
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
name = 'About'
|
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 {
|
body {
|
||||||
font-family: 'ShareTechMono';
|
font: 14px/1.5 monospace;
|
||||||
background-color: #24202b;
|
background-color: #24202b;
|
||||||
color: white;
|
color: white;
|
||||||
font-size: 14pt;
|
font-size: 14pt;
|
||||||
@ -43,6 +38,7 @@ aside {
|
|||||||
#content {
|
#content {
|
||||||
border: 1px solid;
|
border: 1px solid;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
|
max-width: 50%;
|
||||||
// min-width: 40em;
|
// min-width: 40em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,6 +51,22 @@ a {
|
|||||||
justify-content: center;
|
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) {
|
@media only screen and (max-width: 768px) {
|
||||||
#wrapper {
|
#wrapper {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -1,38 +1,16 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<content>
|
<div id="posts">
|
||||||
{{ if .Data.Singular }}
|
{{ $listtitle := .Title }}
|
||||||
<h3 style="margin-bottom:0">Filtering for "{{ .Title }}"</h3>
|
{{ if or .Title .Content }}
|
||||||
<small>
|
<div>
|
||||||
<a href="{{ "/news" | relURL }}">Remove filter</a>
|
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
|
||||||
</small>
|
{{ with .Content }}<div>{{ . }}</div>{{ end }}
|
||||||
{{ end }}
|
</div>
|
||||||
<ul class="blog-posts">
|
{{ end }}
|
||||||
{{ range .Pages }}
|
|
||||||
<li>
|
{{ range .Paginator.Pages }}
|
||||||
<span>
|
{{ partial "summary.html" . }}
|
||||||
<i>
|
{{ end }}
|
||||||
<time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
|
{{ partial "pagination.html" . }}
|
||||||
{{ .Date.Format (default "02 Jan, 2006" .Site.Params.dateFormat) }}
|
</div>
|
||||||
</time>
|
{{ end }}
|
||||||
</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 }}
|
|
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