commit b56ec7ca6c6f16b5daed702dad1cf8768fcf6f77
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date: Fri, 29 Nov 2019 22:34:42 -0500
Initial commit
Diffstat:
14 files changed, 143 insertions(+), 0 deletions(-)
diff --git a/LICENSE b/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2019 YOUR_NAME_HERE
+
+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.
diff --git a/archetypes/default.md b/archetypes/default.md
@@ -0,0 +1,2 @@
++++
++++
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html lang="{{ .Site.Language }}">
+ {{ partial "head.html" . }}
+ <body>
+ {{ partial "nav.html" . }}
+ <main>
+ {{ partial "header.html" . }}
+ {{ block "content" . }}{{ end }}
+ </main>
+ {{ partial "footer.html" . }}
+ </body>
+</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
@@ -0,0 +1,14 @@
+{{ define "content" }}
+<article>
+ {{ .Content }}
+ <ul>
+ {{ $pages := .Data.Pages }}
+ {{ if .IsHome }}
+ {{ $pages = (first 5 (where .Site.RegularPages "Section" "!=" "")) }}
+ {{ end }}
+ {{ range $pages }}
+ <li>{{ .Date.Format "2006-01-02" }} <a href="{{ .Permalink }}">{{ .Title }}</a></li>
+ {{ end }}
+ </ul>
+</article>
+{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
@@ -0,0 +1 @@
+{{ define "content" }}<article>{{ .Content }}</article>{{ end }}
diff --git a/layouts/partials/css/color.css b/layouts/partials/css/color.css
@@ -0,0 +1,6 @@
+:root {
+ --accent-color: #00F;
+ --text-color: #000;
+ --background-color: #FFF;
+ --alt-background-color: #CF6;
+}
diff --git a/layouts/partials/css/custom.css b/layouts/partials/css/custom.css
diff --git a/layouts/partials/css/style.css b/layouts/partials/css/style.css
@@ -0,0 +1,31 @@
+{{ partial "css/color.css" . | safeCSS }}
+body {
+ background: var(--background-color);
+ color: var(--text-color);
+ margin: auto;
+ max-width: 70ch;
+ padding: 1em;
+ line-height: 1.5;
+}
+a {
+ color: var(--accent-color);
+}
+img, video {
+ max-width: 100%;
+}
+table {
+ margin: auto;
+}
+th, td {
+ padding: 5px;
+}
+thead, tfoot, tr:nth-child(even), pre, code, kbd {
+ background: var(--alt-background-color);
+}
+pre {
+ overflow-x: auto;
+}
+code, kbd {
+ font-size: 80%;
+}
+{{ partial "css/custom.css" . | safeCSS }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
@@ -0,0 +1 @@
+<footer>{{ with .Site.Copyright }}{{ . | markdownify }}{{ end }}</footer>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
@@ -0,0 +1,11 @@
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <style>{{ partial "css/style.css" . | safeCSS }}</style>
+ {{ if .IsHome }}
+ <title>{{ .Site.Title }}</title>
+ {{ else }}
+ <title>{{ .Title }} | {{ .Site.Title }}</title>
+ {{ end }}
+ {{ partial "head_custom.html" . }}
+</head>
diff --git a/layouts/partials/head_custom.html b/layouts/partials/head_custom.html
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
@@ -0,0 +1,5 @@
+{{ if .IsPage }}
+<header><h1>{{ .Title }}</h1></header>
+{{ else if .IsHome }}
+<header><h1>{{ .Site.Title }}</h1></header>
+{{ end }}
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
@@ -0,0 +1,19 @@
+<nav>
+ {{- if not .IsHome -}}
+ <a href="{{ .Site.Home.Permalink | relURL }}">{{ .Site.Title }}</a> |
+ {{- end -}}
+ {{- range $i, $menu := .Site.Menus.main -}}
+ {{- if (ge $i 1) -}} | {{- end -}}
+ <a href="{{ $menu.URL | relURL }}">{{ $menu.Name }}</a>
+ {{- end -}}
+ {{- if .IsTranslated -}}
+ <span style="float:right;">
+ [
+ {{- range $i, $page := .Translations -}}
+ {{- if (ge $i 1) }} | {{ end -}}
+ <a href="{{ $page.Permalink | relURL }}">{{ $page.Language.LanguageName }}</a>
+ {{- end -}}
+ ]
+ </span>
+ {{- end -}}
+</nav>
diff --git a/theme.toml b/theme.toml
@@ -0,0 +1,21 @@
+# theme.toml template for a Hugo theme
+# See https://github.com/gohugoio/hugoThemes#themetoml for an example
+
+name = "Djem So"
+license = "MIT"
+licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE"
+description = ""
+homepage = "http://example.com/"
+tags = []
+features = []
+min_version = "0.41"
+
+[author]
+ name = ""
+ homepage = ""
+
+# If porting an existing theme
+[original]
+ name = ""
+ homepage = ""
+ repo = ""