add bbb theme (split to separate repo later

This commit is contained in:
Joel Beckmeyer 2022-07-31 09:34:20 -04:00
parent 47b6fbe3b5
commit ff7fcadfdb
13 changed files with 133 additions and 0 deletions

20
themes/bbb/LICENSE Normal file
View File

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2022 Joel Beckmeyer
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.

View File

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

View File

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html class="no-js" lang="{{ .Site.LanguageCode }}" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
{{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}}
<div id="content">
{{- block "main" . }}{{- end }}
</div>
{{- partial "footer.html" . -}}
</body>
</html>

View File

@ -0,0 +1,10 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ range .Pages.ByPublishDate.Reverse }}
<p>
<h3><a class="title" href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
{{ partial "metadata.html" . }}
<a class="summary" href="{{ .RelPermalink }}"/a>
</p>
{{ end }}
{{ end }}

View File

@ -0,0 +1,6 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ partial "metadata.html" . }}
<br><br>
{{ .Content }}
{{ end }}

View File

@ -0,0 +1,5 @@
{{ define "main" }}
<div>
<h1 class="title">{{ .Site.Title }}</h1>
</div>
{{ end }}

View File

@ -0,0 +1 @@
<p class="footer">{{ .Site.Params.FooterText | markdownify }}</p>

View File

@ -0,0 +1,15 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="{{ .Site.BaseURL }}">
<link rel="stylesheet" type="text/css" href="/css/style.css">
<link id="theme_css" rel="stylesheet" href="/css/style.css">
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
{{ $title := print .Site.Title " | " .Title }}
{{ if .IsHome }}{{ $title = .Site.Title }}{{ end }}
<title>{{ $title }}</title>
</head>

View File

@ -0,0 +1,14 @@
<div id="nav-border" class="container">
<nav id="menu" class="nav">
{{ range .Site.Menus.main }}
<a class="nav-link" href="{{ .URL }}">
{{ if .Pre }}
{{ $icon := printf "<i data-feather=\"%s\"></i> " .Pre | safeHTML }}
{{ $icon }}
{{ end }}
{{ $text := print .Name | safeHTML }}
{{ $text }}
</a>
{{ end }}
</nav>
</div>

View File

@ -0,0 +1,11 @@
{{ $dateTime := .PublishDate.Format "2006-01-02" }}
{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }}
<i data-feather="calendar"></i>
<time datetime="{{ $dateTime }}">{{ .PublishDate.Format $dateFormat }}</time>
{{ with .Params.tags }}
<i data-feather="tag"></i>
{{ range . }}
{{ $href := print (absURL "tags/") (urlize .) }}
<a class="btn btn-sm btn-outline-dark tag-btn" href="{{ $href }}">{{ . }}</a>
{{ end }}
{{ end }}

View File

@ -0,0 +1,26 @@
* {
max-width: 650px;
margin: auto;
}
.nav {
margin-top: 1rem;
margin-bottom: 1rem;
text-align: center;
}
.nav-link {
padding: .25rem;
}
.title {
max-width: 650px;
margin-top: 1rem;
margin-bottom: 1rem;
text-align: center;
}
.footer {
position: relative;
text-align: center;
}

12
themes/bbb/theme.toml Normal file
View File

@ -0,0 +1,12 @@
name = "bbb"
license = "MIT"
licenselink = "https://git.beckmeyer.us/TnSb/bbb-hugo-theme/blob/master/LICENSE"
description = "Basic, Boring, Barebones Hugo Theme"
homepage = "https://git.beckmeyer.us/TnSb/bbb"
tags = []
features = []
min_version = "0.41.0"
[author]
name = "Joel Beckmeyer"
homepage = "https://beckmeyer.us/"