diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..0c53f35 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space + +[*.html] +indent_size = 4 + +[*.md] +indent_size = 2 + +[config.toml] +indent_size = 2 diff --git a/archetypes/blog.md b/archetypes/blog.md new file mode 100644 index 0000000..a873a97 --- /dev/null +++ b/archetypes/blog.md @@ -0,0 +1,13 @@ ++++ +title = "{{ replace .Name "-" " " | title }}" +date = "{{ .Date }}" +draft = true + +description = """ +Lorem ipsum +""" + +tags = [ + "awesome", +] ++++ diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..b1a6dd7 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,8 @@ ++++ +title = "{{ replace .Name "-" " " | title }}" +menu = "main" + +description = """ +Lorem ipsum +""" ++++ diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..d9032bb --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,27 @@ + + + {{- partial "head.html" . -}} + + + {{- partial "header.html" . -}} + {{ partial "navbar.html" . }} + +
+ {{ if and (ne .Params.Toc false) .IsPage }} +
+

Table of Contents

+ {{ .TableOfContents }} +
+ {{ end }} + +
+ {{- block "main" . }} + {{ .Content }} + {{- end }} +
+
+ + {{- partial "footer.html" . -}} + + + diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..17b274b --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,4 @@ +{{ define "main" }} +

{{ .Title }}

+{{ .Content }} +{{ end }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..e4e4a83 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,2 @@ +{{ define "main" }} +{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..ff0262d --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,18 @@ + + + + + + + {{ range .AlternativeOutputFormats -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} + + {{ $title := print .Title " | " .Site.Title }} + {{ if .IsHome }}{{ $title = .Site.Title }}{{ end }} + {{ $title }} + + {{ template "_internal/opengraph.html" . }} + {{ template "_internal/twitter_cards.html" . }} + {{ template "_internal/schema.html" . }} + diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..e115b84 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,3 @@ +
+

{{ .Site.Title }}

+
diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html new file mode 100644 index 0000000..c914cbb --- /dev/null +++ b/layouts/partials/navbar.html @@ -0,0 +1,6 @@ + diff --git a/layouts/robots.txt b/layouts/robots.txt new file mode 100644 index 0000000..0326f5c --- /dev/null +++ b/layouts/robots.txt @@ -0,0 +1,2 @@ +User-Agent: * +Sitemap: {{ "sitemap.xml" | absURL }} diff --git a/static/css/bobatheme.css b/static/css/bobatheme.css new file mode 100644 index 0000000..c8a4d07 --- /dev/null +++ b/static/css/bobatheme.css @@ -0,0 +1,118 @@ +@media screen and (max-width: 700px) { + .row { + flex-direction: column; + } +} +@media screen and (max-width: 400px) { + .navbar a { + float: none; + width: 100%; + } +} + +body { + font-family: sans-serif; + margin: 0; + display: flex; + flex-direction: column; +} +a { + color: blue; +} +blockquote { + border-left: 5px solid #ccc; + padding-left: 10px; +} + +.header { + padding: 10px; + text-align: center; + background: #4FA2F5; + color: white; +} +.header h1 { + font-size: 40px; +} + +.navbar { + overflow: hidden; + background-color: #999; +} +.navbar a { + float: left; + display: block; + color: white; + text-align: center; + padding: 14px 20px; + text-decoration: none; +} +/* .navbar a.right { + float: right; +} */ +.navbar a:hover { + background-color: #ddd; + color: black; +} + +* { + box-sizing: border-box; +} +.row { + flex: 1; + display: flex; + flex-wrap: wrap; +} +.side { + width: 20%; + background-color: lightgray; + padding: 20px; +} +.main { + width: 80%; + background-color: white; + padding: 20px; +} +.footer { + padding: 20px; + text-align: center; + background: #ddd; +} + +@media (prefers-color-scheme: dark) { + body { + background-color: black; + } + a { + color: #4da6ff; + } + blockquote { + border-left: 5px solid #222; + } + .header { + background: #1A406B; + color: lightgray; + } + .navbar { + background-color: #222; + } + .navbar a { + color: lightgray; + } + .navbar a:hover { + background-color: #444; + color: white; + } + .side { + background-color: #111; + color: lightgray; + } + .main { + background-color: black; + color: lightgray; + } + .footer { + background: #222; + color: lightgray; + } + max-width: 650px; +} diff --git a/static/css/starwars.css b/static/css/starwars.css new file mode 100644 index 0000000..b463942 --- /dev/null +++ b/static/css/starwars.css @@ -0,0 +1,116 @@ +@media screen and (max-width: 700px) { + .row { + flex-direction: column; + } +} +@media screen and (max-width: 400px) { + .navbar a { + float: none; + width: 100%; + } +} + +body, html { + height: 100%; +} + +body { + font-family: sans-serif; + margin: 0; + display: flex; + flex-direction: column; +} +a { + color: blue; +} + +.header { + padding: 10px; + text-align: center; + background: url(../images/stars.png); + background-size: cover; + color: white; +} +.header h1 { + font-size: 50px; + font-weight: bold; + transform-origin: 50% 100%; + transform: perspective(350px) rotateX(25deg); + color: yellow; +} + +.navbar { + overflow: hidden; + background-color: #999; +} +.navbar a { + float: left; + display: block; + color: white; + text-align: center; + padding: 14px 20px; + text-decoration: none; +} +/* .navbar a.right { + float: right; +} */ +.navbar a:hover { + background-color: #ddd; + color: black; +} + +* { + box-sizing: border-box; +} +.row { + flex: 1; + display: flex; + flex-wrap: wrap; +} +.side { + width: 25%; + background-color: lightgray; + padding: 20px; +} +.main { + width: 75%; + background-color: white; + padding: 20px; +} +.footer { + padding: 20px; + text-align: center; + background: #ddd; +} + +@media (prefers-color-scheme: dark) { + body { + background-color: black; + } + a { + color: #4da6ff; + } + .navbar { + background-color: #222; + } + .navbar a { + color: lightgray; + } + .navbar a:hover { + background-color: #444; + color: white; + } + .side { + background-color: #111; + color: lightgray; + } + .main { + background-color: black; + color: lightgray; + } + .footer { + background: #222; + color: lightgray; + } + max-width: 650px; +} diff --git a/static/img/stars.png b/static/img/stars.png new file mode 100644 index 0000000..58a65db Binary files /dev/null and b/static/img/stars.png differ diff --git a/theme.toml b/theme.toml new file mode 100644 index 0000000..5b86e74 --- /dev/null +++ b/theme.toml @@ -0,0 +1,15 @@ +# theme.toml template for a Hugo theme +# See https://github.com/gohugoio/hugoThemes#themetoml for an example + +name = "bobatheme" +license = "MIT" +licenselink = "https://github.com/BBaoVanC/bobatheme/blob/master/LICENSE" +description = "Simple Hugo theme for boba.best and bbaovanc.com" +homepage = "https://boba.best/" +tags = [] +features = [] +min_version = "0.41.0" + +[author] + name = "bbaovanc" + homepage = "https://bbaovanc.com"