Compare commits
14 Commits
works-with
...
main
Author | SHA1 | Date |
---|---|---|
tastytea | 3b6fd103ed | |
tastytea | 3ae78f860f | |
tastytea | 7b4b21ebc6 | |
tastytea | 74c3fc4a51 | |
tastytea | 2a08b25998 | |
tastytea | d82bdbfa52 | |
tastytea | 469bf0881b | |
tastytea | 21221ad721 | |
tastytea | 0a10286c19 | |
tastytea | 9ef05f0c16 | |
tastytea | 5c8b48fbc1 | |
tastytea | a9be36db94 | |
tastytea | f682b9da6f | |
tastytea | 940ef63cd5 |
23
README.md
23
README.md
|
@ -28,11 +28,15 @@ the
|
||||||
[archive](https://schlomp.space/tastytea/hugo-theme-nocolor/archive/main.tar.gz)
|
[archive](https://schlomp.space/tastytea/hugo-theme-nocolor/archive/main.tar.gz)
|
||||||
into `themes/nocolor`.
|
into `themes/nocolor`.
|
||||||
|
|
||||||
|
### Breaking changes:
|
||||||
|
|
||||||
|
- 2021-09-25: Don't automatically add RSS hyperlink.
|
||||||
|
|
||||||
## Configuration & Modification
|
## Configuration & Modification
|
||||||
|
|
||||||
Please take a look at the [configuration example for
|
Please take a look at the [configuration example for
|
||||||
Slick](https://github.com/spookey/slick/blob/master/_sites/example/config.toml). It
|
Slick](https://github.com/spookey/slick/blob/main/_sites/example/config.toml).
|
||||||
is valid for nocolor too, with these exceptions:
|
It is valid for nocolor too, with these exceptions:
|
||||||
|
|
||||||
* `favicon` and `css` have to be in in the assets folder.
|
* `favicon` and `css` have to be in in the assets folder.
|
||||||
|
|
||||||
|
@ -42,6 +46,10 @@ template `extra_head.html` or above the footer by overwriting
|
||||||
`layouts/partials/extra_head.html` or `layouts/partials/extra_foot.html`,
|
`layouts/partials/extra_head.html` or `layouts/partials/extra_foot.html`,
|
||||||
respectively.
|
respectively.
|
||||||
|
|
||||||
|
Maybe the [configuration file for my
|
||||||
|
blog](https://schlomp.space/tastytea/blog/src/branch/main/config.toml) is
|
||||||
|
helpful, too.
|
||||||
|
|
||||||
### Custom ARIA labels
|
### Custom ARIA labels
|
||||||
|
|
||||||
Some elements can't be labeled by default because we don't know what's going to
|
Some elements can't be labeled by default because we don't know what's going to
|
||||||
|
@ -49,8 +57,7 @@ be in it. Custom [ARIA
|
||||||
labels](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Navigation_Role)
|
labels](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Navigation_Role)
|
||||||
are supported for the top menu and the bottom menu.
|
are supported for the top menu and the bottom menu.
|
||||||
|
|
||||||
.`config.toml`
|
`config.toml`:
|
||||||
|
|
||||||
``` toml
|
``` toml
|
||||||
[params]
|
[params]
|
||||||
[params.aria]
|
[params.aria]
|
||||||
|
@ -63,8 +70,7 @@ are supported for the top menu and the bottom menu.
|
||||||
If you want source code highlighting with AsciiDoc, you'll need pygmentize from
|
If you want source code highlighting with AsciiDoc, you'll need pygmentize from
|
||||||
the package [pygments](https://pygments.org/). Set this in your config file:
|
the package [pygments](https://pygments.org/). Set this in your config file:
|
||||||
|
|
||||||
.`config.toml`
|
`config.toml`:
|
||||||
|
|
||||||
``` toml
|
``` toml
|
||||||
pygmentsCodefences = true
|
pygmentsCodefences = true
|
||||||
pygmentsCodeFencesGuessSyntax = false
|
pygmentsCodeFencesGuessSyntax = false
|
||||||
|
@ -80,7 +86,8 @@ pygmentize -f html -S <style> -a .highlight \
|
||||||
```
|
```
|
||||||
|
|
||||||
And add `:source-highlighter: pygments` at the top of your posts, below the
|
And add `:source-highlighter: pygments` at the top of your posts, below the
|
||||||
front matter. Make sure to include the generated CSS file.
|
front matter. Make sure to include the generated CSS file. You can also set the
|
||||||
|
`source-highlighter` attribute in your config file.[^1]
|
||||||
|
|
||||||
### Table of contents
|
### Table of contents
|
||||||
|
|
||||||
|
@ -97,3 +104,5 @@ blog.
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
See <https://schlomp.space/tastytea/hugo-theme-nocolor/src/branch/main/CONTRIBUTING.adoc>.
|
See <https://schlomp.space/tastytea/hugo-theme-nocolor/src/branch/main/CONTRIBUTING.adoc>.
|
||||||
|
|
||||||
|
[^1]: https://gohugo.io/content-management/formats/#external-helper-asciidoctor
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
html
|
html
|
||||||
{
|
{
|
||||||
font-family: serif;
|
font-family: serif;
|
||||||
|
hyphens: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea, pre, code
|
||||||
|
{
|
||||||
|
hyphens: manual;
|
||||||
}
|
}
|
||||||
|
|
||||||
body
|
body
|
||||||
|
@ -12,11 +18,11 @@ body
|
||||||
/* Minimum margin for small screens. */
|
/* Minimum margin for small screens. */
|
||||||
body>*
|
body>*
|
||||||
{
|
{
|
||||||
margin-left: 5px;
|
margin-left: 0.2em;
|
||||||
margin-right: 5px;
|
margin-right: 0.2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header
|
.header .title
|
||||||
{
|
{
|
||||||
font-size: 150%;
|
font-size: 150%;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
|
@ -28,9 +34,9 @@ body>*
|
||||||
content: " – ";
|
content: " – ";
|
||||||
}
|
}
|
||||||
|
|
||||||
.header .description
|
.nav-top
|
||||||
{
|
{
|
||||||
font-size: 75%;
|
margin-top: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav ul, .pagination ul
|
.nav ul, .pagination ul
|
||||||
|
@ -94,8 +100,7 @@ li > p
|
||||||
|
|
||||||
.admonitionblock
|
.admonitionblock
|
||||||
{
|
{
|
||||||
margin-bottom: 1em;
|
margin: 0.5em auto 0.5em 1em; /* trbl */
|
||||||
margin-left: 1em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.admonitionblock td
|
.admonitionblock td
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ default "en" .Site.LanguageCode }}">
|
<html lang="{{ default "en" .Lang }}">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>{{ if and (.Title) (not (eq .Title .Site.Title)) }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
|
<title>{{ if and (.Title) (not (eq .Title .Site.Title)) }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{- define "main" }}
|
{{- define "main" }}
|
||||||
<section aria-labelledby="nocolor_list">
|
<section class="list" aria-labelledby="nocolor_list">
|
||||||
<h1 id="nocolor_list">{{ .Title }}:</h1>
|
<h1 id="nocolor_list">{{ .Title }}:</h1>
|
||||||
<ul>
|
<ul>
|
||||||
{{- range .Paginator.Pages }}
|
{{- range .Paginator.Pages }}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<link>{{ .Permalink }}</link>
|
<link>{{ .Permalink }}</link>
|
||||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||||
<generator>Hugo {{ hugo.Version }} -- gohugo.io</generator>
|
<generator>Hugo {{ hugo.Version }} -- gohugo.io</generator>
|
||||||
{{- with .Site.LanguageCode }}
|
{{- with .Lang }}
|
||||||
<language>{{ . }}</language>
|
<language>{{ . }}</language>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Site.Author.email }}
|
{{- with .Site.Author.email }}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{- define "main" }}
|
{{- define "main" }}
|
||||||
<section aria-labelledby="nocolor_terms">
|
<section class="terms" aria-labelledby="nocolor_terms">
|
||||||
<h1 id="nocolor_terms">{{ .Title }}:</h1>
|
<h1 id="nocolor_terms">{{ .Title }}:</h1>
|
||||||
<ul>
|
<ul>
|
||||||
{{- range .Data.Terms.ByCount }}
|
{{- range .Data.Terms.ByCount }}
|
||||||
|
|
|
@ -3,18 +3,15 @@
|
||||||
<nav class="nav nav-bottom"{{- with .Site.Params.aria.menu_bottom }} aria-label="{{ . }}"{{- end }}>
|
<nav class="nav nav-bottom"{{- with .Site.Params.aria.menu_bottom }} aria-label="{{ . }}"{{- end }}>
|
||||||
<ul>
|
<ul>
|
||||||
{{- range .Site.Menus.footer }}
|
{{- range .Site.Menus.footer }}
|
||||||
<li>
|
{{ with .Pre }}{{ . }}{{ end }}
|
||||||
|
<li{{ with .Params.class }} class="{{ . }}"{{ end }}>
|
||||||
{{- if .URL }}
|
{{- if .URL }}
|
||||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
<a href="{{ .URL }}"{{ with .Title }} title="{{ . }}"{{ end }}>{{ .Name }}</a>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{ .Name }}
|
{{ .Name }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{ with .Post }}{{ . }}{{ end }}
|
||||||
{{- with .Site.Home.OutputFormats.Get "RSS" }}
|
|
||||||
<li>
|
|
||||||
<a href="{{ .RelPermalink }}">RSS</a>
|
|
||||||
</li>
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -3,19 +3,21 @@
|
||||||
{{- with .Site.Params.subtitle }}
|
{{- with .Site.Params.subtitle }}
|
||||||
<span class="description">{{ . }}</span>
|
<span class="description">{{ . }}</span>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
<nav class="nav nav-top"{{- with .Site.Params.aria.menu_top }} aria-label="{{ . }}"{{- end }}>
|
||||||
|
<ul>
|
||||||
|
{{- $curr := . }}
|
||||||
|
{{- range .Site.Menus.main }}
|
||||||
|
{{ with .Pre }}{{ . }}{{ end }}
|
||||||
|
<li{{ with .Params.class }} class="{{ . }}"{{ end }}>
|
||||||
|
{{- if .URL }}
|
||||||
|
<a href="{{ .URL }}"{{ with .Title }} title="{{ . }}"{{ end }}>{{ .Name }}</a>
|
||||||
|
{{- else }}
|
||||||
|
<li>{{ .Name }}</li>
|
||||||
|
{{- end }}
|
||||||
|
</li>
|
||||||
|
{{ with .Post }}{{ . }}{{ end }}
|
||||||
|
{{- end }}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<nav class="nav nav-top"{{- with .Site.Params.aria.menu_top }} aria-label="{{ . }}"{{- end }}>
|
|
||||||
<ul>
|
|
||||||
{{- $curr := . }}
|
|
||||||
{{- range .Site.Menus.main }}
|
|
||||||
{{- if .URL }}
|
|
||||||
<li>
|
|
||||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
|
||||||
</li>
|
|
||||||
{{- else }}
|
|
||||||
{{ .Name }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
Loading…
Reference in New Issue