aboutsummaryrefslogtreecommitdiffhomepage
path: root/themes/default
diff options
context:
space:
mode:
authorNicolas Lœuillet <nicolas.loeuillet@gmail.com>2013-12-12 01:48:24 -0800
committerNicolas Lœuillet <nicolas.loeuillet@gmail.com>2013-12-12 01:48:24 -0800
commit05d6dd487ceaf8c00510ebe5e0e762fcc11df691 (patch)
treeebe6a344aa054a37c1c2d2e54efc59a67930e873 /themes/default
parentd460914f65254d201911a8346792d680218c8dc3 (diff)
parent6bf4702608e4f32d66a9840ec93461f653315a76 (diff)
downloadwallabag-05d6dd487ceaf8c00510ebe5e0e762fcc11df691.tar.gz
wallabag-05d6dd487ceaf8c00510ebe5e0e762fcc11df691.tar.zst
wallabag-05d6dd487ceaf8c00510ebe5e0e762fcc11df691.zip
Merge pull request #356 from inthepoche/tags
Tags feature
Diffstat (limited to 'themes/default')
-rw-r--r--themes/default/_menu.twig1
-rw-r--r--themes/default/css/style.css6
-rw-r--r--themes/default/edit-tags.twig20
-rw-r--r--themes/default/img/default/rss.pngbin0 -> 288 bytes
-rw-r--r--themes/default/tag.twig33
-rw-r--r--themes/default/tags.twig8
-rw-r--r--themes/default/view.twig3
7 files changed, 71 insertions, 0 deletions
diff --git a/themes/default/_menu.twig b/themes/default/_menu.twig
index 699d6a0c..02bec1dc 100644
--- a/themes/default/_menu.twig
+++ b/themes/default/_menu.twig
@@ -2,6 +2,7 @@
2 <li><a href="./" {% if view == 'home' %}class="current"{% endif %}>{% trans "home" %}</a></li> 2 <li><a href="./" {% if view == 'home' %}class="current"{% endif %}>{% trans "home" %}</a></li>
3 <li><a href="./?view=fav" {% if view == 'fav' %}class="current"{% endif %}>{% trans "favorites" %}</a></li> 3 <li><a href="./?view=fav" {% if view == 'fav' %}class="current"{% endif %}>{% trans "favorites" %}</a></li>
4 <li><a href="./?view=archive" {% if view == 'archive' %}class="current"{% endif %}>{% trans "archive" %}</a></li> 4 <li><a href="./?view=archive" {% if view == 'archive' %}class="current"{% endif %}>{% trans "archive" %}</a></li>
5 <li><a href="./?view=tags" {% if view == 'tags' %}class="current"{% endif %}>{% trans "tags" %}</a></li>
5 <li><a href="./?view=config" {% if view == 'config' %}class="current"{% endif %}>{% trans "config" %}</a></li> 6 <li><a href="./?view=config" {% if view == 'config' %}class="current"{% endif %}>{% trans "config" %}</a></li>
6 <li><a href="./?logout" title="{% trans "logout" %}">{% trans "logout" %}</a></li> 7 <li><a href="./?logout" title="{% trans "logout" %}">{% trans "logout" %}</a></li>
7 </ul> \ No newline at end of file 8 </ul> \ No newline at end of file
diff --git a/themes/default/css/style.css b/themes/default/css/style.css
index 670eb50f..2088ee2e 100644
--- a/themes/default/css/style.css
+++ b/themes/default/css/style.css
@@ -176,6 +176,12 @@ a:visited {
176 text-decoration: none; 176 text-decoration: none;
177} 177}
178 178
179#article .tags {
180 font-size: 0.8em;
181 color: #888;
182 padding-bottom: 5px;
183}
184
179.backhome { 185.backhome {
180 display: inline; 186 display: inline;
181} 187}
diff --git a/themes/default/edit-tags.twig b/themes/default/edit-tags.twig
new file mode 100644
index 00000000..7116bba9
--- /dev/null
+++ b/themes/default/edit-tags.twig
@@ -0,0 +1,20 @@
1{% extends "layout.twig" %}
2{% block title %}edit tags{% endblock %}
3{% block menu %}
4{% include '_menu.twig' %}
5{% endblock %}
6{% block content %}
7{% if tags is empty %}
8no tags
9{% endif %}
10<ul>
11{% for tag in tags %}<li>{{ tag.value }} <a href="./?action=remove_tag&amp;tag_id={{ tag.id }}&amp;id={{ entry_id }}">✘</a></li>{% endfor %}
12</ul>
13<form method="post" action="./?action=add_tag">
14 <label for="value">New tags: </label><input type="text" id="value" name="value" required="required" />
15 <p>{% trans "you can type several tags, separated by comma" %}</p>
16 <input type="hidden" name="entry_id" value="{{ entry_id }}" />
17 <input type="submit" value="add tags" />
18</form>
19<a href="./?view=view&id={{ entry_id }}">{% trans "back to the article" %}</a>
20{% endblock %} \ No newline at end of file
diff --git a/themes/default/img/default/rss.png b/themes/default/img/default/rss.png
new file mode 100644
index 00000000..21bad1a1
--- /dev/null
+++ b/themes/default/img/default/rss.png
Binary files differ
diff --git a/themes/default/tag.twig b/themes/default/tag.twig
new file mode 100644
index 00000000..364c7cd4
--- /dev/null
+++ b/themes/default/tag.twig
@@ -0,0 +1,33 @@
1{% extends "layout.twig" %}
2{% block title %}tag {% endblock %}
3{% block menu %}
4{% include '_menu.twig' %}
5{% endblock %}
6{% block content %}
7 <h3>{% trans "Tag" %} {{ tag.value }}</h3>
8 {% if entries is empty %}
9 <div class="messages warning"><p>{% trans "No link available here!" %}</p></div>
10 {% else %}
11 {% block pager %}
12 {% if nb_results > 1 %}
13 <div class="results">
14 <div class="nb-results">{{ nb_results }} {% trans "results" %}</div>
15 {{ page_links | raw }}
16 </div>
17 {% endif %}
18 {% endblock %}
19 {% for entry in entries %}
20 <div id="entry-{{ entry.id|e }}" class="entrie">
21 <h2><a href="index.php?view=view&amp;id={{ entry.id|e }}">{{ entry.title|raw }}</a></h2>
22 <ul class="tools">
23 <li><a title="{% trans "toggle mark as read" %}" class="tool {% if entry.is_read == 0 %}archive-off{% else %}archive{% endif %}" href="./?action=toggle_archive&amp;id={{ entry.id|e }}"><span>{% trans "toggle mark as read" %}</span></a></li>
24 <li><a title="{% trans "toggle favorite" %}" class="tool {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="./?action=toggle_fav&amp;id={{ entry.id|e }}"><span>{% trans "toggle favorite" %}</span></a></li>
25 <li><a title="{% trans "delete" %}" class="tool delete" href="./?action=delete&amp;id={{ entry.id|e }}"><span>{% trans "delete" %}</span></a></li>
26 <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}" class="tool link"><span>{{ entry.url | e | getDomain }}</span></a></li>
27 <li><a target="_blank" title="{% trans "estimated reading time:" %} {{ entry.content| getReadingTime }} min" class="reading-time"><span>{{ entry.content| getReadingTime }} min</span></a></li>
28 </ul>
29 <p>{{ entry.content|striptags|slice(0, 300) }}...</p>
30 </div>
31 {% endfor %}
32 {% endif %}
33{% endblock %} \ No newline at end of file
diff --git a/themes/default/tags.twig b/themes/default/tags.twig
new file mode 100644
index 00000000..cff6b1d7
--- /dev/null
+++ b/themes/default/tags.twig
@@ -0,0 +1,8 @@
1{% extends "layout.twig" %}
2{% block title %}tags{% endblock %}
3{% block menu %}
4{% include '_menu.twig' %}
5{% endblock %}
6{% block content %}
7{% for tag in tags %}<a href="./?view=tag&amp;id={{ tag.id }}">{{ tag.value }}</a> {% if token != '' %}<a href="?feed&amp;type=tag&amp;user_id={{ user_id }}&amp;tag_id={{ tag.id }}&amp;token={{ token }}" target="_blank"><img src="{{ poche_url }}/themes/{{ theme }}/img/{{ theme }}/rss.png" /></a>{% endif %} {% endfor %}
8{% endblock %} \ No newline at end of file
diff --git a/themes/default/view.twig b/themes/default/view.twig
index 1e54ae38..64672b61 100644
--- a/themes/default/view.twig
+++ b/themes/default/view.twig
@@ -20,6 +20,9 @@
20 <header class="mbm"> 20 <header class="mbm">
21 <h1>{{ entry.title|raw }}</h1> 21 <h1>{{ entry.title|raw }}</h1>
22 </header> 22 </header>
23 <aside class="tags">
24 tags: {% for tag in tags %}<a href="./?view=tag&amp;id={{ tag.id }}">{{ tag.value }}</a> {% endfor %}<a href="./?view=edit-tags&amp;id={{ entry.id|e }}" title="{% trans "edit tags" %}">✎</a>
25 </aside>
23 <article> 26 <article>
24 {{ content | raw }} 27 {{ content | raw }}
25 </article> 28 </article>