mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 13:25:57 -06:00
Support featured videos (instead of image)
This commit is contained in:
parent
346ef21784
commit
2616803f47
@ -21,7 +21,7 @@
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-image {
|
.post-media {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ body {
|
|||||||
max-width: 720px;
|
max-width: 720px;
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img, video {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,9 +69,17 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ with .Resources.GetMatch "feature" }}
|
{{ with .Resources.GetMatch "feature" }}
|
||||||
<div class="post-image">
|
<div class="post-media">
|
||||||
<img src="{{ .Permalink }}" alt="{{ .Title }}" />
|
<img src="{{ .Permalink }}" alt="{{ .Title }}" />
|
||||||
</div>
|
</div>
|
||||||
|
{{ else }}
|
||||||
|
{{ with .Resources.GetMatch "feature-video" }}
|
||||||
|
<div class="post-media">
|
||||||
|
<video controls>
|
||||||
|
<source src="{{ .Permalink }}" alt="{{ .Title }}">
|
||||||
|
</video>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="post-description">
|
<div class="post-description">
|
||||||
|
4
layouts/shortcodes/video.html
Normal file
4
layouts/shortcodes/video.html
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<video controls>
|
||||||
|
<source src="{{ .Get "src" }}" alt="{{ .Get "title" }}">
|
||||||
|
Your browser does not support video.
|
||||||
|
</video>
|
Loading…
Reference in New Issue
Block a user