Initial Commit
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.hugo_build.lock
|
5
archetypes/default.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
+++
|
||||
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
|
||||
date = {{ .Date }}
|
||||
draft = true
|
||||
+++
|
7
content/_index.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Ethan Marshall's Website
|
||||
|
||||
Hi! I am Ethan Marshall (also known as ``ejv2``) and you have reached my corner of the internet.
|
||||
|
||||
{{< figure src="/img/me.jpg" caption="Me on holiday in the Canaries - circa 2015" >}}
|
||||
|
||||
I spend most of my time writing software and building circuits, although more the latter nowadays. I quite like working with embedded micro-controllers (ESP32, Atmel, 3286) and I have some experience in PCB design.
|
BIN
content/contact/birth-of-steam.jpg
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
content/contact/ethan.gpg
Normal file
BIN
content/contact/frens.gif
Normal file
After Width: | Height: | Size: 205 KiB |
32
content/contact/index.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
+++
|
||||
title = 'Contact Me'
|
||||
draft = false
|
||||
+++
|
||||
|
||||
![frens!](frens.gif)
|
||||
|
||||
On the internet, I usually go as ``ejv2`` (as you could probably guess), but also ``ejmv2`` and ``ethan_v2``.
|
||||
|
||||
If you are wondering, these are just my initials.
|
||||
|
||||
Please feel free to email me at any time. To get my address, paste the following snippet in to your terminal. It should print my full email address. This filters most spammers and Windows users :)
|
||||
|
||||
```bash
|
||||
echo "ethan*ejv2-com-au" | tr '*-' '@.' | sed 's/com.au/cc/'
|
||||
```
|
||||
|
||||
My GPG key fingerprint is is ``32C6 7135 677E E71F 8BF1 F681 DF88 6452 F0AD D93A``. Test verifying [this message](https://gist.githubusercontent.com/ejv2/b1e860e96233c42a874d82028bb6a584/raw/e1cf6237f50dd61dea1f4f79968e393a59f58bd3/public_key_message_2024.txt).
|
||||
|
||||
If you are lazy download [here](https://ejv2.cc/contact/ethan.gpg), or run:
|
||||
|
||||
```bash
|
||||
curl "https://ejv2.cc/contact/ethan.gpg" | gpg --import
|
||||
```
|
||||
|
||||
I don't use Reddit, Twitter or any other bad platforms (which is basically all of them).
|
||||
|
||||
Although I do have some old social media accounts, they will pretty much all be inactive. The only service I regularly use is Steam, so feel free to add me on there or send me a message.
|
||||
|
||||
![birth of steam](birth-of-steam.jpg)
|
||||
|
||||
In any case, I appreciate you getting in touch!
|
8
content/credits.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
+++
|
||||
title = 'Site Credits'
|
||||
draft = false
|
||||
+++
|
||||
|
||||
This site is powered by [hugo](https://gohugo.io) with a modified version of the [risotto](https://github.com/joeroe/risotto) theme.
|
||||
|
||||
Thanks to [Luke Smith](https://lukesmith.xyz) for some ideas, as well as all the contributors to <https://landchad.net>.
|
8
content/post/_index.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
+++
|
||||
aliases = ["posts", "articles", "blog", "showcase", "docs"]
|
||||
title = "Blog"
|
||||
author = "Ethan Marshall"
|
||||
tags = ["index"]
|
||||
+++
|
||||
|
||||
This is a collection of my personal blog posts.
|
23
content/post/hello-world/index.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
+++
|
||||
title = 'Hello World'
|
||||
date = 2024-08-01T04:21:56+01:00
|
||||
author = 'Ethan Marshall'
|
||||
draft = true
|
||||
+++
|
||||
|
||||
Hello, world! This is my first testing post to see if this system will work. Nothing to see here!
|
||||
<!--more-->
|
||||
|
||||
**But,** whilst I'm here, I might as well do some describing of what this site is and where I will be taking it. Exciting stuff...
|
||||
|
||||
This site came about as a result of a complete re-design from the ground up of my website. My previous website was hosted under a different domain which now redirects here. It was powered entirely by WordPress with a metric tonne of plugins on the most feeble server known to man. This basically resulted in a very slow site with quite limited customization.
|
||||
|
||||
I decided to start again from scratch to give myself a bit more wiggle room. This is the result.
|
||||
|
||||
As this site evolves, it is likely that many things will change and break so get ready for that, I guess. I would suppose that not enough people read this anyway for any link rot or other poor administration to have sever effects.
|
||||
|
||||
In any case, hopefully this is the first of many good posts to come and I will keep them coming.
|
||||
|
||||
This is Ethan (ejv2) - signing off.
|
||||
|
||||
![signing off](signing-off.gif)
|
BIN
content/post/hello-world/signing-off.gif
Normal file
After Width: | Height: | Size: 169 KiB |
53
hugo.toml
Normal file
|
@ -0,0 +1,53 @@
|
|||
baseURL = 'https://ejv2.cc/'
|
||||
languageCode = 'en-gb'
|
||||
title = "ejv2"
|
||||
theme = 'risotto'
|
||||
copyright = 'Copyright (C) 2024 - Ethan Marshall'
|
||||
|
||||
sectionPagesMenu = "main"
|
||||
|
||||
[params]
|
||||
noindex = false
|
||||
|
||||
[params.theme]
|
||||
palette = "gruvbox-dark"
|
||||
|
||||
[params.about]
|
||||
title = "Ethan Marshall"
|
||||
description = "A generic computer programmer. I like C, Go and math."
|
||||
|
||||
[[params.socialLinks]]
|
||||
icon = "fa-brands fa-github"
|
||||
title = "GitHub"
|
||||
url = "https://github.com/ejv2"
|
||||
|
||||
[[params.socialLinks]]
|
||||
icon = "fa-brands fa-steam"
|
||||
title = "Steam"
|
||||
url = "https://steamcommunity.com/id/ejmv2"
|
||||
|
||||
[[params.socialLinks]]
|
||||
icon = "fa-solid fa-envelope"
|
||||
title = "Email"
|
||||
url = "/contact"
|
||||
|
||||
[[params.socialLinks]]
|
||||
icon = "fa-solid fa-rss"
|
||||
title = "RSS"
|
||||
url = "/blog/index.xml"
|
||||
|
||||
[menu]
|
||||
[[menu.main]]
|
||||
identifier = "contact"
|
||||
name = "Contact"
|
||||
url = "/contact/"
|
||||
weight = 10
|
||||
|
||||
[markup]
|
||||
|
||||
# Table of contents
|
||||
# Add toc = true to content front matter to enable
|
||||
[markup.tableOfContents]
|
||||
startLevel = 2
|
||||
endLevel = 3
|
||||
ordered = true
|
BIN
static/favicon.ico
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
static/img/me.jpg
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
static/img/setup.jpg
Normal file
After Width: | Height: | Size: 231 KiB |
19
themes/dead-simple/.gitignore
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Binaries for programs and plugins
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
|
||||
# Dependency directories (remove the comment below to include it)
|
||||
# vendor/
|
||||
|
||||
/exampleSite/public
|
||||
/exampleSite/resources
|
||||
/exampleSite/.hugo_build.lock
|
21
themes/dead-simple/LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2022 Gleb Buzin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
29
themes/dead-simple/README.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Hugo Dead Simple
|
||||
|
||||
Simple hugo theme designed to be dead easy on the reader.
|
||||
|
||||
General idea is to stay off of enshittifying trend: no icons, less whitespace, less colors, links are blue, etc...
|
||||
|
||||
<img src="https://raw.githubusercontent.com/barklan/hugo-dead-simple/main/images/screenshot.png"/>
|
||||
|
||||
## Features
|
||||
|
||||
- Auto light and dark themes
|
||||
- Fast without bullshit - minified, minimal vanilla css, images are lazy-loaded, system fonts, no CDNs, functional without js if Katex is not used
|
||||
- Site-wide search
|
||||
- Keyboard-friendly: `h` to home, `t` to tags, `i` to search, `Tab` to navigate posts and search
|
||||
- Dynamic wiki-style table of contents
|
||||
- Katex math (inline and block)
|
||||
- Info boxes
|
||||
- Attachments
|
||||
- Info boxes
|
||||
- Columns / Tabs
|
||||
- Copy buttons on code blocks
|
||||
- Mobile-friendly
|
||||
|
||||
[Example site, overview of features and configuration.](https://hugo-dead-simple.netlify.app/post/hugo-dead-simple/) \
|
||||
[Example site repo.](https://github.com/barklan/hugo-dead-simple-example)
|
||||
|
||||
## TODO
|
||||
|
||||
- https://gohugo.io/content-management/mathematics/ (recent hugo)
|
125
themes/dead-simple/assets/css/code.css
Normal file
|
@ -0,0 +1,125 @@
|
|||
@keyframes code-fade-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.highlight div,
|
||||
pre {
|
||||
background-color: var(--code-background);
|
||||
padding: 0.7em;
|
||||
overflow-x: auto;
|
||||
margin: 0px;
|
||||
border: 1px solid var(--code-border);
|
||||
border-radius: 3px 0 3px 3px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
margin: 0.8em 0;
|
||||
}
|
||||
|
||||
.highlight div pre {
|
||||
border: 0px;
|
||||
padding: 0px 5px;
|
||||
margin: 0px;
|
||||
box-shadow: 0px 0px 0px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: 'Source Code Pro', monospace;
|
||||
color: var(--code);
|
||||
|
||||
/* For Iosevka */
|
||||
/* font-stretch: expanded; */
|
||||
font-stretch: normal;
|
||||
|
||||
background: var(--code-background);
|
||||
border-radius: 5%;
|
||||
padding: 1px 4px;
|
||||
border: 1px solid var(--code-border);
|
||||
font-size: 0.920em;
|
||||
}
|
||||
|
||||
pre code {
|
||||
font-size: 0.900em;
|
||||
font-stretch: normal;
|
||||
|
||||
border: none;
|
||||
background: none;
|
||||
padding: 0;
|
||||
margin: 0px;
|
||||
tab-size: 4;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 760px) {
|
||||
pre code {
|
||||
font-size: 80%;
|
||||
}
|
||||
}
|
||||
|
||||
.fs95 {
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
.fs90 {
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
.fs85 {
|
||||
font-size: 85%;
|
||||
}
|
||||
|
||||
.fs80 {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
.fs75 {
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
.fs70 {
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
.fs50 {
|
||||
font-size: 50%;
|
||||
}
|
||||
|
||||
/* Line numbers in code blocks. */
|
||||
.ln {
|
||||
user-select: none;
|
||||
margin-right: 14px;
|
||||
color: rgb(150, 150, 150);
|
||||
}
|
||||
|
||||
.hl {
|
||||
background-color: var(--code-hl);
|
||||
outline-style: solid;
|
||||
outline-color: var(--code-hl);
|
||||
outline-width: 0.5px;
|
||||
}
|
||||
|
||||
/* Copy code button */
|
||||
.copy-code-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 760px) {
|
||||
.copy-code-button {
|
||||
animation-duration: 1s;
|
||||
animation-name: code-fade-in;
|
||||
margin-top: -22px;
|
||||
float: right;
|
||||
display: block;
|
||||
background-color: var(--code-background);
|
||||
border-color: var(--code-border);
|
||||
border-style: solid;
|
||||
border-width: 1px 1px 0 1px;
|
||||
border-radius: 2px 2px 0 0;
|
||||
color: var(--text-dim);
|
||||
}
|
||||
}
|
85
themes/dead-simple/assets/css/images.css
Normal file
|
@ -0,0 +1,85 @@
|
|||
@keyframes images {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
max-height: 70vh;
|
||||
margin: 0.8em 0;
|
||||
animation-duration: 1s;
|
||||
animation-name: images;
|
||||
}
|
||||
|
||||
.imgp {
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.imgp img,
|
||||
figure img
|
||||
{
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
color: var(--text-dim);
|
||||
font-size: 0.96rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
figcaption h4 {
|
||||
margin-top: 0px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
img,
|
||||
iframe,
|
||||
video {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* Image gallery. */
|
||||
.image-gallery, .image-gallery-img {
|
||||
list-style-type: none;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.image-gallery {
|
||||
margin: 0 0 1.2rem 0;
|
||||
}
|
||||
|
||||
.image-gallery-img {
|
||||
margin: 0 0 2.6rem 0;
|
||||
}
|
||||
|
||||
.image-gallery > li, .image-gallery-img > li {
|
||||
flex-basis: 440px;
|
||||
}
|
||||
|
||||
.image-gallery li img,
|
||||
.image-gallery-img li img
|
||||
{
|
||||
object-fit: cover;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
border-radius: 4px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.three-image-gallery > li {
|
||||
flex-basis: 290px;
|
||||
}
|
216
themes/dead-simple/assets/css/main.css
Normal file
|
@ -0,0 +1,216 @@
|
|||
:root {
|
||||
--complimentary: #815205;
|
||||
--text: black;
|
||||
--code: black;
|
||||
--text-dim: #444;
|
||||
--link: #3366cc;
|
||||
--link-visited: #795cb2;
|
||||
--code-background: #f3f5f7;
|
||||
--code-border: #eaecf0;
|
||||
--code-border: transparent;
|
||||
--code-hl: #e6e6e6;
|
||||
--border-general: #cccfd4;
|
||||
--table-th: #e1e5ea;
|
||||
--table-tr: #edeff2;
|
||||
--toc-background: #f9f9f9;
|
||||
--toc-border: #aaa;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--complimentary: #815205;
|
||||
--text: #d8d8d8;
|
||||
--code: #cbcbcb;
|
||||
--text-dim: #a7a7a7;
|
||||
/* --link: #8cb4ff; */
|
||||
--link: #88a9e9;
|
||||
--link-visited: #a390ca;
|
||||
--code-background: #272727;
|
||||
--code-border: transparent;
|
||||
--code-hl: #5a5a5a;
|
||||
--border-general: #495057;
|
||||
--table-th: #414141;
|
||||
--table-tr: #343434;
|
||||
--toc-background: #343434;
|
||||
--toc-border: #495057;
|
||||
}
|
||||
}
|
||||
|
||||
#gitinfo-date {
|
||||
color: var(--text-dim);
|
||||
filter: opacity(40%);
|
||||
font-style: italic;
|
||||
font-size: 0.9em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 760px) {
|
||||
#gitinfo-date {
|
||||
margin-left: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: add iframe margins */
|
||||
|
||||
/* HTML & BODY */
|
||||
html {
|
||||
color: var(--text);
|
||||
/* set in header*/
|
||||
/* background-color: var(--background); */
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: auto;
|
||||
padding: 0em 1em 2em 1em;
|
||||
font-family:
|
||||
"Inter",
|
||||
-apple-system,
|
||||
BlinkMacSystemFont,
|
||||
"Roboto",
|
||||
Helvetica,
|
||||
sans-serif;
|
||||
line-height: 1.54;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 760px) {
|
||||
body {
|
||||
margin: auto;
|
||||
max-width: 68vw;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1150px) {
|
||||
body {
|
||||
margin: auto;
|
||||
max-width: 62vw;
|
||||
}
|
||||
}
|
||||
|
||||
main {
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
/* BASIC HTML ELEMENTS */
|
||||
p {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-weight: normal;
|
||||
margin-bottom: 0px;
|
||||
font-size: 2em;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
border-bottom: 1px solid;
|
||||
border-color: var(--text-dim);
|
||||
margin-bottom: 0.5em;
|
||||
margin-top: 1.2em;
|
||||
font-weight: normal;
|
||||
font-size: 1.65em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.25em;
|
||||
font-weight: 600;
|
||||
margin-bottom: 0.7em;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.1em;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
font-style: oblique;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: var(--link);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: var(--link-visited);
|
||||
}
|
||||
|
||||
hr {
|
||||
border-style: dashed;
|
||||
color: var(--text-dim);
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-left: 0.3rem solid var(--complimentary);
|
||||
font-style: oblique;
|
||||
margin: 1.6rem 0;
|
||||
padding: 0 1.4rem 0 1rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
blockquote p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
details {
|
||||
padding: 0 0 0 14px;
|
||||
border-left: 2px dashed var(--border-general);
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0 2px 0 2px;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 2rem;
|
||||
}
|
||||
|
||||
/* NOTE: fix for Inter font. */
|
||||
strong {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* NOTE: fix for Inter font. */
|
||||
th {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* MISC */
|
||||
.section-title {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.post-list {
|
||||
color: var(--complimentary);
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 760px) {
|
||||
.post-list {
|
||||
max-width: 60vw;
|
||||
}
|
||||
}
|
||||
|
||||
.bold-post-in-list {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 760px) {
|
||||
.katex {
|
||||
font-size: 1.05em !important;
|
||||
}
|
||||
}
|
||||
|
||||
.footnotes {
|
||||
margin-top: 60px;
|
||||
}
|
||||
|
||||
.terms {
|
||||
padding-left: 16px;
|
||||
}
|
25
themes/dead-simple/assets/css/menu.css
Normal file
|
@ -0,0 +1,25 @@
|
|||
.menu {
|
||||
padding: 0px 4px 0px 0px;
|
||||
z-index: 9999;
|
||||
text-align: left;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.menu li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.menu a {
|
||||
margin-right: 1.1em;
|
||||
text-decoration: none;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.menu a:visited {
|
||||
color: var(--link);
|
||||
}
|
||||
|
||||
.menu a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
73
themes/dead-simple/assets/css/misc.css
Normal file
|
@ -0,0 +1,73 @@
|
|||
/* ATTACHMENTS */
|
||||
.attachments-files {
|
||||
display: block;
|
||||
font-size: 1rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.attachment-size {
|
||||
display: inline-block;
|
||||
color: var(--text-dim);
|
||||
}
|
||||
|
||||
.attachments ul {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.attachments label {
|
||||
font-weight: 300;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* COLUMNS */
|
||||
.md-columns {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-left: -1rem;
|
||||
margin-right: -1rem;
|
||||
}
|
||||
|
||||
.md-columns > div {
|
||||
flex: 1 1;
|
||||
margin: 1rem 0;
|
||||
min-width: 100px;
|
||||
max-width: 100%;
|
||||
padding: 0 1rem;
|
||||
}
|
||||
|
||||
.md-columns .markdown-inner {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* TABS */
|
||||
.md-tabs {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
border: 1px solid var(--border-general);
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.md-tabs label {
|
||||
display: inline-block;
|
||||
padding: 0.6rem 0.2rem 0.3rem 0.2rem;
|
||||
border-bottom: 1px transparent;
|
||||
cursor: pointer;
|
||||
}
|
||||
.md-tabs .md-tabs-content {
|
||||
order: 999;
|
||||
width: 100%;
|
||||
border-top: 1px solid var(--border-general);
|
||||
padding: 0.5rem 1rem 1rem 1rem;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.md-tabs input[type="radio"] {
|
||||
margin-left: 1.1rem;
|
||||
}
|
||||
|
||||
.md-tabs input[type="radio"]:checked + label + .md-tabs-content {
|
||||
display: block;
|
||||
}
|
50
themes/dead-simple/assets/css/post_meta.css
Normal file
|
@ -0,0 +1,50 @@
|
|||
/* POST META */
|
||||
#single-header {
|
||||
/* border-bottom: 2px solid var(--complimentary); */
|
||||
padding: 0px 8px 4px 0;
|
||||
margin-bottom: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.date {
|
||||
color: var(--text-dim);
|
||||
padding-top: 0.1em;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
#single-meta {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0px;
|
||||
padding-top: 0px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
#single-meta a:visited {
|
||||
color: var(--link);
|
||||
}
|
||||
|
||||
#subtitle {
|
||||
font-family: "Linux Libertine", "Georgia", "Times", serif;
|
||||
margin-top: -8px;
|
||||
margin-bottom: 0.3em;
|
||||
font-size: 1.4em;
|
||||
color: var(--text-dim);
|
||||
}
|
||||
|
||||
.datesub {
|
||||
font-weight: normal;
|
||||
color: var(--text-dim);
|
||||
}
|
||||
|
||||
#tags {
|
||||
font-weight: normal;
|
||||
color: var(--text-dim);
|
||||
}
|
||||
|
||||
#tags a {
|
||||
filter: brightness(80%);
|
||||
}
|
||||
|
||||
#tags a:visited {
|
||||
filter: brightness(80%);
|
||||
}
|
28
themes/dead-simple/assets/css/search.css
Normal file
|
@ -0,0 +1,28 @@
|
|||
/* SEARCH */
|
||||
#search-input {
|
||||
padding: 6px;
|
||||
width: 72%;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 900px) {
|
||||
#search-input {
|
||||
width: 42%;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1150px) {
|
||||
#search-input {
|
||||
width: 33%;
|
||||
}
|
||||
}
|
||||
|
||||
input {
|
||||
background-color: var(--background);
|
||||
color: var(--text);
|
||||
border-color: var(--border-general);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#results {
|
||||
padding-left: 16px;
|
||||
}
|
33
themes/dead-simple/assets/css/tables.css
Normal file
|
@ -0,0 +1,33 @@
|
|||
/* TABLES */
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
display: block;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 760px) {
|
||||
table {
|
||||
display: table !important;
|
||||
}
|
||||
}
|
||||
|
||||
table thead th {
|
||||
border: 1px solid var(--border-general);
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
padding: 4px 8px;
|
||||
border: 1px solid rgb(200, 200, 200);
|
||||
border: 1px solid var(--border-general);
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: var(--table-th);
|
||||
}
|
||||
|
||||
tr {
|
||||
background-color: var(--table-tr);
|
||||
}
|
||||
|
||||
|
98
themes/dead-simple/assets/css/toc.css
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* TOC */
|
||||
.toc a {
|
||||
color: var(--text-dim);
|
||||
}
|
||||
|
||||
.toc a:visited {
|
||||
color: var(--text-dim);
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1150px) {
|
||||
#tableOfContentContainer {
|
||||
position: fixed;
|
||||
left: 20px;
|
||||
top: 46px;
|
||||
max-width: 15vw;
|
||||
width: 15vw;
|
||||
}
|
||||
|
||||
#TableOfContents {
|
||||
opacity: 0.6;
|
||||
transition-duration: 1s;
|
||||
}
|
||||
|
||||
#TableOfContents:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.toc {
|
||||
animation-duration: 1s;
|
||||
background: var(--toc-background) none repeat scroll 0 0;
|
||||
border: 1px solid var(--toc-border);
|
||||
display: table;
|
||||
font-size: 95%;
|
||||
margin-bottom: 1em;
|
||||
padding: 0.4em 1.5em 0.4em 0.2em;
|
||||
width: auto;
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1150px) {
|
||||
.toc {
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
font-size: 80%;
|
||||
line-height: 1.3;
|
||||
border-right: 0px;
|
||||
border-top: 0px;
|
||||
border-bottom: 0px;
|
||||
border-left: 0px;
|
||||
}
|
||||
|
||||
#TableOfContents {
|
||||
max-height: 85vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
#TableOfContents li {
|
||||
max-width: 13vw;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
/* !important was here for some reason. */
|
||||
.toc li,
|
||||
.toc ul,
|
||||
.toc ul li {
|
||||
list-style: outside none none;
|
||||
}
|
||||
|
||||
.toc ul li a {
|
||||
transition-duration: 50ms;
|
||||
}
|
||||
|
||||
.active-toc {
|
||||
font-weight: bold;
|
||||
transition-duration: 50ms;
|
||||
}
|
||||
|
||||
/* h2 in toc has 20px padding and h1 should be the title and shouldn't be present in toc */
|
||||
@media screen and (min-width: 1150px) {
|
||||
#TableOfContents {
|
||||
margin-left: -32px;
|
||||
}
|
||||
}
|
||||
|
||||
#TableOfContents ul {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.toc h3 {
|
||||
margin-left: 20px;
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
font-weight: normal;
|
||||
}
|
3
themes/dead-simple/go.mod
Normal file
|
@ -0,0 +1,3 @@
|
|||
module github.com/barklan/hugo-dead-simple
|
||||
|
||||
go 1.18
|
BIN
themes/dead-simple/images/screenshot.png
Normal file
After Width: | Height: | Size: 480 KiB |
BIN
themes/dead-simple/images/tn.png
Normal file
After Width: | Height: | Size: 492 KiB |
5
themes/dead-simple/layouts/404.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
404 NOT FOUND
|
||||
|
||||
{{ partial "footer.html" . }}
|
|
@ -0,0 +1,3 @@
|
|||
<p class="imgp">
|
||||
<img loading="lazy" src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} />
|
||||
</p>
|
|
@ -0,0 +1 @@
|
|||
<a href="{{ .Destination | safeURL }}" {{ with .Title}}title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noreferrer nofollow"{{ end }}>{{ .Text | safeHTML }}</a>
|
15
themes/dead-simple/layouts/_default/index.json
Normal file
|
@ -0,0 +1,15 @@
|
|||
{{/* layouts/_default/index.json */}}
|
||||
{{- $index := slice -}}
|
||||
{{- range where .Site.RegularPages.ByDate.Reverse "Type" "not in" (slice "page" "json") -}}
|
||||
{{ if .Params.dateCreated }}
|
||||
{{ $.Scratch.Set "date" (.Params.dateCreated) }}
|
||||
{{ else }}
|
||||
{{- if isset site.Params "date_format" -}}
|
||||
{{- $.Scratch.Set "date" (.Date.Format site.Params.date_format) -}}
|
||||
{{- else -}}
|
||||
{{- $.Scratch.Set "date" (.Date.Format "2006-01-02") -}}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
{{- $index = $index | append (dict "title" ( .Title | plainify ) "permalink" .Permalink "contents" .Plain "section" (i18n (.Section | title)) "tags" (apply .Params.tags "i18n" "." ) "categories" (apply .Params.categories "i18n" "." ) "summary" (.Params.summary | markdownify | htmlUnescape | plainify) "date" ($.Scratch.Get "date") ) -}}
|
||||
{{- end -}}
|
||||
{{- $index | jsonify -}}
|
20
themes/dead-simple/layouts/_default/list.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
<div class="home-content">{{ .Content }}</div>
|
||||
|
||||
{{ if .IsHome }}
|
||||
<!--TODO: replace with faster search-->
|
||||
{{ partial "search-form.html" . }}
|
||||
<ul id="results"></ul>
|
||||
|
||||
{{ range .Sections }}
|
||||
<h2 class="section-title">{{ .CurrentSection.Title }}</h2>
|
||||
{{ .CurrentSection.Content }}
|
||||
{{ partial "post_list.html" . }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<h2 class="section-title">{{ .CurrentSection.Title }}</h2>
|
||||
{{ partial "post_list.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "footer.html" . }}
|
43
themes/dead-simple/layouts/_default/single.html
Normal file
|
@ -0,0 +1,43 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
|
||||
{{ if not .Params.notitle }}
|
||||
<div id="single-header">
|
||||
<h1>
|
||||
{{ .Title | markdownify }}
|
||||
</h1>
|
||||
<div id="single-meta">
|
||||
{{ if .Params.subtitle }}
|
||||
<p id="subtitle">{{ .Params.subtitle }}</p>
|
||||
{{ end }}
|
||||
{{ if .Params.date }}
|
||||
<span class="datesub">{{ .Date.Format "Jan 2, 2006" }}{{ if .GitInfo }} m. {{
|
||||
.Lastmod.Format "Jan 2, 2006" }}{{ end }}</span>
|
||||
{{ end }} {{ partial "tags.html" .}}
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
<div style="padding-bottom: 1px;"></div>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.toc }}
|
||||
<aside class="hidden lg:block toc " id="tableOfContentContainer">
|
||||
{{ .TableOfContents }}
|
||||
</aside>
|
||||
{{ end }}
|
||||
|
||||
|
||||
<main>{{ .Content }}</main>
|
||||
|
||||
{{ if .Params.Next }}
|
||||
<br>
|
||||
<hr>
|
||||
{{ with .PrevInSection }}
|
||||
Next: <a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.math }}
|
||||
{{ partial "math.html" . }}
|
||||
{{ end }}
|
||||
{{ partial "footer.html" . }}
|
13
themes/dead-simple/layouts/_default/taxonomy.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
<h1>{{ .Title }}</h1>
|
||||
<ul class="post-list">
|
||||
{{ range .Pages }}
|
||||
|
||||
{{ partial "post_row.html" . }}
|
||||
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
|
||||
{{ partial "footer.html" . }}
|
13
themes/dead-simple/layouts/_default/terms.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
<ul class="terms">
|
||||
{{ range .Data.Terms }}
|
||||
<li>
|
||||
<a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a> - {{ .Count }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
{{ partial "footer.html" . }}
|
9
themes/dead-simple/layouts/partials/footer.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<br>
|
||||
|
||||
<footer>
|
||||
{{ partial "footer_scripts.html" . }}
|
||||
{{ partial "search-index.html" . }}
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
127
themes/dead-simple/layouts/partials/footer_scripts.html
Normal file
|
@ -0,0 +1,127 @@
|
|||
<!-- Shortcuts. -->
|
||||
<script defer>
|
||||
document.addEventListener("keydown", function (e) {
|
||||
if (document.activeElement.isContentEditable) {
|
||||
return false;
|
||||
}
|
||||
if (document.activeElement.tagName == "INPUT") {
|
||||
return false;
|
||||
}
|
||||
if (e.altKey || e.ctrlKey || e.shiftKey) {
|
||||
return false;
|
||||
}
|
||||
var key = e.key;
|
||||
if (key === "h") {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
window.location.href = "/";
|
||||
} else if (key === "t") {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
window.location.href = `https://${location.hostname}/tags`;
|
||||
} else if (key === "i") {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
const inputs = document.querySelectorAll("input");
|
||||
for (let i = 0; i < inputs.length; i++) {
|
||||
if (inputs[i].offsetParent !== null) {
|
||||
inputs[i].selectionStart = inputs[i].selectionEnd =
|
||||
inputs[i].value.length;
|
||||
inputs[i].focus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- Dynamic toc. -->
|
||||
<script defer>
|
||||
function throttle(fn, wait) {
|
||||
var time = Date.now();
|
||||
return function () {
|
||||
var now = Date.now()
|
||||
if (time + wait - now < 0) {
|
||||
fn();
|
||||
time = now;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function scrollHandler() {
|
||||
const anchors = Array.from(document.querySelectorAll("body h2, body h3"));
|
||||
|
||||
function scrollCallback() {
|
||||
var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
||||
|
||||
// Highlight the last scrolled-to: set everything inactive first
|
||||
for (var i = 0; i < anchors.length; i++) {
|
||||
var anchorId = anchors[i].getAttribute("id");
|
||||
var link = document.querySelector(
|
||||
'nav ul li a[href="#' + anchorId + '"]',
|
||||
);
|
||||
if (link) {
|
||||
link.classList.remove("active-toc");
|
||||
}
|
||||
}
|
||||
|
||||
// Then iterate backwards, on the first match highlight it and break
|
||||
for (var i = anchors.length - 1; i >= 0; i--) {
|
||||
var offsetTop = anchors[i].offsetTop;
|
||||
if (scrollTop > offsetTop - 75) {
|
||||
var anchorId = anchors[i].getAttribute("id");
|
||||
var link = document.querySelector(
|
||||
'nav ul li a[href="#' + anchorId + '"]',
|
||||
);
|
||||
if (link) {
|
||||
link.classList.add("active-toc");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener(
|
||||
"scroll",
|
||||
throttle(scrollCallback, 300),
|
||||
);
|
||||
}
|
||||
setTimeout(scrollHandler, 100);
|
||||
</script>
|
||||
|
||||
<script defer>
|
||||
function addCopyButtonToCodeBlocks() {
|
||||
// Get all code blocks with a class of "language-*"
|
||||
const codeBlocks = document.querySelectorAll('code[class^="language-"]');
|
||||
|
||||
codeBlocks.forEach((codeBlock) => {
|
||||
const copyButton = document.createElement("button");
|
||||
copyButton.classList.add("copy-code-button");
|
||||
copyButton.innerHTML = "copy";
|
||||
|
||||
// Add a click event listener to the copy button
|
||||
copyButton.addEventListener("click", () => {
|
||||
// Copy the code inside the code block to the clipboard
|
||||
const elements = codeBlock.querySelectorAll(".cl");
|
||||
let codeToCopy = "";
|
||||
elements.forEach((element) => {
|
||||
codeToCopy += element.innerText;
|
||||
});
|
||||
navigator.clipboard.writeText(codeToCopy);
|
||||
|
||||
// Update the copy button text to indicate that the code has been copied
|
||||
copyButton.innerHTML = "copied!";
|
||||
setTimeout(() => {
|
||||
copyButton.innerHTML = "copy";
|
||||
}, 1500);
|
||||
});
|
||||
|
||||
// Add the copy button to the code block
|
||||
codeBlock.parentNode.before(copyButton);
|
||||
});
|
||||
}
|
||||
setTimeout(function () {
|
||||
addCopyButtonToCodeBlocks();
|
||||
}, 100);
|
||||
</script>
|
74
themes/dead-simple/layouts/partials/header.html
Normal file
|
@ -0,0 +1,74 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<meta http-equiv="cache-control" content="max-age=0" />
|
||||
<meta http-equiv="cache-control" content="no-cache" />
|
||||
<meta http-equiv="expires" content="0" />
|
||||
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
|
||||
<meta http-equiv="pragma" content="no-cache" />
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ relURL "apple-touch-icon.png" }}"}>
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ relURL "favicon-32x32.png" }}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ relURL "favicon-16x16.png" }}">
|
||||
<link rel="manifest" href="{{ relURL "site.webmanifest" }}">
|
||||
|
||||
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff" />
|
||||
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1b1b1b" />
|
||||
|
||||
<meta name="description" content="{{ .Title }}">
|
||||
|
||||
{{ with .OutputFormats.Get "rss" -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
|
||||
{{ if .IsHome }}
|
||||
<title>{{ .Site.Title }}</title>
|
||||
{{ else }}
|
||||
<title>{{ .Title }} | {{ .Site.Title }}</title>
|
||||
{{ end }}
|
||||
|
||||
<!-- Prevent flicker on page load. -->
|
||||
<style>
|
||||
:root {
|
||||
--background: #ffffff;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--background: #1b1b1b;
|
||||
}
|
||||
}
|
||||
html {
|
||||
background-color: var(--background);
|
||||
}
|
||||
body {
|
||||
background-color: var(--background);
|
||||
}
|
||||
</style>
|
||||
|
||||
{{ $CSS := slice
|
||||
(resources.Get "css/main.css")
|
||||
(resources.Get "css/menu.css")
|
||||
(resources.Get "css/toc.css")
|
||||
(resources.Get "css/images.css")
|
||||
(resources.Get "css/post_meta.css")
|
||||
(resources.Get "css/search.css")
|
||||
(resources.Get "css/code.css")
|
||||
(resources.Get "css/tables.css")
|
||||
(resources.Get "css/misc.css")
|
||||
| resources.Concat "style.css" | minify | fingerprint }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ $CSS.RelPermalink }}" media="all">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{ if not .Params.nomenu }}
|
||||
<nav>
|
||||
<ul class="menu">
|
||||
{{ range .Site.Menus.main }}
|
||||
<li><a tabindex="-1" class="menu-link" href="{{ .URL | relURL }}">{{ safeHTML .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
{{ end }}
|
3
themes/dead-simple/layouts/partials/math.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/contrib/auto-render.min.js" crossorigin="anonymous" referrerpolicy="no-referrer" onload="renderMathInElement(document.body);"></script>
|
8
themes/dead-simple/layouts/partials/post_list.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<ul class="post-list">
|
||||
{{ range .CurrentSection.RegularPages }}
|
||||
|
||||
{{ partial "post_row.html" . }}
|
||||
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
23
themes/dead-simple/layouts/partials/post_row.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
<li>
|
||||
{{ if not .CurrentSection.Params.nodate }}
|
||||
<div style="display: grid; grid-template-columns: 7em auto">
|
||||
<span class="date">{{ .Date.Format "Jan 2, 2006" }}</span>
|
||||
{{ if .Params.bold }}
|
||||
<a class="bold-post-in-list" href="{{ .RelPermalink }}"
|
||||
>{{ .Page.Title | markdownify }}</a
|
||||
>
|
||||
{{ else }}
|
||||
<a href="{{ .RelPermalink }}">{{ .Page.Title | markdownify }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ if .Params.bold }}
|
||||
<a class="bold-post-in-list" href="{{ .RelPermalink }}"
|
||||
>{{ .Page.Title | markdownify }}</a
|
||||
>
|
||||
{{ else }}
|
||||
<a href="{{ .RelPermalink }}">{{ .Page.Title | markdownify }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</li>
|
||||
|
8
themes/dead-simple/layouts/partials/search-form.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<form id="search"
|
||||
action='{{ with .GetPage "/" }}{{.Permalink}}{{end}}' method="get">
|
||||
<label hidden for="search-input">Search site</label>
|
||||
<input tabindex="-1" type="text" id="search-input" name="query"
|
||||
placeholder="search [i] ...">
|
||||
<!-- <input tabindex="-1" type="submit" value="search"> -->
|
||||
</form>
|
||||
|
14
themes/dead-simple/layouts/partials/search-index.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<script>
|
||||
window.store = {
|
||||
{{ range .Site.Pages }}
|
||||
"{{ .Permalink }}": {
|
||||
"title": "{{ .Title }}",
|
||||
"tags": [{{ range .Params.Tags }}"{{ . }}",{{ end }}],
|
||||
"content": {{ .Content | plainify }}, // Strip out HTML tags
|
||||
"url": "{{ .Permalink }}"
|
||||
},
|
||||
{{ end }}
|
||||
}
|
||||
</script>
|
||||
<script defer src="{{ relURL "/js/lunr.js" }}"></script>
|
||||
<script defer src="{{ relURL "/js/search.js" }}"></script>
|
11
themes/dead-simple/layouts/partials/tags.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{{ $taxonomy := "tags" }} {{ with .Param $taxonomy }}
|
||||
<span id="tags">
|
||||
|
||||
{{ range $index, $tag := . }} {{ with $.Site.GetPage (printf "/%s/%s"
|
||||
$taxonomy $tag) -}}
|
||||
<span>
|
||||
<a href="{{ .Permalink }}">#{{ $tag | urlize }}</a>
|
||||
</span>
|
||||
{{- end -}} {{- end -}}
|
||||
</span>
|
||||
{{ end }}
|
24
themes/dead-simple/layouts/shortcodes/attachments.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
<section class="attachments">
|
||||
<label>{{- (.Get "title") | default "Attachments" -}}{{ with (.Get "caption") }} ({{- . -}}){{ end }}</label>
|
||||
<div class="attachments-files">
|
||||
{{- $folderName := default "files" (.Get "folder") -}}
|
||||
{{- $hasPattern := false -}}
|
||||
{{- if .Get "pattern" -}}{{- $hasPattern = true -}}{{- end -}}
|
||||
{{- $folder := path.Join "content" (path.Join .Page.File.Dir $folderName) -}}
|
||||
<ul>
|
||||
{{- range readDir $folder -}}
|
||||
{{- $include := not $hasPattern -}}
|
||||
{{- if $hasPattern -}}{{- $include = findRE ($.Get "pattern") .Name -}}{{- end -}}
|
||||
{{- if $include -}}
|
||||
<li>
|
||||
<a class="tooltipped tooltipped-n" aria-label="Download" href="{{ ($.Page.Resources.GetMatch (path.Join $folderName .Name)).RelPermalink }}" download>{{- .Name | markdownify -}}</a>
|
||||
<a class="new-tab tooltipped tooltipped-n" aria-label="Open in new tab" href="{{ ($.Page.Resources.GetMatch (path.Join $folderName .Name)).RelPermalink }}" target="_blank">🔗</a>
|
||||
|
||||
<div class="attachment-size">({{- if le .Size 1024 -}}{{- .Size -}} b{{- else -}}{{- div .Size 1024 -}}kb{{- end -}})</div>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
42
themes/dead-simple/layouts/shortcodes/beauty.html
Normal file
|
@ -0,0 +1,42 @@
|
|||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300&display=swap" rel="stylesheet">
|
||||
|
||||
<link href="/fonts/iosevka-extendedlight.woff2" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: 'Iosevka Web';
|
||||
font-display: swap;
|
||||
font-weight: 300;
|
||||
font-stretch: expanded;
|
||||
font-style: normal;
|
||||
src: url('/fonts/iosevka-extendedlight.woff2') format('woff2');
|
||||
}
|
||||
|
||||
h1, h2 {
|
||||
font-family: 'Space Grotesk', sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
text-align: justify;
|
||||
|
||||
font-family: 'Space Grotesk', sans-serif;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: 'Iosevka Web', sans-serif;
|
||||
font-weight: 300;
|
||||
font-stretch: expanded;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre code {
|
||||
font-family: 'Iosevka Web', sans-serif;
|
||||
font-weight: 300;
|
||||
font-stretch: expanded;
|
||||
font-style: normal;
|
||||
font-size: 13.5px;
|
||||
}
|
||||
</style>
|
120
themes/dead-simple/layouts/shortcodes/box.html
Normal file
|
@ -0,0 +1,120 @@
|
|||
{{/* Source:https://gitlab.com/Roneo/hugo-shortcode-roneo-collection */}}
|
||||
|
||||
{{/* Available box types: warning, info, important, tip */}}
|
||||
{{- $boxType := .Get 0 | default "info" -}}
|
||||
|
||||
{{/* Workaround markdownify inconsistency for single/multiple paragraphs */}}
|
||||
{{- $raw := (markdownify .Inner | chomp) -}}
|
||||
{{- $block := findRE "(?is)^<(?:address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h(?:1|2|3|4|5|6)|header|hgroup|hr|li|main|nav|noscript|ol|output|p|pre|section|table|tfoot|ul|video)\\b" $raw 1 -}}
|
||||
|
||||
{{/* Count how many times we've called this shortcode and load the css if it's the first time */}}
|
||||
{{- if not ($.Page.Scratch.Get "box_count") -}}
|
||||
|
||||
<style type="text/css">
|
||||
.box-shortcode {
|
||||
padding: 1.2em;
|
||||
padding-top: 1em;
|
||||
line-height: 1em;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 2em;
|
||||
border-radius: 3px;
|
||||
color: var(--text);
|
||||
background: #f3ebe850;
|
||||
}
|
||||
|
||||
.box-title {
|
||||
margin: -18px -18px 12px;
|
||||
padding: 4px 18px;
|
||||
border-radius: 3px 3px 0 0;
|
||||
font-weight: 700;
|
||||
color: var(--text);
|
||||
background: #6ab0de;
|
||||
}
|
||||
.box-shortcode.warning .box-title {
|
||||
background: #ff6b6b;
|
||||
}
|
||||
.box-shortcode.warning {
|
||||
background: #ff6b6b4f;
|
||||
}
|
||||
.box-shortcode.info .box-title {
|
||||
background: #0089e488;
|
||||
}
|
||||
.box-shortcode.info {
|
||||
background: #0089e41c;
|
||||
}
|
||||
.box-shortcode.important .box-title {
|
||||
background: #f7ec2c;
|
||||
}
|
||||
.box-shortcode.important {
|
||||
background: #f7ec2c7d;
|
||||
}
|
||||
.box-shortcode.tip .box-title {
|
||||
background: #a3ffa34d;
|
||||
}
|
||||
.box-shortcode.tip {
|
||||
background: #a3ffa34d;
|
||||
}
|
||||
.icon-box {
|
||||
display: inline-flex;
|
||||
align-self: center;
|
||||
margin-right: 8px;
|
||||
}
|
||||
.icon-box img,
|
||||
.icon-box svg {
|
||||
height: 1em;
|
||||
width: 1em;
|
||||
fill: var(--text-dim);
|
||||
}
|
||||
.icon-box img,
|
||||
.icon-box.baseline svg {
|
||||
top: 0.125em;
|
||||
position: relative;
|
||||
}
|
||||
.box-shortcode p {
|
||||
margin-bottom: 0.6em;
|
||||
}
|
||||
.box-shortcode p:first-of-type {
|
||||
display: inline;
|
||||
}
|
||||
.box-shortcode p:nth-of-type(2) {
|
||||
margin-top: 0.6em;
|
||||
}
|
||||
.box-shortcode p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
{{/* SVG icons */}}
|
||||
<svg width="0" height="0" display="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<symbol id="tip-box" viewBox="0 0 512 512" preserveAspectRatio="xMidYMid meet">
|
||||
<path
|
||||
d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"/>
|
||||
</symbol>
|
||||
<symbol id="important-box" viewBox="0 0 512 512" preserveAspectRatio="xMidYMid meet">
|
||||
<path
|
||||
d="M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"/>
|
||||
</symbol>
|
||||
<symbol id="warning-box" viewBox="0 0 576 512" preserveAspectRatio="xMidYMid meet">
|
||||
<path
|
||||
d="M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"/>
|
||||
</symbol>
|
||||
<symbol id="info-box" viewBox="0 0 512 512" preserveAspectRatio="xMidYMid meet">
|
||||
<path
|
||||
d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"/>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
{{- end -}}
|
||||
|
||||
{{- $.Page.Scratch.Add "box_count" 1 -}}
|
||||
|
||||
<div class="box box-shortcode {{ $boxType }}" {{ if len .Params | eq 2 }} id="{{ .Get 1 }}" {{ end }}>
|
||||
<span class="icon-box baseline">
|
||||
<svg><use href="#{{- $boxType -}}-box"></use></svg>
|
||||
</span>
|
||||
{{- if or $block (not $raw) }}
|
||||
{{ $raw }}
|
||||
{{ else }}
|
||||
<p>{{ $raw }}</p>
|
||||
{{ end -}}
|
||||
</div>
|
7
themes/dead-simple/layouts/shortcodes/columns.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<div class="md-columns">
|
||||
{{ range split .Inner "<--->" }}
|
||||
{{ printf "<div class=\"markdown-inner\">" | htmlUnescape | safeHTML }}
|
||||
{{ . | safeHTML }}
|
||||
{{ printf "</div>" | htmlUnescape | safeHTML }}
|
||||
{{ end }}
|
||||
</div>
|
18
themes/dead-simple/layouts/shortcodes/tab.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
{{ if .Parent }}
|
||||
{{ $name := .Get 0 }}
|
||||
|
||||
{{- if not (.Parent.Scratch.Get "tabs-id") -}}
|
||||
{{ $id := index (seq 1000 | shuffle) 0 }}
|
||||
{{ .Parent.Scratch.Add "tabs-id" $id }}
|
||||
{{- end -}}
|
||||
|
||||
{{ $group := printf "tabs-%d" (.Parent.Scratch.Get "tabs-id") }}
|
||||
|
||||
{{ if not (.Parent.Scratch.Get $group) }}
|
||||
{{ .Parent.Scratch.Set $group slice }}
|
||||
{{ end }}
|
||||
|
||||
{{ .Parent.Scratch.Add $group (dict "Name" $name "Content" .Inner) }}
|
||||
{{ else }}
|
||||
{{ errorf "%q: 'tab' shortcode must be inside 'tabs' shortcode" .Page.Path }}
|
||||
{{ end}}
|
18
themes/dead-simple/layouts/shortcodes/tabs.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
{{ if .Inner }}{{ end }}
|
||||
|
||||
{{ $id := .Scratch.Get "tabs-id" }}
|
||||
{{ $group := printf "tabs-%d" $id }}
|
||||
|
||||
<div class="md-tabs">
|
||||
{{- range $index, $tab := .Scratch.Get $group -}}
|
||||
{{ $individualTabId := printf "%s-%d" $group $index }}
|
||||
<input type="radio" class="hidden" name="{{ $group }}" id="{{ $individualTabId }}" {{ if not $index }}checked="checked"{{ end }} />
|
||||
<label for="{{ $individualTabId }}">
|
||||
{{- $tab.Name -}}
|
||||
</label>
|
||||
<div class="md-tabs-content markdown-inner">
|
||||
{{- .Content | markdownify | safeHTML -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{ .Scratch.Delete "tabs-id" }}
|
13
themes/dead-simple/layouts/shortcodes/threeimg.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<div class="image-gallery-container">
|
||||
<ul class="image-gallery-img three-image-gallery">
|
||||
<li>
|
||||
<a target="_blank" href="{{ index .Params 0 }}"><img loading="lazy" src="{{ index .Params 0 }}" /></a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="_blank" href="{{ index .Params 1 }}"><img loading="lazy" src="{{ index .Params 1 }}" /></a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="_blank" href="{{ index .Params 2 }}"><img loading="lazy" src="{{ index .Params 2 }}" /></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
10
themes/dead-simple/layouts/shortcodes/twoimg.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<div class="image-gallery-container">
|
||||
<ul class="image-gallery-img">
|
||||
<li>
|
||||
<a target="_blank" href="{{ index .Params 0 }}"><img loading="lazy" src="{{ index .Params 0 }}" /></a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="_blank" href="{{ index .Params 1 }}"><img loading="lazy" src="{{ index .Params 1 }}" /></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
1
themes/dead-simple/static/js/lunr.js
Normal file
51
themes/dead-simple/static/js/search.js
Normal file
|
@ -0,0 +1,51 @@
|
|||
function displayResults (results, store) {
|
||||
const searchResults = document.getElementById('results')
|
||||
if (results.length) {
|
||||
let resultList = ''
|
||||
// Iterate and build result list elements
|
||||
for (const n in results) {
|
||||
const item = store[results[n].ref]
|
||||
resultList += '<li><p><a href="' + item.url + '">' + item.title + '</a></p>'
|
||||
resultList += '<p>' + item.content.substring(0, 150) + '...</p></li>'
|
||||
}
|
||||
searchResults.innerHTML = resultList
|
||||
} else {
|
||||
searchResults.innerHTML = 'No results found.'
|
||||
}
|
||||
}
|
||||
|
||||
// Get the query parameter(s)
|
||||
const params = new URLSearchParams(window.location.search)
|
||||
const query = params.get('query')
|
||||
|
||||
// Perform a search if there is a query
|
||||
if (query) {
|
||||
// Retain the search input in the form when displaying results
|
||||
document.getElementById('search-input').setAttribute('value', query)
|
||||
|
||||
const idx = lunr(function () {
|
||||
this.ref('id')
|
||||
this.field('title', {
|
||||
boost: 15
|
||||
})
|
||||
this.field('tags')
|
||||
this.field('content', {
|
||||
boost: 10
|
||||
})
|
||||
|
||||
for (const key in window.store) {
|
||||
this.add({
|
||||
id: key,
|
||||
title: window.store[key].title,
|
||||
tags: window.store[key].category,
|
||||
content: window.store[key].content
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
// Perform the search
|
||||
const results = idx.search(query)
|
||||
// Update the list with results
|
||||
displayResults(results, window.store)
|
||||
}
|
||||
|
28
themes/dead-simple/theme.toml
Normal file
|
@ -0,0 +1,28 @@
|
|||
name = "dead-simple"
|
||||
license = "MIT"
|
||||
licenselink = "https://github.com/barklan/hugo-dead-simple/blob/main/LICENSE"
|
||||
description = "Dead simple Hugo theme."
|
||||
homepage = "https://github.com/barklan/hugo-dead-simple"
|
||||
tags = [
|
||||
"blog",
|
||||
"company",
|
||||
"documentation",
|
||||
"docs",
|
||||
"minimal",
|
||||
"responsive",
|
||||
"light",
|
||||
"simple",
|
||||
"clean"
|
||||
]
|
||||
features = [
|
||||
"responsive",
|
||||
"single-column",
|
||||
"blog",
|
||||
"table-of-contents",
|
||||
"favicon"
|
||||
]
|
||||
min_version = "0.83.0"
|
||||
|
||||
[author]
|
||||
name = "Gleb Buzin"
|
||||
homepage = "https://github.com/barklan"
|
36
themes/risotto/.github/workflows/hugo-build-exampleSite.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
name: hugo build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||
path: risotto
|
||||
|
||||
- name: Setup Hugo
|
||||
uses: peaceiris/actions-hugo@v2
|
||||
with:
|
||||
hugo-version: '0.85.0'
|
||||
# extended: true
|
||||
|
||||
- name: Build
|
||||
working-directory: ./risotto/exampleSite
|
||||
run: hugo --minify --themesDir="../.." -t risotto
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./risotto/exampleSite/public
|
||||
cname: risotto.joeroe.io
|
1
themes/risotto/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.hugo_build.lock
|
20
themes/risotto/LICENSE
Normal file
|
@ -0,0 +1,20 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2021 Joe Roe
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
43
themes/risotto/NEWS.md
Normal file
|
@ -0,0 +1,43 @@
|
|||
# risotto (development version)
|
||||
|
||||
* **Breaking change:** The config parameter `logo` now expects a character, e.g. an emoji or Unicode symbol.
|
||||
* For the old behaviour, use `logo_image`
|
||||
* Fixed invalid HTML in header nav
|
||||
* Added RSS feed references to head element (#73, after <https://gohugo.io/templates/rss/>)
|
||||
|
||||
# risotto 0.4.0
|
||||
|
||||
* Added descriptions to sidebar of list pages, where defined in the frontmatter of `_index.md` (#55)
|
||||
* Made sidebar sticky, avoiding overflow for long tables of contents (#51)
|
||||
* Added convenience classes for colours, e.g. `.base00` and `.bg-base00`.
|
||||
* Fixed overflow of code blocks with line numbers (#41)
|
||||
* Fixed invalid HTML in page header (#64)
|
||||
* Updated FontAwesome to 6.5.1 (#63)
|
||||
* Please note that future versions will probably not include FontAwesome by default
|
||||
* Updated Academicons to 1.9.4 (#63)
|
||||
* Please note that future versions will probably not include Academicons by default
|
||||
|
||||
# risotto 0.3.0
|
||||
|
||||
* Added support for favicons (#57)
|
||||
|
||||
# risotto 0.2.0
|
||||
|
||||
* **Breaking change** – new framework for colour palettes:
|
||||
* Palettes are defined using CSS variables following the [base16](https://github.com/chriskempson/base16) system
|
||||
* Added 14 new palettes: `apprentice`, `base16-dark`, `base16-light`, `dracula`, `material`, `papercolor-dark`, `papercolor-light`, `solarized-dark`, `solarized-light`, `tender`, `tokyo-night-dark`, `tokyo-night-light`, `windows-95` and `windows-95-light`.
|
||||
* The default palette is `base16-dark`
|
||||
* The `mode` parameter is no longer needed
|
||||
* If you were using one of the old named palettes (`gruvbox-dark` or `gruvbox-light`), the change will be seamless.
|
||||
* If you were using a custom palette, you will need to redefine it using the new framework. See README for further details.
|
||||
* Added a table of contents (thanks @dashv, #47)
|
||||
* Added multilanguage support with a language switcher (thanks @bedefaced)
|
||||
* Made the site header and nav wrap more efficiently on narrow screens (thanks @m-dev672, #32)
|
||||
* Added a changelog
|
||||
|
||||
# risotto 0.1.0
|
||||
|
||||
First named release, including:
|
||||
|
||||
* `gruvbox-dark` and `gruvbox-light` colour palettes
|
||||
* FontAwesome6 and Academicons icon sets
|
108
themes/risotto/README.md
Normal file
|
@ -0,0 +1,108 @@
|
|||
# 🍚 risotto
|
||||
|
||||
risotto is a minimalist, responsive [hugo](https://gohugo.io) theme inspired by terminal ricing aesthetics.
|
||||
|
||||
[![Hugo Themes](https://img.shields.io/badge/Hugo_Themes-risotto-blue?logo=hugo)](https://themes.gohugo.io/themes/risotto/)
|
||||
[![Version](https://img.shields.io/badge/semver-v0.4.0-blue)](https://semver.org)
|
||||
![hugo build status](https://github.com/joeroe/risotto/actions/workflows/hugo-build-exampleSite.yml/badge.svg)
|
||||
[![W3C Validation](https://img.shields.io/w3c-validation/html?targetUrl=https%3A%2F%2Frisotto.joeroe.io)](https://validator.nu/?doc=https%3A%2F%2Frisotto.joeroe.io)
|
||||
![Code size](https://img.shields.io/github/languages/code-size/joeroe/risotto)
|
||||
|
||||
![Screenshot of the risotto theme](https://raw.githubusercontent.com/joeroe/risotto/master/images/screenshot.png)
|
||||
|
||||
## Features
|
||||
|
||||
* Plain, semantic HTML with no Javascript
|
||||
* Plain CSS – no frameworks, no preprocessors, just simple and easy-to-customise stylesheets
|
||||
* Uses [CSS Grid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout) for native responsive behaviour without arbitrary breakpoints
|
||||
* Comes with [16 built-in colour schemes](#colour-schemes) based on popular terminal themes plus the ability to use custom themes using the [base16 system](https://github.com/monicfenga/base16-styles)
|
||||
|
||||
## Install
|
||||
|
||||
The easiest way to install the theme is to [download the latest release](https://github.com/joeroe/risotto/releases) and extract it to your project's `themes/` directory.
|
||||
You can also clone this repository into your site's `themes` directory and checkout the latest release:
|
||||
|
||||
```shell
|
||||
git clone https://github.com/joeroe/risotto themes/risotto && cd themes/risotto
|
||||
git checkout $(git tag -l | grep '^v[0-9.]*$' | sort -V | tail -n 1)
|
||||
```
|
||||
|
||||
Note that this will not work if your site is itself a git repository.
|
||||
In that case, you can add the theme as a [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules), but this is not recommended due to the difficulty of tracking a specific release.
|
||||
|
||||
## Update
|
||||
|
||||
If you installed the theme using `git clone`, pull the repository to get the latest version:
|
||||
|
||||
```shell
|
||||
cd themes/risotto
|
||||
git pull
|
||||
```
|
||||
|
||||
Otherwise, simply [download the latest release](https://github.com/joeroe/risotto/releases) and extract it to your project's `themes/` directory, replacing the old version.
|
||||
|
||||
## Configure
|
||||
|
||||
To use the theme, add `theme = 'risotto'` to your site's `hugo.toml`, or `theme: risotto` to your `hugo.yaml`.
|
||||
|
||||
See `exampleSite/config.toml` for the theme-specific parameters you need to add to your site's `hugo.toml` or `hugo.yaml` to configure the theme.
|
||||
|
||||
### Colour schemes
|
||||
|
||||
risotto uses the [base16 framework](https://github.com/chriskempson/base16) to define colour schemes that can be used with the `theme.palette` parameter.
|
||||
A selection of 16 palettes (10 dark, 6 light) are bundled with the theme: `apprentice`, `base16-dark`, `base16-light`, `dracula`, `gruvbox-dark`, `gruvbox-light`, `material`, `papercolor-dark`, `papercolor-light`, `solarized-dark`, `solarized-light`, `tender`, `tokyo-night-dark`, `tokyo-night-light`, `windows-95` and `windows-95-light`.
|
||||
The default is `base16-dark`.
|
||||
|
||||
<!-- TODO: add screenshots of default themes -->
|
||||
|
||||
The easiest way to use other base16 styles is to place .css file from https://github.com/monicfenga/base16-styles/tree/master/css-variables and place it in your `static/css/palettes` directory.
|
||||
|
||||
Or to define a wholly custom theme, you will need to define the following CSS variables for the following base16 colours (see [base16-dark.css](blob/main/static/css/palettes/base16-dark.css) for an example):
|
||||
|
||||
| Base | Default colour | Used for | Examples |
|
||||
| ---- | ------------------------------------------ | ------------------- | ------------------------------------ |
|
||||
| 00 | <span class="base00">Dark</span> | Background | Page background |
|
||||
| 01 | <span class="base01">│</span> | Alt. background | Content background |
|
||||
| 02 | <span class="base02">│</span> | In-text backgrounds | `<pre>`, `<code>`, `<kbd>`, `<samp>` |
|
||||
| 03 | <span class="base03">│</span> | Muted text | `:before` & `:marker` symbols |
|
||||
| 04 | <span class="base04">│</span> | Alt. foreground | Aside text |
|
||||
| 05 | <span class="base05">│</span> | Foreground | Content text |
|
||||
| 06 | <span class="base06">│</span> | | |
|
||||
| 07 | <span class="base07">Light</span> | | |
|
||||
| 08 | <span class="base08">Red</span> | | |
|
||||
| 09 | <span class="base09">Orange</span> | | |
|
||||
| 0A | <span class="base0A">Yellow</span> | Highlights | Selected text, `<mark>` |
|
||||
| 0B | <span class="base0B">Green</span> | Primary accent | Logo |
|
||||
| 0C | <span class="base0C">Cyan</span> | Active links | `a:active`, `a:hover` |
|
||||
| 0D | <span class="base0D">Blue</span> | Links | `a:link`, `a:visited` |
|
||||
| 0E | <span class="base0E">Magenta</span> | | |
|
||||
| 0F | <span class="base0F">Brown</span> | | |
|
||||
|
||||
For light mode palettes, the sequence of 00–07 should be reversed (light to dark, not dark to light).
|
||||
Note that not all colours are currently used in the theme.
|
||||
|
||||
You you use these colours directly in content using the convenience classes `.baseXX` and `.bg-baseXX`.
|
||||
For example:
|
||||
|
||||
```html
|
||||
<span class="base0A">Yellow text</span>
|
||||
<mark class="bg-base0D">Text highlighted in green</mark>
|
||||
```
|
||||
|
||||
## Favicon
|
||||
|
||||
risotto will automatically use favicons placed in the `static/` directory.
|
||||
The following files will be detected and included in your site's `<head>` section:
|
||||
|
||||
* `favicon.ico`
|
||||
* `favicon-16x16.png`
|
||||
* `favicon-32x32.png`
|
||||
* `apple-touch-icon.png`
|
||||
* `site.webmanifest`
|
||||
|
||||
You can generate these from an image or emoji using [favicon.io](https://favicon.io/) or a similar service.
|
||||
They must be placed directly under your site's `static/` directory, i.e. not in in a subdirectory or `themes/risotto/static/`.
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
The 'cooked rice' emoji used as a favicon for the example site was created by the [Twemoji project](https://twemoji.twitter.com/) and is licensed under [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/).
|
2
themes/risotto/archetypes/default.md
Normal file
|
@ -0,0 +1,2 @@
|
|||
+++
|
||||
+++
|
3
themes/risotto/config.toml
Normal file
|
@ -0,0 +1,3 @@
|
|||
[module]
|
||||
[module.hugoVersion]
|
||||
min = "0.41.0"
|
21
themes/risotto/exampleSite/LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Steve Francia
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
103
themes/risotto/exampleSite/config.toml
Normal file
|
@ -0,0 +1,103 @@
|
|||
baseURL = "https://risotto.joeroe.io"
|
||||
theme = "risotto"
|
||||
title = "risotto demo"
|
||||
author = "Joe Roe"
|
||||
copyright = "© [Joe Roe](https://joeroe.io) & [risotto contributors](https://github.com/joeroe/risotto/graphs/contributors)."
|
||||
paginate = 3
|
||||
languageCode = "en"
|
||||
DefaultContentLanguage = "en"
|
||||
enableInlineShortcodes = true
|
||||
# prevent build failures when using Hugo's Instagram shortcode due to deprecated Instagram API.
|
||||
# See https://github.com/gohugoio/hugo/issues/7228#issuecomment-714490456
|
||||
ignoreErrors = ["error-remote-getjson"]
|
||||
|
||||
# Automatically add content sections to main menu
|
||||
sectionPagesMenu = "main"
|
||||
|
||||
[params]
|
||||
noindex = false
|
||||
|
||||
[params.theme]
|
||||
palette = "base16-dark"
|
||||
|
||||
# Sidebar: about/bio
|
||||
[params.about]
|
||||
title = "risotto"
|
||||
description = "A [hugo](https://gohugo.io) theme inspired by terminal ricing."
|
||||
# unicode/emoji logo:
|
||||
logo = "🍚"
|
||||
# or use an image:
|
||||
#logo_image = "images/rice.svg"
|
||||
|
||||
# Sidebar: social links
|
||||
# Available icon sets:
|
||||
# * FontAwesome 6 <https://fontawesome.com/> ('fa-brands', 'fa-normal', or 'fa-solid' for brands)
|
||||
# * Academicons <https://jpswalsh.github.io/academicons> ('ai ai-')
|
||||
|
||||
[[params.socialLinks]]
|
||||
icon = "fa-brands fa-github"
|
||||
title = "GitHub"
|
||||
url = "https://github.com/joeroe/risotto"
|
||||
|
||||
[[params.socialLinks]]
|
||||
icon = "fa-solid fa-envelope"
|
||||
title = "Email"
|
||||
url = "mailto:example@example.com"
|
||||
|
||||
[[params.socialLinks]]
|
||||
icon = "ai ai-orcid"
|
||||
title = "ORCID"
|
||||
url = "https://orcid.org/0000-0001-2345-6789"
|
||||
|
||||
[menu]
|
||||
|
||||
[[menu.main]]
|
||||
identifier = "about"
|
||||
name = "About"
|
||||
url = "/about/"
|
||||
weight = 10
|
||||
|
||||
[taxonomies]
|
||||
category = "categories"
|
||||
tag = "tags"
|
||||
series = "series"
|
||||
|
||||
# For hugo >= 0.60.0, enable inline HTML
|
||||
[markup.goldmark.renderer]
|
||||
unsafe = true
|
||||
|
||||
[markup]
|
||||
|
||||
# Table of contents
|
||||
# Add toc = true to content front matter to enable
|
||||
[markup.tableOfContents]
|
||||
startLevel = 2
|
||||
endLevel = 3
|
||||
ordered = true
|
||||
|
||||
[privacy]
|
||||
|
||||
[privacy.vimeo]
|
||||
disabled = false
|
||||
simple = true
|
||||
|
||||
[privacy.twitter]
|
||||
disabled = false
|
||||
enableDNT = true
|
||||
simple = true
|
||||
|
||||
[privacy.instagram]
|
||||
disabled = false
|
||||
simple = true
|
||||
|
||||
[privacy.youtube]
|
||||
disabled = false
|
||||
privacyEnhanced = true
|
||||
|
||||
[services]
|
||||
|
||||
[services.instagram]
|
||||
disableInlineCSS = true
|
||||
|
||||
[services.twitter]
|
||||
disableInlineCSS = true
|
27
themes/risotto/exampleSite/configTaxo.toml
Normal file
|
@ -0,0 +1,27 @@
|
|||
timeout = 30000
|
||||
enableInlineShortcodes = true
|
||||
|
||||
[taxonomies]
|
||||
category = "categories"
|
||||
tag = "tags"
|
||||
series = "series"
|
||||
|
||||
[privacy]
|
||||
|
||||
[privacy.vimeo]
|
||||
disabled = false
|
||||
simple = true
|
||||
|
||||
[privacy.twitter]
|
||||
disabled = false
|
||||
enableDNT = true
|
||||
simple = true
|
||||
disableInlineCSS = true
|
||||
|
||||
[privacy.instagram]
|
||||
disabled = false
|
||||
simple = true
|
||||
|
||||
[privacy.youtube]
|
||||
disabled = false
|
||||
privacyEnhanced = true
|
1
themes/risotto/exampleSite/content/_index.md
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../README.md
|
3
themes/risotto/exampleSite/content/_index.md.old
Normal file
|
@ -0,0 +1,3 @@
|
|||
+++
|
||||
author = "Hugo Authors"
|
||||
+++
|
25
themes/risotto/exampleSite/content/about.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
+++
|
||||
title = "About"
|
||||
description = "Hugo, the world's fastest framework for building websites"
|
||||
date = "2019-02-28"
|
||||
aliases = ["about-us", "about-hugo", "contact"]
|
||||
author = "Hugo Authors"
|
||||
+++
|
||||
|
||||
Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.
|
||||
|
||||
Hugo makes use of a variety of open source projects including:
|
||||
|
||||
* https://github.com/yuin/goldmark
|
||||
* https://github.com/alecthomas/chroma
|
||||
* https://github.com/muesli/smartcrop
|
||||
* https://github.com/spf13/cobra
|
||||
* https://github.com/spf13/viper
|
||||
|
||||
Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages.
|
||||
|
||||
Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases.
|
||||
|
||||
Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.
|
||||
|
||||
Learn more and contribute on [GitHub](https://github.com/gohugoio).
|
5
themes/risotto/exampleSite/content/archives.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
date: 2019-05-28
|
||||
type: section
|
||||
layout: "archives"
|
||||
---
|
7
themes/risotto/exampleSite/content/homepage/about.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: 'Our Difference'
|
||||
button: 'About us'
|
||||
weight: 2
|
||||
---
|
||||
|
||||
Lorem ipsum dolor sit amet, et essent mediocritatem quo, choro volumus oporteat an mei. Ipsum dolor sit amet, et essent mediocritatem quo.
|
3
themes/risotto/exampleSite/content/homepage/index.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
headless: true
|
||||
---
|
7
themes/risotto/exampleSite/content/homepage/work.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: 'We Help Business Grow'
|
||||
button: 'Our Work'
|
||||
weight: 1
|
||||
---
|
||||
|
||||
Lorem ipsum dolor sit amet, et essent mediocritatem quo, choro volumus oporteat an mei. Numquam dolores mel eu, mea docendi omittantur et, mea ea duis erat. Elit melius cu ius. Per ex novum tantas putant, ei his nullam aliquam apeirian. Aeterno quaestio constituto sea an, no eum intellegat assueverit.
|
7
themes/risotto/exampleSite/content/post/_index.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
+++
|
||||
aliases = ["posts", "articles", "blog", "showcase", "docs"]
|
||||
title = "Posts"
|
||||
author = "Hugo Authors"
|
||||
description = "Example posts demonstrating hugo's markup features"
|
||||
tags = ["index"]
|
||||
+++
|
46
themes/risotto/exampleSite/content/post/emoji-support.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Emoji Support"
|
||||
date = "2019-03-05"
|
||||
description = "Guide to emoji usage in Hugo"
|
||||
tags = [
|
||||
"emoji",
|
||||
]
|
||||
+++
|
||||
|
||||
Emoji can be enabled in a Hugo project in a number of ways.
|
||||
<!--more-->
|
||||
The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
|
||||
|
||||
To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g.
|
||||
|
||||
<p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p>
|
||||
<br>
|
||||
|
||||
The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
|
||||
|
||||
***
|
||||
|
||||
**N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.
|
||||
|
||||
{{< highlight html >}}
|
||||
.emoji {
|
||||
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
|
||||
}
|
||||
{{< /highlight >}}
|
||||
|
||||
{{< css.inline >}}
|
||||
<style>
|
||||
.emojify {
|
||||
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
|
||||
font-size: 2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@media screen and (max-width:650px) {
|
||||
.nowrap {
|
||||
display: block;
|
||||
margin: 25px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{{< /css.inline >}}
|
149
themes/risotto/exampleSite/content/post/markdown-syntax.md
Normal file
|
@ -0,0 +1,149 @@
|
|||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Markdown Syntax Guide"
|
||||
date = "2019-03-11"
|
||||
description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
||||
tags = [
|
||||
"markdown",
|
||||
"css",
|
||||
"html",
|
||||
]
|
||||
categories = [
|
||||
"themes",
|
||||
"syntax",
|
||||
]
|
||||
series = ["Themes Guide"]
|
||||
aliases = ["migrate-from-jekyl"]
|
||||
toc = true
|
||||
+++
|
||||
|
||||
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
|
||||
<!--more-->
|
||||
|
||||
## Headings
|
||||
|
||||
The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
|
||||
|
||||
# H1
|
||||
## H2
|
||||
### H3
|
||||
#### H4
|
||||
##### H5
|
||||
###### H6
|
||||
|
||||
## Paragraph
|
||||
|
||||
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
|
||||
|
||||
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
|
||||
|
||||
## Blockquotes
|
||||
|
||||
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
|
||||
|
||||
#### Blockquote without attribution
|
||||
|
||||
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
|
||||
> **Note** that you can use *Markdown syntax* within a blockquote.
|
||||
|
||||
#### Blockquote with attribution
|
||||
|
||||
> Don't communicate by sharing memory, share memory by communicating.<br>
|
||||
> — <cite>Rob Pike[^1]</cite>
|
||||
|
||||
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
|
||||
|
||||
## Tables
|
||||
|
||||
Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
|
||||
|
||||
Name | Age
|
||||
--------|------
|
||||
Bob | 27
|
||||
Alice | 23
|
||||
|
||||
#### Inline Markdown within tables
|
||||
|
||||
| Italics | Bold | Code |
|
||||
| -------- | -------- | ------ |
|
||||
| *italics* | **bold** | `code` |
|
||||
|
||||
## Code Blocks
|
||||
|
||||
#### Code block with backticks
|
||||
|
||||
```html
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
#### Code block indented with four spaces
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
#### Code block with Hugo's internal highlight shortcode
|
||||
{{< highlight html >}}
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
{{< /highlight >}}
|
||||
|
||||
## List Types
|
||||
|
||||
#### Ordered List
|
||||
|
||||
1. First item
|
||||
2. Second item
|
||||
3. Third item
|
||||
|
||||
#### Unordered List
|
||||
|
||||
* List item
|
||||
* Another item
|
||||
* And another item
|
||||
|
||||
#### Nested list
|
||||
|
||||
* Fruit
|
||||
* Apple
|
||||
* Orange
|
||||
* Banana
|
||||
* Dairy
|
||||
* Milk
|
||||
* Cheese
|
||||
|
||||
## Other Elements — abbr, sub, sup, kbd, mark
|
||||
|
||||
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
|
||||
|
||||
H<sub>2</sub>O
|
||||
|
||||
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
||||
|
||||
Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session.
|
||||
|
||||
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
|
49
themes/risotto/exampleSite/content/post/math-typesetting.md
Normal file
|
@ -0,0 +1,49 @@
|
|||
---
|
||||
author: Hugo Authors
|
||||
title: Math Typesetting
|
||||
date: 2019-03-08
|
||||
description: A brief guide to setup KaTeX
|
||||
math: true
|
||||
---
|
||||
|
||||
Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.
|
||||
<!--more-->
|
||||
|
||||
In this example we will be using [KaTeX](https://katex.org/)
|
||||
|
||||
- Create a partial under `/layouts/partials/math.html`
|
||||
- Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally.
|
||||
- Include the partial in your templates like so:
|
||||
|
||||
```bash
|
||||
{{ if or .Params.math .Site.Params.math }}
|
||||
{{ partial "math.html" . }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
- To enable KaTex globally set the parameter `math` to `true` in a project's configuration
|
||||
- To enable KaTex on a per page basis include the parameter `math: true` in content files
|
||||
|
||||
**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html)
|
||||
|
||||
{{< math.inline >}}
|
||||
{{ if or .Page.Params.math .Site.Params.math }}
|
||||
<!-- KaTeX -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
|
||||
{{ end }}
|
||||
{{</ math.inline >}}
|
||||
|
||||
### Examples
|
||||
|
||||
{{< math.inline >}}
|
||||
<p>
|
||||
Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
|
||||
</p>
|
||||
{{</ math.inline >}}
|
||||
|
||||
Block math:
|
||||
$$
|
||||
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
||||
$$
|
45
themes/risotto/exampleSite/content/post/placeholder-text.md
Normal file
|
@ -0,0 +1,45 @@
|
|||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Placeholder Text"
|
||||
date = "2019-03-09"
|
||||
description = "Lorem Ipsum Dolor Si Amet"
|
||||
tags = [
|
||||
"markdown",
|
||||
"text",
|
||||
]
|
||||
+++
|
||||
|
||||
Lorem est tota propiore conpellat pectoribus de pectora summo. <!--more-->Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum.
|
||||
|
||||
1. Exierant elisi ambit vivere dedere
|
||||
2. Duce pollice
|
||||
3. Eris modo
|
||||
4. Spargitque ferrea quos palude
|
||||
|
||||
Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis.
|
||||
|
||||
1. Comas hunc haec pietate fetum procerum dixit
|
||||
2. Post torum vates letum Tiresia
|
||||
3. Flumen querellas
|
||||
4. Arcanaque montibus omnes
|
||||
5. Quidem et
|
||||
|
||||
# Vagus elidunt
|
||||
|
||||
<svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg>
|
||||
|
||||
[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon)
|
||||
|
||||
## Mane refeci capiebant unda mulcebat
|
||||
|
||||
Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis.
|
||||
|
||||
Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et.
|
||||
|
||||
Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**.
|
||||
|
||||
{{< css.inline >}}
|
||||
<style>
|
||||
.canon { background: white; width: 100%; height: auto; }
|
||||
</style>
|
||||
{{< /css.inline >}}
|
34
themes/risotto/exampleSite/content/post/rich-content.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Rich Content"
|
||||
date = "2019-03-10"
|
||||
description = "A brief description of Hugo Shortcodes"
|
||||
tags = [
|
||||
"shortcodes",
|
||||
"privacy",
|
||||
]
|
||||
+++
|
||||
|
||||
Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
|
||||
<!--more-->
|
||||
---
|
||||
|
||||
## YouTube Privacy Enhanced Shortcode
|
||||
|
||||
{{< youtube ZJthWmvUzzc >}}
|
||||
|
||||
<br>
|
||||
|
||||
---
|
||||
|
||||
## Twitter Simple Shortcode
|
||||
|
||||
{{< twitter_simple 1085870671291310081 >}}
|
||||
|
||||
<br>
|
||||
|
||||
---
|
||||
|
||||
## Vimeo Simple Shortcode
|
||||
|
||||
{{< vimeo_simple 48912912 >}}
|
0
themes/risotto/exampleSite/layouts/.gitkeep
Normal file
6
themes/risotto/exampleSite/static/README
Normal file
|
@ -0,0 +1,6 @@
|
|||
The favicons in this directory were generated using the following graphics from Twitter Twemoji:
|
||||
|
||||
- Graphics Title: 1f35a.svg
|
||||
- Graphics Author: Copyright 2020 Twitter, Inc and other contributors (https://github.com/twitter/twemoji)
|
||||
- Graphics Source: https://github.com/twitter/twemoji/blob/master/assets/svg/1f35a.svg
|
||||
- Graphics License: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
|
BIN
themes/risotto/exampleSite/static/android-chrome-192x192.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
themes/risotto/exampleSite/static/android-chrome-512x512.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
themes/risotto/exampleSite/static/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
themes/risotto/exampleSite/static/favicon-16x16.png
Normal file
After Width: | Height: | Size: 688 B |
BIN
themes/risotto/exampleSite/static/favicon-32x32.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
themes/risotto/exampleSite/static/favicon.ico
Normal file
After Width: | Height: | Size: 15 KiB |
1
themes/risotto/exampleSite/static/site.webmanifest
Normal file
|
@ -0,0 +1 @@
|
|||
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
|
BIN
themes/risotto/images/screenshot.png
Normal file
After Width: | Height: | Size: 198 KiB |
BIN
themes/risotto/images/tn.png
Normal file
After Width: | Height: | Size: 181 KiB |
0
themes/risotto/layouts/404.html
Normal file
36
themes/risotto/layouts/_default/baseof.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{- site.Language.Lang -}}">
|
||||
|
||||
<head>
|
||||
{{- partial "head.html" . -}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="page">
|
||||
|
||||
<header class="page__header">
|
||||
{{- partial "header.html" . -}}
|
||||
</header>
|
||||
|
||||
<section class="page__body">
|
||||
{{- block "main" . }}{{- end }}
|
||||
</section>
|
||||
|
||||
<section class="page__aside">
|
||||
<div class="aside__about">
|
||||
{{- partial "about.html" . -}}
|
||||
</div>
|
||||
<hr>
|
||||
<div class="aside__content">
|
||||
{{- block "aside" . }}{{- end }}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer class="page__footer">
|
||||
{{- partial "footer.html" . -}}
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
1
themes/risotto/layouts/_default/li.html
Normal file
|
@ -0,0 +1 @@
|
|||
<li><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></li>
|
16
themes/risotto/layouts/_default/list.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{ define "main" }}
|
||||
<h1 id="{{ .Title | urlize }}">{{ .Title | markdownify }}</h1>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
{{ .Render "li" }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{define "aside" }}
|
||||
{{ if .Params.description }}<p>{{ .Params.description }}</p>{{ end }}
|
||||
{{ end }}
|
25
themes/risotto/layouts/_default/single.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{ define "main" }}
|
||||
<header class="content__header">
|
||||
<h1>{{ .Title | markdownify }}</h1>
|
||||
</header>
|
||||
<div class="content__body">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
<footer class="content__footer"></footer>
|
||||
{{ end }}
|
||||
|
||||
{{define "aside" }}
|
||||
{{ if .Params.description }}<p>{{ .Params.description }}</p>{{ end }}
|
||||
{{ if or (.Params.author) (.Params.date) }}
|
||||
<p>
|
||||
{{ if .Params.author }}By {{ .Params.author }}{{ if .Date }}, {{ end }}{{ end }}
|
||||
{{ if .Date }}{{ .Date.Format "2006-01-02" }}{{ end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ if and (.Params.toc) (.TableOfContents) }}
|
||||
<hr>
|
||||
On this page:
|
||||
{{ .TableOfContents }}
|
||||
{{ end }}
|
||||
{{ end }}
|
4
themes/risotto/layouts/index.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
{{ define "main" }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
|
16
themes/risotto/layouts/partials/about.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{ with .Site.Params.about }}
|
||||
<div class="aside__about">
|
||||
{{ with .logo }}<span class="about__logo" role="img">{{ . }}</span> {{ end }}
|
||||
{{ with .logo_image }}<img class="about__logo" src="{{ . | absURL }}" alt="Logo">{{ end }}
|
||||
<h1 class="about__title">{{ .title }}</h1>
|
||||
{{ with .description }}<p class="about__description">{{ . | markdownify }}</p>{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<ul class="aside__social-links">
|
||||
{{ range $item := .Site.Params.socialLinks }}
|
||||
<li>
|
||||
<a href="{{ $item.url }}" rel="me" aria-label="{{ $item.title }}" title="{{ $item.title }}"><i class="{{ $item.icon }}" aria-hidden="true"></i></a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
5
themes/risotto/layouts/partials/footer.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{- partial "lang.html" . -}}
|
||||
<div class="text-center">
|
||||
<p class="copyright">{{ .Site.Copyright | markdownify }}</p>
|
||||
<p class="advertisement"><a href="/">https://ejv2.cc</a> - <a href="/credits">credits</a></p>
|
||||
</div>
|