mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-08-07 00:01:37 -05:00
Import remaining template and styling code from bbaovanc.com
It's probably better structure-wise to have it all consolidated in bobatheme. Then bbaovanc.com is only concerned about content, not stuff that I declared to be specific to my site. This came from when I had multiple sites running bobatheme in the background, so now it's just an arbitrary, legacy distinction. Fixes #86
This commit is contained in:
@@ -1,4 +1,56 @@
|
||||
{{/*
|
||||
Create a file named `layouts/partials/comments.html` at your site root to
|
||||
add a comment system. Page variables are passed.
|
||||
*/}}
|
||||
{{ with resources.Get "css/comments.css" | fingerprint "sha512" }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
{{ end }}
|
||||
|
||||
<h2 style="margin-bottom: 0;">Comments</h2>
|
||||
<p style="margin: 0; font-size: smaller;">
|
||||
If you provide an email address, you can enable notifications for
|
||||
replies to your comment. It will not be shown publicly.
|
||||
</p>
|
||||
|
||||
<noscript>
|
||||
<i>Enable JavaScript to see the comment section.</i>
|
||||
</noscript>
|
||||
|
||||
{{ $url := .Permalink }}
|
||||
{{ if .IsTranslated }}
|
||||
{{ with index .AllTranslations 0 }}
|
||||
{{ $url = .Permalink }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<script data-isso-id="{{ $url }}"
|
||||
data-isso-default-lang="{{ .Language.Lang }}"
|
||||
data-isso-css="true"
|
||||
data-isso-max-comments-top="inf"
|
||||
data-isso-max-comments-nested="inf"
|
||||
data-isso-reveal-on-click="5"
|
||||
{{/*
|
||||
data-isso-avatar-bg="#111"
|
||||
data-isso-avatar-fg="#9abf88 #5698c4 #e279a3 #9163b6 ..."
|
||||
*/}}
|
||||
data-isso-vote="true"
|
||||
{{/*
|
||||
data-isso-vote-levels=""
|
||||
*/}}
|
||||
data-isso-feed="true"
|
||||
data-isso-require-email="false"
|
||||
data-isso-reply-notifications="true"
|
||||
data-isso-reply-notifications-default-enabled="true"
|
||||
|
||||
{{ with (.GetTerms "authors") }}
|
||||
{{ $authorHashes := slice }}
|
||||
{{ range . }}
|
||||
{{ with .Params.issoUserID }}
|
||||
{{ $authorHashes = $authorHashes | append . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
data-isso-page-author-hashes="{{ delimit $authorHashes "," }}"
|
||||
{{ end }}
|
||||
|
||||
src="https://isso.bbaovanc.com/js/embed.min.js">
|
||||
</script>
|
||||
|
||||
<section id="isso-thread" data-title="{{ .Title }}"></section>
|
||||
|
@@ -16,6 +16,27 @@
|
||||
{{ with resources.Get "js/bobatheme.js" | fingerprint "sha512" }}
|
||||
<script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||
{{ end }}
|
||||
{{ if not hugo.IsServer }}
|
||||
<script defer data-domain="bbaovanc.com" src="https://plausible.bbaovanc.com/js/bobalytics.outbound-links.js"></script>
|
||||
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
|
||||
{{ with resources.Get "js/share-event.js" | fingerprint "sha512" }}
|
||||
<script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq .Layout "search" }}
|
||||
{{ with resources.Get "css/search.css" | fingerprint "sha512" }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
{{ end }}
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{ absURL "pagefind/pagefind-ui.css" }}" crossorigin="anonymous">
|
||||
<script src="{{ absURL "pagefind/pagefind-ui.js" }}" crossorigin="anonymous"></script>
|
||||
<script>
|
||||
window.addEventListener('DOMContentLoaded', (event) => {
|
||||
new PagefindUI({ element: "#search-box", showSubResults: true });
|
||||
});
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.faviconSVG }}
|
||||
<link rel="icon" href="{{ . | absURL }}" />
|
||||
@@ -26,6 +47,10 @@
|
||||
|
||||
<title>{{ .Render "head_title" }}</title>
|
||||
|
||||
{{ range .Site.Params.rel_me }}
|
||||
<link rel="me" href="{{ . }}" />
|
||||
{{ end }}
|
||||
|
||||
{{ partial "seo-tags/opengraph.html" . }}
|
||||
{{ partial "seo-tags/twitter-cards.html" . }}
|
||||
{{ partial "seo-tags/schema.html" . }}
|
||||
@@ -34,6 +59,4 @@
|
||||
|
||||
<meta name="language" content="{{ .Language.Lang }}">
|
||||
<meta name="description" content="{{ (partial "seo-description.html" .) | plainify }}">
|
||||
|
||||
{{ partial "additional-head.html" . }}
|
||||
</head>
|
||||
|
@@ -1 +0,0 @@
|
||||
<!-- Placeholder for website to add custom post metadata to summaries -->
|
@@ -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" . }}
|
||||
|
3
layouts/search.html
Normal file
3
layouts/search.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{{ define "main" }}
|
||||
<div id="search-box"></div>
|
||||
{{ end }}
|
Reference in New Issue
Block a user