From 32968bd30e907dcb681831c149a9afcc12a664da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20HULARD?= Date: Wed, 24 Jan 2018 17:30:06 +0100 Subject: Add specific styles for the card tag form element. Also add a `.hidden` class in the baggy theme to have consistency with material. --- app/Resources/static/themes/material/css/cards.scss | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/Resources/static/themes/material') diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss index 8f7f8f7b..f3319f3d 100644 --- a/app/Resources/static/themes/material/css/cards.scss +++ b/app/Resources/static/themes/material/css/cards.scss @@ -180,6 +180,17 @@ a.original:not(.waves-effect) { flex-grow: 1; } +.card-tag-form { + display: flex; + min-width: 100px; + flex-grow: 1; +} + +.card-tag-form input { + margin-bottom: 0; + height: 2rem; +} + .card-tag-rss { display: flex; } -- cgit v1.2.3 From 50f35f0db2be9586205e793f315608eec59c9666 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 19 Jan 2019 22:08:29 +0100 Subject: Move icon into the top menu bar Change the way to select a random entry: - select all ids from the given user (with filters) - choose randomly one in php - find that entry --- app/Resources/static/themes/material/index.js | 4 +++- app/Resources/static/themes/material/js/tools.js | 14 +++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'app/Resources/static/themes/material') diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js index 96310d81..05794597 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'; import '../_global/index'; /* Tools */ -import { initExport, initFilters } from './js/tools'; +import { initExport, initFilters, initRandom } from './js/tools'; /* Import shortcuts */ import './js/shortcuts/main'; @@ -32,8 +32,10 @@ $(document).ready(() => { format: 'dd/mm/yyyy', container: 'body', }); + initFilters(); initExport(); + initRandom(); const toggleNav = (toShow, toFocus) => { $('.nav-panel-actions').hide(100); diff --git a/app/Resources/static/themes/material/js/tools.js b/app/Resources/static/themes/material/js/tools.js index 39398fd8..0b3d3038 100644 --- a/app/Resources/static/themes/material/js/tools.js +++ b/app/Resources/static/themes/material/js/tools.js @@ -8,6 +8,7 @@ function initFilters() { $('#clear_form_filters').on('click', () => { $('#filters input').val(''); $('#filters :checked').removeAttr('checked'); + return false; }); } @@ -21,4 +22,15 @@ function initExport() { } } -export { initExport, initFilters }; +function initRandom() { + // no display if export (ie: entries) not available + if ($('div').is('#export')) { + $('#button_random').show(); + } +} + +export { + initExport, + initFilters, + initRandom, +}; -- cgit v1.2.3 From a6b242a1fd6f8900d80354361449f1bf62506ef9 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sun, 2 Dec 2018 12:43:05 +0100 Subject: Enable OTP 2FA - Update SchebTwoFactorBundle to version 3 - Enable Google 2fa on the bundle - Disallow ability to use both email and google as 2fa - Update Ocramius Proxy Manager to handle typed function & attributes (from PHP 7) - use `$this->addFlash` shortcut instead of `$this->get('session')->getFlashBag()->add` - update admin to be able to create/reset the 2fa --- app/Resources/static/themes/material/index.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/Resources/static/themes/material') diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js index 05794597..2926cad1 100755 --- a/app/Resources/static/themes/material/index.js +++ b/app/Resources/static/themes/material/index.js @@ -50,25 +50,30 @@ $(document).ready(() => { $('#tag_label').focus(); return false; }); + $('#nav-btn-add').on('click', () => { toggleNav('.nav-panel-add', '#entry_url'); return false; }); + const materialAddForm = $('.nav-panel-add'); materialAddForm.on('submit', () => { materialAddForm.addClass('disabled'); $('input#entry_url', materialAddForm).prop('readonly', true).trigger('blur'); }); + $('#nav-btn-search').on('click', () => { toggleNav('.nav-panel-search', '#search_entry_term'); return false; }); + $('.close').on('click', (e) => { $(e.target).parent('.nav-panel-item').hide(100); $('.nav-panel-actions').show(100); $('.nav-panels').css('background', 'transparent'); return false; }); + $(window).scroll(() => { const s = $(window).scrollTop(); const d = $(document).height(); -- cgit v1.2.3 From fb7dedf36c115b8658a014a7a50b003ea3b58f67 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Sat, 2 Mar 2019 22:48:43 +0100 Subject: material: move a media query from cards to dedicated scss file Signed-off-by: Kevin Decherf --- app/Resources/static/themes/material/css/cards.scss | 6 ------ app/Resources/static/themes/material/css/media_queries.scss | 4 ++++ 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'app/Resources/static/themes/material') diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss index 4f67e038..4cbeb7bd 100644 --- a/app/Resources/static/themes/material/css/cards.scss +++ b/app/Resources/static/themes/material/css/cards.scss @@ -272,9 +272,3 @@ a.original:not(.waves-effect) { .settings .div_tabs { padding-bottom: 15px; } - -@media only screen and (min-width: 992px) { - .card-tag-labels li { - max-width: 50%; - } -} diff --git a/app/Resources/static/themes/material/css/media_queries.scss b/app/Resources/static/themes/material/css/media_queries.scss index 72584426..56e6fd0f 100644 --- a/app/Resources/static/themes/material/css/media_queries.scss +++ b/app/Resources/static/themes/material/css/media_queries.scss @@ -12,6 +12,10 @@ .pagination { margin-left: auto; } + + .card-tag-labels li { + max-width: 50%; + } } @media only screen and (max-width: 992px) { -- cgit v1.2.3 From 05232afe3223242ef9563bb8a6ae13a462a043b0 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Sat, 2 Mar 2019 23:46:00 +0100 Subject: material: fix left padding of content on medium screens Fixes #3877 Signed-off-by: Kevin Decherf --- app/Resources/static/themes/material/css/media_queries.scss | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/Resources/static/themes/material') diff --git a/app/Resources/static/themes/material/css/media_queries.scss b/app/Resources/static/themes/material/css/media_queries.scss index 56e6fd0f..1626365e 100644 --- a/app/Resources/static/themes/material/css/media_queries.scss +++ b/app/Resources/static/themes/material/css/media_queries.scss @@ -12,12 +12,18 @@ .pagination { margin-left: auto; } - + .card-tag-labels li { max-width: 50%; } } +@media screen and (min-width: 993px) { + main #content { + padding-left: 70px; + } +} + @media only screen and (max-width: 992px) { header, main, -- cgit v1.2.3 From f1f1efb5def331721e03bc55ac3be81fbae8fd01 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Sun, 3 Mar 2019 02:13:14 +0100 Subject: material: wrap card actions, remove class hiding of creation date Signed-off-by: Kevin Decherf --- app/Resources/static/themes/material/css/cards.scss | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/Resources/static/themes/material') diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss index 4cbeb7bd..68001a01 100644 --- a/app/Resources/static/themes/material/css/cards.scss +++ b/app/Resources/static/themes/material/css/cards.scss @@ -102,6 +102,11 @@ main { display: inline-flex; vertical-align: middle; + .card-reading-time, + .card-created-at { + display: inline-flex; + } + span { margin-right: 5px; } -- cgit v1.2.3 From 246cc9ac939f076fb7b2453e1b616a8b3500e1d1 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Sun, 3 Mar 2019 02:16:19 +0100 Subject: material: add media queries to hide creation date from card actions Hide the creation date from card actions on specific sizes when there's not enough space for all parts. Fixes #3851 Signed-off-by: Kevin Decherf --- app/Resources/static/themes/material/css/media_queries.scss | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/Resources/static/themes/material') diff --git a/app/Resources/static/themes/material/css/media_queries.scss b/app/Resources/static/themes/material/css/media_queries.scss index 1626365e..32d8c484 100644 --- a/app/Resources/static/themes/material/css/media_queries.scss +++ b/app/Resources/static/themes/material/css/media_queries.scss @@ -174,3 +174,12 @@ padding: 0; } } + +@media screen and (max-width: 310px), + screen and (min-width: 601px) and (max-width: 660px), + screen and (min-width: 993px) and (max-width: 1050px), + screen and (min-width: 1201px) and (max-width: 1250px) { + .card .card-action .reading-time .card-created-at { + display: none; + } +} -- cgit v1.2.3 From cf0010cf4adbefb8fc73d55474a1446a3a2f2f36 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Sat, 9 Mar 2019 00:27:50 +0100 Subject: material: fix left padding on non-entry pages introduced by #3893 Signed-off-by: Kevin Decherf --- app/Resources/static/themes/material/css/media_queries.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Resources/static/themes/material') diff --git a/app/Resources/static/themes/material/css/media_queries.scss b/app/Resources/static/themes/material/css/media_queries.scss index 32d8c484..491eedce 100644 --- a/app/Resources/static/themes/material/css/media_queries.scss +++ b/app/Resources/static/themes/material/css/media_queries.scss @@ -19,7 +19,7 @@ } @media screen and (min-width: 993px) { - main #content { + body.entry main #content { padding-left: 70px; } } -- cgit v1.2.3 From 4b5b228650cd109db7b21fd754581416e7f7d97e Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Sat, 27 Apr 2019 22:48:28 +0200 Subject: material: add metadata to list view Add reading time and creation date to rows of list view. Refactor styles using a sass mixin. Fixes #3838 Signed-off-by: Kevin Decherf --- .../static/themes/material/css/cards.scss | 52 ++++++++++++++++------ .../static/themes/material/css/media_queries.scss | 4 ++ 2 files changed, 42 insertions(+), 14 deletions(-) (limited to 'app/Resources/static/themes/material') diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss index 68001a01..0cdc7457 100644 --- a/app/Resources/static/themes/material/css/cards.scss +++ b/app/Resources/static/themes/material/css/cards.scss @@ -18,6 +18,24 @@ main { overflow: hidden; } +@mixin mixin-reading-time { + .reading-time { + display: inline-flex; + vertical-align: middle; + + .card-reading-time, + .card-created-at { + display: inline-flex; + } + + span { + margin-right: 5px; + } + + @content; + } +} + .card { .card-content .card-title, .card-reveal .card-title { @@ -98,19 +116,7 @@ main { margin-right: 5px !important; } - .reading-time { - display: inline-flex; - vertical-align: middle; - - .card-reading-time, - .card-created-at { - display: inline-flex; - } - - span { - margin-right: 5px; - } - } + @include mixin-reading-time; } .card-image { @@ -224,10 +230,18 @@ a.original:not(.waves-effect) { } div.metadata { + overflow: hidden; + height: 1.5em; + display: flex; + + ul.tags { + margin-left: 4px; + } + .chip { background-color: $blueAccentColor; padding: 0 7px; - margin: auto 2px; + margin: auto 1px; border-radius: 6px; line-height: 22px; height: 22px; @@ -244,6 +258,16 @@ a.original:not(.waves-effect) { padding-left: 8px; } } + + @include mixin-reading-time { + padding: 0 5px; + flex-wrap: wrap; + margin-left: auto; + + i.material-icons { + font-size: 20px; + } + } } div.card-content { diff --git a/app/Resources/static/themes/material/css/media_queries.scss b/app/Resources/static/themes/material/css/media_queries.scss index 491eedce..6f9d2a95 100644 --- a/app/Resources/static/themes/material/css/media_queries.scss +++ b/app/Resources/static/themes/material/css/media_queries.scss @@ -173,6 +173,10 @@ .row .col { padding: 0; } + + .card-stacked div.metadata .reading-time { + display: none; + } } @media screen and (max-width: 310px), -- cgit v1.2.3 From 0a81f9b9d990734810a571d43f44db6c67e7cd5e Mon Sep 17 00:00:00 2001 From: Simounet Date: Sun, 19 Jan 2020 10:54:56 +0100 Subject: Sidebar sub entries not conditioned by hover anymore --- app/Resources/static/themes/material/css/article.scss | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'app/Resources/static/themes/material') diff --git a/app/Resources/static/themes/material/css/article.scss b/app/Resources/static/themes/material/css/article.scss index 75658a58..f1a11da0 100644 --- a/app/Resources/static/themes/material/css/article.scss +++ b/app/Resources/static/themes/material/css/article.scss @@ -172,18 +172,18 @@ &:hover { width: 260px !important; - .collapsible-body { - height: auto; - - li a i.material-icons { - margin: auto 5px auto -8px; - } - } - span { opacity: 1; } } + + .collapsible-body { + height: auto; + + li a i.material-icons { + margin: auto 5px auto -8px; + } + } } .progress { -- cgit v1.2.3 From cfd77d1c2abca28c346af4697fb92db98a42f40a Mon Sep 17 00:00:00 2001 From: Simounet Date: Sun, 19 Jan 2020 12:50:08 +0100 Subject: Sticky nav on entry action button click --- app/Resources/static/themes/material/css/nav.scss | 5 +++++ app/Resources/static/themes/material/index.js | 8 ++++++++ 2 files changed, 13 insertions(+) (limited to 'app/Resources/static/themes/material') diff --git a/app/Resources/static/themes/material/css/nav.scss b/app/Resources/static/themes/material/css/nav.scss index 147f163f..b7288278 100644 --- a/app/Resources/static/themes/material/css/nav.scss +++ b/app/Resources/static/themes/material/css/nav.scss @@ -131,6 +131,11 @@ nav { display: none; } +.entry-nav-top--sticky { + position: sticky; + top: 0; +} + @media (min-width: 993px) { .button-collapse { display: none; diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js index 2926cad1..4b194d00 100755 --- a/app/Resources/static/themes/material/index.js +++ b/app/Resources/static/themes/material/index.js @@ -17,6 +17,13 @@ import './js/shortcuts/entry'; /* Theme style */ import './css/index.scss'; +const stickyNav = () => { + const nav = $('.js-entry-nav-top'); + $('[data-toggle="actions"]').click(() => { + nav.toggleClass('entry-nav-top--sticky'); + }); +}; + $(document).ready(() => { // sideNav $('.button-collapse').sideNav(); @@ -36,6 +43,7 @@ $(document).ready(() => { initFilters(); initExport(); initRandom(); + stickyNav(); const toggleNav = (toShow, toFocus) => { $('.nav-panel-actions').hide(100); -- cgit v1.2.3 From dc23bf9f29b2cff5c27ee8d2d251f435d00e6652 Mon Sep 17 00:00:00 2001 From: Simounet Date: Sun, 19 Jan 2020 17:49:54 +0100 Subject: Entry action buttons displayed on page end reached --- .../static/themes/material/css/article.scss | 1 + app/Resources/static/themes/material/index.js | 32 ++++++++++++++++------ 2 files changed, 25 insertions(+), 8 deletions(-) (limited to 'app/Resources/static/themes/material') diff --git a/app/Resources/static/themes/material/css/article.scss b/app/Resources/static/themes/material/css/article.scss index f1a11da0..755372c9 100644 --- a/app/Resources/static/themes/material/css/article.scss +++ b/app/Resources/static/themes/material/css/article.scss @@ -5,6 +5,7 @@ #article { font-size: 20px; margin: 0 auto; + padding-bottom: 80px; max-width: 45em; article { diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js index 4b194d00..e808d75c 100755 --- a/app/Resources/static/themes/material/index.js +++ b/app/Resources/static/themes/material/index.js @@ -24,6 +24,29 @@ const stickyNav = () => { }); }; +const articleScroll = () => { + const articleEl = $('#article'); + if (articleEl.length > 0) { + $(window).scroll(() => { + const s = $(window).scrollTop(); + const d = $(document).height(); + const c = $(window).height(); + const articleElBottom = articleEl.offset().top + articleEl.height(); + const scrollPercent = (s / (d - c)) * 100; + $('.progress .determinate').css('width', `${scrollPercent}%`); + const fixedActionBtn = $('.js-fixed-action-btn'); + const toggleScrollDataName = 'toggle-auto'; + if ((s + c) > articleElBottom) { + fixedActionBtn.data(toggleScrollDataName, true); + fixedActionBtn.openFAB(); + } else if (fixedActionBtn.data(toggleScrollDataName) === true) { + fixedActionBtn.data(toggleScrollDataName, false); + fixedActionBtn.closeFAB(); + } + }); + } +}; + $(document).ready(() => { // sideNav $('.button-collapse').sideNav(); @@ -44,6 +67,7 @@ $(document).ready(() => { initExport(); initRandom(); stickyNav(); + articleScroll(); const toggleNav = (toShow, toFocus) => { $('.nav-panel-actions').hide(100); @@ -81,12 +105,4 @@ $(document).ready(() => { $('.nav-panels').css('background', 'transparent'); return false; }); - - $(window).scroll(() => { - const s = $(window).scrollTop(); - const d = $(document).height(); - const c = $(window).height(); - const scrollPercent = (s / (d - c)) * 100; - $('.progress .determinate').css('width', `${scrollPercent}%`); - }); }); -- cgit v1.2.3 From 45582f29927ca3d2271a64f1a8621a2fa1e7001c Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Sat, 25 Jan 2020 15:40:29 +0100 Subject: material: replace display: flex with block in print mode This change is a workaround for a reported issue with printing flex items on Firefox See: https://bugzilla.mozilla.org/show_bug.cgi?id=939897 Fixes #4251 Signed-off-by: Kevin Decherf --- app/Resources/static/themes/material/css/media_queries.scss | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/Resources/static/themes/material') diff --git a/app/Resources/static/themes/material/css/media_queries.scss b/app/Resources/static/themes/material/css/media_queries.scss index 6f9d2a95..4242ead2 100644 --- a/app/Resources/static/themes/material/css/media_queries.scss +++ b/app/Resources/static/themes/material/css/media_queries.scss @@ -187,3 +187,9 @@ display: none; } } + +@media only print { + body { + display: block; + } +} -- cgit v1.2.3