mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-08-30 08:37:34 -05:00
Compare commits
5 Commits
5631f1655a
...
b1cdf7c318
Author | SHA1 | Date | |
---|---|---|---|
b1cdf7c318
|
|||
14475c13f4
|
|||
6b729c6acf
|
|||
f751c4b104
|
|||
de20387b5a
|
@@ -217,14 +217,6 @@ hr {
|
||||
border: 1px solid var(--background-3);
|
||||
}
|
||||
|
||||
@media (min-width: 720px) {
|
||||
.full-width-hr {
|
||||
/* see also: the related-posts section too */
|
||||
margin-left: calc(-100vw / 2 + 760px / 2);
|
||||
margin-right: calc(-100vw / 2 + 760px / 2);
|
||||
}
|
||||
}
|
||||
|
||||
table.simple {
|
||||
border-collapse: collapse;
|
||||
border: 2px solid var(--text-1);
|
||||
@@ -676,43 +668,6 @@ footer p {
|
||||
padding: 8px 15px;
|
||||
}
|
||||
|
||||
/* Social media share buttons */
|
||||
|
||||
.share-buttons {
|
||||
background: var(--background-1);
|
||||
color: var(--text-1);
|
||||
margin: 25px 0;
|
||||
padding: 8px 0;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
justify-content: center;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.share-buttons a {
|
||||
background-color: var(--background-2);
|
||||
color: var(--text-2);
|
||||
padding: 4px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.share-buttons a:hover {
|
||||
background-color: var(--background-3);
|
||||
color: var(--text-3);
|
||||
}
|
||||
|
||||
.share-buttons svg {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* https://stackoverflow.com/a/72073682/19003757 */
|
||||
/*
|
||||
.telegram-share > svg {
|
||||
transform: scale(1.5);
|
||||
margin: 9px -9px -9px 9px;
|
||||
}
|
||||
*/
|
||||
|
||||
/* See also formating */
|
||||
.see-also {
|
||||
background-color: var(--background-1);
|
||||
@@ -891,15 +846,14 @@ aside.quote {
|
||||
|
||||
/* Related posts section {{{ */
|
||||
|
||||
.full-width-page-list {
|
||||
/* make left/right 0 margin so it takes up full width */
|
||||
margin: 25px 0;
|
||||
}
|
||||
/* set the margins on the contents instead of the parent .related-posts
|
||||
* so that the posts in the list clip off the edge of the screen,
|
||||
* which makes a more obvious indicator that it's scrollable
|
||||
*/
|
||||
|
||||
.related-posts > hr,
|
||||
.related-posts > h1 {
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
margin: var(--page-margin);
|
||||
}
|
||||
|
||||
.related-posts .page {
|
||||
@@ -909,17 +863,18 @@ aside.quote {
|
||||
}
|
||||
|
||||
.related-posts .page:first-child {
|
||||
margin-left: 20px;
|
||||
margin-left: var(--page-margin);
|
||||
}
|
||||
.related-posts .page:last-child {
|
||||
margin-right: 20px;
|
||||
margin-right: var(--page-margin);
|
||||
}
|
||||
|
||||
.related-posts .page-list {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 20px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
margin-bottom: var(--page-margin);
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
@@ -945,7 +900,6 @@ aside.quote {
|
||||
.post-meta-view-markdown,
|
||||
.code-copy-button,
|
||||
.prevnext,
|
||||
.share-buttons,
|
||||
.related-posts {
|
||||
display: none;
|
||||
}
|
||||
|
@@ -1,3 +0,0 @@
|
||||
function share_event(service) {
|
||||
plausible("Share", {props: {Network: service}});
|
||||
}
|
18
i18n/en.yaml
18
i18n/en.yaml
@@ -125,21 +125,3 @@ aria_navbar:
|
||||
|
||||
aria_table_of_contents:
|
||||
other: "table of contents"
|
||||
|
||||
aria_share_twitter:
|
||||
other: "share to twitter button"
|
||||
|
||||
aria_share_facebook:
|
||||
other: "share to facebook button"
|
||||
|
||||
aria_share_linkedin:
|
||||
other: "share to linkedin button"
|
||||
|
||||
aria_share_reddit:
|
||||
other: "share to reddit button"
|
||||
|
||||
aria_share_telegram:
|
||||
other: "share to telegram button"
|
||||
|
||||
aria_share_print:
|
||||
other: "print article button"
|
||||
|
@@ -19,9 +19,6 @@
|
||||
{{ 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 }}
|
||||
{{ $isso_url := .Permalink }}
|
||||
{{ if .IsTranslated }}
|
||||
|
@@ -1,69 +0,0 @@
|
||||
<div class="share-buttons">
|
||||
{{ if .Site.Params.shareButtons.twitter }}
|
||||
<a class="twitter-share"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
aria-label="{{ i18n "aria_share_twitter" }}"
|
||||
onclick="share_event('Twitter');"
|
||||
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"
|
||||
aria-label="{{ i18n "aria_share_facebook" }}"
|
||||
onclick="share_event('Facebook');"
|
||||
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"
|
||||
aria-label="{{ i18n "aria_share_linkedin" }}"
|
||||
onclick="share_event('LinkedIn');"
|
||||
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"
|
||||
aria-label="{{ i18n "aria_share_reddit" }}"
|
||||
onclick="share_event('Reddit');"
|
||||
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"
|
||||
aria-label="{{ i18n "aria_share_telegram" }}"
|
||||
onclick="share_event('Telegram');"
|
||||
href="https://t.me/share/url?url={{ .Permalink }}&text={{ .Title }}">
|
||||
{{- partial "icon.html" "telegram" -}}
|
||||
</a>
|
||||
{{ end }}
|
||||
*/}}
|
||||
|
||||
{{ if .Site.Params.shareButtons.print }}
|
||||
<a class="print-share"
|
||||
aria-label="{{ i18n "aria_share_print" }}"
|
||||
href="javascript:void(0)"
|
||||
onclick="window.print(); share_event('Print');">
|
||||
{{- partial "icon.html" "printer" -}}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
@@ -1 +0,0 @@
|
||||
<hr class="full-width-hr">
|
@@ -60,10 +60,6 @@
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.shareButtons }}
|
||||
{{ partial "share.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.comments }}
|
||||
<div class="comments">
|
||||
{{ partial "comments.html" . }}
|
||||
|
Reference in New Issue
Block a user