build: migrate to hugo-bearblog theme

This commit is contained in:
Renken 2024-08-16 23:32:46 +02:00
parent 8b78346aad
commit 1cabc70d75
Signed by: renken
GPG key ID: 1F2BB159B645E575
14 changed files with 4 additions and 502 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "themes/hugo-bearblog"]
path = themes/hugo-bearblog
url = https://github.com/janraasch/hugo-bearblog.git

View file

@ -1,6 +0,0 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

View file

@ -1,341 +0,0 @@
$black: #080808;
html {
font-family: sans-serif;
color: $black;
}
body {
max-width: 920px;
margin: 0 auto;
padding: 1rem;
}
h1 {
margin-top: 0;
font-size: 1.5rem;
small {
display: block;
font-size: 1rem;
}
}
.index {
display: flex;
flex-direction: row;
.article-list {
flex-grow: 1;
.article {
margin-bottom: 1rem;
}
.date {
display: block;
color: #333;
}
}
aside {
width: 40%;
img {
display: block;
margin: 0 auto 1rem;
border-radius: 5px;
}
dt {
font-size: 0.9rem;
}
dd {
margin-left: 0;
&:not(:last-child) {
margin-bottom: 0.5rem;
}
}
}
@media(max-width: 640px) {
aside {
display: none;
}
}
}
article {
margin: 0 auto;
max-width: 720px;
line-height: 1.3;
img, video, iframe {
// !important for asciinema frames
display: block !important;
margin: 0 auto !important;
max-width: 90%;
@media(max-width: 640px) {
max-width: calc(100% - 2rem);
}
}
sup {
line-height: 1;
}
.comment {
margin: 2rem auto 0;
max-width: 80%;
color: #333;
}
}
.footnotes {
font-size: 0.85rem;
}
footer {
margin-top: 2rem;
text-align: center;
font-size: 0.8rem;
color: #333;
}
.float-img {
float: right;
display: inline;
padding-left: 1rem;
@media(max-width: 640px) {
display: block;
float: none;
padding-left: inherit;
}
}
pre {
background-color: #eee;
padding: 0.25rem 1rem;
margin: 0 -1rem;
max-width: 100%;
overflow-x: auto;
.cp {
color: #800;
}
.k {
color: #008;
}
.kt, .kd, .kc {
color: #44F;
}
.s {
color: #484;
font-style: italic;
}
.cm, .c1 {
color: #333;
font-style: italic;
}
.gi {
color: green;
}
.gd {
color: red;
}
.gu {
color: blue;
}
}
.webring {
margin-top: 2rem;
h2 {
font-size: 1.2rem;
}
.articles {
display: flex;
@media(max-width: 640px) {
flex-direction: column;
}
}
.title {
margin: 0;
}
.article {
flex: 1 1 0;
display: flex;
flex-direction: column;
background: #eee;
padding: 0.5rem;
margin: 0 0.5rem;
@media(max-width: 640px) {
margin: 0.5rem 0;
}
}
.article:first-child {
margin-left: 0;
}
.article:last-child {
margin-right: 0;
}
.summary {
font-size: 0.8rem;
flex: 1 1 0;
}
.attribution {
float: right;
font-size: 0.8rem;
color: #555;
line-height: 3;
}
.date {
color: black;
}
}
summary {
cursor: pointer;
background-color: #eee;
padding: 0.25rem 1rem;
margin: 0 -1rem;
}
details[open] {
border-bottom: 1rem solid #eee;
margin: 0 -1rem 1rem;
padding: 0 1rem;
}
.text-center {
text-align: center;
}
blockquote {
border-left: 5px solid #777;
background-color: #eee;
padding: 0 1rem;
margin-left: 0;
margin-right: 0;
blockquote {
margin-right: 0;
margin-left: 0;
}
}
dl {
display: grid;
grid-template-columns: auto 1fr;
grid-gap: 0.2rem 1rem;
dt {
font-weight: bold;
grid-column-start: 1;
}
dd {
grid-column-start: 2;
margin: 0;
}
}
.alert {
padding: 0.5rem;
border: 1px solid transparent;
margin-bottom: 1rem;
&.alert-danger {
background: #f8d7da;
color: #721c24;
border-color: #f5c6cb;
}
&.alert-info {
background: #d1ecf1;
color: #0c5460;
border-color: #bee5eb;
}
}
table {
color: #333;
background: white;
border: 1px solid grey;
font-size: 12pt;
border-collapse: collapse;
}
table thead th,
table tfoot th {
background: rgba(0,0,0,.1);
}
table caption {
padding:.5em;
}
table th,
table td {
padding: .5em;
border: 1px solid lightgrey;
}
td.red {
background: #F8D7DA;
}
td.yellow {
background: #FFF3CD;
}
td.blue {
background: #CFE2FF;
}
.error,
.info,
.warn
.todo {
background: #efefef;
border-left-style: solid;
border-left-width: 0.4rem;
border-radius: 0.2rem;
margin-left: 0;
> p {
padding: 0.5rem 1rem;
}
}
.warn {
border-left-color: #ffbb00;
}
.info {
border-left-color: #0000ee;
}
.error {
border-left-color: #ee0000;
}
.todo {
border-left-color: #eeee00;
}

View file

@ -1,11 +0,0 @@
{{ partial "head.html" . }}
<h1>
{{$.Title}}
</h1>
<main>
{{.Content}}
</main>
{{ partial "foot.html" }}

View file

@ -1,41 +0,0 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}}
{{- if or $.IsHome $.IsSection -}}
{{- $pages = $pctx.RegularPages -}}
{{- else -}}
{{- $pages = $pctx.Pages -}}
{{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>renken's weblog</title>
<link>https://shione.net</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{ range $pages }}
{{- if .OutputFormats.Get "HTML" -}}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{- .Content | html -}}</description>
</item>
{{- end -}}
{{ end }}
</channel>
</rss>

View file

@ -1,10 +0,0 @@
<!doctype html>
<html lang="en">
<meta charset="utf-8" />
<title>{{.Title}}</title>
{{ $style := resources.Get "main.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
<main>
{{.Content}}
</main>

View file

@ -1,18 +0,0 @@
{{ partial "head.html" . }}
<h1>
{{$.Title}}
<small>
<span class="date">{{.Date.Format "January 2, 2006"}}</span>
on
<span class="site"><a href="{{.Site.BaseURL}}">{{.Site.Title}}</a></span>
</small>
</h1>
<main>
<article>
{{.Content}}
</article>
</main>
{{ partial "foot.html" }}

View file

@ -1,55 +0,0 @@
{{ partial "head.html" . }}
<main class="index">
<section class="article-list">
<h1>{{$.Title}}</h1>
{{ range (where (where .Site.RegularPages "Section" "blog") "Params.nohtml" "!=" "true") }}
{{- if .OutputFormats.Get "html" }}
<div class="article">
<span class="date">{{.Date.Format "January 2, 2006"}}</span>
<a href="{{.Permalink}}">{{.Title}}</a>
</div>
{{ end }}
{{ end }}
</section>
<aside>
<img
src="/avatar.png"
alt="My avatar: Nonoka Sasaki from Mitsuboshi Colors"
width="148" height="148" />
<div class="text-center">
<a href="services.html">services</a>
·
<a href="misc.html">misc</a>
·
<a class="rss" href="/blog/index.xml">rss</a>
</div>
<dl class="external-links">
<dt>email</dt>
<dd><a href="mailto:renken@shione.net">renken@shione.net</a></dd>
<dt>gitlab</dt>
<dd><a href="https://gitlab.com/renken">renken</a></dd>
<dt>telegram</dt>
<dd><a href="https://t.me/renken">renken</a></dd>
<dt>last.fm</dt>
<dd><a href="https://www.last.fm/user/renkenrc">renkenrc</a></dd>
<dt>pgp</dt>
<dd><a href="/renken.asc">53334B09D2066FCF</a></dd>
<dt><a href="/services/stream.html">stream</a></dt>
<dd><a href="srt://shione:60000">srt://shione:60000</a></dd>
</dl>
<small>
Hi, Im Renken, 25 years old from Algeria and I manage shione. The name
Shione translates to “sound of tide” (汐音).
</small>
</aside>
</main>
{{ partial "foot.html" . }}

View file

@ -1,6 +0,0 @@
<footer>
<a href="https://www.debian.org"><img id="rss" src="/debian.png" alt="debian"></a>
<br>
<br>
<a href="https://gitlab.com/renken/shione">source code</a>
</footer>

View file

@ -1,14 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
{{ if $.Params.noindex }}
<meta name="robots" content="noindex">
{{ end }}
<title>{{$.Title}}</title>
<link rel="alternate" type="application/rss+xml" title="RSS" href="/index.xml">
<link rel="icon" type="image/png" href="/avatar.png">
{{ $style := resources.Get "main.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
</head>

1
themes/hugo-bearblog Submodule

@ -0,0 +1 @@
Subproject commit efc24bc5e95f0ccb88051e1a7d95e8a1404e953e