summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/index.php13
-rw-r--r--templates/part.content.php28
-rw-r--r--templates/part.content.shortcuts.php4
3 files changed, 28 insertions, 17 deletions
diff --git a/templates/index.php b/templates/index.php
index e8064d1d6..7d9d69297 100644
--- a/templates/index.php
+++ b/templates/index.php
@@ -26,6 +26,7 @@ foreach (Plugin::getScripts() as $appName => $fileName) {
<div id="app" ng-app="News" ng-cloak ng-strict-di
ng-controller="AppController as App">
+
<div id="global-loading"
class="icon-loading"
ng-show="App.loading.isLoading('global')"></div>
@@ -35,6 +36,7 @@ foreach (Plugin::getScripts() as $appName => $fileName) {
ng-controller="NavigationController as Navigation"
ng-hide="App.loading.isLoading('global')">
+ <news-search on-search="Navigation.search" class="ng-hide"></news-search>
<news-title-unread-count
unread-count="{{ Navigation.getUnreadCount() }}">
</news-title-unread-count>
@@ -58,6 +60,9 @@ foreach (Plugin::getScripts() as $appName => $fileName) {
</div>
<!-- content -->
+ <script type="text/ng-template" id="audio.html">
+ <?php print_unescaped($this->inc('part.content.audio')) ?>
+ </script>
<script type="text/ng-template" id="articleaction.html">
<?php print_unescaped($this->inc('part.content.articleaction')) ?>
</script>
@@ -79,6 +84,14 @@ foreach (Plugin::getScripts() as $appName => $fileName) {
}"
tabindex="-1"
news-pull-to-refresh="showPullToRefresh">
+ <div class="podcast" news-sticky-menu="#app-content" ng-if="App.playingItem">
+ <audio controls autoplay ng-src="{{ App.playingItem.enclosureLink|trustUrl }}" news-play-one></audio>
+ <a class="button podcast-download" title="<?php p($l->t('Download')) ?>"
+ ng-href="{{ App.playingItem.enclosureLink|trustUrl }}"
+ target="_blank"></a>
+ <button class="podcast-close" title="<?php p($l->t('Close')) ?>"
+ ng-click="App.playingItem = false"></button>
+ </div>
<div id="app-content-wrapper"
ng-class="{
'autopaging': App.loading.isLoading('autopaging'),
diff --git a/templates/part.content.php b/templates/part.content.php
index 6454adb4e..d15b9124c 100644
--- a/templates/part.content.php
+++ b/templates/part.content.php
@@ -125,26 +125,20 @@
</span>
</div>
-
-
<div class="enclosure" ng-if="item.enclosureLink">
- <news-enclosure type="{{ ::item.enclosureMime }}"
- link="{{ ::item.enclosureLink }}">
- <p class="enclosure-error">
- <?php
- p($l->t('Browser can not play media type'))
- ?>: {{ ::item.enclosureMime }}
- </p>
- <a class="button"
- ng-href="{{ ::item.enclosureLink | trustUrl }}"
- target="_blank"
- rel="noreferrer"
- >
- <?php p($l->t('Download')) ?>
- </a>
- </news-enclosure>
+ <video controls preload="none" ng-if="Content.getMediaType(item.enclosureMime) =='video'" news-play-one>
+ <source 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">
+ <?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"></div>
</div>
diff --git a/templates/part.content.shortcuts.php b/templates/part.content.shortcuts.php
index d4a4796f7..7a9fd4562 100644
--- a/templates/part.content.shortcuts.php
+++ b/templates/part.content.shortcuts.php
@@ -65,6 +65,10 @@
<td>a</td>
<td><?php p($l->t('Scroll to active navigation entry')); ?></td>
</tr>
+ <tr>
+ <td>q</td>
+ <td><?php p($l->t('Focus search field')); ?></td>
+ </tr>
</table>
</div>
</div> \ No newline at end of file