From 71b72cb2318053a61476597ad0482c44cbe8adf3 Mon Sep 17 00:00:00 2001 From: ouidade Date: Sun, 18 Jun 2023 20:42:25 +0200 Subject: [PATCH] css rorschach theme --- config/sync/admin_toolbar.settings.yml | 2 +- config/sync/block.block.booknavigation_2.yml | 4 +- ...y_view_display.paragraph.image.default.yml | 2 +- ...w_display.paragraph.subheading.default.yml | 2 +- ...w_display.paragraph.tablefield.default.yml | 2 +- ...ty_view_display.paragraph.text.default.yml | 2 +- ...y_view_display.paragraph.title.default.yml | 2 +- config/sync/system.site.yml | 2 +- config/sync/user.role.user.yml | 34 ++++++ web/sites/development.services.yml | 50 +++++++++ .../custom/rorschach/css-compiled/styles.css | 104 +++++++++++++----- .../custom/rorschach/rorschach.info.yml | 1 + .../scss/components/_tablefields.scss | 21 +++- .../custom/rorschach/scss/global/_layout.scss | 58 +++++++--- .../rorschach/scss/pages/_bookpage.scss | 15 ++- .../rorschach/scss/pages/_editform.scss | 39 +++++++ .../rorschach/scss/partials/_breadcrumbs.scss | 23 ++++ .../rorschach/scss/partials/_header.scss | 4 +- web/themes/custom/rorschach/scss/styles.scss | 5 +- ...node--field-type-de-protagoniste.html.twig | 47 -------- .../block--system-branding-block.html.twig | 28 +++++ ...ield--field-type-de-protagoniste.html.twig | 89 --------------- .../templates/footnote-link.html.twig | 2 + .../templates/footnote-list.html.twig | 23 ++++ .../rorschach/templates/layout/page.html.twig | 22 +++- .../layout/region--sidebar.html.twig | 28 +++++ 26 files changed, 406 insertions(+), 205 deletions(-) create mode 100644 web/themes/custom/rorschach/scss/pages/_editform.scss create mode 100644 web/themes/custom/rorschach/scss/partials/_breadcrumbs.scss delete mode 100644 web/themes/custom/rorschach/templates/block--entity-field--node--field-type-de-protagoniste.html.twig create mode 100644 web/themes/custom/rorschach/templates/block--system-branding-block.html.twig delete mode 100644 web/themes/custom/rorschach/templates/field--field-type-de-protagoniste.html.twig create mode 100644 web/themes/custom/rorschach/templates/footnote-link.html.twig create mode 100644 web/themes/custom/rorschach/templates/footnote-list.html.twig create mode 100644 web/themes/custom/rorschach/templates/layout/region--sidebar.html.twig diff --git a/config/sync/admin_toolbar.settings.yml b/config/sync/admin_toolbar.settings.yml index 86a5b3e..1a58fdb 100644 --- a/config/sync/admin_toolbar.settings.yml +++ b/config/sync/admin_toolbar.settings.yml @@ -1,4 +1,4 @@ _core: default_config_hash: jvTSppzcgH5wnzBhX5xnAExcp2I1CzkQ_aky65XNfYI langcode: fr -menu_depth: 4 +menu_depth: 7 diff --git a/config/sync/block.block.booknavigation_2.yml b/config/sync/block.block.booknavigation_2.yml index 24abb5c..ade7247 100644 --- a/config/sync/block.block.booknavigation_2.yml +++ b/config/sync/block.block.booknavigation_2.yml @@ -9,8 +9,8 @@ dependencies: - rorschach id: booknavigation_2 theme: rorschach -region: sidebar_second -weight: -8 +region: sidebar +weight: -5 provider: null plugin: book_navigation settings: diff --git a/config/sync/core.entity_view_display.paragraph.image.default.yml b/config/sync/core.entity_view_display.paragraph.image.default.yml index fb2b899..0bac205 100644 --- a/config/sync/core.entity_view_display.paragraph.image.default.yml +++ b/config/sync/core.entity_view_display.paragraph.image.default.yml @@ -14,7 +14,7 @@ mode: default content: field_image: type: image - label: above + label: visually_hidden settings: image_link: '' image_style: '' diff --git a/config/sync/core.entity_view_display.paragraph.subheading.default.yml b/config/sync/core.entity_view_display.paragraph.subheading.default.yml index 41ffdb8..4532493 100644 --- a/config/sync/core.entity_view_display.paragraph.subheading.default.yml +++ b/config/sync/core.entity_view_display.paragraph.subheading.default.yml @@ -14,7 +14,7 @@ mode: default content: field_subheading: type: text_default - label: above + label: visually_hidden settings: { } third_party_settings: { } weight: 0 diff --git a/config/sync/core.entity_view_display.paragraph.tablefield.default.yml b/config/sync/core.entity_view_display.paragraph.tablefield.default.yml index b82f247..06ac5bd 100644 --- a/config/sync/core.entity_view_display.paragraph.tablefield.default.yml +++ b/config/sync/core.entity_view_display.paragraph.tablefield.default.yml @@ -14,7 +14,7 @@ mode: default content: field_tablefield: type: tablefield - label: above + label: visually_hidden settings: row_header: true column_header: false diff --git a/config/sync/core.entity_view_display.paragraph.text.default.yml b/config/sync/core.entity_view_display.paragraph.text.default.yml index df712f8..4c9594e 100644 --- a/config/sync/core.entity_view_display.paragraph.text.default.yml +++ b/config/sync/core.entity_view_display.paragraph.text.default.yml @@ -14,7 +14,7 @@ mode: default content: field_text: type: text_default - label: above + label: visually_hidden settings: { } third_party_settings: { } weight: 0 diff --git a/config/sync/core.entity_view_display.paragraph.title.default.yml b/config/sync/core.entity_view_display.paragraph.title.default.yml index 7a7a8bc..aaecb4a 100644 --- a/config/sync/core.entity_view_display.paragraph.title.default.yml +++ b/config/sync/core.entity_view_display.paragraph.title.default.yml @@ -14,7 +14,7 @@ mode: default content: field_title: type: text_default - label: above + label: visually_hidden settings: { } third_party_settings: { } weight: 0 diff --git a/config/sync/system.site.yml b/config/sync/system.site.yml index 4d24d00..1f85610 100644 --- a/config/sync/system.site.yml +++ b/config/sync/system.site.yml @@ -2,7 +2,7 @@ _core: default_config_hash: KpKfgMpPrABs7m0Uqd8VFuYXns2cRXsuYy0QL4SRE14 langcode: fr uuid: eb24bc99-64ef-496d-beb3-b02a8573f75f -name: 'International Rorschach Institute' +name: Blbblkmkjfpa mail: dev@figureslibres.io slogan: '' page: diff --git a/config/sync/user.role.user.yml b/config/sync/user.role.user.yml index 9095142..e6deacc 100644 --- a/config/sync/user.role.user.yml +++ b/config/sync/user.role.user.yml @@ -6,12 +6,20 @@ dependencies: - filter.format.wysiwyg - node.type.book module: + - block_content - book + - book_access_code + - config_pages + - contact - content_translation + - field_ui - filter + - menu_admin_per_menu - node - paragraphs + - profile - tablefield + - taxonomy _core: default_config_hash: i1HX2g6ycNxMoSaVKRrMZtmApin-bVKG1d0FG04peQw id: user @@ -19,18 +27,43 @@ label: Editor weight: -4 is_admin: null permissions: + - 'access content overview' + - 'access printer-friendly version' + - 'add access codes' - 'add content to books' - 'addrow tablefield' + - 'administer block_content display' + - 'administer block_content form display' - 'administer book outlines' + - 'administer config_pages display' + - 'administer config_pages form display' + - 'administer contact_message display' + - 'administer contact_message form display' + - 'administer display modes' + - 'administer main menu items' + - 'administer node display' + - 'administer node form display' + - 'administer paragraph display' + - 'administer paragraph form display' + - 'administer profile display' + - 'administer profile form display' + - 'administer taxonomy_term display' + - 'administer taxonomy_term form display' + - 'administer user display' + - 'administer user form display' - 'create book content' - 'create content translations' - 'create defalut workflow_transition' - 'create default workflow_transition' - 'create new books' + - 'delete access codes' - 'delete any book content' + - 'delete book revisions' - 'delete content translations' - 'delete own book content' + - 'edit access codes' - 'edit any book content' + - 'edit own book content' - 'export tablefield' - 'import tablefield' - 'rebuild tablefield' @@ -39,3 +72,4 @@ permissions: - 'translate paragraph' - 'update content translations' - 'use text format wysiwyg' + - 'view own unpublished content' diff --git a/web/sites/development.services.yml b/web/sites/development.services.yml index d2857c6..cc931e1 100644 --- a/web/sites/development.services.yml +++ b/web/sites/development.services.yml @@ -3,6 +3,56 @@ # To activate this feature, follow the instructions at the top of the # 'example.settings.local.php' file, which sits next to this file. parameters: + twig.config: + # Twig debugging: + # + # When debugging is enabled: + # - The markup of each Twig template is surrounded by HTML comments that + # contain theming information, such as template file name suggestions. + # - Note that this debugging markup will cause automated tests that directly + # check rendered HTML to fail. When running automated tests, 'debug' + # should be set to FALSE. + # - The dump() function can be used in Twig templates to output information + # about template variables. + # - Twig templates are automatically recompiled whenever the source code + # changes (see auto_reload below). + # + # For more information about debugging Twig templates, see + # https://www.drupal.org/node/1906392. + # + # Not recommended in production environments + # @default false + debug: true + # Twig auto-reload: + # + # Automatically recompile Twig templates whenever the source code changes. + # If you don't provide a value for auto_reload, it will be determined + # based on the value of debug. + # + # Not recommended in production environments + # @default null + auto_reload: null + # Twig cache: + # + # By default, Twig templates will be compiled and stored in the filesystem + # to increase performance. Disabling the Twig cache will recompile the + # templates from source each time they are used. In most cases the + # auto_reload setting above should be enabled rather than disabling the + # Twig cache. + # + # Not recommended in production environments + # @default true + cache: false + # Cacheability debugging: + # + # Responses with cacheability metadata (CacheableResponseInterface instances) + # get X-Drupal-Cache-Tags and X-Drupal-Cache-Contexts headers. + # + # For more information about debugging cacheable responses, see + # https://www.drupal.org/developing/api/8/response/cacheable-response-interface + # + # Not recommended in production environments + # @default false http.response.debug_cacheability_headers: true services: cache.backend.null: diff --git a/web/themes/custom/rorschach/css-compiled/styles.css b/web/themes/custom/rorschach/css-compiled/styles.css index 2ef8a83..ee9a0ab 100644 --- a/web/themes/custom/rorschach/css-compiled/styles.css +++ b/web/themes/custom/rorschach/css-compiled/styles.css @@ -6,11 +6,17 @@ margin: auto; background-color: hotpink; } -table, th, td { - border: 1px solid; } - -#main-content { - background-color: blueviolet; } +table { + border-collapse: collapse; } + table thead th { + border: 1px solid #333; + text-align: center; + font-weight: bold; + padding: 1rem; } + table tbody td { + border: 1px solid #333; + text-align: center; + padding: 1rem; } /*global*/ @font-face { @@ -106,30 +112,33 @@ table, th, td { font-style: normal; } /* Colors used for EQL */ -.block { - box-shadow: 1px 0px 1px black; } - .layout-container { font-family: "Marianne", sans-serif; margin: none; top: 0%; left: 0%; width: 100%; - overflow: hidden; - display: flex; - flex-flow: row wrap; } + overflow: hidden; } .layout-container header { - flex: 0 0 100%; } + flex: 0 0 100%; + grid-row: 1; } .layout-container main { - position: relative; } + width: 100%; + position: relative; + grid-column: 1 / 5; + grid-row: 2 / span 4; } + .layout-container main .layout-content { + margin-left: 3rem; + margin-right: 3rem; + padding-bottom: 6rem; } + .layout-container main .layout-content .field__label { + visibility: hidden; } + .layout-container aside { + grid-column: 5 /span 6; + grid-row: 2 /span 4; } .layout-container footer { - flex: 0 0 100%; } - -.layout-content { - padding-top: 7rem; - padding-bottom: 6rem; } - .layout-content .field__label { - visibility: hidden; } + grid-column: 1 / span 10; + grid-row: 6; } a { text-decoration: none; } @@ -790,9 +799,6 @@ a { .field--name-field-subheading { font-size: 2rem; } -.block { - border: black; } - article.node-type-book { width: 70%; } article.node-type-book h2 { @@ -800,14 +806,50 @@ article.node-type-book { article.node-type-book div:nth-child(1) > nav:nth-child(1) > ul:nth-child(2) { display: flex; flex-direction: row; - justify-content: space-between; } + justify-content: space-between; + list-style: none; + box-shadow: 0px 0px 1px black; } + article.node-type-book .links.inline { + list-style: none; + box-shadow: 0px 0px 1px black; } + +#edit-field-article-0-subform-field-subheading-0-format { + font-size: 1rem; + visibility: hidden; } + +#edit-field-article-1-subform-field-subheading-0-format { + font-size: 1rem; + visibility: hidden; } + +#edit-field-article-2-subform-field-subheading-0-format { + font-size: 1rem; + visibility: hidden; } + +#edit-field-article-3-subform-field-subheading-0-format { + font-size: 1rem; + visibility: hidden; } + +#edit-field-article-4-subform-field-subheading-0-format { + font-size: 1rem; + visibility: hidden; } + +#edit-field-article-5-subform-field-subheading-0-format { + font-size: 1rem; + visibility: hidden; } + +#edit-field-article-6-subform-field-subheading-0-format { + font-size: 1rem; + visibility: hidden; } + +#edit-field-article-8-subform-field-subheading-0-format { + font-size: 1rem; + visibility: hidden; } /*partials*/ .layout-container { position: relative; width: 100vw; } .layout-container header { - position: fixed; z-index: 99; width: 100vw; } @@ -857,7 +899,6 @@ article.node-type-book { padding-bottom: 0.8rem; max-width: inherit; width: 220px; - align-items: center; height: 20px; } #header-top .region-header-top-left ul li a { color: black; } @@ -967,3 +1008,14 @@ article.node-type-book { #fotter-bottom .region-footer-bottom-middle .view-id-partenaires .view-content .node-type-partenaires_logo_footer_ { padding-right: 1rem; padding-bottom: 1rem; } + +#block-breadcrumbs nav ol { + list-style: none; + display: flex; + flex-direction: row; + justify-content: flex-start; } + #block-breadcrumbs nav ol li { + padding-right: 1rem; } + #block-breadcrumbs nav ol li ::after { + padding-left: 1rem; + content: " >"; } diff --git a/web/themes/custom/rorschach/rorschach.info.yml b/web/themes/custom/rorschach/rorschach.info.yml index 0dede02..56235fe 100644 --- a/web/themes/custom/rorschach/rorschach.info.yml +++ b/web/themes/custom/rorschach/rorschach.info.yml @@ -17,6 +17,7 @@ regions: help: 'Help' page_top: 'Page top' content: 'Main Content' + sidebar: "Sidebar" sidebar_first: 'Sidebar first' sidebar_second: 'Sidebar second' page_bottom: 'Page bottom' diff --git a/web/themes/custom/rorschach/scss/components/_tablefields.scss b/web/themes/custom/rorschach/scss/components/_tablefields.scss index 0b4a02a..a6cce2a 100644 --- a/web/themes/custom/rorschach/scss/components/_tablefields.scss +++ b/web/themes/custom/rorschach/scss/components/_tablefields.scss @@ -6,9 +6,22 @@ // } // } -thead th { - border-bottom: 1px solid #333; - text-align: center; - font-weight: bold; +table{ + border-collapse: collapse; + thead th{ + border: 1px solid #333; + text-align: center; + font-weight: bold; + padding: 1rem; + } + + tbody td { + border: 1px solid #333; + text-align: center; + padding: 1rem; + + } } + + diff --git a/web/themes/custom/rorschach/scss/global/_layout.scss b/web/themes/custom/rorschach/scss/global/_layout.scss index e06f5a5..4bdbe6a 100644 --- a/web/themes/custom/rorschach/scss/global/_layout.scss +++ b/web/themes/custom/rorschach/scss/global/_layout.scss @@ -1,13 +1,15 @@ .block{ - box-shadow: 1px 0px 1px $black; + // box-shadow: 0px 0px 1px $black; } // .layout-sidebar-first{ // clear: left; // } - +// .form-wrapper{ +// visibility: hidden; +// } .layout-container { font-family: $font-family-default; @@ -16,33 +18,53 @@ left: 0%; width: 100%; overflow: hidden; - display: flex; - flex-flow: row wrap; - ; + // display: flex; + // flex-flow: row wrap; + // display: -ms-grid; + // display: grid; + // -ms-grid-rows: 5fr; + // grid-template-rows: 5fr; + // -ms-grid-columns: (minmax(0, 1fr)); + // grid-template-columns: repeat(6, minmax(0, 1fr)); + // grid-column-gap: 1.125rem; + header{ flex: 0 0 100%; + grid-row: 1; } main{ - + width: 100%; position: relative; // top: -7rem; - .layout-sidebar-first{ + grid-column: 1 / 5; + grid-row: 2 / span 4; + .layout-content{ + margin-left: 3rem; + margin-right: 3rem; + // padding-top: 7rem; + padding-bottom: 6rem; + .field__label{ + visibility: hidden; + } } } + + aside{ + grid-column: 5 /span 6; + grid-row: 2 /span 4; + } + + + + footer{ - flex: 0 0 100%; - } - - -} -.layout-content{ - padding-top: 7rem; - padding-bottom: 6rem; - .field__label{ - visibility: hidden; - } + // flex: 0 0 100%; + grid-column: 1 / span 10; + grid-row: 6; + } } + // .path-frontpage{ // margin: 0; // } diff --git a/web/themes/custom/rorschach/scss/pages/_bookpage.scss b/web/themes/custom/rorschach/scss/pages/_bookpage.scss index 990d6c9..09f4e11 100644 --- a/web/themes/custom/rorschach/scss/pages/_bookpage.scss +++ b/web/themes/custom/rorschach/scss/pages/_bookpage.scss @@ -2,12 +2,7 @@ font-size: 2rem; } -.block{ - border: black; -} -h2{ -} article.node-type-book{ width: 70%; h2{ @@ -17,5 +12,13 @@ article.node-type-book{ display: flex; flex-direction: row; justify-content: space-between; + list-style: none; + box-shadow: 0px 0px 1px black; + } -} \ No newline at end of file + .links.inline{ + list-style: none; + box-shadow: 0px 0px 1px black; + } +} + diff --git a/web/themes/custom/rorschach/scss/pages/_editform.scss b/web/themes/custom/rorschach/scss/pages/_editform.scss new file mode 100644 index 0000000..a338846 --- /dev/null +++ b/web/themes/custom/rorschach/scss/pages/_editform.scss @@ -0,0 +1,39 @@ + + + +#edit-field-article-0-subform-field-subheading-0-format{ + font-size: 1rem; + visibility: hidden; +} + +#edit-field-article-1-subform-field-subheading-0-format{ + font-size: 1rem; + visibility: hidden; +} + +#edit-field-article-2-subform-field-subheading-0-format{ + font-size: 1rem; + visibility: hidden; +} + +#edit-field-article-3-subform-field-subheading-0-format{ + font-size: 1rem; + visibility: hidden; +} +#edit-field-article-4-subform-field-subheading-0-format{ + font-size: 1rem; + visibility: hidden; +} + +#edit-field-article-5-subform-field-subheading-0-format{ + font-size: 1rem; + visibility: hidden; +} +#edit-field-article-6-subform-field-subheading-0-format{ + font-size: 1rem; + visibility: hidden; +} +#edit-field-article-8-subform-field-subheading-0-format{ + font-size: 1rem; + visibility: hidden; +} \ No newline at end of file diff --git a/web/themes/custom/rorschach/scss/partials/_breadcrumbs.scss b/web/themes/custom/rorschach/scss/partials/_breadcrumbs.scss new file mode 100644 index 0000000..dd6fec2 --- /dev/null +++ b/web/themes/custom/rorschach/scss/partials/_breadcrumbs.scss @@ -0,0 +1,23 @@ +#block-breadcrumbs{ + nav { + ol { + list-style: none; + display: flex; + flex-direction: row; + justify-content: flex-start; + + li{ + padding-right: 1rem; + ::after{ + padding-left: 1rem; + content: " >"; + } + } + + } + + } +} + + + // #block-breadcrumbs > nav:nth-child(1) > ol:nth-child(2) \ No newline at end of file diff --git a/web/themes/custom/rorschach/scss/partials/_header.scss b/web/themes/custom/rorschach/scss/partials/_header.scss index f1f733d..52f943c 100644 --- a/web/themes/custom/rorschach/scss/partials/_header.scss +++ b/web/themes/custom/rorschach/scss/partials/_header.scss @@ -6,7 +6,7 @@ header{ // display: block; // width: 100%; - position: fixed; + // position: fixed; z-index: 99; width: 100vw; @@ -100,7 +100,7 @@ padding-bottom: 0.8rem; max-width: inherit; width: 220px; - align-items: center; + // align-items: center; // padding-left: 1rem; height: 20px; // text-align: none diff --git a/web/themes/custom/rorschach/scss/styles.scss b/web/themes/custom/rorschach/scss/styles.scss index dda1896..e5057a8 100644 --- a/web/themes/custom/rorschach/scss/styles.scss +++ b/web/themes/custom/rorschach/scss/styles.scss @@ -13,7 +13,7 @@ // @import "global/_reset"; @import "global/_typography"; @import "global/_mediaqueries"; - +// @import "global/grid"; /*pages*/ /* @@ -24,6 +24,7 @@ @import "pages/_static"; @import "pages/_home"; @import "pages/_bookpage"; +@import "pages/_editform"; @@ -31,5 +32,7 @@ @import "partials/_header"; @import "partials/_footer"; @import "partials/_navigation"; +@import "partials/_breadcrumbs.scss"; + diff --git a/web/themes/custom/rorschach/templates/block--entity-field--node--field-type-de-protagoniste.html.twig b/web/themes/custom/rorschach/templates/block--entity-field--node--field-type-de-protagoniste.html.twig deleted file mode 100644 index bae1217..0000000 --- a/web/themes/custom/rorschach/templates/block--entity-field--node--field-type-de-protagoniste.html.twig +++ /dev/null @@ -1,47 +0,0 @@ -{# -/** - * @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, - ] -%} - - - - - {{ title_prefix }} - {% if label %} - {{ label }} - {% endif %} - {{ title_suffix }} - {% block content %} - {{ content }} - {% endblock %} - diff --git a/web/themes/custom/rorschach/templates/block--system-branding-block.html.twig b/web/themes/custom/rorschach/templates/block--system-branding-block.html.twig new file mode 100644 index 0000000..8839aa1 --- /dev/null +++ b/web/themes/custom/rorschach/templates/block--system-branding-block.html.twig @@ -0,0 +1,28 @@ +{% extends "block.html.twig" %} +{# +/** + * @file + * Default theme implementation for a branding block. + * + * Each branding element variable (logo, name, slogan) is only available if + * enabled in the block configuration. + * + * Available variables: + * - site_logo: Logo for site as defined in Appearance or theme settings. + * - site_name: Name for site as defined in Site information settings. + * - site_slogan: Slogan for site as defined in Site information settings. + * + * @ingroup themeable + */ +#} +{% block content %} + {% if site_logo %} + + {{ 'Home'| t }} + + {% endif %} + {% if site_name %} + {{ site_name }} + {% endif %} + {{ site_slogan }} +{% endblock %} diff --git a/web/themes/custom/rorschach/templates/field--field-type-de-protagoniste.html.twig b/web/themes/custom/rorschach/templates/field--field-type-de-protagoniste.html.twig deleted file mode 100644 index f854907..0000000 --- a/web/themes/custom/rorschach/templates/field--field-type-de-protagoniste.html.twig +++ /dev/null @@ -1,89 +0,0 @@ -{# -/** - * @file - * Theme override for a field. - * - * To override output, copy the "field.html.twig" from the templates directory - * to your theme's directory and customize it, just like customizing other - * Drupal templates such as page.html.twig or node.html.twig. - * - * Instead of overriding the theming for all fields, you can also just override - * theming for a subset of fields using - * @link themeable Theme hook suggestions. @endlink For example, - * here are some theme hook suggestions that can be used for a field_foo field - * on an article node type: - * - field--node--field-foo--article.html.twig - * - field--node--field-foo.html.twig - * - field--node--article.html.twig - * - field--field-foo.html.twig - * - field--text-with-summary.html.twig - * - field.html.twig - * - * Available variables: - * - attributes: HTML attributes for the containing element. - * - label_hidden: Whether to show the field label or not. - * - title_attributes: HTML attributes for the title. - * - label: The label for the field. - * - multiple: TRUE if a field can contain multiple items. - * - items: List of all the field items. Each item contains: - * - attributes: List of HTML attributes for each item. - * - content: The field item's content. - * - entity_type: The entity type to which the field belongs. - * - field_name: The name of the field. - * - field_type: The type of the field. - * - label_display: The display settings for the label. - * - * - * @see template_preprocess_field() - */ -#} - -{% - set classes = [ - 'field', - 'field--name-' ~ field_name|clean_class, - 'field--type-' ~ field_type|clean_class, - 'field--label-' ~ label_display, - label_display == 'inline' ? 'clearfix', - - ] -%} -{% - set title_classes = [ - 'field__label', - label_display == 'visually_hidden' ? 'visually-hidden', - ] -%} - - -{% if label_hidden %} - {% if multiple %} - - - - {% for item in items %} - - {% endfor %} - - {% else %} - {% for item in items %} - - -
{{ item.content }}
- - {% endfor %} - {% endif %} -{% else %} - - {{ label }} - {% if multiple %} -
- {% endif %} - {% for item in items %} - {{ item.content }}
- {% endfor %} - {% if multiple %} - - {% endif %} - -{% endif %} diff --git a/web/themes/custom/rorschach/templates/footnote-link.html.twig b/web/themes/custom/rorschach/templates/footnote-link.html.twig new file mode 100644 index 0000000..aa32cae --- /dev/null +++ b/web/themes/custom/rorschach/templates/footnote-link.html.twig @@ -0,0 +1,2 @@ +{# footnotes/footnote-link.html.twig #} +{{ fn.value }} diff --git a/web/themes/custom/rorschach/templates/footnote-list.html.twig b/web/themes/custom/rorschach/templates/footnote-list.html.twig new file mode 100644 index 0000000..1802716 --- /dev/null +++ b/web/themes/custom/rorschach/templates/footnote-list.html.twig @@ -0,0 +1,23 @@ +{# footnotes/footnote-list.html.twig #} +
    + {% for fn in footnotes %} + {% if fn.ref_id is iterable %} + {# + // Output footnote that has more than one reference to it in the body. + // The only difference is to insert backlinks to all references. + // Helper: we need to enumerate a, b, c... + #} + {% set abc = "abcdefghijklmnopqrstuvwxyz"|split('') %} + {% set i = 0 %} +
  • {{ fn.value }} + {% for ref in fn.ref_id %} + {{ attribute(abc, i) }} + {% set i = i + 1 %} + {% endfor %} + {{ fn.text|raw }}
  • + {% else %} + {# Output normal footnote. #} +
  • {{ fn.value }}{{ fn.text|raw }}
  • + {% endif %} + {% endfor %} +
diff --git a/web/themes/custom/rorschach/templates/layout/page.html.twig b/web/themes/custom/rorschach/templates/layout/page.html.twig index 13c8e25..87b9bb4 100644 --- a/web/themes/custom/rorschach/templates/layout/page.html.twig +++ b/web/themes/custom/rorschach/templates/layout/page.html.twig @@ -31,7 +31,7 @@ */ #} -
+
@@ -52,6 +52,20 @@ {{ page.content }}
{# /.layout-content #} + {# {% if page.sidebar_first %} + + {% endif %} + + {% if page.sidebar_second %} + + {% endif %} #} + + +