mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-05-15 08:12:57 -05:00
Compare commits
No commits in common. "a172b1ea212b8f0416125fcb57d095449342120f" and "d41f3facd7653f3e5a3d242e8ee5ce84a59c5580" have entirely different histories.
a172b1ea21
...
d41f3facd7
@ -274,29 +274,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Social media share buttons */
|
|
||||||
.share-buttons {
|
|
||||||
background: var(--background-2);
|
|
||||||
margin: 25px 0;
|
|
||||||
padding: 8px 0;
|
|
||||||
border-radius: 8px;
|
|
||||||
display: flex;
|
|
||||||
gap: 8px;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.share-buttons a {
|
|
||||||
background-color: var(--background-4);
|
|
||||||
padding: 4px;
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.share-buttons svg {
|
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Back to top */
|
/* Back to top */
|
||||||
#back-to-top {
|
#back-to-top {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
@ -4,6 +4,8 @@ markup:
|
|||||||
lineNos: true
|
lineNos: true
|
||||||
|
|
||||||
params:
|
params:
|
||||||
|
faviconICO: favicon.ico
|
||||||
|
faviconPNG: favicon.png
|
||||||
readingtime: true
|
readingtime: true
|
||||||
|
|
||||||
taxonomies:
|
taxonomies:
|
||||||
|
@ -20,9 +20,9 @@ params:
|
|||||||
# these are for the OpenGraph/Twitter embeds in Hugo
|
# these are for the OpenGraph/Twitter embeds in Hugo
|
||||||
description: Example website for bobatheme
|
description: Example website for bobatheme
|
||||||
|
|
||||||
# these are for favicons in bobatheme (disabled by default)
|
# these are for favicons in bobatheme (defaults are shown here)
|
||||||
# faviconSVG: favicon.svg
|
# faviconICO: favicon.ico
|
||||||
# appleTouchPNG: apple-touch-icon.png
|
# faviconPNG: favicon.png
|
||||||
|
|
||||||
# show reading time (enabled by default)
|
# show reading time (enabled by default)
|
||||||
# readingtime: true
|
# readingtime: true
|
||||||
@ -34,14 +34,6 @@ params:
|
|||||||
# display a "Latest Posts" section on the homepage below its content
|
# display a "Latest Posts" section on the homepage below its content
|
||||||
homepageLatestPosts: true
|
homepageLatestPosts: true
|
||||||
|
|
||||||
# social media share icons
|
|
||||||
# shareButtons:
|
|
||||||
# twitter: true
|
|
||||||
# facebook: true
|
|
||||||
# linkedin: true
|
|
||||||
# reddit: true
|
|
||||||
# telegram: true
|
|
||||||
|
|
||||||
# footer: >-
|
# footer: >-
|
||||||
# Some example text for the footer.
|
# Some example text for the footer.
|
||||||
|
|
||||||
|
@ -32,8 +32,6 @@
|
|||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ partial "series-box.html" . }}
|
|
||||||
|
|
||||||
{{ if or .NextInSection .PrevInSection }}
|
{{ if or .NextInSection .PrevInSection }}
|
||||||
<div class="prevnext">
|
<div class="prevnext">
|
||||||
{{ with .NextInSection }}
|
{{ with .NextInSection }}
|
||||||
@ -64,9 +62,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if .Site.Params.shareButtons }}
|
{{ partial "series-box.html" . }}
|
||||||
{{ partial "share.html" . }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $related := .Site.RegularPages.Related . | first 10 }}
|
{{ $related := .Site.RegularPages.Related . | first 10 }}
|
||||||
{{ with $related }}
|
{{ with $related }}
|
||||||
|
@ -16,11 +16,11 @@
|
|||||||
<script defer src="{{ .Permalink }}" type="text/javascript" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
<script defer src="{{ .Permalink }}" type="text/javascript" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ with .Site.Params.faviconSVG }}
|
{{ with .Site.Params.faviconICO }}
|
||||||
<link rel="icon" href="{{ . | absURL }}" />
|
<link rel="icon" type="image/x-icon" href="{{ . | absURL }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with .Site.Params.appleTouchPNG }}
|
{{ with .Site.Params.faviconPNG }}
|
||||||
<link rel="apple-touch-icon" href="{{ . | absURL }}" />
|
<link rel="icon" type="image/png" href="{{ . | absURL }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if .IsHome }}
|
{{ if .IsHome }}
|
||||||
|
@ -2,5 +2,4 @@
|
|||||||
{{- $icon := $icon_resource.Content -}}
|
{{- $icon := $icon_resource.Content -}}
|
||||||
{{- $icon = replaceRE `<svg` `<svg class="icon"` $icon -}}
|
{{- $icon = replaceRE `<svg` `<svg class="icon"` $icon -}}
|
||||||
{{- $icon = replaceRE `</svg>` (printf `<title>%s icon</title></svg>` .) $icon -}}
|
{{- $icon = replaceRE `</svg>` (printf `<title>%s icon</title></svg>` .) $icon -}}
|
||||||
{{- $icon = replaceRE `(width|height)="[0-9]*"` "" $icon -}}
|
|
||||||
{{- $icon | safeHTML -}}
|
{{- $icon | safeHTML -}}
|
||||||
|
@ -1,50 +0,0 @@
|
|||||||
<div class="share-buttons">
|
|
||||||
{{ if .Site.Params.shareButtons.twitter }}
|
|
||||||
<a class="twitter-share"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener"
|
|
||||||
href="https://twitter.com/intent/tweet?url={{ .Permalink }}&text={{ .Title }}&via=bbaovanc">
|
|
||||||
{{- partial "icon.html" "twitter" -}}
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if .Site.Params.shareButtons.facebook }}
|
|
||||||
<a class="facebook-share"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener"
|
|
||||||
href="https://www.facebook.com/sharer.php?u={{ .Permalink }}">
|
|
||||||
{{- partial "icon.html" "facebook" -}}
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if .Site.Params.shareButtons.linkedin }}
|
|
||||||
<a class="linkedin-share"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener"
|
|
||||||
href="https://www.linkedin.com/sharing/share-offsite/?url={{ .Permalink }}">
|
|
||||||
{{- partial "icon.html" "linkedin" -}}
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if .Site.Params.shareButtons.reddit }}
|
|
||||||
<a class="reddit-share"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener"
|
|
||||||
href="https://reddit.com/submit?url={{ .Permalink }}&title={{ .Title }}">
|
|
||||||
{{- partial "icon.html" "reddit" -}}
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{/* Telegram icon doesn't have `viewbox` set, which breaks the sizing.
|
|
||||||
https://stackoverflow.com/q/72073399/19003757
|
|
||||||
https://github.com/michaelampr/jam/issues/39
|
|
||||||
{{ if .Site.Params.shareButtons.telegram }}
|
|
||||||
<a class="telegram-share"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener"
|
|
||||||
href="https://t.me/share/url?url={{ .Permalink }}&text={{ .Title }}">
|
|
||||||
{{- partial "icon.html" "telegram" -}}
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
*/}}
|
|
||||||
</div>
|
|
Loading…
x
Reference in New Issue
Block a user