diff --git a/web/themes/ventuno/bcl-builder.config.js b/web/themes/ventuno/bcl-builder.config.js index 5e5c8b7595..986e7dcb15 100644 --- a/web/themes/ventuno/bcl-builder.config.js +++ b/web/themes/ventuno/bcl-builder.config.js @@ -44,6 +44,14 @@ module.exports = { sourceMap: "file", }, }, + { + entry: path.resolve(outputFolder, "src/scss/searchpage.scss"), + dest: path.resolve(outputFolder, "assets/css/searchpage.css"), + options: { + includePaths, + sourceMap: "file", + }, + }, { entry: path.resolve(outputFolder, "src/scss/overrides/tour.scss"), dest: path.resolve(outputFolder, "assets/css/tour.css"), diff --git a/web/themes/ventuno/src/scss/components/_advanced-search-filters.scss b/web/themes/ventuno/src/scss/components/_advanced-search-filters.scss new file mode 100644 index 0000000000..8a9ad5c183 --- /dev/null +++ b/web/themes/ventuno/src/scss/components/_advanced-search-filters.scss @@ -0,0 +1,51 @@ +// Advanced search filters +.joinup-search-filters { + .offcanvas { + box-shadow: none; + @include media-breakpoint-up(lg) { + z-index: 500; // Avoid sidebar to overlap toolbar tray when logged in + } + &::before { + width: 100vw; + height: 100%; + background: $gray-300; + content: ''; + position: absolute; + z-index: -10; + right: 0; + } + .offcanvas-header { + border-bottom: 1px solid $gray-400; + } + .form-label, + .fieldset-legend, + .form-select, + .form-control { + font-size: $font-size-sm; + } + .form-label, + fieldset > legend { + text-transform: uppercase; + color: $primary; + font-weight: $font-weight-bold; + margin-bottom: $spacer; + } + .form-item { + margin-top: $spacer * 1.5; + padding-bottom: $spacer * 1.5; + border-bottom: 1px solid $gray-400; + @include media-breakpoint-up(lg) { + margin-top: $spacer * 2.5; + padding-bottom: $spacer * 2.5; + + } + } + .fieldset-wrapper { + .form-item { + margin-top: 0; + border-bottom: none; + padding-bottom: $spacer * .75; + } + } + } +} diff --git a/web/themes/ventuno/src/scss/homepage.scss b/web/themes/ventuno/src/scss/homepage.scss index 0791e76be8..3f5e961f77 100644 --- a/web/themes/ventuno/src/scss/homepage.scss +++ b/web/themes/ventuno/src/scss/homepage.scss @@ -19,5 +19,3 @@ @import "components/highlighted-event-block"; @import "components/global-search-block"; @import "components/explore-block"; -@import "components/footer"; -@import "components/site-alerts-messages"; diff --git a/web/themes/ventuno/src/scss/main.scss b/web/themes/ventuno/src/scss/main.scss index 27d44f21ad..260d7fffd6 100644 --- a/web/themes/ventuno/src/scss/main.scss +++ b/web/themes/ventuno/src/scss/main.scss @@ -10,4 +10,5 @@ // Components @import "components/navbar"; +@import "components/site-alerts-messages"; @import "components/footer"; diff --git a/web/themes/ventuno/src/scss/searchpage.scss b/web/themes/ventuno/src/scss/searchpage.scss new file mode 100644 index 0000000000..d0e17cf9e6 --- /dev/null +++ b/web/themes/ventuno/src/scss/searchpage.scss @@ -0,0 +1,12 @@ +// Searchpage CSS +// Only styles specific to the Searchpage + +// Joinup variables +@import "@openeuropa/bcl-theme-joinup/src/scss/oe-bcl-joinup.scss"; + +// Custom Joinup mixins +@import "mixins/joinup-icons"; +@import "mixins/full-width-background-colors"; + +// Components +@import "components/advanced-search-filters"; diff --git a/web/themes/ventuno/templates/block/block--facetform-viewsearch.html.twig b/web/themes/ventuno/templates/block/block--facetform-viewsearch.html.twig new file mode 100644 index 0000000000..6def603b0c --- /dev/null +++ b/web/themes/ventuno/templates/block/block--facetform-viewsearch.html.twig @@ -0,0 +1,52 @@ +{# +/** + * @file + * Theme override to display a block. + * + * Available variables: + * - plugin_id: The ID of the block implementation. + * - label: The configured label of the block if visible. + * - configuration: A list of the block's configuration values. + * - label: The configured label for the block. + * - label_display: The display settings for the label. + * - provider: The module or other provider that provided this block plugin. + * - Block plugin specific settings will also be stored here. + * - content: The content of this block. + * - attributes: array of HTML attributes populated by modules, intended to + * be added to the main container tag of this template. + * - id: A valid HTML ID and guaranteed unique. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * + * @see template_preprocess_block() + */ +#} +{# {% + set classes = [ + 'block', + 'block-' ~ configuration.provider|clean_class, + 'block-' ~ plugin_id|clean_class, + ] +%} #} + +{{ pattern('offcanvas', { + title: { + label: 'ADVANCED SEARCH', + heading: 4, + extra_classes: 'fw-normal fs-sm text-muted', + id: 'offcanvasLabel', + }, + placement: 'start', + offcanvas_id: 'search-offcanvas', + body: content, + with_body_scroll: false, + with_backdrop: true, + extra_classes_body: 'py-0 p-lg-0', + extra_classes_header: 'px-lg-0 py-lg-4', + extra_classes_close: 'd-md-none', + attributes: create_attribute().addClass(["bcl-offcanvas", "pe-3", "h-100"]), +}) }} diff --git a/web/themes/ventuno/templates/layout/page--search.html.twig b/web/themes/ventuno/templates/layout/page--search.html.twig new file mode 100644 index 0000000000..eaa6042ab3 --- /dev/null +++ b/web/themes/ventuno/templates/layout/page--search.html.twig @@ -0,0 +1,203 @@ +{# +/** + * @file + * Theme override for the home page. + * + * This adds a dedicated "About" section which has a particular layout which + * would otherwise require 3 additional regions to be added to the theme just + * displaying this section on the homepage. + * + * There is no support for using the Layout API in arbitrary regions, so this + * has been hacked together by creating the layout in an unused Page Manager + * variant and injecting this in the template. + * + * Once we have a way to leverage layouts in dedicated regions (such as support + * in core or when the Layout Builder Everywhere module is stabilized) we can + * replace this overridden template with the Layout Builder + the + * `twocolfooter-onecol-67-33` layout from the Joinup Layout module. + * + * @see https://www.drupal.org/project/drupal/issues/2924058 + * @see https://www.drupal.org/project/lb_everywhere + * + * The doctype, html, head and body tags are not in this template. Instead they + * can be found in the html.html.twig template in this directory. + * + * Available variables: + * + * General utility variables: + * - base_path: The base URL path of the Drupal installation. Will usually be + * "/" unless you have installed Drupal in a sub-directory. + * - is_front: A flag indicating if the current page is the front page. + * - logged_in: A flag indicating if the user is registered and signed in. + * - is_admin: A flag indicating if the user has permission to access + * administration pages. + * + * Site identity: + * - front_page: The URL of the front page. Use this instead of base_path when + * linking to the front page. This includes the language domain or prefix. + * + * Page content (in order of occurrence in the default page.html.twig): + * - messages: Status and error messages. Should be displayed prominently. + * - node: Fully loaded node, if there is an automatically-loaded node + * associated with the page and the node ID is the second argument in the + * page's path (e.g. node/12345 and node/12345/revisions, but not + * comment/reply/12345). + * + * Regions: + * - page.header: Items for the header region. + * - page.featured: Items for the featured content region. + * - page.content_top: Items for the region displayed above the main content. + * - page.content: The main content of the current page. + * - page.content_bottom: Items for the region displayed below the main content. + * - page.sidebar: Items for the sidebar. + * - page.footer: Items for the footer region. + * + * @see template_preprocess_page() + * @see html.html.twig + */ +#} + +{{ attach_library('ventuno/searchpage') }} + +