This commit is contained in:
BBaoVanC 2021-10-02 16:22:52 -05:00
parent 157feeb814
commit bed4a9b74a
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
4 changed files with 111 additions and 63 deletions

View File

@ -11,6 +11,22 @@
margin-right: 5px; margin-right: 5px;
} }
.post {
padding-bottom: 20px;
}
.post-title, .post-title h1 {
margin-bottom: 10px;
}
.post-description {
padding-top: 10px;
}
.readmore {
padding-top: 5px;
}
body { body {
margin: auto; margin: auto;
max-width: 720px; max-width: 720px;
@ -24,24 +40,35 @@ body {
/* Styling */ /* Styling */
.footer { #navbar h2 {
text-align: center; color: inherit;
background: #ddd; text-decoration: inherit;
} }
.header a, #navbar { .header a {
color: inherit;
}
.post-title a {
color: inherit; color: inherit;
text-decoration: inherit; text-decoration: inherit;
} }
body { body {
background-color: black; background-color: #111;
color: lightgray; color: lightgray;
font-family: sans-serif; font-family: sans-serif;
} }
a { a {
color: #4da6ff; color: #4da6ff;
text-decoration: inherit;
} }
a:hover {
text-decoration: underline;
}
blockquote { blockquote {
border-left: 5px solid #222; border-left: 5px solid #222;
padding-left: 10px; padding-left: 10px;

View File

@ -4,6 +4,7 @@
{{- partial "head.html" . -}} {{- partial "head.html" . -}}
<body> <body>
<div class="top">
<h2 class="header"> <h2 class="header">
<a href="{{ "/" | relURL }}">{{ .Site.Title | markdownify }}</a> <a href="{{ "/" | relURL }}">{{ .Site.Title | markdownify }}</a>
</h2> </h2>
@ -14,6 +15,7 @@
<a class="navbar-item" href="{{ .URL }}">{{ .Name }}</a> <a class="navbar-item" href="{{ .URL }}">{{ .Name }}</a>
{{ end }} {{ end }}
</nav> </nav>
</div>
{{ if .Site.Params.breadcrumbnav }} {{ if .Site.Params.breadcrumbnav }}
{{ partial "breadcrumb.html" . }} {{ partial "breadcrumb.html" . }}

View File

@ -7,35 +7,52 @@
{{ else }} {{ else }}
<h1>{{ .Title | markdownify }}</h1> <h1>{{ .Title | markdownify }}</h1>
{{ end }} {{ end }}
<ul>
{{ $showDate := .Params.showdate }} {{ $showDate := .Params.showdate }}
{{ range .Pages }} {{ range .Pages }}
<li> <div class="post">
{{ if $showDate }} <h2 class="post-title">
<time datetime="{{ .Date.Format "2006-01-02" }}" pubdate>
{{ .Date.Format "2006-01-02" }}
</time>
{{ end }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</li> </h2>
{{ else }}
<li> <div class="post-metadata">
No posts here! {{ if .Date }}
</li> <time datetime="{{ .Date.Format "January 2, 2006" }}" pubdate>
{{ .Date.Format "January 2, 2006" }}
</time>
{{ if ne .Lastmod .Date }}
( Modified
<time datetime="{{ .Lastmod.Format "January 2, 2006" }}" pubdate>
{{ .Lastmod.Format "January 2, 2006" }}
</time>
) <!-- I don't know how to get rid of the whitespace in between here,
so I'll just live with it for now. -->
{{ end }} {{ end }}
</ul> {{ end }}
{{ if .Data.Singular }}
{{ else }}
{{ if .Params.showtags }}
<small>
Site-wide tags:
<span class="tags"> <span class="tags">
<br /> {{ range (.GetTerms "tags") }}
{{ range .Site.Taxonomies.tags }} <a href="{{ .Permalink }}">#{{ .LinkTitle }}</a>
<a href="{{ .Page.Permalink }}">#{{ .Page.Title }}</a>&nbsp;
{{ end }} {{ end }}
</span> </span>
</small> </div>
<div class="post-description">
{{ if .Description }}
{{ .Description | markdownify }}
{{ else }}
{{ .Summary | markdownify }}
{{ end }} {{ end }}
</div>
<div class="readmore">
<a href="{{ .Permalink }}">Read more &rarr;</a>
</div>
</div>
{{ else }}
<div>
No posts here!
</div>
{{ end }} {{ end }}
{{ end }} {{ end }}

View File

@ -1,7 +1,9 @@
{{ define "main" }} {{ define "main" }}
<div class="post-title">
<h1>{{ .Title | markdownify }}</h1> <h1>{{ .Title | markdownify }}</h1>
<!-- I'd like to get rid of the unnaturally large gap between the </div>
header and the metadata (date, tags, etc) -->
<div class="post-metadata">
{{ if .Date }} {{ if .Date }}
<time datetime="{{ .Date.Format "January 2, 2006" }}" pubdate> <time datetime="{{ .Date.Format "January 2, 2006" }}" pubdate>
{{ .Date.Format "January 2, 2006" }} {{ .Date.Format "January 2, 2006" }}
@ -14,7 +16,6 @@
) <!-- I don't know how to get rid of the whitespace in between here, ) <!-- I don't know how to get rid of the whitespace in between here,
so I'll just live with it for now. --> so I'll just live with it for now. -->
{{ end }} {{ end }}
<br />
{{ end }} {{ end }}
<span class="tags"> <span class="tags">
@ -22,6 +23,7 @@
<a href="{{ .Permalink }}">#{{ .LinkTitle }}</a> <a href="{{ .Permalink }}">#{{ .LinkTitle }}</a>
{{ end }} {{ end }}
</span> </span>
</div>
{{ if .Params.Toc }} {{ if .Params.Toc }}
<div id="table-of-contents"> <div id="table-of-contents">