mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-08-31 00:57:33 -05:00
Compare commits
6 Commits
e0d2c536e4
...
5afaf2ce3e
Author | SHA1 | Date | |
---|---|---|---|
5afaf2ce3e
|
|||
486fa65ad6
|
|||
f371afe529
|
|||
8f79d2af3a
|
|||
d6cb2c12c8
|
|||
2fa53d1f2c
|
@@ -4,8 +4,6 @@ markup:
|
||||
lineNos: true
|
||||
goldmark:
|
||||
parser:
|
||||
# don't put <p> around ![]() image in markdown (used to embed any resource now)
|
||||
wrapStandAloneImageWithinParagraph: false
|
||||
attribute:
|
||||
block: true
|
||||
# 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 }} />
|
||||
{{ else if eq .ResourceType "video" }}
|
||||
<video controls preload="metadata">
|
||||
{{/* FIXME
|
||||
<source src="{{ .Permalink }}" {{ with .Params.alt }}alt="{{ . }}"{{ end }} />
|
||||
*/}}
|
||||
{{ with .Params.alt }}
|
||||
{{ warnf "video does not support alt text, '%s'" . }}
|
||||
{{ end }}
|
||||
<source src="{{ .Permalink }}" />
|
||||
{{ i18n "browser_no_video_support" }}
|
||||
<a href="{{ .Permalink }}" target="_blank" rel="noopener">
|
||||
{{ i18n "browser_no_video_support_link" }}
|
||||
</a>
|
||||
</video>
|
||||
{{ else }}
|
||||
{{/* TODO: could consider implementing more types, listed at:
|
||||
|
@@ -3,7 +3,7 @@
|
||||
<figure>
|
||||
{{ partial "embed-resource.html" . }}
|
||||
{{ with .Title }}
|
||||
<figcaption>{{ . }}</figcaption>
|
||||
<figcaption>{{ . | markdownify }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
</div>
|
||||
|
@@ -1,17 +1,17 @@
|
||||
<figure>
|
||||
{{ $resource_title := "" }}
|
||||
{{ with .Get "src" }}
|
||||
{{ with $.Page.Resources.Get . }}
|
||||
{{ $resource_title = .Title }}
|
||||
{{ partial "embed-resource.html" . }}
|
||||
{{ with .Title }}
|
||||
<figcaption>{{ . | markdownify }}</figcaption>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "resource %q not found" . }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ .Inner }}
|
||||
{{ with .Get "caption" }}
|
||||
<figcaption>{{ . | markdownify }}</figcaption>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with or (.Get "caption") (.Get 0) $resource_title }}
|
||||
<figcaption>{{ . | markdownify }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
|
Reference in New Issue
Block a user