mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-09-07 11:47:35 -05:00
Compare commits
1 Commits
share-butt
...
b79c956c07
Author | SHA1 | Date | |
---|---|---|---|
b79c956c07
|
@@ -198,21 +198,22 @@ video {
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-media > figure img,
|
figure > .figure-media {
|
||||||
.post-media > figure video {
|
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border: 7px solid var(--figure-border);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
figure img,
|
figure > .figure-media.border {
|
||||||
figure video {
|
|
||||||
padding: 5px;
|
|
||||||
border: 2px solid var(--figure-border);
|
border: 2px solid var(--figure-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-media > figure > .figure-media {
|
||||||
|
border: 7px solid var(--figure-border);
|
||||||
|
}
|
||||||
|
|
||||||
figure {
|
figure {
|
||||||
margin: auto;
|
display: block;
|
||||||
display: inline-block;
|
text-align: center;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
figcaption {
|
figcaption {
|
||||||
|
@@ -3,9 +3,9 @@
|
|||||||
* claims that images won't work with JS disabled since it would
|
* claims that images won't work with JS disabled since it would
|
||||||
* make tracking possible, but my experience says otherwise
|
* make tracking possible, but my experience says otherwise
|
||||||
*/}}
|
*/}}
|
||||||
<img src="{{ .Permalink }}" {{ with .Params.alt }}alt="{{ . }}"{{ end }} />
|
<img class="figure-media" src="{{ .Permalink }}" {{ with .Params.alt }}alt="{{ . }}"{{ end }} />
|
||||||
{{ else if eq .ResourceType "video" }}
|
{{ else if eq .ResourceType "video" }}
|
||||||
<video controls preload="metadata">
|
<video class="figure-media" controls preload="metadata">
|
||||||
{{ with .Params.alt }}
|
{{ with .Params.alt }}
|
||||||
{{ warnf "video does not support alt text, '%s'" . }}
|
{{ warnf "video does not support alt text, '%s'" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@@ -1,22 +1,4 @@
|
|||||||
{{ define "_partials/share-button.html" }}
|
|
||||||
<a class="{{ .ShortName }}-share"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener"
|
|
||||||
aria-label="{{ i18n (printf "aria_share_%s" .ShortName) }}"
|
|
||||||
onclick="share_event('{{ .ProperName }}');"
|
|
||||||
href="{{ .URL }}">
|
|
||||||
{{- partial "icon.html" (or .IconName .ShortName) -}}
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<div class="share-buttons">
|
<div class="share-buttons">
|
||||||
{{ $services := dict
|
|
||||||
"twitter" (dict "ProperName" "Twitter" "URL" (printf "https://twitter.com/intent/tweet?url=%s&text=%s&via=bbaovanc" .Permalink .Title))
|
|
||||||
}}
|
|
||||||
{{ range $name, $info := $services }}
|
|
||||||
{{ $data := merge $info (dict "ShortName" $name) }}
|
|
||||||
{{ partial "share-button.html" $data }}
|
|
||||||
{{ end }}
|
|
||||||
{{ if .Site.Params.shareButtons.twitter }}
|
{{ if .Site.Params.shareButtons.twitter }}
|
||||||
<a class="twitter-share"
|
<a class="twitter-share"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
Reference in New Issue
Block a user