master #1

Closed
Oliver wants to merge 49 commits from master into main
19 changed files with 369 additions and 181 deletions
Showing only changes of commit 22caaf02a1 - Show all commits

3
.gitignore vendored
View File

@ -1 +1,2 @@
.vscode/
/.hugo_build.lock
/public

View File

@ -1,21 +1,17 @@
# Oliver's Hugo Theme
Fork of [lugo](https://github.com/LukeSmithxyz/lugo). Used for my personal website(s).
## get started
## Get started
```sh
hugo new site new-site
cd new-site
git clone https://github.com/lukesmithxyz/lugo themes/lugo
cd new-site/
git submodule add https://git.oliveratkinson.net/Oliver/lugo themes/lugo
echo "theme = 'lugo'" >> config.toml
cp themes/lugo/static/style.css static/
```
## stuff
## Notes
- Makes one RSS feed for the entire site at `/index.xml`
- Stylesheet is in `/style.css` and includes some important stuff for partials.
- If a post is tagged, links to the tags are placed at the bottom of the post.
- `nextprev.html` adds links to the Next and Previous articles to the bottom of a page.
- `taglist.html` links all tags an article is tagged to for related content.

View File

@ -6,6 +6,12 @@ languageCode = 'en-us'
# "relatedtext" is the text that appears above the tag list at the bottom of pages.
relatedtext = "Tags:"
favicon = "favicon.ico"
showrss = true
#list items
datesinlist = true
authorsinlist = true
#footer items
nextprev = true
taglist = true
showrss = true

View File

@ -1,47 +1,24 @@
<!DOCTYPE html>
<html lang="{{ .Site.Language }}">
<head>
<title>{{ if not .IsHome }}{{ .Title | title }} | {{ end }}{{ .Site.Title }}</title>
<link rel="canonical" href="{{ .Site.BaseURL }}">
<link rel='alternate' type='application/rss+xml' title="{{ .Site.Title }} RSS" href='/index.xml'>
<link rel='stylesheet' type='text/css' href='/style.css'>
<link rel='stylesheet' type='text/css' href='/hugo.css'>
<link rel='stylesheet' type='text/css' href='/content.css'>
{{ with .Site.Params.favicon }}<link rel="icon" href="{{ . }}">
{{ end -}}
<meta name="description" content="{{ with .Params.description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}">
{{ if isset .Params "tags" }}<meta name="keywords" content="{{ with .Params.tags }}{{ delimit . ", " }}{{ end }}">
{{ end -}}
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="index, follow">
<meta charset="utf-8">
</head>
{{ partial "head.html" . }}
<body>
{{ if .Site.Menus.main }}{{ partial "nav.html" . }}{{ end -}}
<main>
<header>
<h1 id="tag_{{ .Title }}">
{{ if .IsHome }} {{ .Site.Title }} {{ end }}
{{ block "title" . }}
{{ end }}</h1>
<h4 id="tag_{{ .Title }}">
{{ if not .IsHome }} {{ .Params.description }} {{ end }}
</h4>
</header>
<article>
{{ block "main" . }}
{{ .Content }}
{{ end }}
{{ if not .IsHome }} <br><hr><br> {{end -}}
{{ if .Param "nextprev" }}{{ partial "nextprev.html" . -}}{{ end -}}
{{ if .Param "taglist" }}{{ partial "taglist.html" . }}{{ end -}}
</article>
</main>
{{ block "footer" . }}
<footer>
<a href="{{ .Site.BaseURL }}">{{ .Site.BaseURL }}</a>
{{- if .Param "showrss" }}<br><br><a href="/index.xml"><img src="/rss.svg" style="max-height:1.5em" alt="RSS Feed" title="Subscribe via RSS for updates."></a>{{ end }}
</footer>
{{ end }}
{{ block "header" . }}
{{ partial "header.html" . }}
{{ end }}
<main>
<div class="article-header">
<h3 class="spaced">
{{ .Page.Title }}
</h3>
</div>
<article>
{{ block "main" . }}
{{ .Content }}
{{ end }}
</article>
{{ block "footer" . }}
{{ partial "footer.html" . }}
{{ end }}
</main>
</body>
</html>

View File

@ -6,13 +6,16 @@
{{ if not .IsHome }}
<ul>
{{- range.Pages }}
<li>
{{- if .Param "datesinlist" }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006 Jan 02" }}</time> &ndash; {{ end -}}
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
{{- if .Param "authorsinlist" }}
{{- range .Param "authors" }} by {{ . }}{{ end -}}
{{ end -}}
</li>
<li>
{{- if .Param "datesinlist" }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006 Jan 02" }}</time> &ndash; {{ end -}}
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
{{- if .Param "authorsinlist" }}
{{ with .Params.authors }}
by
{{ delimit . ", " " and " }}
{{end}}
{{ end -}}
</li>
{{- end }}
</ul>
{{- end }}

View File

@ -0,0 +1,7 @@
<hr>
<footer>
Fund the web dev in XMR:
<p id="xmr" class="copy">wallet address here</p>
<a href="{{ .Site.BaseURL }}">{{ .Site.BaseURL }}</a>
{{- if .Param "showrss" }}<br><br><a href="/index.xml"><img src="/rss.svg" style="max-height:1.5em" alt="RSS Feed" title="Subscribe via RSS for updates."></a>{{ end }}
</footer>

View File

@ -0,0 +1,20 @@
<head>
<title>{{ if not .IsHome }}{{ .Title | title }} | {{ end }}{{ .Site.Title }}</title>
<link rel="canonical" href="{{ .Site.BaseURL }}">
<link rel='alternate' type='application/rss+xml' title="{{ .Site.Title }} RSS" href='{{ .Site.BaseURL }}/index.xml'>
<link rel='stylesheet' type='text/css' media='screen' href='{{ .Site.BaseURL }}/style.css'>
<link rel='stylesheet' type='text/css' href='{{ .Site.BaseURL }}/lugo.css'>
{{ with .Site.Params.favicon }}
<link rel="icon" href="{{ . }}">
{{ end -}}
<meta name="description" content="{{ with .Params.description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}">
{{ if isset .Params "tags" }}
<meta name="keywords" content="{{ with .Params.tags }}{{ delimit . " , " }}{{ end }}">
{{ end -}}
{{ if isset .Params "redirect" }}
<meta http-equiv="refresh" content="2; URL={{ with .Params.redirect }}{{ . }}{{ end }}">
{{ end -}}
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="index, follow">
<meta charset="utf-8">
</head>

View File

@ -0,0 +1,5 @@
<header>
<h2>
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
</h2>
</header>

View File

@ -1,8 +0,0 @@
<nav>
<ul>
{{- $sec := .Page.Section }}{{ $file := .File.TranslationBaseName -}}
{{ range.Site.Menus.main.ByWeight }}{{ $base := path.Base .URL }}
<li><a {{ if or ( eq $sec $base ) ( eq $file $base ) ( and (eq $sec "") ( eq $file "_index") (eq $base "/") ) }}class="menuactive" {{ end }}href="{{ .URL }}"><span class=pre>{{ .Pre }}</span><span class=menuname>{{ .Name }}</span></a></li>
{{- end }}
</ul>
</nav>

View File

@ -1,10 +0,0 @@
{{ if or .Next .Prev -}}
<div id="nextprev">
{{- with .Prev }}
<a href="{{ .RelPermalink}}"><div id="prevart">Previous:<br>{{.Title}}</div></a>
{{ end -}}
{{- with .Next -}}
<a href="{{ .RelPermalink}}"><div id="nextart">Next:<br>{{.Title}}</div></a>
{{ end -}}
</div>
{{ end -}}

View File

@ -7,7 +7,7 @@
-->
<figure {{ with .Get "class" }}class="{{.}}"{{ end -}}>
{{- with .Get "link"}}<a href="{{.}}">{{ end -}}
<img src="{{ .Get "src" }}"
<img src='{{ .Get "src" }}'
{{- with .Get "mouse" }} title="{{.}}"{{ end -}}
{{- with .Get "alt" }} alt="{{.}}"{{ end -}}
>

View File

@ -0,0 +1,10 @@
<div>
<link rel='stylesheet' type='text/css' media='screen' href='{{ .Site.BaseURL }}/form.css'>
<form class="spaced" method="post" action="login" enctype="application/x-www-form-urlencoded">
<label>Login</label>
<br>
<input type="text" id="username" name="username" aria-autocomplete="both" placeholder="Username" autofocus autocomplete="username" required><br>
<input type="password" id="password" name="password" placeholder="Password" autocomplete="new-password" required><br>
<input type="submit" value="Submit">
</form>
</div>

View File

@ -0,0 +1,14 @@
<link rel='stylesheet' type='text/css' media='screen' href='/form.css'>
<form method="post" action="post-article" enctype="application/x-www-form-urlencoded">
<label style="display: none">Create new post:</label>
<p>Markdown is supported!</p>
<textarea
accesskey="/"
id="article"
name="article"
required
maxlength="1000"
rows="11"
placeholder="Your super sick idea..."></textarea>
<input type="submit" value="Post">
</form>

View File

@ -0,0 +1,7 @@
<link rel='stylesheet' type='text/css' media='screen' href='/roller.css'>
<div class="roller-container">
{{ $s := $.Params }}
{{ range $k, $v := $s }}
<h3 class="roller{{ $k }}">{{ $v }}</h3>
{{ end }}
</div>

View File

@ -1,3 +0,0 @@
{{ if isset .Site.Taxonomies "tags" }}{{ if not (eq (len .Site.Taxonomies.tags) 0) }} <ul id="tagcloud">
{{ range $name, $items := .Site.Taxonomies.tags }}{{ $url := printf "%s/%s" "tags" ($name | urlize | lower)}}<li><a href="{{ $url | absURL }}" id="tag_{{ $name }}">{{ $name | title }}</a></li>
{{ end }}</ul>{{ end }}{{ end }}

58
static/form.css Normal file
View File

@ -0,0 +1,58 @@
input {
color: #ffffff;
margin: 0.2rem;
}
textarea:focus, input:focus {
outline-width: 0.2rem;
outline-style: solid;
}
textarea:focus {
outline-color: #222222;
}
input:focus {
outline-color: white;
}
input[type="submit"]:focus {
outline-color: #344a70;
}
input[type="submit"] {
background-color: #344a70;
text-align: center;
}
input[type="password"], [type="text"] {
background-color: #ffffff;
color: #222222;
}
textarea, input {
border-radius: 0.5rem;
border-style: hidden;
padding: 0.75rem;
}
textarea {
background-color: #222222;
border-style: solid;
border-width: 0;
resize: none;
color: white;
scrollbar-width: 0;
width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
font-family: inherit;
font-size: inherit;
font-weight: inherit;
}
textarea > ::placeholder {
color: #717171;
opacity: 1;
}

46
static/lugo.css Normal file
View File

@ -0,0 +1,46 @@
/* For NEXTPREV.HTML */
#nextprev {
/* The container for both the previous and next articles. */
color: black;
}
#nextprev a:any-link {
color: black;
}
#nextart {
float: left ;
text-align: left ;
}
#prevart {
float: right ;
text-align: right ;
}
#nextart,#prevart {
max-width: 33% ;
}
/* For TAGLIST.HTML */
.taglist {
text-align: center;
clear: both;
color: rgb(64, 64, 64);
}
/* For putting right / left boxes next to each other */
.left {
width: 45%;
padding-right: 5%;
float: left;
clear: both;
}
.right {
width: 45%;
padding-left: 5%;
float: right;
}

71
static/roller.css Normal file
View File

@ -0,0 +1,71 @@
.roller-container {display: grid; text-align: center;}
.roller0,.roller1,.roller2,.roller3,.roller4,.roller5{
animation-iteration-count: infinite;
animation-timing-function: cubic-bezier(1, 0, 0, 1);
animation-duration: 6s;
animation-direction: normal;
transform-origin: center;
/* works with "display: grid" to have all the words in the same place on the screen. */
grid-row: 1;
grid-column: 1;
}
.roller0 { animation-name: roll0; color: rgb(0, 182, 182)}
.roller1 { animation-name: roll1; color: rgb(173, 3, 154)}
.roller2 { animation-name: roll2; color: rgb(6, 179, 0)}
.roller3 { animation-name: roll3; color: rgb(211, 189, 0)}
.roller4 { animation-name: roll4; color: rgb(171, 0, 0)}
.roller5 { animation-name: roll5; color: rgb(255, 247, 0)}
@keyframes roll0 {
100% { opacity: 1; transform: translateY(0) rotateX(0); }
0% { opacity: 1; transform: translateY(0) rotateX(0); }
17% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
34% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
51% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
68% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
85% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
}
@keyframes roll1 {
100% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
0% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
17% { opacity: 1; transform: translateY(0) rotateX(0); }
34% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
51% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
68% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
85% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
}
@keyframes roll2 {
100% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
0% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
17% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
34% { opacity: 1; transform: translateY(0) rotateX(0); }
51% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
68% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
85% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
}
@keyframes roll3 {
100% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
0% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
17% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
34% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
51% { opacity: 1; transform: translateY(0) rotateX(0); }
68% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
85% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
}
@keyframes roll4 {
100% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
0% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
17% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
34% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
51% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
68% { opacity: 1; transform: translateY(0) rotateX(0); }
85% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
}
@keyframes roll5 {
100% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
0% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
17% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
34% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
51% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
68% { opacity: 0; transform: translateY(2rem) rotateX(15deg); }
85% { opacity: 1; transform: translateY(0) rotateX(0); }
}

View File

@ -1,120 +1,108 @@
.copy:hover {
color: #344a70;
}
::-webkit-scrollbar {
width: 0;
}
body {
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
font-size: large;
background: rgb(71, 71, 71);
color: black;
background-color: #222222;
color: #ffffff;
font-family: Arial, Helvetica, sans-serif;
margin: 0;
font-size: x-large;
}
main {
max-width: 75%;
margin: auto;
header {
background-color: #344a70;
margin-top: 0;
margin-left: 0;
text-align: center;
padding: 0.75rem;
font-size: xx-large;
}
h1, h2, h3, h4 {
text-align: center;
flex: 100%;
.article-header {
background-color: #454545;
color: #707070;
margin: 2rem;
margin-bottom: 0;
border-top-right-radius: 0.5rem;
border-top-left-radius: 0.5rem;
}
header h1 {
color: white;
}
header h4 {
/*
The color half-way between the
background color and pure white
*/
color: rgb(163, 163, 163);
}
a:link {
color: white;
}
a:visited{
color: rgb(174, 174, 174);
}
article a:link {
color: rgb(0, 0, 0);
}
article a:visited {
color: rgb(64, 64, 64);
.spaced {
margin: 0;
padding: 1rem;
}
article {
background-color: burlywood;
outline: cadetblue solid 5px;
padding: 3%;
border-radius: 10px;
background-color: #303030;
padding: 1.5rem;
margin-left: 2rem;
margin-right: 2rem;
text-align: left;
border-bottom-left-radius: 0.5rem;
border-bottom-right-radius: 0.5em;
}
hr {
border-top: 2px solid cadetblue;
border-radius: 4px;
}
br {
clear: both;
}
pre {
/*
This has to be flagged important because somewhere in hugo a style
is being directly applied to pre blocks. Ill have to find it later.
*/
background-color: rgb(59, 59, 59) !important;
padding-top: 0px;
padding-bottom: 0px;
padding-left: 10px;
padding-right: 10px;
border-radius: 8px;
outline: cadetblue solid 3px;
}
code {
font-size: large;
color: white;
/*
we need to re-define these
for times when a single backtick is used
*/
background-color: rgb(59, 59, 59);
padding-left: 3px;
padding-right: 3px;
padding-top: 1px;
border-radius: 4px;
}
img {
border-radius: 4px;
margin: 0;
}
figcaption {
color: rgb(69, 69, 69);
font-style: italic;
text-align: center;
}
figure {
margin: 2%;
margin: 2rem;
height: 1px;
border: 0;
border-top: 1px solid #454545;
height: 1px;
}
footer {
padding-top: 2%;
text-align: center;
clear: both;
color: #606060;
text-align: center;
}
footer a:any-link {
color: white;
p {
margin-left: 1rem;
margin-right: 1rem;
margin-top: 0;
}
@media only screen and (max-width: 600px) {
main {
max-width: 90%;
}
h1,h2,h3,h4,h5,h6 {
margin: 0;
text-align: center;
}
article h1 {
margin-bottom: 1rem;
}
a {
color: #3e765d;
}
a:hover {
color: #344a70;
text-decoration-line: none;
}
header a {
color: inherit;
text-decoration-line: none;
font-weight: bold;
}
header a:hover {
font-weight: bold;
color: inherit
}
main {
max-width: 80%;
margin: auto;
}
@media screen and (max-width: 900px) {
main {
max-width: 100%;
margin: auto;
}
}