Initial commit

This commit is contained in:
Lukas Joswiak 2020-05-14 23:48:11 -07:00
commit 3e882d86e6
16 changed files with 408 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
.DS_Store

20
LICENSE Normal file
View file

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2020 Lukas Joswiak
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.

2
archetypes/default.md Normal file
View file

@ -0,0 +1,2 @@
+++
+++

59
assets/css/syntax.css Normal file
View file

@ -0,0 +1,59 @@
/* Background */ .chroma { color: #f8f8f2; background-color: #272822 }
/* Error */ .chroma .err { color: #960050; background-color: #1e0010 }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc }
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* Keyword */ .chroma .k { color: #66d9ef }
/* KeywordConstant */ .chroma .kc { color: #66d9ef }
/* KeywordDeclaration */ .chroma .kd { color: #66d9ef }
/* KeywordNamespace */ .chroma .kn { color: #f92672 }
/* KeywordPseudo */ .chroma .kp { color: #66d9ef }
/* KeywordReserved */ .chroma .kr { color: #66d9ef }
/* KeywordType */ .chroma .kt { color: #66d9ef }
/* NameAttribute */ .chroma .na { color: #a6e22e }
/* NameClass */ .chroma .nc { color: #a6e22e }
/* NameConstant */ .chroma .no { color: #66d9ef }
/* NameDecorator */ .chroma .nd { color: #a6e22e }
/* NameException */ .chroma .ne { color: #a6e22e }
/* NameFunction */ .chroma .nf { color: #a6e22e }
/* NameOther */ .chroma .nx { color: #a6e22e }
/* NameTag */ .chroma .nt { color: #f92672 }
/* Literal */ .chroma .l { color: #ae81ff }
/* LiteralDate */ .chroma .ld { color: #e6db74 }
/* LiteralString */ .chroma .s { color: #e6db74 }
/* LiteralStringAffix */ .chroma .sa { color: #e6db74 }
/* LiteralStringBacktick */ .chroma .sb { color: #e6db74 }
/* LiteralStringChar */ .chroma .sc { color: #e6db74 }
/* LiteralStringDelimiter */ .chroma .dl { color: #e6db74 }
/* LiteralStringDoc */ .chroma .sd { color: #e6db74 }
/* LiteralStringDouble */ .chroma .s2 { color: #e6db74 }
/* LiteralStringEscape */ .chroma .se { color: #ae81ff }
/* LiteralStringHeredoc */ .chroma .sh { color: #e6db74 }
/* LiteralStringInterpol */ .chroma .si { color: #e6db74 }
/* LiteralStringOther */ .chroma .sx { color: #e6db74 }
/* LiteralStringRegex */ .chroma .sr { color: #e6db74 }
/* LiteralStringSingle */ .chroma .s1 { color: #e6db74 }
/* LiteralStringSymbol */ .chroma .ss { color: #e6db74 }
/* LiteralNumber */ .chroma .m { color: #ae81ff }
/* LiteralNumberBin */ .chroma .mb { color: #ae81ff }
/* LiteralNumberFloat */ .chroma .mf { color: #ae81ff }
/* LiteralNumberHex */ .chroma .mh { color: #ae81ff }
/* LiteralNumberInteger */ .chroma .mi { color: #ae81ff }
/* LiteralNumberIntegerLong */ .chroma .il { color: #ae81ff }
/* LiteralNumberOct */ .chroma .mo { color: #ae81ff }
/* Operator */ .chroma .o { color: #f92672 }
/* OperatorWord */ .chroma .ow { color: #f92672 }
/* Comment */ .chroma .c { color: #75715e }
/* CommentHashbang */ .chroma .ch { color: #75715e }
/* CommentMultiline */ .chroma .cm { color: #75715e }
/* CommentSingle */ .chroma .c1 { color: #75715e }
/* CommentSpecial */ .chroma .cs { color: #75715e }
/* CommentPreproc */ .chroma .cp { color: #75715e }
/* CommentPreprocFile */ .chroma .cpf { color: #75715e }
/* GenericDeleted */ .chroma .gd { color: #f92672 }
/* GenericEmph */ .chroma .ge { font-style: italic }
/* GenericInserted */ .chroma .gi { color: #a6e22e }
/* GenericStrong */ .chroma .gs { font-weight: bold }
/* GenericSubheading */ .chroma .gu { color: #75715e }

0
layouts/404.html Normal file
View file

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
{{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}}
<main id="content">
{{- block "main" . }}{{- end }}
</main>
{{- partial "footer.html" . -}}
</body>
</html>

View file

@ -0,0 +1,3 @@
{{ define "main" }}
{{- partial "posts.html" . -}}
{{ end }}

View file

@ -0,0 +1,6 @@
{{ define "main" }}
<article>
<header id="post-title"><h1>{{ .Title }}</h1></header>
{{- .Content -}}
</article>
{{ end }}

4
layouts/index.html Normal file
View file

@ -0,0 +1,4 @@
{{ define "main" }}
{{ .Content }}
{{- partial "posts.html" . -}}
{{ end }}

View file

@ -0,0 +1,208 @@
*, *:before, *:after {
box-sizing: border-box;
}
html {
font-size: 62.5%;
}
body {
font-size: 16px;
font-size: 1.6rem;
font-family: 'Helvetica Neue', 'Arial', sans-serif;
color: #282828;
width: 100%;
margin: 0 auto;
padding: 0 16px;
line-height: 1.6;
}
@media (prefers-color-scheme: dark) {
body {
color: #ebebeb;
background: #121212;
}
}
header#banner {
margin: 25px 0;
}
header#banner a {
color: #323232;
text-decoration: none;
}
header#banner a:hover {
text-decoration: underline;
}
header#banner h2 {
display: inline;
font-size: 21px;
font-size: 2.1rem;
margin: 0 8px 0 0;
}
header#banner nav {
display: inline-block;
}
header#banner nav ul {
list-style-type: none;
font-size: 1.05em;
text-transform: lowercase;
margin: 0;
padding: 0;
}
header#banner nav ul li {
display: inline;
margin: 0 3px;
}
header#banner nav ul li a {
color: #454545;
}
@media (prefers-color-scheme: dark) {
header#banner a {
color: #e0e0e0;
text-decoration: none;
}
header#banner nav ul li a {
color: #cccccc;
}
}
main#content a {
color: #007dfa;
text-decoration: none;
}
@media (prefers-color-scheme: dark) {
main#content a {
color: #00b1ed;
}
}
main#content a:hover {
text-decoration: underline;
}
main#content p {
color: #323232;
margin: 16px 0;
}
@media (prefers-color-scheme: dark) {
main#content p {
color: #f5f5f5;
}
}
main#content h1,
main#content h2,
main#content h3,
main#content h4,
main#content h5,
main#content h6 {
margin-bottom: 0;
}
main#content h1 + p,
main#content h2 + p,
main#content h3 + p,
main#content h4 + p,
main#content h5 + p,
main#content h6 + p {
margin-top: 5px;
}
main#content h3 {
font-size: 19px;
font-size: 1.9rem;
}
/* index.html styles */
main#content ul#posts {
list-style-type: none;
font-size: 16px;
font-size: 1.6rem;
margin-top: 0;
padding: 0;
}
main#content ul#posts li {
margin: 5px 0;
padding: 0;
}
main#content ul#posts small {
font-size: 0.8em;
color: #767676;
margin-left: 10px;
}
main#content ul#posts li a {
text-decoration: none;
}
main#content ul#posts li a:hover {
color: #369aff;
}
main#content ul#posts li a:hover small {
color: inherit;
}
@media (prefers-color-scheme: dark) {
main#content ul#posts li a:hover {
color: #21c7ff;
}
}
/* single.html styles */
main#content header#post-title {
font-size: 16px;
font-size: 1.6rem;
}
main#content img {
max-width: 100%;
margin: 0 auto;
}
main#content code,
main#content pre {
font-family: 'Menlo', monospace;
}
main#content code {
font-size: 0.96em;
padding: 0 5px;
}
main#content pre {
display: block;
overflow-x: auto;
font-size 14px;
font-size: 1.4rem;
white-space: pre;
margin: 20px 0;
padding: 1.5rem 1.5rem;
line-height: 1.4;
}
main#content pre code {
padding: 0;
}
footer#footer {
font-size: 14px;
font-size: 1.4rem;
font-weight: 300;
color: #949494;
margin: 40px 0;
}

View file

@ -0,0 +1,37 @@
body {
width: 600px;
line-height: 1.5;
}
/* index.html styles */
header#banner h2 {
font-size: 25px;
font-size: 2.5rem;
}
main#content h3 {
font-size: 20px;
font-size: 2rem;
}
main#content ul#posts {
font-size: 18px;
font-size: 1.8rem;
}
/* single.html styles */
main#content header#post-title {
font-size: 20px;
font-size: 2rem;
}
main#content img {
max-width: 108%;
margin-left: -4%;
}
main#content pre {
width: 108%;
margin-left: -4%;
padding: 1.5rem 2.2rem;
}

View file

@ -0,0 +1,3 @@
<footer id="footer">
{{ .Site.Params.copyright }}
</footer>

View file

@ -0,0 +1,17 @@
<head>
<title>{{ .Title }}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css" media="screen">
{{ partial "css/main.css" . | safeCSS }}
</style>
<style type="text/css" media="(min-width: 770px)">
{{ partial "css/min770px.css" . | safeCSS }}
</style>
{{ $syntax := resources.Get "css/syntax.css" | minify }}
<link rel="stylesheet" href="{{ $syntax.Permalink }}">
</head>

View file

@ -0,0 +1,12 @@
<header id="banner">
<h2><a href="/">{{ .Site.Title }}</a></h2>
<nav>
<ul>
{{ range .Site.Home.Pages }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</nav>
</header>

View file

@ -0,0 +1,13 @@
<h3>Posts</h3>
{{ range where .Pages "Section" "posts" }}
<ul id="posts">
{{ range .Pages.ByDate.Reverse }}
<li>
<a href="{{ .Permalink }}">
{{- .Title -}}
<small><time>{{ .Date.Format "Jan 2, 2006" }}</time></small>
</a>
</li>
{{ end }}
</ul>
{{ end }}

12
theme.toml Normal file
View file

@ -0,0 +1,12 @@
name = "Etch"
license = "MIT"
licenselink = "https://github.com/LukasJoswiak/etch/blob/master/LICENSE"
description = ""
homepage = "http://example.com/"
tags = ["simple", "clean", "fast", "responsive", "dark mode"]
features = ["fast", "syntax highlighting", "dark mode"]
min_version = "0.41"
[author]
name = "Lukas Joswiak"
homepage = "https://lukasjoswiak.com"