From 8a9604aafe8b8c6ddde4e1be78189af5238588fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 9 Nov 2016 15:44:28 +0100 Subject: Added unmark.it sharing Fix #668 --- app/Resources/static/themes/baggy/css/main.css | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index 44db2070..6cf49de1 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -936,6 +936,11 @@ a.add-to-wallabag-link-after::after { background-image: url("../../_global/img/icons/diaspora-icon--black.png"); } +/* Unmark.it */ +.icon-image--unmark { + background-image: url("../../_global/img/icons/unmark-icon--black.png"); +} + /* shaarli */ .icon-image--shaarli { background-image: url("../../_global/img/icons/shaarli.png"); -- cgit v1.2.3 From af61cb80eb600618df95a01a15a08e87fc878c2a Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 27 Oct 2016 01:57:27 +0200 Subject: es6 imports Signed-off-by: Thomas Citharel --- .../static/themes/baggy/js/autoCompleteTags.js | 2 +- app/Resources/static/themes/baggy/js/init.js | 18 ++++++++++++------ app/Resources/static/themes/baggy/js/uiTools.js | 4 ++-- 3 files changed, 15 insertions(+), 9 deletions(-) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/js/autoCompleteTags.js b/app/Resources/static/themes/baggy/js/autoCompleteTags.js index f287ebfa..64fdaa92 100755 --- a/app/Resources/static/themes/baggy/js/autoCompleteTags.js +++ b/app/Resources/static/themes/baggy/js/autoCompleteTags.js @@ -5,4 +5,4 @@ function extractLast(term) { return split(term).pop(); } -export { split, extractLast }; +export default { split, extractLast }; diff --git a/app/Resources/static/themes/baggy/js/init.js b/app/Resources/static/themes/baggy/js/init.js index dc11043a..b7347f7c 100755 --- a/app/Resources/static/themes/baggy/js/init.js +++ b/app/Resources/static/themes/baggy/js/init.js @@ -1,11 +1,17 @@ -import { savePercent, retrievePercent } from '../../_global/js/tools'; -import { toggleSaveLinkForm } from './uiTools'; +import $ from 'jquery'; + +/* eslint-disable no-unused-vars */ +/* jquery has default scope */ +import cookie from 'jquery.cookie'; +import ui from 'jquery-ui-browserify'; +/* eslint-enable no-unused-vars */ -const $ = global.jquery = require('jquery'); -require('jquery.cookie'); -require('jquery-ui-browserify'); -const annotator = require('annotator'); +import annotator from 'annotator'; + +import { savePercent, retrievePercent } from '../../_global/js/tools'; +import toggleSaveLinkForm from './uiTools'; +global.jquery = $; $.fn.ready(() => { const $listmode = $('#listmode'); diff --git a/app/Resources/static/themes/baggy/js/uiTools.js b/app/Resources/static/themes/baggy/js/uiTools.js index 900b2707..713c53f7 100644 --- a/app/Resources/static/themes/baggy/js/uiTools.js +++ b/app/Resources/static/themes/baggy/js/uiTools.js @@ -1,4 +1,4 @@ -const $ = require('jquery'); +import $ from 'jquery'; function toggleSaveLinkForm(url, event) { $('#add-link-result').empty(); @@ -32,4 +32,4 @@ function toggleSaveLinkForm(url, event) { plainUrl.focus(); } -export { toggleSaveLinkForm }; +export default toggleSaveLinkForm; -- cgit v1.2.3 From 16ef7607f43ebc3e0134360b7657af191e14fe12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 2 Nov 2016 16:44:20 +0100 Subject: Reorganized JS folders for shortcuts --- app/Resources/static/themes/baggy/js/init.js | 3 +++ .../static/themes/baggy/js/shortcuts/entry.js | 19 +++++++++++++++++++ .../static/themes/baggy/js/shortcuts/main.js | 0 3 files changed, 22 insertions(+) create mode 100644 app/Resources/static/themes/baggy/js/shortcuts/entry.js create mode 100644 app/Resources/static/themes/baggy/js/shortcuts/main.js (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/js/init.js b/app/Resources/static/themes/baggy/js/init.js index b7347f7c..5a8911ad 100755 --- a/app/Resources/static/themes/baggy/js/init.js +++ b/app/Resources/static/themes/baggy/js/init.js @@ -1,4 +1,7 @@ import $ from 'jquery'; +import { initFilters, initExport } from '../../_global/js/tools'; +import './shortcuts/main.js'; +import './shortcuts/entry.js'; /* eslint-disable no-unused-vars */ /* jquery has default scope */ diff --git a/app/Resources/static/themes/baggy/js/shortcuts/entry.js b/app/Resources/static/themes/baggy/js/shortcuts/entry.js new file mode 100644 index 00000000..d618f28e --- /dev/null +++ b/app/Resources/static/themes/baggy/js/shortcuts/entry.js @@ -0,0 +1,19 @@ +/* Article view */ +Mousetrap.bind('o', () => { + $('div#article_toolbar ul.links li:nth-child(2) a')[0].click(); +}); + +/* mark as favorite */ +Mousetrap.bind('s', () => { + $('div#article_toolbar ul.links li:nth-child(5) a')[0].click(); +}); + +/* mark as read */ +Mousetrap.bind('a', () => { + $('div#article_toolbar ul.links li:nth-child(4) a')[0].click(); +}); + +/* delete */ +Mousetrap.bind('del', () => { + $('div#article_toolbar ul.links li:nth-child(7) a')[0].click(); +}); diff --git a/app/Resources/static/themes/baggy/js/shortcuts/main.js b/app/Resources/static/themes/baggy/js/shortcuts/main.js new file mode 100644 index 00000000..e69de29b -- cgit v1.2.3 From 5637a26e9af98a05c76823c85611315cd1a986e0 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 3 Nov 2016 10:02:16 +0100 Subject: Bring navigation (with right, left and enter) on material entries page. Supports going to next and previous page ! Also better indentation for js files (changed editorconfig for them). Signed-off-by: Thomas Citharel --- app/Resources/static/themes/baggy/js/init.js | 12 +++++++++--- app/Resources/static/themes/baggy/js/shortcuts/entry.js | 11 +++++++---- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/js/init.js b/app/Resources/static/themes/baggy/js/init.js index 5a8911ad..05360a28 100755 --- a/app/Resources/static/themes/baggy/js/init.js +++ b/app/Resources/static/themes/baggy/js/init.js @@ -1,7 +1,5 @@ +/* jQuery */ import $ from 'jquery'; -import { initFilters, initExport } from '../../_global/js/tools'; -import './shortcuts/main.js'; -import './shortcuts/entry.js'; /* eslint-disable no-unused-vars */ /* jquery has default scope */ @@ -9,8 +7,16 @@ import cookie from 'jquery.cookie'; import ui from 'jquery-ui-browserify'; /* eslint-enable no-unused-vars */ +/* Annotations */ import annotator from 'annotator'; +/* Shortcuts */ +import './shortcuts/main'; +import './shortcuts/entry'; +import '../../_global/js/shortcuts/main'; +import '../../_global/js/shortcuts/entry'; + +/* Tools */ import { savePercent, retrievePercent } from '../../_global/js/tools'; import toggleSaveLinkForm from './uiTools'; diff --git a/app/Resources/static/themes/baggy/js/shortcuts/entry.js b/app/Resources/static/themes/baggy/js/shortcuts/entry.js index d618f28e..77d267a3 100644 --- a/app/Resources/static/themes/baggy/js/shortcuts/entry.js +++ b/app/Resources/static/themes/baggy/js/shortcuts/entry.js @@ -1,19 +1,22 @@ +import Mousetrap from 'mousetrap'; +import $ from 'jquery'; + /* Article view */ Mousetrap.bind('o', () => { - $('div#article_toolbar ul.links li:nth-child(2) a')[0].click(); + $('div#article_toolbar ul.links li:nth-child(2) a')[0].click(); }); /* mark as favorite */ Mousetrap.bind('s', () => { - $('div#article_toolbar ul.links li:nth-child(5) a')[0].click(); + $('div#article_toolbar ul.links li:nth-child(5) a')[0].click(); }); /* mark as read */ Mousetrap.bind('a', () => { - $('div#article_toolbar ul.links li:nth-child(4) a')[0].click(); + $('div#article_toolbar ul.links li:nth-child(4) a')[0].click(); }); /* delete */ Mousetrap.bind('del', () => { - $('div#article_toolbar ul.links li:nth-child(7) a')[0].click(); + $('div#article_toolbar ul.links li:nth-child(7) a')[0].click(); }); -- cgit v1.2.3 From 94f2057ffefdb164ae388a6971b4ed052082a434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 16 Nov 2016 09:17:12 +0100 Subject: Added CSS class on links --- app/Resources/static/themes/baggy/js/shortcuts/entry.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/js/shortcuts/entry.js b/app/Resources/static/themes/baggy/js/shortcuts/entry.js index 77d267a3..728df8bd 100644 --- a/app/Resources/static/themes/baggy/js/shortcuts/entry.js +++ b/app/Resources/static/themes/baggy/js/shortcuts/entry.js @@ -3,20 +3,20 @@ import $ from 'jquery'; /* Article view */ Mousetrap.bind('o', () => { - $('div#article_toolbar ul.links li:nth-child(2) a')[0].click(); + $('div#article_toolbar ul.links a.original')[0].click(); }); /* mark as favorite */ Mousetrap.bind('s', () => { - $('div#article_toolbar ul.links li:nth-child(5) a')[0].click(); + $('div#article_toolbar ul.links a.favorite')[0].click(); }); /* mark as read */ Mousetrap.bind('a', () => { - $('div#article_toolbar ul.links li:nth-child(4) a')[0].click(); + $('div#article_toolbar ul.links a.markasread')[0].click(); }); /* delete */ Mousetrap.bind('del', () => { - $('div#article_toolbar ul.links li:nth-child(7) a')[0].click(); + $('div#article_toolbar ul.links a.delete')[0].click(); }); -- cgit v1.2.3 From 995c204428dd6be04d2bff1d5e17f3e95268f44d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 18 Nov 2016 19:21:31 +0100 Subject: Added shortcut --- app/Resources/static/themes/baggy/js/shortcuts/main.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/js/shortcuts/main.js b/app/Resources/static/themes/baggy/js/shortcuts/main.js index e69de29b..aed09aee 100644 --- a/app/Resources/static/themes/baggy/js/shortcuts/main.js +++ b/app/Resources/static/themes/baggy/js/shortcuts/main.js @@ -0,0 +1,7 @@ +$(document).ready(() => { + Mousetrap.bind('s', () => { + $('#search').trigger('click'); + $('#search_entry_term').focus(); + return false; + }); +}); -- cgit v1.2.3 From c526f9e4744ac03aa7ab4ff507d5466eee371b08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sun, 20 Nov 2016 10:11:57 +0100 Subject: Added help about shortcuts --- app/Resources/static/themes/baggy/js/shortcuts/entry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/js/shortcuts/entry.js b/app/Resources/static/themes/baggy/js/shortcuts/entry.js index 728df8bd..22aa0caf 100644 --- a/app/Resources/static/themes/baggy/js/shortcuts/entry.js +++ b/app/Resources/static/themes/baggy/js/shortcuts/entry.js @@ -7,7 +7,7 @@ Mousetrap.bind('o', () => { }); /* mark as favorite */ -Mousetrap.bind('s', () => { +Mousetrap.bind('f', () => { $('div#article_toolbar ul.links a.favorite')[0].click(); }); -- cgit v1.2.3 From 0df2a4b021e581c7661968a23e5c8dd5de5273c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 22 Nov 2016 21:31:21 +0100 Subject: Fixed entry shortcuts available in list view --- .../static/themes/baggy/js/shortcuts/entry.js | 34 ++++++++++++---------- 1 file changed, 19 insertions(+), 15 deletions(-) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/js/shortcuts/entry.js b/app/Resources/static/themes/baggy/js/shortcuts/entry.js index 22aa0caf..c87408b9 100644 --- a/app/Resources/static/themes/baggy/js/shortcuts/entry.js +++ b/app/Resources/static/themes/baggy/js/shortcuts/entry.js @@ -1,22 +1,26 @@ import Mousetrap from 'mousetrap'; import $ from 'jquery'; -/* Article view */ -Mousetrap.bind('o', () => { - $('div#article_toolbar ul.links a.original')[0].click(); -}); +$(document).ready(() => { + if ($('#article').length > 0) { + /* Article view */ + Mousetrap.bind('o', () => { + $('div#article_toolbar ul.links a.original')[0].click(); + }); -/* mark as favorite */ -Mousetrap.bind('f', () => { - $('div#article_toolbar ul.links a.favorite')[0].click(); -}); + /* mark as favorite */ + Mousetrap.bind('f', () => { + $('div#article_toolbar ul.links a.favorite')[0].click(); + }); -/* mark as read */ -Mousetrap.bind('a', () => { - $('div#article_toolbar ul.links a.markasread')[0].click(); -}); + /* mark as read */ + Mousetrap.bind('a', () => { + $('div#article_toolbar ul.links a.markasread')[0].click(); + }); -/* delete */ -Mousetrap.bind('del', () => { - $('div#article_toolbar ul.links a.delete')[0].click(); + /* delete */ + Mousetrap.bind('del', () => { + $('div#article_toolbar ul.links a.delete')[0].click(); + }); + } }); -- cgit v1.2.3 From 9f01d0fde09fa055a7db9f26e77c5e6b3d6c2224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 28 Nov 2016 11:02:10 +0100 Subject: Added list view --- app/Resources/static/themes/baggy/css/main.css | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index 4f48f8ca..126c451b 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -297,18 +297,14 @@ h2::after { text-decoration: none; } -#listmode a:hover { - opacity: 1; -} - #listmode.tablemode { - background-image: url("../img/baggy/table.png"); + background-image: url("../../_global/img/table.png"); background-repeat: no-repeat; background-position: bottom; } #listmode.listmode { - background-image: url("../img/baggy/list.png"); + background-image: url("../../_global/img/list.png"); background-repeat: no-repeat; background-position: bottom; } @@ -352,9 +348,9 @@ footer a { letter-spacing: -5px; } -.listmode .entry { - width: 100% !important; - margin-left: 0 !important; +.listmode.entry { + width: 100%; + height: inherit; } .card-entry-labels { @@ -588,6 +584,7 @@ div.pagination ul { text-align: left; font-style: italic; color: #999; + display: inline-flex; } div.pagination ul > * { -- cgit v1.2.3 From 56a7ce17f3a9a22e0bfc8651cb690a14447e0afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 28 Nov 2016 11:26:08 +0100 Subject: Hide article text on mobile with list mode --- app/Resources/static/themes/baggy/css/main.css | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index 126c451b..6d656c21 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -1203,6 +1203,10 @@ pre code { } @media screen and (max-width: 500px) { + .hide { + display: none; + } + .entry { width: 100%; margin-left: 0; -- cgit v1.2.3 From 9aa991281ddd315f607cabcfc3b917401d3d2104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 28 Nov 2016 12:08:51 +0100 Subject: Renamed view_mode by list_mode and hide excerpt --- app/Resources/static/themes/baggy/css/main.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index 6d656c21..e16846ea 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -617,6 +617,10 @@ div.pagination ul .current { background-color: #ccc; } +.hide { + display: none; +} + /* ========================================================================== 2.1 = "save a link" related styles ========================================================================== */ @@ -1203,10 +1207,6 @@ pre code { } @media screen and (max-width: 500px) { - .hide { - display: none; - } - .entry { width: 100%; margin-left: 0; -- cgit v1.2.3