ADD summary, CHANGE single page

This commit is contained in:
Hoernschen 2024-04-20 21:43:44 +02:00
parent 07f46720f8
commit cbe06d5249
Signed by: hoernschen
GPG key ID: 37591FAF4E6D3462
6 changed files with 90 additions and 19 deletions

View file

@ -325,7 +325,7 @@ a {
.title h1 { .title h1 {
font-size: xxx-large; font-size: xxx-large;
padding-block-end: 3rem; margin-block-end: 3rem;
} }
main > .content { main > .content {
@ -340,6 +340,47 @@ main > .content {
flex-grow: 1; flex-grow: 1;
} }
.list {
margin-block-start: 2rem;
}
.list > li {
list-style: none;
margin: 0.5rem;
}
.list > article {
margin: 0.5rem;
padding: 0.5rem;
border: 2px solid gray;
border-radius: 6px;
}
.list > article > h3 {
margin: 0px;
padding-block: 0.25rem;
font-size: x-large;
}
.list > article > .meta {
font-size: smaller;
padding-block-end: 1rem;
}
.meta > span {
padding-inline-end: 1rem;
}
.list > article > .more {
display: block;
width: 100%;
text-align: right;
font-size: x-large;
border: none;
background: inherit;
color: {{ .Site.Params.color.secondary }};
}
.section { .section {
padding-top: 2rem; padding-top: 2rem;
padding-bottom: 2.5rem; padding-bottom: 2.5rem;

4
layouts/_default/li.html Normal file
View file

@ -0,0 +1,4 @@
<li>
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
<div class="meta">{{ .Date.Format "Mon, Jan 2, 2006" }}</div>
</li>

View file

@ -11,7 +11,7 @@
</article> </article>
<div class="list"> <div class="list">
{{ range .Pages }} {{ range .Pages }}
<a href="{{.Permalink}}"><p>{{ .Title }}</p></a> {{ .Render "summary" }}
{{ end }} {{ end }}
</div> </div>
</div> </div>

View file

@ -1,12 +1,21 @@
{{ define "main" }} {{ define "main" }}
<div class="content"> <div class="content">
<div class="meta">
<span> {{ .Date.Format "2006-01-02" }}</span>
<span> ⏱ {{.ReadingTime}} min</span>
{{ with .Params.tags }}
<span>
{{ range . }}
<a href="{{ " tags" | absURL }}/{{ . | urlize }}/">#{{ . }}</a>
{{ end }}
</span>
{{ end }}
</div>
{{ with .Title }} {{ with .Title }}
<div class="title"> <div class="title">
<h1>{{ . }}</h1> <h1>{{ . }}</h1>
<div class="divider"></div>
</div> </div>
{{ end }} {{ end }}
<!-- <h6>{{ .Date.Format "Mon, Jan 2, 2006" }}</h6> -->
{{ if gt (.TableOfContents | findRE `<li>` | len) 4}} {{ if gt (.TableOfContents | findRE `<li>` | len) 4}}
<div class="table-of-contents"> <div class="table-of-contents">
{{ .TableOfContents }} {{ .TableOfContents }}
@ -14,5 +23,5 @@
</div> </div>
{{ end }} {{ end }}
{{ .Content }} {{ .Content }}
</div> </div>
{{ end }} {{ end }}

View file

@ -0,0 +1,16 @@
<article>
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
<div class="meta">
<span> {{ .Date.Format "2006-01-02" }}</span>
<span> ⏱ {{.ReadingTime}} min</span>
{{ with .Params.tags }}
<span>
{{ range . }}
<a href="{{ " tags" | absURL }}/{{ . | urlize }}/">#{{ . }}</a>
{{ end }}
</span>
{{ end }}
</div>
{{ .Summary }}
<a class="more" href='{{ .RelPermalink }}'><i class="icon-angle-right"></i></a>
</article>

1
layouts/contact.vcf Normal file
View file

@ -0,0 +1 @@
test