diff options
author | Thomas Citharel <tcit@tcit.fr> | 2017-06-15 09:43:48 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2017-07-09 19:05:48 +0200 |
commit | 378aaefbbf60698c7b8faafc20f6b8cb22357e31 (patch) | |
tree | d9bf0867797d4f4b60d117a050e1b72719e6f71a /app/Resources/static | |
parent | b5d7eb148c4cd62ff187b08765f0c13c7d330fcf (diff) | |
download | wallabag-378aaefbbf60698c7b8faafc20f6b8cb22357e31.tar.gz wallabag-378aaefbbf60698c7b8faafc20f6b8cb22357e31.tar.zst wallabag-378aaefbbf60698c7b8faafc20f6b8cb22357e31.zip |
Notifications
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'app/Resources/static')
7 files changed, 70 insertions, 2 deletions
diff --git a/app/Resources/static/themes/material/css/index.scss b/app/Resources/static/themes/material/css/index.scss index 285a6504..8300e430 100644 --- a/app/Resources/static/themes/material/css/index.scss +++ b/app/Resources/static/themes/material/css/index.scss | |||
@@ -8,6 +8,7 @@ | |||
8 | @import 'layout'; | 8 | @import 'layout'; |
9 | @import 'nav'; | 9 | @import 'nav'; |
10 | @import 'sidenav'; | 10 | @import 'sidenav'; |
11 | @import 'notifications'; | ||
11 | @import 'various'; | 12 | @import 'various'; |
12 | 13 | ||
13 | /* Tools */ | 14 | /* Tools */ |
diff --git a/app/Resources/static/themes/material/css/nav.scss b/app/Resources/static/themes/material/css/nav.scss index 1a25a5be..601aada2 100644 --- a/app/Resources/static/themes/material/css/nav.scss +++ b/app/Resources/static/themes/material/css/nav.scss | |||
@@ -104,3 +104,7 @@ nav { | |||
104 | #button_export { | 104 | #button_export { |
105 | display: none; | 105 | display: none; |
106 | } | 106 | } |
107 | |||
108 | #button_notifications a.nav-panel-menu { | ||
109 | max-height: 65px; | ||
110 | } | ||
diff --git a/app/Resources/static/themes/material/css/notifications.scss b/app/Resources/static/themes/material/css/notifications.scss new file mode 100644 index 00000000..60114ce4 --- /dev/null +++ b/app/Resources/static/themes/material/css/notifications.scss | |||
@@ -0,0 +1,38 @@ | |||
1 | @mixin notification { | ||
2 | .notifications-area { | ||
3 | flex-grow: 1; | ||
4 | |||
5 | .collection { | ||
6 | margin: auto; | ||
7 | } | ||
8 | } | ||
9 | |||
10 | .no-notifications { | ||
11 | position: absolute; | ||
12 | top: 40%; | ||
13 | left: 50%; | ||
14 | transform: translate(-40%, -50%); | ||
15 | } | ||
16 | |||
17 | .view-more { | ||
18 | display: block; | ||
19 | margin: auto 5px 10px; | ||
20 | flex: 0 1 2.5em; | ||
21 | } | ||
22 | |||
23 | .btn.notification-action-button { | ||
24 | display: block; | ||
25 | line-height: 25px; | ||
26 | height: auto; | ||
27 | } | ||
28 | } | ||
29 | |||
30 | .notifications-page { | ||
31 | @include notification; | ||
32 | |||
33 | .pagination { | ||
34 | float: none; | ||
35 | text-align: center; | ||
36 | margin-top: 30px; | ||
37 | } | ||
38 | } | ||
diff --git a/app/Resources/static/themes/material/css/sidenav.scss b/app/Resources/static/themes/material/css/sidenav.scss index 416dc1c7..a86eed17 100644 --- a/app/Resources/static/themes/material/css/sidenav.scss +++ b/app/Resources/static/themes/material/css/sidenav.scss | |||
@@ -2,6 +2,8 @@ | |||
2 | Side-nav | 2 | Side-nav |
3 | ========================================================================== */ | 3 | ========================================================================== */ |
4 | 4 | ||
5 | @import 'notifications'; | ||
6 | |||
5 | .side-nav { | 7 | .side-nav { |
6 | width: 240px; | 8 | width: 240px; |
7 | 9 | ||
@@ -36,6 +38,15 @@ | |||
36 | } | 38 | } |
37 | } | 39 | } |
38 | 40 | ||
41 | #notifications { | ||
42 | width: 300px; | ||
43 | display: flex; | ||
44 | flex-flow: column; | ||
45 | justify-content: space-between; | ||
46 | |||
47 | @include notification; | ||
48 | } | ||
49 | |||
39 | .bold > a { | 50 | .bold > a { |
40 | font-weight: bold; | 51 | font-weight: bold; |
41 | } | 52 | } |
diff --git a/app/Resources/static/themes/material/css/various.scss b/app/Resources/static/themes/material/css/various.scss index 7daf40ec..300015ab 100644 --- a/app/Resources/static/themes/material/css/various.scss +++ b/app/Resources/static/themes/material/css/various.scss | |||
@@ -30,3 +30,9 @@ nav .input-field input { | |||
30 | .tab { | 30 | .tab { |
31 | flex: 1; | 31 | flex: 1; |
32 | } | 32 | } |
33 | |||
34 | #notifications-count { | ||
35 | position: relative; | ||
36 | top: -50px; | ||
37 | left: 15px; | ||
38 | } | ||
diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js index d6afbb8a..435cd02f 100755 --- a/app/Resources/static/themes/material/index.js +++ b/app/Resources/static/themes/material/index.js | |||
@@ -8,7 +8,7 @@ import 'materialize-css/dist/js/materialize'; | |||
8 | import '../_global/index'; | 8 | import '../_global/index'; |
9 | 9 | ||
10 | /* Tools */ | 10 | /* Tools */ |
11 | import { initExport, initFilters } from './js/tools'; | 11 | import { initExport, initFilters, initNotifications } from './js/tools'; |
12 | 12 | ||
13 | /* Import shortcuts */ | 13 | /* Import shortcuts */ |
14 | import './js/shortcuts/main'; | 14 | import './js/shortcuts/main'; |
@@ -34,6 +34,7 @@ $(document).ready(() => { | |||
34 | }); | 34 | }); |
35 | initFilters(); | 35 | initFilters(); |
36 | initExport(); | 36 | initExport(); |
37 | initNotifications(); | ||
37 | 38 | ||
38 | $('#nav-btn-add-tag').on('click', () => { | 39 | $('#nav-btn-add-tag').on('click', () => { |
39 | $('.nav-panel-add-tag').toggle(100); | 40 | $('.nav-panel-add-tag').toggle(100); |
diff --git a/app/Resources/static/themes/material/js/tools.js b/app/Resources/static/themes/material/js/tools.js index 39398fd8..492640a0 100644 --- a/app/Resources/static/themes/material/js/tools.js +++ b/app/Resources/static/themes/material/js/tools.js | |||
@@ -21,4 +21,11 @@ function initExport() { | |||
21 | } | 21 | } |
22 | } | 22 | } |
23 | 23 | ||
24 | export { initExport, initFilters }; | 24 | function initNotifications() { |
25 | if ($('div').is('#notifications')) { | ||
26 | $('#button_notifications').show(); | ||
27 | $('.js-notifications-action').sideNav({ edge: 'right' }); | ||
28 | } | ||
29 | } | ||
30 | |||
31 | export { initExport, initFilters, initNotifications }; | ||