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,16 +4,18 @@
{{- partial "head.html" . -}} {{- partial "head.html" . -}}
<body> <body>
<h2 class="header"> <div class="top">
<a href="{{ "/" | relURL }}">{{ .Site.Title | markdownify }}</a> <h2 class="header">
</h2> <a href="{{ "/" | relURL }}">{{ .Site.Title | markdownify }}</a>
</h2>
<nav id="navbar"> <nav id="navbar">
<a class="navbar-item" href="{{ "/" | relURL }}">Home</a> <a class="navbar-item" href="{{ "/" | relURL }}">Home</a>
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
<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>
{{ end }} {{ .Date.Format "January 2, 2006" }}
</ul> </time>
{{ if .Data.Singular }} {{ if ne .Lastmod .Date }}
{{ else }} ( Modified
{{ if .Params.showtags }} <time datetime="{{ .Lastmod.Format "January 2, 2006" }}" pubdate>
<small> {{ .Lastmod.Format "January 2, 2006" }}
Site-wide tags: </time>
<span class="tags"> ) <!-- I don't know how to get rid of the whitespace in between here,
<br /> so I'll just live with it for now. -->
{{ range .Site.Taxonomies.tags }}
<a href="{{ .Page.Permalink }}">#{{ .Page.Title }}</a>&nbsp;
{{ end }} {{ end }}
</span> {{ end }}
</small>
{{ end }} <span class="tags">
{{ range (.GetTerms "tags") }}
<a href="{{ .Permalink }}">#{{ .LinkTitle }}</a>
{{ end }}
</span>
</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 }}
{{ end }} {{ end }}

View File

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