mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-07-04 11:07:32 -05:00
Compare commits
2 Commits
ca0f8d390c
...
hugo-0.146
Author | SHA1 | Date | |
---|---|---|---|
7c79f83138
|
|||
fa89bc6746
|
@ -291,17 +291,17 @@ table.simple tbody tr:nth-child(even) {
|
||||
|
||||
/* Icons */
|
||||
.icon {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
color: var(--text-1);
|
||||
text-align: center;
|
||||
display: inline;
|
||||
vertical-align: sub;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* workarounds for some icons from jam-icons being non-square aspect ratio */
|
||||
.icon-code {
|
||||
width: 1.25em;
|
||||
h1 svg.icon {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
@ -315,6 +315,11 @@ table.simple tbody tr:nth-child(even) {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.heading-link svg {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* Top bar formatting {{{ */
|
||||
@ -671,7 +676,6 @@ table.simple tbody tr:nth-child(even) {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
justify-content: center;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.share-buttons a {
|
||||
@ -686,7 +690,8 @@ table.simple tbody tr:nth-child(even) {
|
||||
}
|
||||
|
||||
.share-buttons svg {
|
||||
display: block;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
/* https://stackoverflow.com/a/72073682/19003757 */
|
||||
|
3
assets/js/share-event.js
Normal file
3
assets/js/share-event.js
Normal file
@ -0,0 +1,3 @@
|
||||
function share_event(service) {
|
||||
// this function does nothing by default
|
||||
}
|
68
exampleSite/hugo.yaml
Normal file
68
exampleSite/hugo.yaml
Normal file
@ -0,0 +1,68 @@
|
||||
baseURL: https://example.com
|
||||
theme: bobatheme
|
||||
defaultContentLanguage: en
|
||||
copyright: '© 2021 bbaovanc <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>'
|
||||
sectionPagesMenu: main
|
||||
enableRobotsTXT: true
|
||||
enableGitInfo: true
|
||||
|
||||
pagination:
|
||||
pagerSize: 5
|
||||
|
||||
taxonomies:
|
||||
_merge: deep
|
||||
|
||||
markup: # this just keeps the bobatheme markup styling
|
||||
_merge: deep
|
||||
|
||||
outputs:
|
||||
_merge: deep
|
||||
|
||||
outputFormats:
|
||||
_merge: deep
|
||||
|
||||
params:
|
||||
author:
|
||||
name: bbaovanc
|
||||
|
||||
# these are for the OpenGraph/Twitter embeds in Hugo
|
||||
description: Example website for bobatheme
|
||||
|
||||
# these are for favicons in bobatheme (disabled by default)
|
||||
# faviconSVG: favicon.svg
|
||||
# appleTouchPNG: apple-touch-icon.png
|
||||
|
||||
# show reading time (enabled by default)
|
||||
# readingtime: true
|
||||
|
||||
# used for "View source" (unset by default)
|
||||
# gitFileURL: https://github.com/BBaoVanC/bobatheme/blob/master
|
||||
# gitFileIcon: github-circle
|
||||
# gitHistoryURL: https://github.com/BBaoVanC/bobatheme/commits/master
|
||||
|
||||
# social media share icons
|
||||
# shareButtons:
|
||||
# twitter: true
|
||||
# facebook: true
|
||||
# linkedin: true
|
||||
# reddit: true
|
||||
# telegram: true
|
||||
# print: true
|
||||
|
||||
# show "Latest Posts" section at bottom of content pages
|
||||
# latestPostsOnContent: true
|
||||
|
||||
# footer: >-
|
||||
# Some example text for the footer.
|
||||
|
||||
|
||||
# see https://gohugo.io/about/hugo-and-gdpr/#all-privacy-settings
|
||||
# you probably want to keep this default
|
||||
privacy:
|
||||
_merge: deep
|
||||
|
||||
languages:
|
||||
en:
|
||||
languageName: English
|
||||
title: Example Website
|
||||
weight: 1
|
@ -8,12 +8,6 @@
|
||||
|
||||
{{ partial "top.html" . }}
|
||||
|
||||
{{ if hugo.IsServer -}}
|
||||
<div style="position: fixed; bottom: 25px; right: 25px;">
|
||||
{{ templates.Current.Name }}
|
||||
</div>
|
||||
{{ end -}}
|
||||
|
||||
<div class="main-container">
|
||||
{{ if not .IsHome }}
|
||||
{{ partial "breadcrumb.html" . }}
|
@ -1 +0,0 @@
|
||||
<!-- Placeholder for website to add custom post metadata to summaries -->
|
@ -1,14 +0,0 @@
|
||||
{{/* https://github.com/gohugoio/hugo/issues/13823#issuecomment-3015270202 */}}
|
||||
{{ with .Get 0 -}}
|
||||
{{ with $.Page.GetPage . -}}
|
||||
{{ .RenderShortcodes -}}
|
||||
{{ else with $.Page.Resources.Get . -}}
|
||||
{{ .RenderShortcodes -}}
|
||||
{{ else with resources.Get . -}}
|
||||
{{ .Content -}}
|
||||
{{ else -}}
|
||||
{{ errorf "The %q shortcode was unable to find %q. See %s" $.Name . $.Position -}}
|
||||
{{ end -}}
|
||||
{{ else -}}
|
||||
{{ errorf "The %q shortcode requires a positional parameter indicating the logical path of the file to include. See %s" .Name .Position -}}
|
||||
{{ end -}}
|
@ -16,6 +16,9 @@
|
||||
{{ with resources.Get "js/bobatheme.js" | fingerprint "sha512" }}
|
||||
<script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||
{{ end }}
|
||||
{{ with resources.Get "js/share-event.js" | fingerprint "sha512" }}
|
||||
<script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.faviconSVG }}
|
||||
<link rel="icon" href="{{ . | absURL }}" />
|
@ -1,6 +1,6 @@
|
||||
{{- $icon_resource := resources.Get (printf "jam/icons/%s.svg" .) -}}
|
||||
{{- $icon := $icon_resource.Content -}}
|
||||
{{- $icon = replaceRE `<svg` (printf `<svg class="icon icon-%s"` .) $icon -}}
|
||||
{{- $icon = replaceRE `<svg` `<svg class="icon"` $icon -}}
|
||||
{{- $icon = replaceRE `</svg>` (printf `<title>%s icon</title></svg>` .) $icon -}}
|
||||
{{- $icon = replaceRE `(width|height)="[0-9]*"` "" $icon -}}
|
||||
{{- $icon | safeHTML -}}
|
@ -22,8 +22,6 @@
|
||||
{{ partial "page-metadata/item/edithistory.html" . }}
|
||||
{{ partial "page-metadata/item/viewraw.html" . }}
|
||||
|
||||
{{ partial "page-metadata/custom-full.html" . }}
|
||||
|
||||
{{ partial "page-metadata/item/categories.html" . }}
|
||||
|
||||
{{ partial "page-metadata/item/tags.html" . }}
|
@ -9,7 +9,6 @@
|
||||
|
||||
{{ partial "page-metadata/item/authors.html" . }}
|
||||
{{ partial "page-metadata/item/readingtime.html" . }}
|
||||
|
||||
{{ partial "page-metadata/item/series.html" . }}
|
||||
{{ partial "page-metadata/item/categories.html" . }}
|
||||
{{ partial "page-metadata/item/tags.html" . }}
|
20
layouts/shortcodes/include.html
Normal file
20
layouts/shortcodes/include.html
Normal file
@ -0,0 +1,20 @@
|
||||
{{ $path := "" }}
|
||||
{{ $markdown := false }}
|
||||
{{ if .IsNamedParams }}
|
||||
{{ $path = .Get "path" }}
|
||||
{{ with .Get "markdown" }}
|
||||
{{ $markdown = . }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ $path = .Get 0 }}
|
||||
{{ end }}
|
||||
|
||||
{{ with ($path | readFile) }}
|
||||
{{ if $markdown }}
|
||||
{{ $path | readFile | $.Page.RenderString (dict "display" "block") }}
|
||||
{{ else }}
|
||||
{{ $path | readFile }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "file not found: %s" $path }}
|
||||
{{ end }}
|
Reference in New Issue
Block a user