summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorb_b <bruno@eliaz.fr>2019-11-10 08:19:05 +0100
committerBenjamin Brahmer <info@b-brahmer.de>2019-11-10 08:19:05 +0100
commit44658773bf864042ba5f9d4937a28b4ce4e9cc56 (patch)
tree6b4c49de0e3d7f3471d4f362ed3fd48ecf990181
parent71cfef02bc8751185ce01fc2803f62e519655cac (diff)
Generate enclosure div only for audio & video (#567)
Generate enclosure div only for audio & video Fix #532 Signed-off-by: brunob <bruno@eliaz.fr>
-rw-r--r--css/content.css3
-rw-r--r--templates/part.content.php17
2 files changed, 10 insertions, 10 deletions
diff --git a/css/content.css b/css/content.css
index b90653e49..b121d1556 100644
--- a/css/content.css
+++ b/css/content.css
@@ -562,8 +562,7 @@
}
#app-content .enclosure audio,
-#app-content .enclosure video,
-#app-content .enclosure img {
+#app-content .enclosure video {
width: 100%;
}
diff --git a/templates/part.content.php b/templates/part.content.php
index bfaa3133b..b7cf52243 100644
--- a/templates/part.content.php
+++ b/templates/part.content.php
@@ -130,19 +130,20 @@
</span>
</div>
- <div class="enclosure" ng-if="item.enclosureLink">
- <video controls preload="none" ng-if="Content.getMediaType(item.enclosureMime) =='video'" news-play-one ng-src="{{ item.enclosureLink|trustUrl }}" type="{{ item.enclosureMime }}">
+ <div class="enclosure" ng-if="Content.getMediaType(item.enclosureMime) == 'audio'">
+ <button ng-click="App.play(item)"><?php p($l->t('Play audio')) ?></button>
+ <a class="button" ng-href="{{ item.enclosureLink|trustUrl }}" target="_blank" rel="noreferrer">
+ <?php p($l->t('Download audio')) ?>
+ </a>
+ </div>
+ <div class="enclosure" ng-if="Content.getMediaType(item.enclosureMime) == 'video'">
+ <video controls preload="none" news-play-one ng-src="{{ item.enclosureLink|trustUrl }}" type="{{ item.enclosureMime }}">
</video>
- <button ng-if="Content.getMediaType(item.enclosureMime) == 'audio'" ng-click="App.play(item)"><?php p($l->t('Play audio')) ?></button>
- <a ng-show="Content.getMediaType(item.enclosureMime) =='video'" class="button" ng-href="{{ item.enclosureLink|trustUrl }}" target="_blank" rel="noreferrer">
+ <a class="button" ng-href="{{ item.enclosureLink|trustUrl }}" target="_blank" rel="noreferrer">
<?php p($l->t('Download video')) ?>
</a>
- <a ng-show="Content.getMediaType(item.enclosureMime) =='audio'" class="button" ng-href="{{ item.enclosureLink|trustUrl }}" target="_blank" rel="noreferrer">
- <?php p($l->t('Download audio')) ?>
- </a>
</div>
-
<div class="body" news-bind-html-unsafe="item.body" ng-attr-dir="{{item.rtl && 'rtl'}}"></div>
</div>