make videos not autoplay
This commit is contained in:
parent
1a05b0ba75
commit
8805d45eaa
|
@ -68,20 +68,22 @@
|
||||||
|
|
||||||
<% if (item.enclosures.length > 0){ %>
|
<% if (item.enclosures.length > 0){ %>
|
||||||
<div class="enclosures">
|
<div class="enclosures">
|
||||||
<% for (var i = 0; i < item.enclosures.length; i ++){ var e = item.enclosures[i] %>
|
<% for (var i = 0; i < item.enclosures.length; i ++){ %>
|
||||||
|
<% var e = item.enclosures[i] %>
|
||||||
|
<% if (e.type.indexOf('video') > -1){ %>
|
||||||
|
<video class="enclosure" controls loop src="<%= e.url %>"/>
|
||||||
|
<% } else { %>
|
||||||
<a target="_top" class="enclosure" href="<%= e.url %>" >
|
<a target="_top" class="enclosure" href="<%= e.url %>" >
|
||||||
<% if (e.type.indexOf('image') > -1){ %>
|
<% if (e.type.indexOf('image') > -1){ %>
|
||||||
<img src="<%= e.url %>"/>
|
<img src="<%= e.url %>"/>
|
||||||
<% }else if (e.type.indexOf('video') > -1){ %>
|
|
||||||
<video autoplay loop muted src="<%= e.url %>"/>
|
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<%= e.url %>
|
<%= e.url %>
|
||||||
<% } %>
|
<% } %>
|
||||||
</a>
|
</a>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
<div class="date"><%= item.stringDate %></div>
|
<div class="date"><%= item.stringDate %></div>
|
||||||
</div>
|
</div>
|
||||||
<% }); %>
|
<% }); %>
|
||||||
|
|
|
@ -102,9 +102,11 @@ a * {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: zoom-in;
|
|
||||||
max-height: 12rem; }
|
max-height: 12rem; }
|
||||||
|
|
||||||
|
a.enclosure {
|
||||||
|
cursor: zoom-in; }
|
||||||
|
|
||||||
.enclosure > * {
|
.enclosure > * {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -102,9 +102,11 @@ a * {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: zoom-in;
|
|
||||||
max-height: 12rem; }
|
max-height: 12rem; }
|
||||||
|
|
||||||
|
a.enclosure {
|
||||||
|
cursor: zoom-in; }
|
||||||
|
|
||||||
.enclosure > * {
|
.enclosure > * {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -125,15 +125,16 @@ a * {
|
||||||
}
|
}
|
||||||
|
|
||||||
.enclosure{
|
.enclosure{
|
||||||
|
|
||||||
display:flex;
|
display:flex;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
width:50%;
|
width:50%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: zoom-in;
|
|
||||||
max-height: 12rem;
|
max-height: 12rem;
|
||||||
}
|
}
|
||||||
|
a.enclosure{
|
||||||
|
cursor: zoom-in;
|
||||||
|
}
|
||||||
.enclosure>*{
|
.enclosure>*{
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
width:100%;
|
width:100%;
|
||||||
|
|
Loading…
Reference in New Issue