aboutsummaryrefslogtreecommitdiffhomepage
path: root/themes/baggy
diff options
context:
space:
mode:
Diffstat (limited to 'themes/baggy')
-rwxr-xr-xthemes/baggy/_display-mode.twig5
-rwxr-xr-x[-rw-r--r--]themes/baggy/_head.twig2
-rw-r--r--themes/baggy/_menu.twig5
-rwxr-xr-xthemes/baggy/_pocheit-form.twig10
-rw-r--r--themes/baggy/_top.twig2
-rw-r--r--themes/baggy/config.twig48
-rwxr-xr-xthemes/baggy/css/main.css172
-rwxr-xr-x[-rw-r--r--]themes/baggy/edit-tags.twig8
-rwxr-xr-x[-rw-r--r--]themes/baggy/home.twig8
-rwxr-xr-xthemes/baggy/img/baggy/blank.pngbin0 -> 141 bytes
-rw-r--r--themes/baggy/img/baggy/down.pngbin0 -> 216 bytes
-rwxr-xr-xthemes/baggy/img/baggy/list.pngbin0 -> 201 bytes
-rwxr-xr-xthemes/baggy/img/baggy/table.pngbin0 -> 229 bytes
-rw-r--r--themes/baggy/img/baggy/top.pngbin0 -> 212 bytes
-rwxr-xr-xthemes/baggy/img/logo-other_themes.pngbin0 -> 3922 bytes
-rwxr-xr-xthemes/baggy/js/init.js132
-rwxr-xr-xthemes/baggy/js/jquery.cookie.js117
-rwxr-xr-x[-rw-r--r--]themes/baggy/tags.twig2
-rw-r--r--themes/baggy/view.twig21
19 files changed, 495 insertions, 37 deletions
diff --git a/themes/baggy/_display-mode.twig b/themes/baggy/_display-mode.twig
new file mode 100755
index 00000000..31f76581
--- /dev/null
+++ b/themes/baggy/_display-mode.twig
@@ -0,0 +1,5 @@
1<div id="display-mode">
2 <a href="javascript: void(null);" id="listmode" class="listmode">
3 <img src="{{ poche_url }}/themes/{{ theme }}/img/{{ theme }}/blank.png" alt="{% trans "toggle view mode" %}" title="{% trans "toggle view mode" %}" width="16" height="16">
4 </a>
5</div>
diff --git a/themes/baggy/_head.twig b/themes/baggy/_head.twig
index 206d5aae..144bcaa6 100644..100755
--- a/themes/baggy/_head.twig
+++ b/themes/baggy/_head.twig
@@ -8,5 +8,7 @@
8 <link rel="stylesheet" href="{{ poche_url }}/themes/{{theme}}/css/messages.css" media="all"> 8 <link rel="stylesheet" href="{{ poche_url }}/themes/{{theme}}/css/messages.css" media="all">
9 <link rel="stylesheet" href="{{ poche_url }}/themes/{{theme}}/css/print.css" media="print"> 9 <link rel="stylesheet" href="{{ poche_url }}/themes/{{theme}}/css/print.css" media="print">
10 <script src="{{ poche_url }}/themes/{{theme}}/js/jquery-2.0.3.min.js"></script> 10 <script src="{{ poche_url }}/themes/{{theme}}/js/jquery-2.0.3.min.js"></script>
11 <script src="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/js/autoClose.js"></script>
12 <script src="{{ poche_url }}/themes/{{theme}}/js/jquery.cookie.js"></script>
11 <script src="{{ poche_url }}/themes/{{theme}}/js/init.js"></script> 13 <script src="{{ poche_url }}/themes/{{theme}}/js/init.js"></script>
12 <script src="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/js/closeMessage.js"></script> 14 <script src="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/js/closeMessage.js"></script>
diff --git a/themes/baggy/_menu.twig b/themes/baggy/_menu.twig
index e9cd9d4a..5226728b 100644
--- a/themes/baggy/_menu.twig
+++ b/themes/baggy/_menu.twig
@@ -4,9 +4,10 @@
4 <li><a href="./?view=fav" {% if view == 'fav' %}class="current"{% endif %}>{% trans "favorites" %}</a></li> 4 <li><a href="./?view=fav" {% if view == 'fav' %}class="current"{% endif %}>{% trans "favorites" %}</a></li>
5 <li><a href="./?view=archive" {% if view == 'archive' %}class="current"{% endif %}>{% trans "archive" %}</a></li> 5 <li><a href="./?view=archive" {% if view == 'archive' %}class="current"{% endif %}>{% trans "archive" %}</a></li>
6 <li><a href="./?view=tags" {% if view == 'tags' %}class="current"{% endif %}>{% trans "tags" %}</a></li> 6 <li><a href="./?view=tags" {% if view == 'tags' %}class="current"{% endif %}>{% trans "tags" %}</a></li>
7 <li><a href="javascript: void(null);" id="pocheit">{% trans "save a link" %}</a></li> 7 <li style="position: relative;"><a href="javascript: void(null);" id="bagit">{% trans "save a link" %}</a>
8 {% include '_pocheit-form.twig' %}
9 </li>
8 <li><a href="./?view=config" {% if view == 'config' %}class="current"{% endif %}>{% trans "config" %}</a></li> 10 <li><a href="./?view=config" {% if view == 'config' %}class="current"{% endif %}>{% trans "config" %}</a></li>
9 <li><a class="icon icon-power" href="./?logout" title="{% trans "logout" %}">{% trans "logout" %}</a></li> 11 <li><a class="icon icon-power" href="./?logout" title="{% trans "logout" %}">{% trans "logout" %}</a></li>
10 </ul> 12 </ul>
11 13
12 {% include '_pocheit-form.twig' %}
diff --git a/themes/baggy/_pocheit-form.twig b/themes/baggy/_pocheit-form.twig
new file mode 100755
index 00000000..505ec368
--- /dev/null
+++ b/themes/baggy/_pocheit-form.twig
@@ -0,0 +1,10 @@
1<div id="bagit-form" class="messages info">
2 <form method="get" action="index.php" target="_blank" id="bagit-form-form">
3 <h2><a href="javascript: void(null);" id="bagit-form-close">X</a>
4 {% trans "Save a link" %}</h2>
5 <input type="hidden" name="autoclose" value="1" />
6 <input required placeholder="example.com/article" class="addurl" id="plainurl" name="plainurl" type="url" />
7 <input type="submit" value="{% trans "save link!" %}" />
8 <div id="add-link-result"></div>
9 </form>
10</div>
diff --git a/themes/baggy/_top.twig b/themes/baggy/_top.twig
index 4f476a37..d3e35aa3 100644
--- a/themes/baggy/_top.twig
+++ b/themes/baggy/_top.twig
@@ -1,6 +1,6 @@
1 <header class="w600p center mbm"> 1 <header class="w600p center mbm">
2 <h1 class="logo"> 2 <h1 class="logo">
3 {% if view == 'home' %}{% block logo %}<img width="100" height="100" src="{{ poche_url }}/themes/{{theme}}/img/logo-w.png" alt="logo poche" />{% endblock %} 3 {% if view == 'home' %}{% block logo %}<img width="100" height="100" src="{{ poche_url }}/themes/{{theme}}/img/logo-w.png" alt="wallabag logo" />{% endblock %}
4 {% else %}<a href="./" title="{% trans "return home" %}" >{{ block('logo') }}</a> 4 {% else %}<a href="./" title="{% trans "return home" %}" >{{ block('logo') }}</a>
5 {% endif %} 5 {% endif %}
6 </h1> 6 </h1>
diff --git a/themes/baggy/config.twig b/themes/baggy/config.twig
index b37ac115..a13af0c8 100644
--- a/themes/baggy/config.twig
+++ b/themes/baggy/config.twig
@@ -8,10 +8,11 @@
8 <h2>{% trans "Saving articles" %}</h2> 8 <h2>{% trans "Saving articles" %}</h2>
9 <p>{% trans "There are several ways to save an article:" %} (<a href="http://doc.wallabag.org/" title="{% trans "read the documentation" %}">?</a>)</p> 9 <p>{% trans "There are several ways to save an article:" %} (<a href="http://doc.wallabag.org/" title="{% trans "read the documentation" %}">?</a>)</p>
10 <ul> 10 <ul>
11 <li>Firefox: <a href="https://addons.mozilla.org/firefox/addon/poche/" title="download the firefox extension">{% trans "download the extension" %}</a></li> 11 <li>Firefox: <a href="https://addons.mozilla.org/firefox/addon/wallabag/" title="download the firefox extension">{% trans "download the extension" %}</a></li>
12 <li>Chrome: <a href="http://doc.wallabag.org/doku.php?id=users:chrome_extension" title="download the chrome extension">{% trans "download the extension" %}</a></li> 12 <li>Chrome: <a href="http://doc.wallabag.org/doku.php?id=users:chrome_extension" title="download the chrome extension">{% trans "download the extension" %}</a></li>
13 <li>Android: <a href="https://f-droid.org/repository/browse/?fdid=fr.gaulupeau.apps.Poche" title="download the application">{% trans "via F-Droid" %}</a> {% trans " or " %} <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" title="download the application">{% trans "via Google Play" %}</a></li> 13 <li>Android: <a href="https://f-droid.org/app/fr.gaulupeau.apps.InThePoche" title="download the application">{% trans "via F-Droid" %}</a> {% trans " or " %} <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" title="download the application">{% trans "via Google Play" %}</a></li>
14 <li>Windows Phone: <a href="https://www.windowsphone.com/en-us/store/app/poche/334de2f0-51b5-4826-8549-a3d805a37e83" title="download the window phone application">{% trans "download the application" %}</a></li> 14 <li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" title="download the iOS application">{% trans "download the application" %}</a></li>
15 <li>Windows Phone: <a href="http://www.windowsphone.com/en-us/store/app/wallabag/ff890514-348c-4d0b-9b43-153fff3f7450" title="download the window phone application">{% trans "download the application" %}</a></li>
15 <li> 16 <li>
16 <form method="get" action="index.php"> 17 <form method="get" action="index.php">
17 <label class="addurl" for="config_plainurl">{% trans "By filling this field" %}:</label> 18 <label class="addurl" for="config_plainurl">{% trans "By filling this field" %}:</label>
@@ -25,9 +26,10 @@
25 <h2>{% trans "Upgrading wallabag" %}</h2> 26 <h2>{% trans "Upgrading wallabag" %}</h2>
26 <ul> 27 <ul>
27 <li>{% trans "Installed version" %} : <strong>{{ constant('POCHE') }}</strong></li> 28 <li>{% trans "Installed version" %} : <strong>{{ constant('POCHE') }}</strong></li>
28 <li>{% trans "Latest stable version" %} : {{ prod }}. {% if compare_prod == -1 %}<strong><a href="http://wallabag.org/">{% trans "A more recent stable version is available." %}</a></strong>{% else %}{% trans "You are up to date." %}{% endif %}</li> 29 <li>{% trans "Latest stable version" %} : {{ prod }}. {% if compare_prod == -1 %}<strong><a href="http://wallabag.org/">{% trans "A more recent stable version is available." %}</a></strong>{% else %}{% trans "You are up to date." %}{% endif %} ({% trans "Last check:" %} {{ check_time_prod }})</li>
29 {% if constant('DEBUG_POCHE') == 1 %}<li>{% trans "Latest dev version" %} : {{ dev }}. {% if compare_dev == -1 %}<strong><a href="http://wallabag.org/">{% trans "A more recent development version is available." %}</a></strong>{% else %}{% trans "You are up to date." %}{% endif %}</li>{% endif %} 30 {% if constant('DEBUG_POCHE') == 1 %}<li>{% trans "Latest dev version" %} : {{ dev }}. {% if compare_dev == -1 %}<strong><a href="http://wallabag.org/">{% trans "A more recent development version is available." %}</a></strong>{% else %}{% trans "You are up to date." %}{% endif %} ({% trans "Last check:" %} {{ check_time_dev }}){% endif %}</li>
30 </ul> 31 </ul>
32 <p>{% trans "You can clear cache to check the latest release." %}</p>
31 33
32 <h2>{% trans "Feeds" %}</h2> 34 <h2>{% trans "Feeds" %}</h2>
33 {% if token == '' %} 35 {% if token == '' %}
@@ -42,7 +44,7 @@
42 <p>{% trans "Your user id:" %} <strong>{{user_id}}</strong></p> 44 <p>{% trans "Your user id:" %} <strong>{{user_id}}</strong></p>
43 <p>{% trans "You can regenerate your token: <a href='?feed&amp;action=generate'>generate!</a>." %}</p> 45 <p>{% trans "You can regenerate your token: <a href='?feed&amp;action=generate'>generate!</a>." %}</p>
44 {% endif %} 46 {% endif %}
45 47
46 <h2>{% trans "Change your theme" %}</h2> 48 <h2>{% trans "Change your theme" %}</h2>
47 <form method="post" action="?updatetheme" name="changethemeform"> 49 <form method="post" action="?updatetheme" name="changethemeform">
48 <fieldset class="w500p inline"> 50 <fieldset class="w500p inline">
@@ -103,15 +105,37 @@
103 {% endif %} 105 {% endif %}
104 106
105 <h2>{% trans "Import" %}</h2> 107 <h2>{% trans "Import" %}</h2>
106 <p>{% trans "Please execute the import script locally as it can take a very long time." %}</p> 108 <p>{% trans "Importing from other services can be quite long, and webservers default configuration often prevents long scripts execution time, so it must be done in multiple parts." %}</p>
107 <p>{% trans "More info in the official documentation:" %} <a href="http://doc.wallabag.org/doku.php?id=users:migrate">wallabag.org</a></p> 109 <p>1. {% trans "First, select the export file on your computer and upload it." %}</p>
110 <form method="post" action="?uploadfile" name="uploadfile" enctype="multipart/form-data">
111 <fieldset class="w500p">
112 <div class="row">
113 <label class="col w150p" for="file">{% trans "File:" %}</label>
114 <input class="col" type="file" id="file" name="file" tabindex="4">
115 </div>
116 <div class="row mts txtcenter">
117 <button class="bouton" type="submit" tabindex="4">{% trans "Upload" %}</button>
118 </div>
119 </fieldset>
120 <input type="hidden" name="MAX_FILE_SIZE" value="1048576">
121 <input type="hidden" name="returnurl" value="{{ referer }}">
122 </form>
123 <p>2. {% trans "Then, click on the right link below." %}</p>
108 <ul> 124 <ul>
109 <li><a href="./?import&amp;from=pocket">{% trans "Import from Pocket" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('POCKET_FILE')) }}</li> 125 <li><a href="./?import&amp;from=pocket">{% trans "Import from Pocket" %}</a> {{ '(after uploaded %s file)'|trans|format(constant('POCKET_FILE')) }}</li>
110 <li><a href="./?import&amp;from=readability">{% trans "Import from Readability" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('READABILITY_FILE')) }}</li> 126 <li><a href="./?import&amp;from=readability">{% trans "Import from Readability" %}</a> {{ '(after uploaded %s file)'|trans|format(constant('READABILITY_FILE')) }}</li>
111 <li><a href="./?import&amp;from=instapaper">{% trans "Import from Instapaper" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('INSTAPAPER_FILE')) }}</li> 127 <li><a href="./?import&amp;from=instapaper">{% trans "Import from Instapaper" %}</a> {{ '(after uploaded %s file)'|trans|format(constant('INSTAPAPER_FILE')) }}</li>
112 <li><a href="./?import&amp;from=poche">{% trans "Import from wallabag" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('POCHE_FILE')) }}</li> 128 <li><a href="./?import&amp;from=poche">{% trans "Import from wallabag" %}</a> {{ '(after uploaded %s file)'|trans|format(constant('POCHE_FILE')) }}</li>
113 </ul> 129 </ul>
114 130
131 {% if token == '' %}
132 <p>{% trans "3. Your feed token is currently empty and must first be generated to fetch content. Click <a href='?feed&amp;action=generate'>here to generate it</a>." %}</p>
133 {% else %}
134 <p>3. {% trans "Finally, you have to fetch content for imported items." %} <a href="cron.php?limit=10&amp;user-id={{ user_id }}&amp;token={{token}}" target="_blank">{% trans "Click here" %}</a> {% trans "to fetch content for 10 articles" %}.</p>
135 <p>{% trans "If you have console access to your server, you can also create a cron task:" %}</p>
136 <pre><code>0 */4 * * * cd /path/to/wallabag && php cron.php --limit=10 --user-id={{user_id}} --token={{token}} >/dev/null 2>&1</code></pre>
137 {% endif %}
138
115 <h2>{% trans "Export your wallabag data" %}</h2> 139 <h2>{% trans "Export your wallabag data" %}</h2>
116 {% if constant('STORAGE') == 'sqlite' %} 140 {% if constant('STORAGE') == 'sqlite' %}
117 <p><a href="?download" target="_blank">{% trans "Click here" %}</a> {% trans "to download your database." %}</p>{% endif %} 141 <p><a href="?download" target="_blank">{% trans "Click here" %}</a> {% trans "to download your database." %}</p>{% endif %}
diff --git a/themes/baggy/css/main.css b/themes/baggy/css/main.css
index 3e128b08..61e0b47e 100755
--- a/themes/baggy/css/main.css
+++ b/themes/baggy/css/main.css
@@ -173,21 +173,22 @@ h2:after {
173#links { 173#links {
174 position: fixed; 174 position: fixed;
175 top: 0; 175 top: 0;
176 width: 9em; 176 width: 10em;
177 left: 0; 177 left: 0;
178 text-align: right; 178 text-align: right;
179 background: #333; 179 background: #333;
180 padding-top: 9em; 180 padding-top: 9.5em;
181 height: 100%; 181 height: 100%;
182 box-shadow:inset -4px 0 20px rgba(0,0,0,0.6); 182 box-shadow:inset -4px 0 20px rgba(0,0,0,0.6);
183 z-index: 10; 183 z-index: 10;
184} 184}
185 185
186#main { 186#main {
187 margin-left: 12em; 187 margin-left: 13em;
188 position: relative; 188 position: relative;
189 z-index: 10; 189 z-index: 10;
190 padding-right: 5%; 190 padding-right: 5%;
191 padding-bottom: 1em;
191} 192}
192 193
193 #links a { 194 #links a {
@@ -227,7 +228,7 @@ h2:after {
227 #links li:last-child { 228 #links li:last-child {
228 position: fixed; 229 position: fixed;
229 bottom: 1em; 230 bottom: 1em;
230 width: 10%; 231 width: 10em;
231 } 232 }
232 233
233 #links li:last-child a:before { 234 #links li:last-child a:before {
@@ -237,6 +238,61 @@ h2:after {
237 } 238 }
238 239
239 240
241#sort {
242 padding: 0;
243 list-style-type: none;
244 opacity: 0.5;
245 display: inline-block;
246}
247
248#sort li {
249 display: inline;
250 font-size: 0.9em;
251}
252
253#sort li + li {
254 margin-left: 10px;
255}
256
257#sort a {
258 padding: 2px 2px 0;
259 vertical-align: middle;
260}
261
262#sort img {
263 vertical-align: baseline;
264}
265#sort img:hover {
266 cursor: pointer;
267}
268
269#display-mode {
270 float: right;
271 vertical-align: middle;
272 margin-top: 10px;
273 margin-bottom: 10px;
274 opacity: 0.5;
275}
276#listmode {
277 width: 16px;
278 display: inline-block;
279 text-decoration: none;
280}
281#listmode a:hover {
282 opacity: 1;
283}
284.tablemode {
285 background-image: url("../img/baggy/table.png");
286 background-repeat: no-repeat;
287 background-position: bottom;
288}
289.listmode {
290 background-image: url("../img/baggy/list.png");
291 background-repeat: no-repeat;
292 background-position: bottom;
293}
294
295
240/* ========================================================================== 296/* ==========================================================================
241 2 = Layout 297 2 = Layout
242 ========================================================================== */ 298 ========================================================================== */
@@ -248,7 +304,7 @@ h2:after {
248 304
249footer { 305footer {
250 text-align: right; 306 text-align: right;
251 position: fixed; 307 position: relative;
252 bottom: 0; 308 bottom: 0;
253 right: 5em; 309 right: 5em;
254 color: #999; 310 color: #999;
@@ -266,6 +322,15 @@ footer a {
266 letter-spacing:-5px; 322 letter-spacing:-5px;
267} 323}
268 324
325.listmode .entrie {
326 width: 100%!important;
327 margin-left: 0!important;
328}
329
330.listmode .entrie p {
331 display: none;
332}
333
269.list-entries + .results { 334.list-entries + .results {
270 margin-bottom: 2em; 335 margin-bottom: 2em;
271} 336}
@@ -287,10 +352,10 @@ footer a {
287 letter-spacing:normal; 352 letter-spacing:normal;
288 box-shadow: 0 3px 7px rgba(0,0,0,0.3); 353 box-shadow: 0 3px 7px rgba(0,0,0,0.3);
289 display: inline-block; 354 display: inline-block;
290 width: 32%; 355 width: 32%!important;
291 margin-bottom: 1.5em; 356 margin-bottom: 1.5em;
292 vertical-align: top; 357 vertical-align: top;
293 margin-left: 1.5%; 358 margin-left: 1.5%!important;
294 position: relative; 359 position: relative;
295 overflow: hidden; 360 overflow: hidden;
296 padding: 1.5em 1.5em 3em 1.5em; 361 padding: 1.5em 1.5em 3em 1.5em;
@@ -425,7 +490,7 @@ footer a {
425 } 490 }
426 491
427.entrie:nth-child(3n+1) { 492.entrie:nth-child(3n+1) {
428 margin-left: 0; 493 margin-left: 0!important;
429} 494}
430 495
431.results { 496.results {
@@ -442,6 +507,7 @@ footer a {
442 507
443.pagination { 508.pagination {
444 text-align: right; 509 text-align: right;
510 margin-bottom:50px;
445} 511}
446 512
447.nb-results { 513.nb-results {
@@ -469,6 +535,84 @@ footer a {
469} 535}
470 536
471/* ========================================================================== 537/* ==========================================================================
538 2.1 = "save a link" popup div related styles
539 ========================================================================== */
540
541#bagit-form {
542 background: rgba(0,0,0,0.5);
543 position: absolute;
544 top: 0;
545 left: 10em;
546 z-index: 20;
547 height: 100%;
548 width: 100%;
549 margin: 0;
550 margin-top: -30%;
551 padding: 2em;
552 display: none;
553 border-left: 1px #EEE solid;
554}
555
556#bagit-form form {
557 background: #FFF;
558 position: absolute;
559 top: 0;
560 left: 0;
561 z-index: 20;
562 border: 10px solid #000;
563 width: 400px;
564 height: 200px;
565 /* margin: -150px 0 0 -300px; */
566 padding: 2em;
567}
568
569a#bagit-form-close {
570 background: #000;
571 color: #FFF;
572 padding: 0.2em 0.5em;
573 text-decoration: none;
574 display: inline-block;
575 float: right;
576 font-size: 0.6em;
577}
578a#bagit-form-close:hover {
579 background: #999;
580 color: #000;
581}
582
583.active-current {
584 background-color: #999;
585}
586
587.active-current:after {
588 content: "";
589 width: 0;
590 height: 0;
591 position: absolute;
592 border-style: solid;
593 border-width: 10px;
594 border-color: transparent #EEE transparent transparent;
595 right: 0;
596 top: 50%;
597 margin-top: -10px;
598}
599
600.opacity03 {
601 opacity: 0.3;
602}
603
604.add-to-wallabag-link-after {
605 background-color: #000;
606 color: #fff;
607 padding: 0 3px 2px 3px;
608}
609
610#add-link-result {
611 font-weight: bold;
612 margin-top: 10px;
613}
614
615/* ==========================================================================
472 3 = Pictos 616 3 = Pictos
473 ========================================================================== */ 617 ========================================================================== */
474 618
@@ -602,6 +746,7 @@ footer a {
602#article { 746#article {
603 width: 70%; 747 width: 70%;
604 margin-bottom: 3em; 748 margin-bottom: 3em;
749 text-align: justify;
605} 750}
606 751
607#article .tags { 752#article .tags {
@@ -731,6 +876,9 @@ blockquote {
731 width: 100%; 876 width: 100%;
732 margin-left: 0; 877 margin-left: 0;
733 } 878 }
879 #display-mode {
880 display: none;
881 }
734} 882}
735 883
736@media screen and (max-width: 500px) { 884@media screen and (max-width: 500px) {
@@ -820,4 +968,12 @@ blockquote {
820 #article_toolbar a { 968 #article_toolbar a {
821 padding: 0.3em 0.4em 0.2em; 969 padding: 0.3em 0.4em 0.2em;
822 } 970 }
971
972 #display-mode {
973 display: none;
974 }
975
976 #bagit-form {
977 left: 0;
978 }
823} 979}
diff --git a/themes/baggy/edit-tags.twig b/themes/baggy/edit-tags.twig
index 9e9012ee..65ac996a 100644..100755
--- a/themes/baggy/edit-tags.twig
+++ b/themes/baggy/edit-tags.twig
@@ -4,6 +4,11 @@
4{% include '_menu.twig' %} 4{% include '_menu.twig' %}
5{% endblock %} 5{% endblock %}
6{% block content %} 6{% block content %}
7
8<script src="{{ poche_url }}/themes/default/js/jquery-ui-1.10.4.custom.min.js"></script>
9<script src="{{ poche_url }}/themes/default/js/autoCompleteTags.js"></script>
10<link rel="stylesheet" href="{{ poche_url }}/themes/default/css/jquery-ui-1.10.4.custom.min.css" media="all">
11
7<div id="article"> 12<div id="article">
8 <h2>{{ entry.title|raw }}</21> 13 <h2>{{ entry.title|raw }}</21>
9</div> 14</div>
@@ -17,7 +22,8 @@
17 <input type="hidden" name="entry_id" value="{{ entry_id }}" /> 22 <input type="hidden" name="entry_id" value="{{ entry_id }}" />
18 <label for="value">Add tags: </label><input type="text" placeholder="interview, editorial, video" id="value" name="value" required="required" /> 23 <label for="value">Add tags: </label><input type="text" placeholder="interview, editorial, video" id="value" name="value" required="required" />
19 <input type="submit" value="Tag" /> 24 <input type="submit" value="Tag" />
20 <p>{% trans "You can enter multiple tags, separated by commas." %}</p> 25 <p>{% trans "Start typing for auto complete." %}<br>
26 {% trans "You can enter multiple tags, separated by commas." %}</p>
21</form> 27</form>
22<a class="icon icon-reply return" href="./?view=view&id={{ entry_id }}">{% trans "return to article" %}</a> 28<a class="icon icon-reply return" href="./?view=view&id={{ entry_id }}">{% trans "return to article" %}</a>
23{% endblock %} 29{% endblock %}
diff --git a/themes/baggy/home.twig b/themes/baggy/home.twig
index 4f9db063..e34897fa 100644..100755
--- a/themes/baggy/home.twig
+++ b/themes/baggy/home.twig
@@ -18,6 +18,10 @@
18 {% if entries is empty %} 18 {% if entries is empty %}
19 <div class="messages warning"><p>{% trans "No articles found." %}</p></div> 19 <div class="messages warning"><p>{% trans "No articles found." %}</p></div>
20 {% else %} 20 {% else %}
21 <div>
22 {% include '_display-mode.twig' %}
23 {% include '_sorting.twig' %}
24 </div>
21 {% block pager %} 25 {% block pager %}
22 {% if nb_results > 1 %} 26 {% if nb_results > 1 %}
23 <div class="results"> 27 <div class="results">
@@ -26,9 +30,9 @@
26 </div> 30 </div>
27 {% endif %} 31 {% endif %}
28 {% endblock %} 32 {% endblock %}
29 <div class="list-entries"> 33 <div id="list-entries" class="list-entries">
30 {% for entry in entries %} 34 {% for entry in entries %}
31 <div id="entry-{{ entry.id|e }}" class="entrie"> 35 <div id="entry-{{ entry.id|e }}" class="entrie"{% if listmode %} style="width:100%; margin-left:0;"{% endif %}>
32 <h2><a href="index.php?view=view&amp;id={{ entry.id|e }}">{{ entry.title|raw }}</a></h2> 36 <h2><a href="index.php?view=view&amp;id={{ entry.id|e }}">{{ entry.title|raw }}</a></h2>
33 {% if entry.content| getReadingTime > 0 %} 37 {% if entry.content| getReadingTime > 0 %}
34 <div class="estimatedTime"><a target="_blank" title="{% trans "estimated reading time:" %} {{ entry.content| getReadingTime }} min" class="tool reading-time"><span>{% trans "estimated reading time :" %} {{ entry.content| getReadingTime }} min</span></div> 38 <div class="estimatedTime"><a target="_blank" title="{% trans "estimated reading time:" %} {{ entry.content| getReadingTime }} min" class="tool reading-time"><span>{% trans "estimated reading time :" %} {{ entry.content| getReadingTime }} min</span></div>
diff --git a/themes/baggy/img/baggy/blank.png b/themes/baggy/img/baggy/blank.png
new file mode 100755
index 00000000..63e09844
--- /dev/null
+++ b/themes/baggy/img/baggy/blank.png
Binary files differ
diff --git a/themes/baggy/img/baggy/down.png b/themes/baggy/img/baggy/down.png
new file mode 100644
index 00000000..b9d536a7
--- /dev/null
+++ b/themes/baggy/img/baggy/down.png
Binary files differ
diff --git a/themes/baggy/img/baggy/list.png b/themes/baggy/img/baggy/list.png
new file mode 100755
index 00000000..bd5aff5a
--- /dev/null
+++ b/themes/baggy/img/baggy/list.png
Binary files differ
diff --git a/themes/baggy/img/baggy/table.png b/themes/baggy/img/baggy/table.png
new file mode 100755
index 00000000..859c4cd8
--- /dev/null
+++ b/themes/baggy/img/baggy/table.png
Binary files differ
diff --git a/themes/baggy/img/baggy/top.png b/themes/baggy/img/baggy/top.png
new file mode 100644
index 00000000..954a8c0a
--- /dev/null
+++ b/themes/baggy/img/baggy/top.png
Binary files differ
diff --git a/themes/baggy/img/logo-other_themes.png b/themes/baggy/img/logo-other_themes.png
new file mode 100755
index 00000000..32543a44
--- /dev/null
+++ b/themes/baggy/img/logo-other_themes.png
Binary files differ
diff --git a/themes/baggy/js/init.js b/themes/baggy/js/init.js
index c1d3c0ec..da644fbe 100755
--- a/themes/baggy/js/init.js
+++ b/themes/baggy/js/init.js
@@ -1,12 +1,126 @@
1document.addEventListener('DOMContentLoaded', function() { 1$.fn.ready(function() {
2 var menu = document.getElementById('menu');
3 2
4 menu.addEventListener('click', function(){ 3 var $listmode = $('#listmode'),
5 if(this.nextElementSibling.style.display === "block") { 4 $listentries = $("#list-entries"),
6 this.nextElementSibling.style.display = "none"; 5 $bagit = $('#bagit'),
7 }else { 6 $bagitForm = $('#bagit-form');
8 this.nextElementSibling.style.display = "block"; 7 $bagitFormForm = $('#bagit-form-form');
8
9 /* ==========================================================================
10 Menu
11 ========================================================================== */
12
13 $("#menu").click(function(){
14 $("#links").toggle();
15 });
16
17 /* ==========================================================================
18 List mode or Table Mode
19 ========================================================================== */
20
21 $listmode.click(function(){
22 if ( $.cookie("listmode") == 1 ) {
23 // Cookie
24 $.removeCookie("listmode");
25
26 $listentries.removeClass("listmode");
27 $listmode.removeClass("tablemode");
28 $listmode.addClass("listmode");
29 }
30 else {
31 // Cookie
32 $.cookie("listmode", 1, {expires: 365});
33
34 $listentries.addClass("listmode");
35 $listmode.removeClass("listmode");
36 $listmode.addClass("tablemode");
37 }
38
39 });
40
41 /* ==========================================================================
42 Cookie listmode
43 ========================================================================== */
44
45 if ( $.cookie("listmode") == 1 ) {
46 $listentries.addClass("listmode");
47 $listmode.removeClass("listmode");
48 $listmode.addClass("tablemode");
49 }
50
51 /* ==========================================================================
52 bag it link and close button
53 ========================================================================== */
54
55 function toggleSaveLinkForm(url) {
56 $bagit.toggleClass("active-current");
57 $bagitForm.toggle();
58 $('#content').toggleClass("opacity03");
59 if (url !== 'undefined' && url) {
60 $('#plainurl').val(url);
61 }
62 $('#plainurl').focus();
63 }
64
65 $bagit.click(function(){
66 toggleSaveLinkForm();
67 });
68
69 $("#bagit-form-close").click(function(){
70 toggleSaveLinkForm();
71 });
72
73
74 //send "bag it link" form request via ajax
75 $bagitFormForm.submit( function(event) {
76 $bagitFormForm.css("cursor", "wait");
77 $("#add-link-result").empty();
78
79 $.ajax({
80 type: $bagitFormForm.attr('method'),
81 url: $bagitFormForm.attr('action'),
82 data: $bagitFormForm.serialize(),
83 success: function(data) {
84 $('#add-link-result').html("Done!");
85 $('#plainurl').val('');
86 $('#plainurl').blur('');
87 $bagitFormForm.css("cursor", "auto");
88 //setTimeout( function() { toggleSaveLinkForm(); }, 1000); //close form after 1000 delay
89 },
90 error: function(data) {
91 $('#add-link-result').html("Failed!");
92 $bagitFormForm.css("cursor", "auto");
93 }
94 });
95
96 event.preventDefault();
97 });
98
99 /* ==========================================================================
100 Keyboard gestion
101 ========================================================================== */
102
103 $(window).keydown(function(e){
104 if ( ( e.target.tagName.toLowerCase() !== 'input' && e.keyCode == 83 ) || e.keyCode == 27 ) {
105 toggleSaveLinkForm();
106 return false;
9 } 107 }
10
11 }); 108 });
12}); \ No newline at end of file 109
110 /* ==========================================================================
111 Process all links inside an article
112 ========================================================================== */
113
114 $("article a[href^='http']").after(function() {
115 return " <a href=\"" + $(this).attr('href') + "\" class=\"add-to-wallabag-link-after\" alt=\"add to wallabag\" title=\"add to wallabag\">w</a> ";
116 });
117
118 $(".add-to-wallabag-link-after").click(function(event){
119 toggleSaveLinkForm($(this).attr('href'));
120 event.preventDefault();
121 });
122
123
124
125
126});
diff --git a/themes/baggy/js/jquery.cookie.js b/themes/baggy/js/jquery.cookie.js
new file mode 100755
index 00000000..92719000
--- /dev/null
+++ b/themes/baggy/js/jquery.cookie.js
@@ -0,0 +1,117 @@
1/*!
2 * jQuery Cookie Plugin v1.4.0
3 * https://github.com/carhartl/jquery-cookie
4 *
5 * Copyright 2013 Klaus Hartl
6 * Released under the MIT license
7 */
8(function (factory) {
9 if (typeof define === 'function' && define.amd) {
10 // AMD. Register as anonymous module.
11 define(['jquery'], factory);
12 } else {
13 // Browser globals.
14 factory(jQuery);
15 }
16}(function ($) {
17
18 var pluses = /\+/g;
19
20 function encode(s) {
21 return config.raw ? s : encodeURIComponent(s);
22 }
23
24 function decode(s) {
25 return config.raw ? s : decodeURIComponent(s);
26 }
27
28 function stringifyCookieValue(value) {
29 return encode(config.json ? JSON.stringify(value) : String(value));
30 }
31
32 function parseCookieValue(s) {
33 if (s.indexOf('"') === 0) {
34 // This is a quoted cookie as according to RFC2068, unescape...
35 s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
36 }
37
38 try {
39 // Replace server-side written pluses with spaces.
40 // If we can't decode the cookie, ignore it, it's unusable.
41 s = decodeURIComponent(s.replace(pluses, ' '));
42 } catch(e) {
43 return;
44 }
45
46 try {
47 // If we can't parse the cookie, ignore it, it's unusable.
48 return config.json ? JSON.parse(s) : s;
49 } catch(e) {}
50 }
51
52 function read(s, converter) {
53 var value = config.raw ? s : parseCookieValue(s);
54 return $.isFunction(converter) ? converter(value) : value;
55 }
56
57 var config = $.cookie = function (key, value, options) {
58
59 // Write
60 if (value !== undefined && !$.isFunction(value)) {
61 options = $.extend({}, config.defaults, options);
62
63 if (typeof options.expires === 'number') {
64 var days = options.expires, t = options.expires = new Date();
65 t.setDate(t.getDate() + days);
66 }
67
68 return (document.cookie = [
69 encode(key), '=', stringifyCookieValue(value),
70 options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
71 options.path ? '; path=' + options.path : '',
72 options.domain ? '; domain=' + options.domain : '',
73 options.secure ? '; secure' : ''
74 ].join(''));
75 }
76
77 // Read
78
79 var result = key ? undefined : {};
80
81 // To prevent the for loop in the first place assign an empty array
82 // in case there are no cookies at all. Also prevents odd result when
83 // calling $.cookie().
84 var cookies = document.cookie ? document.cookie.split('; ') : [];
85
86 for (var i = 0, l = cookies.length; i < l; i++) {
87 var parts = cookies[i].split('=');
88 var name = decode(parts.shift());
89 var cookie = parts.join('=');
90
91 if (key && key === name) {
92 // If second argument (value) is a function it's a converter...
93 result = read(cookie, value);
94 break;
95 }
96
97 // Prevent storing a cookie that we couldn't decode.
98 if (!key && (cookie = read(cookie)) !== undefined) {
99 result[name] = cookie;
100 }
101 }
102
103 return result;
104 };
105
106 config.defaults = {};
107
108 $.removeCookie = function (key, options) {
109 if ($.cookie(key) !== undefined) {
110 // Must not alter options, thus extending a fresh object...
111 $.cookie(key, '', $.extend({}, options, { expires: -1 }));
112 return true;
113 }
114 return false;
115 };
116
117}));
diff --git a/themes/baggy/tags.twig b/themes/baggy/tags.twig
index 9df44bb7..9bb93a45 100644..100755
--- a/themes/baggy/tags.twig
+++ b/themes/baggy/tags.twig
@@ -6,7 +6,7 @@
6{% block content %} 6{% block content %}
7<h2>{% trans "Tags" %}</h2> 7<h2>{% trans "Tags" %}</h2>
8<ul class="list-tags"> 8<ul class="list-tags">
9{% for tag in tags %}<li>{% if token != '' %}<a class="icon icon-rss" href="?feed&amp;type=tag&amp;user_id={{ user_id }}&amp;tag_id={{ tag.id }}&amp;token={{ token }}" target="_blank"><span>rss</span></a>{% endif %} <a href="./?view=tag&amp;id={{ tag.id }}">{{ tag.value }}</a> 9{% for tag in tags %}<li>{% if token != '' %}<a class="icon icon-rss" href="?feed&amp;type=tag&amp;user_id={{ user_id }}&amp;tag_id={{ tag.id }}&amp;token={{ token }}" target="_blank"><span>rss</span></a>{% endif %} <a href="./?view=tag&amp;id={{ tag.id }}">{{ tag.value }}</a> ({{ tag.entriescount }})
10</li> 10</li>
11{% endfor %} 11{% endfor %}
12</ul> 12</ul>
diff --git a/themes/baggy/view.twig b/themes/baggy/view.twig
index 4751c4cb..092be04e 100644
--- a/themes/baggy/view.twig
+++ b/themes/baggy/view.twig
@@ -14,7 +14,7 @@
14 {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="{% trans "Tweet" %}"><span>{% trans "Tweet" %}</span></a></li>{% endif %} 14 {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="{% trans "Tweet" %}"><span>{% trans "Tweet" %}</span></a></li>{% endif %}
15 {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="{% trans "Email" %}"><span>{% trans "Email" %}</span></a></li>{% endif %} 15 {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="{% trans "Email" %}"><span>{% trans "Email" %}</span></a></li>{% endif %}
16 {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %} 16 {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %}
17 {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span> ({{ flattr.numflattrs }})</a></li>{% endif %}{% endif %} 17 {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span> ({{ flattr.numflattrs }})</a></li>{% endif %}{% endif %}
18 <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;body={{ entry.url|url_encode }}" title="{% trans "Does this article appear wrong?" %}" class="tool bad-display icon icon-delete"><span>{% trans "Does this article appear wrong?" %}</span></a></li> 18 <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;body={{ entry.url|url_encode }}" title="{% trans "Does this article appear wrong?" %}" class="tool bad-display icon icon-delete"><span>{% trans "Does this article appear wrong?" %}</span></a></li>
19 </ul> 19 </ul>
20 </div> 20 </div>
@@ -29,4 +29,23 @@
29 {{ content | raw }} 29 {{ content | raw }}
30 </article> 30 </article>
31 </div> 31 </div>
32 <script src="{{ poche_url }}/themes/{{theme}}/js/restoreScroll.js"></script>
33 <script type="text/javascript">
34 $(document).ready(function() {
35
36 $(window).scroll(function(e){
37 var scrollTop = $(window).scrollTop();
38 var docHeight = $(document).height();
39 var scrollPercent = (scrollTop) / (docHeight);
40 var scrollPercentRounded = Math.round(scrollPercent*100)/100;
41 savePercent({{ entry.id|e }}, scrollPercentRounded);
42 });
43
44 retrievePercent({{ entry.id|e }});
45
46 $(window).resize(function(){
47 retrievePercent({{ entry.id|e }});
48 });
49 });
50 </script>
32{% endblock %} 51{% endblock %}