diff options
Diffstat (limited to 'app/Resources/static')
-rw-r--r-- | app/Resources/static/themes/_global/img/icons/unmark-icon--black.png | bin | 0 -> 926 bytes | |||
-rw-r--r-- | app/Resources/static/themes/_global/js/bookmarklet.js | 1 | ||||
-rw-r--r-- | app/Resources/static/themes/_global/js/shortcuts/entry.js | 0 | ||||
-rw-r--r-- | app/Resources/static/themes/_global/js/shortcuts/main.js | 15 | ||||
-rw-r--r-- | app/Resources/static/themes/_global/js/tools.js | 7 | ||||
-rwxr-xr-x | app/Resources/static/themes/baggy/css/main.css | 5 | ||||
-rwxr-xr-x | app/Resources/static/themes/baggy/js/autoCompleteTags.js | 2 | ||||
-rwxr-xr-x | app/Resources/static/themes/baggy/js/init.js | 27 | ||||
-rw-r--r-- | app/Resources/static/themes/baggy/js/shortcuts/entry.js | 26 | ||||
-rw-r--r-- | app/Resources/static/themes/baggy/js/shortcuts/main.js | 7 | ||||
-rw-r--r-- | app/Resources/static/themes/baggy/js/uiTools.js | 4 | ||||
-rwxr-xr-x | app/Resources/static/themes/material/css/main.css | 111 | ||||
-rwxr-xr-x | app/Resources/static/themes/material/js/init.js | 19 | ||||
-rw-r--r-- | app/Resources/static/themes/material/js/shortcuts/entry.js | 26 | ||||
-rw-r--r-- | app/Resources/static/themes/material/js/shortcuts/main.js | 76 |
15 files changed, 306 insertions, 20 deletions
diff --git a/app/Resources/static/themes/_global/img/icons/unmark-icon--black.png b/app/Resources/static/themes/_global/img/icons/unmark-icon--black.png new file mode 100644 index 00000000..45f679ee --- /dev/null +++ b/app/Resources/static/themes/_global/img/icons/unmark-icon--black.png | |||
Binary files differ | |||
diff --git a/app/Resources/static/themes/_global/js/bookmarklet.js b/app/Resources/static/themes/_global/js/bookmarklet.js index 5174ff47..a497628b 100644 --- a/app/Resources/static/themes/_global/js/bookmarklet.js +++ b/app/Resources/static/themes/_global/js/bookmarklet.js | |||
@@ -1,4 +1,3 @@ | |||
1 | |||
2 | top['bookmarklet-url@wallabag.org'] = | 1 | top['bookmarklet-url@wallabag.org'] = |
3 | '<!DOCTYPE html><html><head><title>bag it!</title>' + | 2 | '<!DOCTYPE html><html><head><title>bag it!</title>' + |
4 | '<link rel="icon" href="tpl/img/favicon.ico" />' + | 3 | '<link rel="icon" href="tpl/img/favicon.ico" />' + |
diff --git a/app/Resources/static/themes/_global/js/shortcuts/entry.js b/app/Resources/static/themes/_global/js/shortcuts/entry.js new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/app/Resources/static/themes/_global/js/shortcuts/entry.js | |||
diff --git a/app/Resources/static/themes/_global/js/shortcuts/main.js b/app/Resources/static/themes/_global/js/shortcuts/main.js new file mode 100644 index 00000000..c81bf869 --- /dev/null +++ b/app/Resources/static/themes/_global/js/shortcuts/main.js | |||
@@ -0,0 +1,15 @@ | |||
1 | import Mousetrap from 'mousetrap'; | ||
2 | |||
3 | /** Shortcuts **/ | ||
4 | |||
5 | /* Go to */ | ||
6 | Mousetrap.bind('g u', () => { window.location.href = Routing.generate('homepage'); }); | ||
7 | Mousetrap.bind('g s', () => { window.location.href = Routing.generate('starred'); }); | ||
8 | Mousetrap.bind('g r', () => { window.location.href = Routing.generate('archive'); }); | ||
9 | Mousetrap.bind('g a', () => { window.location.href = Routing.generate('all'); }); | ||
10 | Mousetrap.bind('g t', () => { window.location.href = Routing.generate('tag'); }); | ||
11 | Mousetrap.bind('g c', () => { window.location.href = Routing.generate('config'); }); | ||
12 | Mousetrap.bind('g i', () => { window.location.href = Routing.generate('import'); }); | ||
13 | Mousetrap.bind('g d', () => { window.location.href = Routing.generate('developer'); }); | ||
14 | Mousetrap.bind('?', () => { window.location.href = Routing.generate('howto'); }); | ||
15 | Mousetrap.bind('g l', () => { window.location.href = Routing.generate('fos_user_security_logout'); }); | ||
diff --git a/app/Resources/static/themes/_global/js/tools.js b/app/Resources/static/themes/_global/js/tools.js index ab30deb1..568b2dce 100644 --- a/app/Resources/static/themes/_global/js/tools.js +++ b/app/Resources/static/themes/_global/js/tools.js | |||
@@ -1,4 +1,9 @@ | |||
1 | const $ = require('jquery'); | 1 | import $ from 'jquery'; |
2 | import './shortcuts/main'; | ||
3 | import './shortcuts/entry'; | ||
4 | |||
5 | /* Allows inline call qr-code call */ | ||
6 | import jrQrcode from 'jr-qrcode'; // eslint-disable-line | ||
2 | 7 | ||
3 | function supportsLocalStorage() { | 8 | function supportsLocalStorage() { |
4 | try { | 9 | try { |
diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index 4dfa8790..4f48f8ca 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 { | |||
936 | background-image: url("../../_global/img/icons/diaspora-icon--black.png"); | 936 | background-image: url("../../_global/img/icons/diaspora-icon--black.png"); |
937 | } | 937 | } |
938 | 938 | ||
939 | /* Unmark.it */ | ||
940 | .icon-image--unmark { | ||
941 | background-image: url("../../_global/img/icons/unmark-icon--black.png"); | ||
942 | } | ||
943 | |||
939 | /* shaarli */ | 944 | /* shaarli */ |
940 | .icon-image--shaarli { | 945 | .icon-image--shaarli { |
941 | background-image: url("../../_global/img/icons/shaarli.png"); | 946 | background-image: url("../../_global/img/icons/shaarli.png"); |
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) { | |||
5 | return split(term).pop(); | 5 | return split(term).pop(); |
6 | } | 6 | } |
7 | 7 | ||
8 | export { split, extractLast }; | 8 | 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..05360a28 100755 --- a/app/Resources/static/themes/baggy/js/init.js +++ b/app/Resources/static/themes/baggy/js/init.js | |||
@@ -1,11 +1,26 @@ | |||
1 | import { savePercent, retrievePercent } from '../../_global/js/tools'; | 1 | /* jQuery */ |
2 | import { toggleSaveLinkForm } from './uiTools'; | 2 | import $ from 'jquery'; |
3 | |||
4 | /* eslint-disable no-unused-vars */ | ||
5 | /* jquery has default scope */ | ||
6 | import cookie from 'jquery.cookie'; | ||
7 | import ui from 'jquery-ui-browserify'; | ||
8 | /* eslint-enable no-unused-vars */ | ||
9 | |||
10 | /* Annotations */ | ||
11 | import annotator from 'annotator'; | ||
3 | 12 | ||
4 | const $ = global.jquery = require('jquery'); | 13 | /* Shortcuts */ |
5 | require('jquery.cookie'); | 14 | import './shortcuts/main'; |
6 | require('jquery-ui-browserify'); | 15 | import './shortcuts/entry'; |
7 | const annotator = require('annotator'); | 16 | import '../../_global/js/shortcuts/main'; |
17 | import '../../_global/js/shortcuts/entry'; | ||
18 | |||
19 | /* Tools */ | ||
20 | import { savePercent, retrievePercent } from '../../_global/js/tools'; | ||
21 | import toggleSaveLinkForm from './uiTools'; | ||
8 | 22 | ||
23 | global.jquery = $; | ||
9 | 24 | ||
10 | $.fn.ready(() => { | 25 | $.fn.ready(() => { |
11 | const $listmode = $('#listmode'); | 26 | const $listmode = $('#listmode'); |
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..c87408b9 --- /dev/null +++ b/app/Resources/static/themes/baggy/js/shortcuts/entry.js | |||
@@ -0,0 +1,26 @@ | |||
1 | import Mousetrap from 'mousetrap'; | ||
2 | import $ from 'jquery'; | ||
3 | |||
4 | $(document).ready(() => { | ||
5 | if ($('#article').length > 0) { | ||
6 | /* Article view */ | ||
7 | Mousetrap.bind('o', () => { | ||
8 | $('div#article_toolbar ul.links a.original')[0].click(); | ||
9 | }); | ||
10 | |||
11 | /* mark as favorite */ | ||
12 | Mousetrap.bind('f', () => { | ||
13 | $('div#article_toolbar ul.links a.favorite')[0].click(); | ||
14 | }); | ||
15 | |||
16 | /* mark as read */ | ||
17 | Mousetrap.bind('a', () => { | ||
18 | $('div#article_toolbar ul.links a.markasread')[0].click(); | ||
19 | }); | ||
20 | |||
21 | /* delete */ | ||
22 | Mousetrap.bind('del', () => { | ||
23 | $('div#article_toolbar ul.links a.delete')[0].click(); | ||
24 | }); | ||
25 | } | ||
26 | }); | ||
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..aed09aee --- /dev/null +++ b/app/Resources/static/themes/baggy/js/shortcuts/main.js | |||
@@ -0,0 +1,7 @@ | |||
1 | $(document).ready(() => { | ||
2 | Mousetrap.bind('s', () => { | ||
3 | $('#search').trigger('click'); | ||
4 | $('#search_entry_term').focus(); | ||
5 | return false; | ||
6 | }); | ||
7 | }); | ||
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 @@ | |||
1 | const $ = require('jquery'); | 1 | import $ from 'jquery'; |
2 | 2 | ||
3 | function toggleSaveLinkForm(url, event) { | 3 | function toggleSaveLinkForm(url, event) { |
4 | $('#add-link-result').empty(); | 4 | $('#add-link-result').empty(); |
@@ -32,4 +32,4 @@ function toggleSaveLinkForm(url, event) { | |||
32 | plainUrl.focus(); | 32 | plainUrl.focus(); |
33 | } | 33 | } |
34 | 34 | ||
35 | export { toggleSaveLinkForm }; | 35 | export default toggleSaveLinkForm; |
diff --git a/app/Resources/static/themes/material/css/main.css b/app/Resources/static/themes/material/css/main.css index 408fe14c..82a74c23 100755 --- a/app/Resources/static/themes/material/css/main.css +++ b/app/Resources/static/themes/material/css/main.css | |||
@@ -150,6 +150,11 @@ | |||
150 | background-image: url("../../_global/img/icons/diaspora-icon--black.png"); | 150 | background-image: url("../../_global/img/icons/diaspora-icon--black.png"); |
151 | } | 151 | } |
152 | 152 | ||
153 | /* Unmark.it */ | ||
154 | .icon-image--unmark { | ||
155 | background-image: url("../../_global/img/icons/unmark-icon--black.png"); | ||
156 | } | ||
157 | |||
153 | /* Shaarli */ | 158 | /* Shaarli */ |
154 | .icon-image--shaarli { | 159 | .icon-image--shaarli { |
155 | background-image: url("../../_global/img/icons/shaarli.png"); | 160 | background-image: url("../../_global/img/icons/shaarli.png"); |
@@ -159,7 +164,7 @@ body { | |||
159 | display: flex; | 164 | display: flex; |
160 | min-height: 100vh; | 165 | min-height: 100vh; |
161 | flex-direction: column; | 166 | flex-direction: column; |
162 | background: #f0f0f0; | 167 | background: #fafafa; |
163 | } | 168 | } |
164 | 169 | ||
165 | body.login main { | 170 | body.login main { |
@@ -317,11 +322,13 @@ nav input { | |||
317 | color: #444; | 322 | color: #444; |
318 | } | 323 | } |
319 | 324 | ||
320 | .input-field.nav-panel-add label { | 325 | .input-field.nav-panel-add label, |
326 | .input-field.nav-panel-search label { | ||
321 | left: 1rem; | 327 | left: 1rem; |
322 | } | 328 | } |
323 | 329 | ||
324 | .input-field.nav-panel-add .close { | 330 | .input-field.nav-panel-add .close, |
331 | .input-field.nav-panel-search .close { | ||
325 | position: absolute; | 332 | position: absolute; |
326 | top: 0; | 333 | top: 0; |
327 | right: 1rem; | 334 | right: 1rem; |
@@ -340,7 +347,9 @@ nav input { | |||
340 | } | 347 | } |
341 | 348 | ||
342 | .input-field.nav-panel-add, | 349 | .input-field.nav-panel-add, |
343 | .input-field.nav-panel-add form { | 350 | .input-field.nav-panel-add form, |
351 | .input-field.nav-panel-search, | ||
352 | .input-field.nav-panel-search form { | ||
344 | height: 100%; | 353 | height: 100%; |
345 | } | 354 | } |
346 | 355 | ||
@@ -535,6 +544,10 @@ a.original { | |||
535 | line-height: 24px; | 544 | line-height: 24px; |
536 | } | 545 | } |
537 | 546 | ||
547 | .card .card-action ul.tools li a.tool { | ||
548 | margin-right: 5px !important; | ||
549 | } | ||
550 | |||
538 | .card .card-action a { | 551 | .card .card-action a { |
539 | color: #fff; | 552 | color: #fff; |
540 | margin: 0; | 553 | margin: 0; |
@@ -587,7 +600,55 @@ a.original { | |||
587 | #article { | 600 | #article { |
588 | font-size: 20px; | 601 | font-size: 20px; |
589 | margin: 0 auto; | 602 | margin: 0 auto; |
590 | max-width: 40em; | 603 | max-width: 45em; |
604 | } | ||
605 | |||
606 | #article article { | ||
607 | color: #424242; | ||
608 | font-size: 18px; | ||
609 | line-height: 1.7em; | ||
610 | } | ||
611 | |||
612 | #article article h1, | ||
613 | #article article h2, | ||
614 | #article article h3, | ||
615 | #article article h4, | ||
616 | #article article h5, | ||
617 | #article article h6 { | ||
618 | color: #212121; | ||
619 | } | ||
620 | |||
621 | #article article h1 strong, | ||
622 | #article article h2 strong, | ||
623 | #article article h3 strong, | ||
624 | #article article h4 strong, | ||
625 | #article article h5 strong, | ||
626 | #article article h6 strong { | ||
627 | font-weight: 500; | ||
628 | } | ||
629 | |||
630 | #article article h6 { | ||
631 | font-size: 1.2rem; | ||
632 | } | ||
633 | |||
634 | #article article h5 { | ||
635 | font-size: 1.6rem; | ||
636 | } | ||
637 | |||
638 | #article article h4 { | ||
639 | font-size: 1.9rem; | ||
640 | } | ||
641 | |||
642 | #article article h3 { | ||
643 | font-size: 2.2rem; | ||
644 | } | ||
645 | |||
646 | #article article h2 { | ||
647 | font-size: 2.5rem; | ||
648 | } | ||
649 | |||
650 | #article article h1 { | ||
651 | font-size: 2.7rem; | ||
591 | } | 652 | } |
592 | 653 | ||
593 | #article img, | 654 | #article img, |
@@ -596,6 +657,46 @@ a.original { | |||
596 | height: auto; | 657 | height: auto; |
597 | } | 658 | } |
598 | 659 | ||
660 | #article article a { | ||
661 | border-bottom: 1px dotted #03a9f4; | ||
662 | text-decoration: none; | ||
663 | } | ||
664 | |||
665 | #article article a:hover { | ||
666 | border-bottom-style: solid; | ||
667 | } | ||
668 | |||
669 | #article article ul { | ||
670 | padding-left: 30px; | ||
671 | } | ||
672 | |||
673 | #article article ul, | ||
674 | #article article ul li { | ||
675 | list-style-type: disc; | ||
676 | } | ||
677 | |||
678 | #article article blockquote { | ||
679 | font-style: italic; | ||
680 | } | ||
681 | |||
682 | #article article strong { | ||
683 | font-weight: bold; | ||
684 | } | ||
685 | |||
686 | #article article pre { | ||
687 | box-sizing: border-box; | ||
688 | margin: 0 0 1.75em; | ||
689 | border: #e3f2fd 1px solid; | ||
690 | width: 100%; | ||
691 | padding: 10px; | ||
692 | font-family: monospace; | ||
693 | font-size: 0.8em; | ||
694 | white-space: pre; | ||
695 | overflow: auto; | ||
696 | background: #f5f5f5; | ||
697 | border-radius: 3px; | ||
698 | } | ||
699 | |||
599 | #article > header > h1 { | 700 | #article > header > h1 { |
600 | font-size: 2em; | 701 | font-size: 2em; |
601 | margin: 2.1rem 0 0.68rem; | 702 | margin: 2.1rem 0 0.68rem; |
diff --git a/app/Resources/static/themes/material/js/init.js b/app/Resources/static/themes/material/js/init.js index a68269e0..0b2832c0 100755 --- a/app/Resources/static/themes/material/js/init.js +++ b/app/Resources/static/themes/material/js/init.js | |||
@@ -1,10 +1,21 @@ | |||
1 | /* jQuery */ | ||
2 | import $ from 'jquery'; | ||
3 | |||
4 | /* Annotations */ | ||
5 | import annotator from 'annotator'; | ||
6 | |||
7 | /* Tools */ | ||
1 | import { savePercent, retrievePercent, initFilters, initExport } from '../../_global/js/tools'; | 8 | import { savePercent, retrievePercent, initFilters, initExport } from '../../_global/js/tools'; |
2 | 9 | ||
3 | const $ = require('jquery'); | 10 | /* Import shortcuts */ |
11 | import './shortcuts/main'; | ||
12 | import './shortcuts/entry'; | ||
13 | import '../../_global/js/shortcuts/main'; | ||
14 | import '../../_global/js/shortcuts/entry'; | ||
4 | 15 | ||
5 | global.jQuery = $; | ||
6 | require('materialize'); // eslint-disable-line | 16 | require('materialize'); // eslint-disable-line |
7 | const annotator = require('annotator'); | 17 | |
18 | global.jQuery = $; | ||
8 | 19 | ||
9 | $(document).ready(() => { | 20 | $(document).ready(() => { |
10 | // sideNav | 21 | // sideNav |
@@ -44,7 +55,7 @@ $(document).ready(() => { | |||
44 | $('.nav-panels .action').hide(100); | 55 | $('.nav-panels .action').hide(100); |
45 | $('.nav-panel-menu').addClass('hidden'); | 56 | $('.nav-panel-menu').addClass('hidden'); |
46 | $('.nav-panels').css('background', 'white'); | 57 | $('.nav-panels').css('background', 'white'); |
47 | $('#searchfield').focus(); | 58 | $('#search_entry_term').focus(); |
48 | return false; | 59 | return false; |
49 | }); | 60 | }); |
50 | $('.close').on('click', () => { | 61 | $('.close').on('click', () => { |
diff --git a/app/Resources/static/themes/material/js/shortcuts/entry.js b/app/Resources/static/themes/material/js/shortcuts/entry.js new file mode 100644 index 00000000..e19800bd --- /dev/null +++ b/app/Resources/static/themes/material/js/shortcuts/entry.js | |||
@@ -0,0 +1,26 @@ | |||
1 | import Mousetrap from 'mousetrap'; | ||
2 | import $ from 'jquery'; | ||
3 | |||
4 | $(document).ready(() => { | ||
5 | if ($('#article').length > 0) { | ||
6 | /* open original article */ | ||
7 | Mousetrap.bind('o', () => { | ||
8 | $('ul.side-nav a.original i')[0].click(); | ||
9 | }); | ||
10 | |||
11 | /* mark as favorite */ | ||
12 | Mousetrap.bind('f', () => { | ||
13 | $('ul.side-nav a.favorite i')[0].click(); | ||
14 | }); | ||
15 | |||
16 | /* mark as read */ | ||
17 | Mousetrap.bind('a', () => { | ||
18 | $('ul.side-nav a.markasread i')[0].click(); | ||
19 | }); | ||
20 | |||
21 | /* delete */ | ||
22 | Mousetrap.bind('del', () => { | ||
23 | $('ul.side-nav a.delete i')[0].click(); | ||
24 | }); | ||
25 | } | ||
26 | }); | ||
diff --git a/app/Resources/static/themes/material/js/shortcuts/main.js b/app/Resources/static/themes/material/js/shortcuts/main.js new file mode 100644 index 00000000..ad4ca80a --- /dev/null +++ b/app/Resources/static/themes/material/js/shortcuts/main.js | |||
@@ -0,0 +1,76 @@ | |||
1 | import Mousetrap from 'mousetrap'; | ||
2 | import $ from 'jquery'; | ||
3 | |||
4 | function toggleFocus(cardToToogleFocus) { | ||
5 | if (cardToToogleFocus) { | ||
6 | $(cardToToogleFocus).toggleClass('z-depth-4'); | ||
7 | } | ||
8 | } | ||
9 | |||
10 | $(document).ready(() => { | ||
11 | let cardIndex = 0; | ||
12 | const cardNumber = $('#content ul.data > li').length; | ||
13 | let card = $('#content ul.data > li')[cardIndex]; | ||
14 | const pagination = $('.pagination'); | ||
15 | |||
16 | /* Show nothing on quickstart */ | ||
17 | if ($('#content > div.quickstart').length > 0) { | ||
18 | return; | ||
19 | } | ||
20 | |||
21 | /* If we come from next page */ | ||
22 | if (window.location.hash === '#prev') { | ||
23 | cardIndex = cardNumber - 1; | ||
24 | card = $('ul.data > li')[cardIndex]; | ||
25 | } | ||
26 | |||
27 | /* Focus current card */ | ||
28 | toggleFocus(card); | ||
29 | |||
30 | /* Actions */ | ||
31 | Mousetrap.bind('g n', () => { | ||
32 | $('#nav-btn-add').trigger('click'); | ||
33 | return false; | ||
34 | }); | ||
35 | |||
36 | Mousetrap.bind('s', () => { | ||
37 | $('#nav-btn-search').trigger('click'); | ||
38 | return false; | ||
39 | }); | ||
40 | |||
41 | Mousetrap.bind('esc', () => { | ||
42 | $('.close').trigger('click'); | ||
43 | }); | ||
44 | |||
45 | /* Select right card. If there's a next page, go to next page */ | ||
46 | Mousetrap.bind('right', () => { | ||
47 | if (cardIndex >= 0 && cardIndex < cardNumber - 1) { | ||
48 | toggleFocus(card); | ||
49 | cardIndex += 1; | ||
50 | card = $('ul.data > li')[cardIndex]; | ||
51 | toggleFocus(card); | ||
52 | return; | ||
53 | } | ||
54 | if (pagination.length > 0 && pagination.find('li.next:not(.disabled)').length > 0 && cardIndex === cardNumber - 1) { | ||
55 | window.location.href = window.location.origin + $(pagination).find('li.next a').attr('href'); | ||
56 | } | ||
57 | }); | ||
58 | |||
59 | /* Select previous card. If there's a previous page, go to next page */ | ||
60 | Mousetrap.bind('left', () => { | ||
61 | if (cardIndex > 0 && cardIndex < cardNumber) { | ||
62 | toggleFocus(card); | ||
63 | cardIndex -= 1; | ||
64 | card = $('ul.data > li')[cardIndex]; | ||
65 | toggleFocus(card); | ||
66 | return; | ||
67 | } | ||
68 | if (pagination.length > 0 && $(pagination).find('li.prev:not(.disabled)').length > 0 && cardIndex === 0) { | ||
69 | window.location.href = `${window.location.origin + $(pagination).find('li.prev a').attr('href')}#prev`; | ||
70 | } | ||
71 | }); | ||
72 | |||
73 | Mousetrap.bind('enter', () => { | ||
74 | window.location.href = window.location.origin + $(card).find('span.card-title a').attr('href'); | ||
75 | }); | ||
76 | }); | ||