summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-10-20 17:24:42 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-10-20 17:24:42 +0200
commit7a2aad550137ab5ea9d401b059b2a2069ed0801b (patch)
tree9e70b2f370adea7e61b8fdcb7d9d8813c29e2ac1 /templates
parent569406f2d3320ee870160bbcd3a1ad8df5346ea5 (diff)
add keyboard shortcuts
Diffstat (limited to 'templates')
-rw-r--r--templates/index.php1
-rw-r--r--templates/part.content.firstrun.php7
-rw-r--r--templates/part.content.php9
-rw-r--r--templates/part.content.shortcuts.php58
-rw-r--r--templates/part.settings.php6
5 files changed, 73 insertions, 8 deletions
diff --git a/templates/index.php b/templates/index.php
index 69a158843..a2aee6a79 100644
--- a/templates/index.php
+++ b/templates/index.php
@@ -41,6 +41,7 @@ script('news', [
<!-- content -->
<script type="text/ng-template" id="content.html"><?php print_unescaped($this->inc('part.content')) ?></script>
+ <script type="text/ng-template" id="shortcuts.html"><?php print_unescaped($this->inc('part.content.shortcuts')) ?></script>
<div id="app-content"
ng-class="{
diff --git a/templates/part.content.firstrun.php b/templates/part.content.firstrun.php
new file mode 100644
index 000000000..17d0b22ff
--- /dev/null
+++ b/templates/part.content.firstrun.php
@@ -0,0 +1,7 @@
+<div id="first-run">
+ <div>
+ <div class="helper"><h1><?php p($l->t('Add a feed')) ?></h1></div>
+ <div class="title"><h1><?php p($l->t('There are no feeds yet. Go ahead and add some')) ?> :)</h1></div>
+ <div class="helper"><h1><?php p($l->t('Import feeds and articles')) ?></h1></div>
+ </div>
+</div> \ No newline at end of file
diff --git a/templates/part.content.php b/templates/part.content.php
index 2b19b93f6..0c758f99a 100644
--- a/templates/part.content.php
+++ b/templates/part.content.php
@@ -1,12 +1,7 @@
-<div id="first-run">
- <div>
- <div class="helper"><h1><?php p($l->t('Add a feed')) ?></h1></div>
- <div class="title"><h1><?php p($l->t('There are no feeds yet. Go ahead and add some')) ?> :)</h1></div>
- <div class="helper"><h1><?php p($l->t('Import feeds and articles')) ?></h1></div>
- </div>
-</div>
+<?php print_unescaped($this->inc('part.content.firstrun')) ?>
<div news-auto-focus="#app-content"
+ id="articles"
ng-class="{compact: Content.isCompactView(), 'feed-view': Content.isFeed()}">
<div class="pull-to-refresh" ng-class="{'show-pull-to-refresh': showPullToRefresh}">
<button ng-click="Content.refresh()"><?php p($l->t('Refresh')) ?></button>
diff --git a/templates/part.content.shortcuts.php b/templates/part.content.shortcuts.php
new file mode 100644
index 000000000..2874a8607
--- /dev/null
+++ b/templates/part.content.shortcuts.php
@@ -0,0 +1,58 @@
+<div id="app-shortcuts">
+ <div>
+ <table>
+ <tr>
+ <th><?php p($l->t('Keyboard shortcut')); ?></th>
+ <th><?php p($l->t('Description')); ?></th>
+ </tr>
+ <tr>
+ <td>n / j / <?php p($l->t('right')); ?></td>
+ <td><?php p($l->t('Jump to next article')); ?></td>
+ </tr>
+ <tr>
+ <td>p / k / <?php p($l->t('left')); ?></td>
+ <td><?php p($l->t('Jump to previous article')); ?></td>
+ </tr>
+ <tr>
+ <td>s / l</td>
+ <td><?php p($l->t('Toggle star article')); ?></td>
+ </tr>
+ <tr>
+ <td>h</td>
+ <td><?php p($l->t('Star article and jump to next one')); ?></td>
+ </tr>
+ <tr>
+ <td>u</td>
+ <td><?php p($l->t('Toggle keep current article unread')); ?></td>
+ </tr>
+ <tr>
+ <td>o</td>
+ <td><?php p($l->t('Open article in new tab')); ?></td>
+ </tr>
+ <tr>
+ <td>e</td>
+ <td><?php p($l->t('Expand article in compact view')); ?></td>
+ </tr>
+ <tr>
+ <td>r</td>
+ <td><?php p($l->t('Refresh')); ?></td>
+ </tr>
+ <tr>
+ <td>f</td>
+ <td><?php p($l->t('Load next feed')); ?></td>
+ </tr>
+ <tr>
+ <td>d</td>
+ <td><?php p($l->t('Load previous feed')); ?></td>
+ </tr>
+ <tr>
+ <td>c</td>
+ <td><?php p($l->t('Load next folder')); ?></td>
+ </tr>
+ <tr>
+ <td>v</td>
+ <td><?php p($l->t('Load previous folder')); ?></td>
+ </tr>
+ </table>
+ </div>
+</div> \ No newline at end of file
diff --git a/templates/part.settings.php b/templates/part.settings.php
index 9f7f2be50..890eb0d2b 100644
--- a/templates/part.settings.php
+++ b/templates/part.settings.php
@@ -7,6 +7,10 @@
<div id="app-settings-content">
<h3><?php p($l->t('Settings')); ?></h3>
+ <p>
+ <a href="#/shortcuts"><?php p($l->t('Keyboard shortcuts')); ?></a>
+ </p>
+
<p ng-click="Settings.toggleSetting('compact')">
<label for="compact">
<input type="checkbox" ng-checked="Settings.getSetting('compact')" name="compact">
@@ -35,7 +39,6 @@
</label>
</p>
-
<div class="import-export">
<h3><?php p($l->t('Subscriptions (OPML)')); ?></h3>
@@ -100,5 +103,6 @@
<p class="error" ng-show="Settings.articleImportError">
<?php p($l->t('Error when importing: file does not contain valid JSON')); ?>
</p>
+
</div>
</div> \ No newline at end of file