From bc16b7b2ee12f808f5f0269f6ab027c34f6213dd Mon Sep 17 00:00:00 2001 From: Madalina Spoiala Date: Wed, 24 Aug 2022 17:26:40 +0300 Subject: [PATCH 1/9] added styles for print --- theme/site/globals/site.overrides | 46 +++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/theme/site/globals/site.overrides b/theme/site/globals/site.overrides index f66022c..3728c50 100644 --- a/theme/site/globals/site.overrides +++ b/theme/site/globals/site.overrides @@ -2296,9 +2296,7 @@ main { .thematic-areas { page-break-before: always; } -} -#main.print { .ui.container { position: relative !important; display: block !important; @@ -2359,6 +2357,30 @@ main { background: #fff; } + .logo-nav-wrapper .logoImage.tablet, + .logo-nav-wrapper .logoImageSm.tablet { + display: none !important; + } + + .logo-nav-wrapper .logoImageSm.computer { + display: static !important; + } + + .sticky-outer-wrapper .logo { + margin: 0 !important; + } + + .sticky-outer-wrapper .logo-nav-wrapper .logo:after, + .sticky-outer-wrapper.active .logo-nav-wrapper .logo:after { + content: 'Forest Information System for Europe'; + color: #058373; + font-size: 20px; + font-weight: 700; + margin-left: 10px; + max-width: 210px; + display: inline-block !important; + } + .header-bg.contentpage, .ui.breadcrumbs, .placeholder.header-image { @@ -2380,16 +2402,10 @@ main { } .header-image-content { - h1 { - margin: 0 !important; - color: #000 !important; - text-align: left !important; - } - - p { - margin: 0 !important; - color: #000 !important; - text-align: left !important; + h1, p { + margin: 0; + color: #464b0b; + text-align: left; } } } @@ -2399,8 +2415,8 @@ main { position: relative !important; width: 100% !important; height: auto !important; - background: transparent; - box-shadow: none; + background: transparent !important; + box-shadow: none !important; @media (max-width: 1200px) { top: 75px !important; } @@ -2423,7 +2439,7 @@ main { } .footerWrapper { - display: none !important; + display: none; } .react-grid-layout { From 46b318b47f45c57636a43561672ee129ed14a0b6 Mon Sep 17 00:00:00 2001 From: Madalina Spoiala Date: Thu, 25 Aug 2022 19:56:53 +0300 Subject: [PATCH 2/9] print styles --- theme/site/globals/site.overrides | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/theme/site/globals/site.overrides b/theme/site/globals/site.overrides index 3728c50..46f22d5 100644 --- a/theme/site/globals/site.overrides +++ b/theme/site/globals/site.overrides @@ -2362,11 +2362,12 @@ main { display: none !important; } - .logo-nav-wrapper .logoImageSm.computer { - display: static !important; + .sticky-outer-wrapper.active .sticky-inner-wrapper .logo .logoImageSm { + height: 80px !important; } .sticky-outer-wrapper .logo { + display: flex; margin: 0 !important; } @@ -2376,9 +2377,8 @@ main { color: #058373; font-size: 20px; font-weight: 700; - margin-left: 10px; + margin: 1.5rem 0 0 1rem; max-width: 210px; - display: inline-block !important; } .header-bg.contentpage, @@ -2436,6 +2436,25 @@ main { } } } + + .header-navigation-lead { + justify-content: flex-start; + .active-lead-nav { + background: transparent; + box-shadow: none; + border: none; + overflow: initial; + text-overflow: initial; + padding: 0; + width: auto !important; + font-size: 20px; + } + + .lead-navigation-item:not(:first-child) { + display: none; + } + } + } .footerWrapper { From fbbb39fdf5f789c81e7008aa07af4711cfc40edc Mon Sep 17 00:00:00 2001 From: Madalina Spoiala Date: Tue, 30 Aug 2022 07:25:45 +0300 Subject: [PATCH 3/9] print styles --- theme/site/globals/site.overrides | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/theme/site/globals/site.overrides b/theme/site/globals/site.overrides index 46f22d5..d5ffc81 100644 --- a/theme/site/globals/site.overrides +++ b/theme/site/globals/site.overrides @@ -2413,10 +2413,11 @@ main { .sticky-outer-wrapper, .sticky-inner-wrapper { position: relative !important; - width: 100% !important; + width: auto !important; height: auto !important; background: transparent !important; box-shadow: none !important; + transform: none !important; @media (max-width: 1200px) { top: 75px !important; } @@ -2450,9 +2451,12 @@ main { font-size: 20px; } - .lead-navigation-item:not(:first-child) { + .lead-navigation-item { display: none; } + .lead-navigation-item.active-lead-nav { + display: initial; + } } } From ee9f71ad9465a422b50fe8f0267849fa7a0d5490 Mon Sep 17 00:00:00 2001 From: Madalina Spoiala Date: Tue, 30 Aug 2022 18:37:47 +0300 Subject: [PATCH 4/9] tables and page title styles --- theme/site/globals/site.overrides | 138 ++++++++++++++++++++++++++++-- 1 file changed, 133 insertions(+), 5 deletions(-) diff --git a/theme/site/globals/site.overrides b/theme/site/globals/site.overrides index d5ffc81..ed034ce 100644 --- a/theme/site/globals/site.overrides +++ b/theme/site/globals/site.overrides @@ -2265,6 +2265,8 @@ main { blockquote { page-break-inside: avoid; + box-shadow: none !important; + border: none !important; } h1, @@ -2305,6 +2307,10 @@ main { padding: 0 !important; margin: 0 !important; float: none !important; + + p { + text-align: left !important; + } } .columns-view { @@ -2357,6 +2363,21 @@ main { background: #fff; } + .header-bg { + display: none; + } + + //.slider-wrapper { + // .slider-slide > img { + // display: none; + // } + // } + + .header-image-big { + height: auto !important; + padding: 40px 10px 10px 10px !important; + } + .logo-nav-wrapper .logoImage.tablet, .logo-nav-wrapper .logoImageSm.tablet { display: none !important; @@ -2366,9 +2387,15 @@ main { height: 80px !important; } + .logoImage { + @media (max-width: 600px) { + height: 80px !important; + } + } + .sticky-outer-wrapper .logo { display: flex; - margin: 0 !important; + margin: 1rem 0 0 0 !important; } .sticky-outer-wrapper .logo-nav-wrapper .logo:after, @@ -2408,6 +2435,10 @@ main { text-align: left; } } + + .header-meta-data { + display: none; + } } .sticky-outer-wrapper, @@ -2418,9 +2449,6 @@ main { background: transparent !important; box-shadow: none !important; transform: none !important; - @media (max-width: 1200px) { - top: 75px !important; - } } .sticky-inner-wrapper { @@ -2440,6 +2468,7 @@ main { .header-navigation-lead { justify-content: flex-start; + .active-lead-nav { background: transparent; box-shadow: none; @@ -2453,13 +2482,36 @@ main { .lead-navigation-item { display: none; + height: auto; } .lead-navigation-item.active-lead-nav { display: initial; + padding-top: 20px; + } + .navigation-next { + display: none; } } - } + .lead-mobile-nav { + + .lead-nav-item { + background: transparent; + box-shadow: none; + border: none; + overflow: initial; + text-overflow: initial; + padding: 0; + width: auto !important; + font-size: 20px; + + .lead-nav-icon { + display: none; + } + } + } + + } .footerWrapper { display: none; @@ -2498,6 +2550,10 @@ main { } } + .homepage-button { + display: none; + } + .thematic-areas { width: 756px !important; padding: 0 !important; @@ -2505,6 +2561,78 @@ main { background: #fff !important; } + .simple-data-table { + padding: 0 1em; + overflow-x: visible; + margin-left: -30px; + } + + .ui.table { + thead { + background-color: transparent !important; + } + + tr { + th { + border-bottom: none !important; + + &:not(:first-child) { + border-right: 1px solid #e8e8e8 !important; + } + + &.right:last-child { + border-right: none !important; + } + + } + + td { + border-top: 1px solid #e8e8e8 !important; + border-bottom: none !important; + + &:not(:first-child) { + border-right: 1px solid #e8e8e8 !important; + } + + &.right:last-child { + border-right: none !important; + } + } + } + } + + #page-document { + .styled-with-bg { + background-color: transparent !important; + .styled-columnsBlock { + padding: 0 !important; + } + } + } + + .simple-data-table .colored-table table tbody:after { + display: none; + } + + .drop-shadow-block, + .drop-shadow-tile { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + } + + body:not(.has-toolbar):not(.has-sidebar):not(.has-toolbar-collapsed):not(.has-sidebar-collapsed) .content-area main { + padding: 1rem 40px !important; + } + + .margin-block-10 { + margin: 0 !important; + } + + .padding-block-10 { + padding: 0 !important; + } + .svg-container { width: 100%; } From bd1c2072734d72671f17051948300c3d6acd4cc7 Mon Sep 17 00:00:00 2001 From: Madalina Spoiala Date: Thu, 1 Sep 2022 07:41:55 +0300 Subject: [PATCH 5/9] print styles --- theme/site/globals/site.overrides | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/theme/site/globals/site.overrides b/theme/site/globals/site.overrides index ed034ce..6186086 100644 --- a/theme/site/globals/site.overrides +++ b/theme/site/globals/site.overrides @@ -2367,11 +2367,9 @@ main { display: none; } - //.slider-wrapper { - // .slider-slide > img { - // display: none; - // } - // } + .slider-wrapper, .extra-header { + display: none; + } .header-image-big { height: auto !important; @@ -2567,9 +2565,14 @@ main { margin-left: -30px; } + .image { + width: 50%; + } + .ui.table { - thead { + thead, thead th { background-color: transparent !important; + color: #000000 !important; } tr { @@ -2640,6 +2643,14 @@ main { .print-button { display: none; } + + .embed-visualization, .plotly-chart { + display: block !important; + } + + .connected-chart-wrapper { + overflow: initial !important; + } } .print-button { From 22c60cc1718a9d9e39ce0ea8a03d14c970f548f6 Mon Sep 17 00:00:00 2001 From: Madalina Spoiala Date: Fri, 9 Sep 2022 19:37:49 +0300 Subject: [PATCH 6/9] show breadcrumbs in print mode --- theme/site/globals/site.overrides | 54 +++++++++++++++---------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/theme/site/globals/site.overrides b/theme/site/globals/site.overrides index 6186086..b5be96a 100644 --- a/theme/site/globals/site.overrides +++ b/theme/site/globals/site.overrides @@ -2313,6 +2313,24 @@ main { } } + .ui.secondary.vertical.segment.breadcrumbs { + display: inline !important; + width: 100vw !important; + padding: 0 !important; + + .ui.breadcrumb { + display: inline !important; + background: transparent !important; + + .section { + color: #cd4200 !important; + } + .active.section { + font-weight: 700; + } + } + } + .columns-view { .grid.column-grid { display: block; @@ -2393,7 +2411,7 @@ main { .sticky-outer-wrapper .logo { display: flex; - margin: 1rem 0 0 0 !important; + margin: 1rem 0 !important; } .sticky-outer-wrapper .logo-nav-wrapper .logo:after, @@ -2407,7 +2425,6 @@ main { } .header-bg.contentpage, - .ui.breadcrumbs, .placeholder.header-image { display: none !important; } @@ -2465,30 +2482,7 @@ main { } .header-navigation-lead { - justify-content: flex-start; - - .active-lead-nav { - background: transparent; - box-shadow: none; - border: none; - overflow: initial; - text-overflow: initial; - padding: 0; - width: auto !important; - font-size: 20px; - } - - .lead-navigation-item { - display: none; - height: auto; - } - .lead-navigation-item.active-lead-nav { - display: initial; - padding-top: 20px; - } - .navigation-next { - display: none; - } + display: none; } .lead-mobile-nav { @@ -2644,8 +2638,12 @@ main { display: none; } - .embed-visualization, .plotly-chart { - display: block !important; + .embed-visualization { + page-break-before: always !important; + + svg { + position: static !important; + } } .connected-chart-wrapper { From 6a5a11c5b26737e1e64af1e35bb0ed2b944953a6 Mon Sep 17 00:00:00 2001 From: Madalina Spoiala Date: Mon, 12 Sep 2022 21:56:25 +0300 Subject: [PATCH 7/9] rules for iframes and svgs in print mode --- theme/site/globals/site.overrides | 42 ++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/theme/site/globals/site.overrides b/theme/site/globals/site.overrides index b5be96a..97d7669 100644 --- a/theme/site/globals/site.overrides +++ b/theme/site/globals/site.overrides @@ -2313,12 +2313,13 @@ main { } } - .ui.secondary.vertical.segment.breadcrumbs { + .ui.secondary.vertical.segment.breadcrumbs, + .ui.secondary.vertical.segment.breadcrumbs:not(aside .ui.vertical.segment.breadcrumbs) { display: inline !important; width: 100vw !important; padding: 0 !important; - .ui.breadcrumb { + .breadcrumb { display: inline !important; background: transparent !important; @@ -2432,7 +2433,7 @@ main { .header-image-wrapper { height: auto; align-items: start; - padding: 0 10px; + padding: 40px 10px !important; .header-image { width: 756px; @@ -2554,13 +2555,15 @@ main { } .simple-data-table { + display: block; padding: 0 1em; overflow-x: visible; margin-left: -30px; } - .image { - width: 50%; + .image, img { + width: 80% !important; + height: auto; } .ui.table { @@ -2630,25 +2633,40 @@ main { padding: 0 !important; } - .svg-container { - width: 100%; - } - .print-button { display: none; } .embed-visualization { - page-break-before: always !important; + page-break-inside: avoid !important; + //page-break-after: always !important; - svg { - position: static !important; + .svg-container { + display: block; + width: 100%; + } + + .download-button { + display: none; } } .connected-chart-wrapper { overflow: initial !important; } + + .privacy-protection-wrapper { + min-height: 100% !important; + width: 100% !important; + } + + .columns-view > .grid.column-grid > .column.column-blocks-wrapper { + display: block !important; + } + + .columns-view > .grid.column-grid > .column.column-blocks-wrapper > div { + display: block !important; + } } .print-button { From 7af43a192447faeb3bd0b420db8cfcc50c58eb02 Mon Sep 17 00:00:00 2001 From: andreiggr Date: Tue, 13 Sep 2022 10:53:21 +0300 Subject: [PATCH 8/9] add new prop to non-extensible obj --- src/localconfig.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/localconfig.js b/src/localconfig.js index a823e32..8636a3b 100644 --- a/src/localconfig.js +++ b/src/localconfig.js @@ -153,6 +153,8 @@ export function applyConfig(config) { ...(config.viewlets || []), ]; + Object.preventExtensions(config); + config.settings.plotlyCustomColors = [ { title: 'Forest Default', From b7791559525359e28afc88598b0822967b314f6e Mon Sep 17 00:00:00 2001 From: andreiggr Date: Tue, 13 Sep 2022 11:06:15 +0300 Subject: [PATCH 9/9] fix config --- src/index.js | 4 ---- src/localconfig.js | 5 +++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/index.js b/src/index.js index 3ef2bfd..30c7120 100644 --- a/src/index.js +++ b/src/index.js @@ -65,10 +65,6 @@ export default function applyConfig(config) { // ...config.portlets, // }; - config.editForms = { - ...config.editForms, - }; - config.settings.slate = config.settings.slate || {}; config.settings.slate.styleMenu = config.settings.slate.styleMenu || {}; config.settings.slate.styleMenu.inlineStyles = [ diff --git a/src/localconfig.js b/src/localconfig.js index 8636a3b..56d7264 100644 --- a/src/localconfig.js +++ b/src/localconfig.js @@ -153,8 +153,6 @@ export function applyConfig(config) { ...(config.viewlets || []), ]; - Object.preventExtensions(config); - config.settings.plotlyCustomColors = [ { title: 'Forest Default', @@ -247,5 +245,8 @@ export function applyConfig(config) { // 'templated_country_factsheet', // 'basic_data_factsheet', // ]; + + Object.preventExtensions(config); + return config; }