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;
|
||||
}
|
||||
|
||||
.post-image {
|
||||
.post-media {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ body {
|
||||
max-width: 720px;
|
||||
}
|
||||
|
||||
img {
|
||||
img, video {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
|
@ -69,9 +69,17 @@
|
||||
{{ end }}
|
||||
|
||||
{{ with .Resources.GetMatch "feature" }}
|
||||
<div class="post-image">
|
||||
<div class="post-media">
|
||||
<img src="{{ .Permalink }}" alt="{{ .Title }}" />
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ with .Resources.GetMatch "feature-video" }}
|
||||
<div class="post-media">
|
||||
<video controls>
|
||||
<source src="{{ .Permalink }}" alt="{{ .Title }}">
|
||||
</video>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<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