mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-09-02 17:37:35 -05:00
Compare commits
6 Commits
e0d2c536e4
...
5afaf2ce3e
Author | SHA1 | Date | |
---|---|---|---|
5afaf2ce3e
|
|||
486fa65ad6
|
|||
f371afe529
|
|||
8f79d2af3a
|
|||
d6cb2c12c8
|
|||
2fa53d1f2c
|
@@ -4,8 +4,6 @@ markup:
|
|||||||
lineNos: true
|
lineNos: true
|
||||||
goldmark:
|
goldmark:
|
||||||
parser:
|
parser:
|
||||||
# don't put <p> around ![]() image in markdown (used to embed any resource now)
|
|
||||||
wrapStandAloneImageWithinParagraph: false
|
|
||||||
attribute:
|
attribute:
|
||||||
block: true
|
block: true
|
||||||
# this is enabled by default already
|
# this is enabled by default already
|
||||||
|
@@ -1,12 +0,0 @@
|
|||||||
{{/* TODO: should we use .PageInner */}}
|
|
||||||
{{ partial "embed-resource.html" (.Page.Resources.Get .Destination) }}
|
|
||||||
{{ with .Title }}
|
|
||||||
{{ errorf "%q" . }}
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Attributes }}
|
|
||||||
{{/* FIXME: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_markup/render-image.html */}}
|
|
||||||
{{ errorf "%q" . }}
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Text }}
|
|
||||||
{{ errorf "%q" . }}
|
|
||||||
{{ end }}
|
|
@@ -6,12 +6,14 @@
|
|||||||
<img src="{{ .Permalink }}" {{ with .Params.alt }}alt="{{ . }}"{{ end }} />
|
<img src="{{ .Permalink }}" {{ with .Params.alt }}alt="{{ . }}"{{ end }} />
|
||||||
{{ else if eq .ResourceType "video" }}
|
{{ else if eq .ResourceType "video" }}
|
||||||
<video controls preload="metadata">
|
<video controls preload="metadata">
|
||||||
{{/* FIXME
|
{{ with .Params.alt }}
|
||||||
<source src="{{ .Permalink }}" {{ with .Params.alt }}alt="{{ . }}"{{ end }} />
|
{{ warnf "video does not support alt text, '%s'" . }}
|
||||||
*/}}
|
{{ end }}
|
||||||
|
<source src="{{ .Permalink }}" />
|
||||||
{{ i18n "browser_no_video_support" }}
|
{{ i18n "browser_no_video_support" }}
|
||||||
<a href="{{ .Permalink }}" target="_blank" rel="noopener">
|
<a href="{{ .Permalink }}" target="_blank" rel="noopener">
|
||||||
{{ i18n "browser_no_video_support_link" }}
|
{{ i18n "browser_no_video_support_link" }}
|
||||||
|
</a>
|
||||||
</video>
|
</video>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{/* TODO: could consider implementing more types, listed at:
|
{{/* TODO: could consider implementing more types, listed at:
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<figure>
|
<figure>
|
||||||
{{ partial "embed-resource.html" . }}
|
{{ partial "embed-resource.html" . }}
|
||||||
{{ with .Title }}
|
{{ with .Title }}
|
||||||
<figcaption>{{ . }}</figcaption>
|
<figcaption>{{ . | markdownify }}</figcaption>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,17 +1,17 @@
|
|||||||
<figure>
|
<figure>
|
||||||
|
{{ $resource_title := "" }}
|
||||||
{{ with .Get "src" }}
|
{{ with .Get "src" }}
|
||||||
{{ with $.Page.Resources.Get . }}
|
{{ with $.Page.Resources.Get . }}
|
||||||
|
{{ $resource_title = .Title }}
|
||||||
{{ partial "embed-resource.html" . }}
|
{{ partial "embed-resource.html" . }}
|
||||||
{{ with .Title }}
|
|
||||||
<figcaption>{{ . | markdownify }}</figcaption>
|
|
||||||
{{ end }}
|
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ errorf "resource %q not found" . }}
|
{{ errorf "resource %q not found" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ .Inner }}
|
{{ .Inner }}
|
||||||
{{ with .Get "caption" }}
|
{{ end }}
|
||||||
<figcaption>{{ . | markdownify }}</figcaption>
|
|
||||||
{{ end }}
|
{{ with or (.Get "caption") (.Get 0) $resource_title }}
|
||||||
|
<figcaption>{{ . | markdownify }}</figcaption>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</figure>
|
</figure>
|
||||||
|
Reference in New Issue
Block a user