Compare commits

...

9 commits

6 changed files with 58 additions and 18 deletions

View file

@ -20,7 +20,7 @@ smol is based on [Blank](https://github.com/Vimux/Blank) created by [Vimux](http
In your Hugo site `themes` directory, run:
```
git clone https://git.ddd.rip/ptrcnull/smol
git clone https://github.com/ptrcnull/smol
```
Next, open `config.toml` in the base of the Hugo site and ensure the theme option is set to `smol`.

View file

@ -7,6 +7,7 @@
<title>{{ .Title }}</title>
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
{{ template "_internal/opengraph.html" . }}
<link rel="stylesheet" href="{{ "css/style.css" | relURL }}">
{{ range .Site.Params.customCSS -}}
<link rel="stylesheet" href="{{ . | relURL }}?rnd={{ now.Unix }}">

View file

@ -4,5 +4,17 @@
<div>
{{ .Content }}
</div>
{{ range .Pages }}
<h2>{{ .Title }}</h2>
<ul>
{{ range .Pages }}
<li>
<div class="post-title">
{{ .Date.Format "2006-01-02" }} <a href="{{ .RelPermalink }}">{{.Title }}</a>
</div>
</li>
{{ end }}
</ul>
{{ end }}
</main>
{{ end }}

View file

@ -1,7 +1,7 @@
<footer>
<p>&copy; {{ now.Year }} <a href="{{ .Site.BaseURL }}"><b>{{ if .Site.Copyright }}{{ .Site.Copyright }}{{ else }}{{ .Site.Title }}{{ end }}</b></a> .
{{- range $i, $e := .Site.Menus.footer }}
<a href="{{ $e.URL }}"><b>{{ $e.Name }}</b></a>{{ if ne (sub (len $.Site.Menus.footer) 1) $i }} . {{ end }}
<a {{ if $e.Params.Rel }}rel="{{ $e.Params.Rel }}" {{ end -}} href="{{ $e.URL }}"><b>{{ $e.Name }}</b></a>{{ if ne (sub (len $.Site.Menus.footer) 1) $i }} . {{ end }}
{{- end }}
</p>
</footer>

View file

@ -3,14 +3,4 @@
= <a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a> =<br>
{{ strings.Repeat ( .Site.Title | len | add 4 ) "=" }}
<div style="float: right;">{{ .Site.Params.subtitle }}</div><br>
<p>
<nav>
<a href="/"><b>Home</b></a> .
{{ with .Site.Menus.main }}
{{ range $i, $e := . }}
<a href="{{ $e.URL | relURL }}"><b>{{ $e.Name }}</b></a>{{ if ne (sub (len $.Site.Menus.main) 1) $i }} . {{ end }}
{{ end }}
{{ end }}
</nav>
</p>
</header>

View file

@ -1,3 +1,27 @@
:root {
--main-bg-color: #ffffff;
--main-fg-color: #000000;
--code-bg-color: #dddddd;
--code-fg-color: #272822;
--link-fresh-color: #0072b2;
--link-stale-color: #a84275;
}
@media (prefers-color-scheme: dark) {
:root {
--main-bg-color: #222222;
--main-fg-color: #ffffff;
--code-bg-color: #000000;
--code-fg-color: #eeeeee;
--link-fresh-color: #56b4e9;
--link-stale-color: #0072b2;
}
}
html {
overflow-y: scroll
}
@ -6,8 +30,13 @@ body {
max-width: 800px;
margin: 40px auto;
padding: 0 10px;
font: 14px/1.5 monospace;
color: #444
font: 14px/1.5 sans-serif;
background-color: var(--main-bg-color);
color: var(--main-fg-color);
}
header {
font-family: monospace;
}
h1,
@ -17,18 +46,26 @@ h3 {
}
code:not(pre>code) {
color: #272822;
background: #eeeeee;
color: var(--code-fg-color);
background: var(--code-bg-color);
padding: 2px;
}
pre {
color: #FFFFFF;
background: #000000;
color: var(--main-bg-color);
background: var(--main-fg-color);
padding: 24px;
overflow-x: auto
}
a {
color: var(--link-fresh-color);
}
a:visited {
color: var(--link-stale-color);
}
article {
padding: 24px 0
}