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

View File

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

View File

@ -7,35 +7,52 @@
{{ else }}
<h1>{{ .Title | markdownify }}</h1>
{{ end }}
<ul>
{{ $showDate := .Params.showdate }}
{{ range .Pages }}
<li>
{{ if $showDate }}
<time datetime="{{ .Date.Format "2006-01-02" }}" pubdate>
{{ .Date.Format "2006-01-02" }}
</time>
{{ end }}
{{ $showDate := .Params.showdate }}
{{ range .Pages }}
<div class="post">
<h2 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</li>
{{ else }}
<li>
No posts here!
</li>
</h2>
<div class="post-metadata">
{{ if .Date }}
<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 }}
</ul>
{{ if .Data.Singular }}
{{ else }}
{{ if .Params.showtags }}
<small>
Site-wide tags:
{{ end }}
<span class="tags">
<br />
{{ range .Site.Taxonomies.tags }}
<a href="{{ .Page.Permalink }}">#{{ .Page.Title }}</a>&nbsp;
{{ range (.GetTerms "tags") }}
<a href="{{ .Permalink }}">#{{ .LinkTitle }}</a>
{{ end }}
</span>
</small>
{{ end }}
</div>
<div class="post-description">
{{ if .Description }}
{{ .Description | markdownify }}
{{ else }}
{{ .Summary | markdownify }}
{{ end }}
</div>
<div class="readmore">
<a href="{{ .Permalink }}">Read more &rarr;</a>
</div>
</div>
{{ else }}
<div>
No posts here!
</div>
{{ end }}
{{ end }}

View File

@ -1,27 +1,29 @@
{{ define "main" }}
<h1>{{ .Title | markdownify }}</h1>
<!-- I'd like to get rid of the unnaturally large gap between the
header and the metadata (date, tags, etc) -->
{{ if .Date }}
<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 }}
<br />
{{ end }}
<div class="post-title">
<h1>{{ .Title | markdownify }}</h1>
</div>
<span class="tags">
<div class="post-metadata">
{{ if .Date }}
<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 }}
<span class="tags">
{{ range (.GetTerms "tags") }}
<a href="{{ .Permalink }}">#{{ .LinkTitle }}</a>
{{ end }}
</span>
</span>
</div>
{{ if .Params.Toc }}
<div id="table-of-contents">