浏览代码

module image title

ouidade 11 月之前
父节点
当前提交
8cab24aee5

+ 1 - 0
composer.json

@@ -24,6 +24,7 @@
         "drupal/core-recommended": "^9.5",
         "drupal/fakeobjects": "^1.2",
         "drupal/footnotes": "^3.0",
+        "drupal/image_with_title": "^2.0",
         "drupal/paragraphs": "^1.15",
         "drupal/tablefield": "^2.4",
         "wikimedia/composer-merge-plugin": "^2.1"

+ 1 - 1
config/sync/block.block.booknavigation_2.yml

@@ -9,7 +9,7 @@ dependencies:
     - rorschach
 id: booknavigation_2
 theme: rorschach
-region: sidebar
+region: sidebar_second
 weight: -5
 provider: null
 plugin: book_navigation

+ 1 - 1
config/sync/block.block.rorschach_main_menu.yml

@@ -23,7 +23,7 @@ settings:
   label_display: '0'
   provider: system
   level: 1
-  depth: 2
+  depth: 1
   expand_all_items: true
 visibility:
   context:

+ 17 - 10
config/sync/core.entity_form_display.node.book.default.yml

@@ -8,6 +8,7 @@ dependencies:
     - field.field.node.book.field_articles
     - field.field.node.book.field_bookpage_subheading
     - field.field.node.book.field_image
+    - field.field.node.book.field_parent_book
     - field.field.node.book.field_subheading
     - field.field.node.book.field_tablefield
     - field.field.node.book.field_text
@@ -34,13 +35,13 @@ mode: default
 content:
   created:
     type: datetime_timestamp
-    weight: 5
+    weight: 6
     region: content
     settings: {  }
     third_party_settings: {  }
   field_article:
     type: paragraphs
-    weight: 2
+    weight: 3
     region: content
     settings:
       title: Paragraph
@@ -71,36 +72,42 @@ content:
         maxlength_js_enforce: false
       advanced_text_formatter:
         show_token_tree: 0
+  field_parent_book:
+    type: options_select
+    weight: 2
+    region: content
+    settings: {  }
+    third_party_settings: {  }
   langcode:
     type: language_select
-    weight: 3
+    weight: 4
     region: content
     settings:
       include_locked: true
     third_party_settings: {  }
   path:
     type: path
-    weight: 9
+    weight: 10
     region: content
     settings: {  }
     third_party_settings: {  }
   promote:
     type: boolean_checkbox
-    weight: 7
+    weight: 8
     region: content
     settings:
       display_label: true
     third_party_settings: {  }
   status:
     type: boolean_checkbox
-    weight: 11
+    weight: 12
     region: content
     settings:
       display_label: true
     third_party_settings: {  }
   sticky:
     type: boolean_checkbox
-    weight: 8
+    weight: 9
     region: content
     settings:
       display_label: true
@@ -114,13 +121,13 @@ content:
       placeholder: ''
     third_party_settings: {  }
   translation:
-    weight: 6
+    weight: 7
     region: content
     settings: {  }
     third_party_settings: {  }
   uid:
     type: entity_reference_autocomplete
-    weight: 4
+    weight: 5
     region: content
     settings:
       match_operator: CONTAINS
@@ -129,7 +136,7 @@ content:
       placeholder: ''
     third_party_settings: {  }
   url_redirects:
-    weight: 10
+    weight: 11
     region: content
     settings: {  }
     third_party_settings: {  }

+ 17 - 1
config/sync/core.entity_form_display.paragraph.image.default.yml

@@ -8,6 +8,7 @@ dependencies:
     - paragraphs.paragraphs_type.image
   module:
     - field_layout
+    - filefield_sources
     - image
     - layout_discovery
 third_party_settings:
@@ -27,7 +28,22 @@ content:
     settings:
       progress_indicator: throbber
       preview_image_style: thumbnail
-    third_party_settings: {  }
+    third_party_settings:
+      filefield_sources:
+        filefield_sources:
+          sources:
+            upload: true
+            remote: false
+            clipboard: false
+            reference: false
+            attach: false
+          source_reference:
+            autocomplete: '0'
+            search_all_fields: '0'
+          source_attach:
+            path: file_attach
+            absolute: 0
+            attach_mode: move
 hidden:
   created: true
   status: true

+ 9 - 1
config/sync/core.entity_view_display.node.book.default.yml

@@ -8,6 +8,7 @@ dependencies:
     - field.field.node.book.field_articles
     - field.field.node.book.field_bookpage_subheading
     - field.field.node.book.field_image
+    - field.field.node.book.field_parent_book
     - field.field.node.book.field_subheading
     - field.field.node.book.field_tablefield
     - field.field.node.book.field_text
@@ -15,7 +16,6 @@ dependencies:
   module:
     - entity_reference_revisions
     - layout_builder
-    - layout_discovery
     - text
     - user
 third_party_settings:
@@ -70,6 +70,14 @@ content:
     third_party_settings: {  }
     weight: 5
     region: content
+  field_parent_book:
+    type: entity_reference_label
+    label: above
+    settings:
+      link: true
+    third_party_settings: {  }
+    weight: 9
+    region: content
   field_subheading:
     type: entity_reference_revisions_entity_view
     label: above

+ 2 - 0
config/sync/core.entity_view_display.node.book.full.yml

@@ -9,6 +9,7 @@ dependencies:
     - field.field.node.book.field_articles
     - field.field.node.book.field_bookpage_subheading
     - field.field.node.book.field_image
+    - field.field.node.book.field_parent_book
     - field.field.node.book.field_subheading
     - field.field.node.book.field_tablefield
     - field.field.node.book.field_text
@@ -54,6 +55,7 @@ hidden:
   field_article: true
   field_bookpage_subheading: true
   field_image: true
+  field_parent_book: true
   field_subheading: true
   field_tablefield: true
   field_text: true

+ 2 - 0
config/sync/core.entity_view_display.node.book.teaser.yml

@@ -9,6 +9,7 @@ dependencies:
     - field.field.node.book.field_articles
     - field.field.node.book.field_bookpage_subheading
     - field.field.node.book.field_image
+    - field.field.node.book.field_parent_book
     - field.field.node.book.field_subheading
     - field.field.node.book.field_tablefield
     - field.field.node.book.field_text
@@ -55,6 +56,7 @@ hidden:
   field_article: true
   field_bookpage_subheading: true
   field_image: true
+  field_parent_book: true
   field_subheading: true
   field_tablefield: true
   field_text: true

+ 3 - 3
config/sync/core.entity_view_display.paragraph.image.default.yml

@@ -6,18 +6,18 @@ dependencies:
     - field.field.paragraph.image.field_image
     - paragraphs.paragraphs_type.image
   module:
-    - image
+    - image_with_title
 id: paragraph.image.default
 targetEntityType: paragraph
 bundle: image
 mode: default
 content:
   field_image:
-    type: image
+    type: image_with_title
     label: visually_hidden
     settings:
-      image_link: ''
       image_style: ''
+      image_link: ''
       image_loading:
         attribute: lazy
     third_party_settings: {  }

+ 1 - 0
config/sync/core.extension.yml

@@ -64,6 +64,7 @@ module:
   help: 0
   honeypot: 0
   image: 0
+  image_with_title: 0
   inline_entity_form: 0
   jquery_ui: 0
   jquery_ui_button: 0

+ 21 - 0
config/sync/field.field.node.book.field_parent_book.yml

@@ -0,0 +1,21 @@
+uuid: 44db19ef-9bc0-4a03-8ffa-5596582e2269
+langcode: en
+status: true
+dependencies:
+  config:
+    - field.storage.node.field_parent_book
+    - node.type.book
+id: node.book.field_parent_book
+field_name: field_parent_book
+entity_type: node
+bundle: book
+label: 'Parent Book'
+description: ''
+required: false
+translatable: false
+default_value: {  }
+default_value_callback: ''
+settings:
+  handler: 'default:taxonomy_term'
+  handler_settings: {  }
+field_type: entity_reference

+ 4 - 4
config/sync/field.field.paragraph.image.field_image.yml

@@ -11,9 +11,9 @@ dependencies:
 third_party_settings:
   content_translation:
     translation_sync:
-      alt: alt
-      title: title
-      file: '0'
+      file: file
+      alt: '0'
+      title: '0'
 id: paragraph.image.field_image
 field_name: field_image
 entity_type: paragraph
@@ -35,7 +35,7 @@ settings:
   alt_field: true
   alt_field_required: true
   title_field: true
-  title_field_required: false
+  title_field_required: true
   default_image:
     uuid: ''
     alt: ''

+ 20 - 0
config/sync/field.storage.node.field_parent_book.yml

@@ -0,0 +1,20 @@
+uuid: c1de84ae-c09d-4ded-b1fc-c4e6bc0f5d40
+langcode: en
+status: true
+dependencies:
+  module:
+    - node
+    - taxonomy
+id: node.field_parent_book
+field_name: field_parent_book
+entity_type: node
+type: entity_reference
+settings:
+  target_type: taxonomy_term
+module: core
+locked: false
+cardinality: 1
+translatable: true
+indexes: {  }
+persist_with_no_fields: false
+custom_storage: false

+ 11 - 0
config/sync/language.content_settings.taxonomy_term.book.yml

@@ -0,0 +1,11 @@
+uuid: 101b0f6b-851d-4fd7-a274-c21fc1fc4bd0
+langcode: en
+status: true
+dependencies:
+  config:
+    - taxonomy.vocabulary.book
+id: taxonomy_term.book
+target_entity_type_id: taxonomy_term
+target_bundle: book
+default_langcode: site_default
+language_alterable: false

+ 8 - 0
config/sync/taxonomy.vocabulary.book.yml

@@ -0,0 +1,8 @@
+uuid: b4fb8225-0c19-4a99-bbcf-d08c8ef0cf5f
+langcode: en
+status: true
+dependencies: {  }
+name: Book
+vid: book
+description: ''
+weight: 0

+ 0 - 201
config/sync/views.view.book_traversal_links.yml

@@ -1,201 +0,0 @@
-uuid: c0be0038-de5e-4e57-b0a5-18fada0a35c8
-langcode: fr
-status: true
-dependencies:
-  config:
-    - block_content.type.content_book_page
-  module:
-    - block_content
-id: book_traversal_links
-label: 'Book traversal links'
-module: views
-description: ''
-tag: ''
-base_table: block_content_field_data
-base_field: nid
-display:
-  default:
-    id: default
-    display_title: Default
-    display_plugin: default
-    position: 0
-    display_options:
-      title: 'Book traversal links'
-      fields:
-        info:
-          id: info
-          table: block_content_field_data
-          field: info
-          relationship: none
-          group_type: group
-          admin_label: ''
-          entity_type: null
-          entity_field: info
-          plugin_id: field
-          label: ''
-          exclude: false
-          alter:
-            alter_text: false
-            text: ''
-            make_link: false
-            path: ''
-            absolute: false
-            external: false
-            replace_spaces: false
-            path_case: none
-            trim_whitespace: false
-            alt: ''
-            rel: ''
-            link_class: ''
-            prefix: ''
-            suffix: ''
-            target: ''
-            nl2br: false
-            max_length: 0
-            word_boundary: true
-            ellipsis: true
-            more_link: false
-            more_link_text: ''
-            more_link_path: ''
-            strip_tags: false
-            trim: false
-            preserve_tags: ''
-            html: false
-          element_type: ''
-          element_class: ''
-          element_label_type: ''
-          element_label_class: ''
-          element_label_colon: true
-          element_wrapper_type: ''
-          element_wrapper_class: ''
-          element_default_classes: true
-          empty: ''
-          hide_empty: false
-          empty_zero: false
-          hide_alter_empty: true
-          click_sort_column: value
-          type: string
-          settings: {  }
-          group_column: value
-          group_columns: {  }
-          group_rows: true
-          delta_limit: 0
-          delta_offset: 0
-          delta_reversed: false
-          delta_first_last: false
-          multi_type: separator
-          separator: ', '
-          field_api_classes: false
-      pager:
-        type: full
-        options:
-          offset: 0
-          items_per_page: 5
-          total_pages: null
-          id: 0
-          tags:
-            next: 'Next ›'
-            previous: '‹ Previous'
-            first: '« First'
-            last: 'Last »'
-          expose:
-            items_per_page: false
-            items_per_page_label: 'Items per page'
-            items_per_page_options: '5, 10, 25, 50'
-            items_per_page_options_all: false
-            items_per_page_options_all_label: '- All -'
-            offset: false
-            offset_label: Offset
-          quantity: 9
-      exposed_form:
-        type: basic
-        options:
-          submit_button: Apply
-          reset_button: false
-          reset_button_label: Reset
-          exposed_sorts_label: 'Sort by'
-          expose_sort_order: true
-          sort_asc_label: Asc
-          sort_desc_label: Desc
-      access:
-        type: none
-        options: {  }
-      cache:
-        type: tag
-        options: {  }
-      empty: {  }
-      sorts: {  }
-      arguments: {  }
-      filters:
-        status:
-          id: status
-          table: block_content_field_data
-          field: status
-          entity_type: block_content
-          entity_field: status
-          plugin_id: boolean
-          value: '1'
-          group: 1
-          expose:
-            operator: ''
-            operator_limit_selection: false
-            operator_list: {  }
-        reusable:
-          id: reusable
-          table: block_content_field_data
-          field: reusable
-          entity_type: block_content
-          entity_field: reusable
-          plugin_id: boolean
-          value: '1'
-          expose:
-            operator_limit_selection: false
-            operator_list: {  }
-        type:
-          id: type
-          table: block_content_field_data
-          field: type
-          entity_type: block_content
-          entity_field: type
-          plugin_id: bundle
-          value:
-            content_book_page: content_book_page
-          expose:
-            operator_limit_selection: false
-            operator_list: {  }
-      style:
-        type: default
-      row:
-        type: fields
-      query:
-        type: views_query
-        options:
-          query_comment: ''
-          disable_sql_rewrite: false
-          distinct: false
-          replica: false
-          query_tags: {  }
-      relationships: {  }
-      header: {  }
-      footer: {  }
-    cache_metadata:
-      max-age: -1
-      contexts:
-        - 'languages:language_content'
-        - 'languages:language_interface'
-        - url.query_args
-      tags: {  }
-  block_1:
-    id: block_1
-    display_title: Block
-    display_plugin: block
-    position: 1
-    display_options:
-      display_extenders: {  }
-    cache_metadata:
-      max-age: -1
-      contexts:
-        - 'languages:language_content'
-        - 'languages:language_interface'
-        - url.query_args
-      tags: {  }

+ 72 - 18
config/sync/views.view.content.yml

@@ -5,6 +5,7 @@ dependencies:
   module:
     - book
     - node
+    - taxonomy
     - user
 _core:
   default_config_hash: vBKWYGGDoAX-tFd1JErB8tZLSxx3lJ0foouVsgpcbB4
@@ -415,6 +416,62 @@ display:
           format_plural_string: !!binary MQNAY291bnQ=
           prefix: ''
           suffix: ''
+        term_node_tid:
+          id: term_node_tid
+          table: node_field_data
+          field: term_node_tid
+          relationship: none
+          group_type: group
+          admin_label: ''
+          entity_type: node
+          plugin_id: taxonomy_index_tid
+          label: 'All taxonomy terms'
+          exclude: false
+          alter:
+            alter_text: false
+            text: ''
+            make_link: false
+            path: ''
+            absolute: false
+            external: false
+            replace_spaces: false
+            path_case: none
+            trim_whitespace: false
+            alt: ''
+            rel: ''
+            link_class: ''
+            prefix: ''
+            suffix: ''
+            target: ''
+            nl2br: false
+            max_length: 0
+            word_boundary: true
+            ellipsis: true
+            more_link: false
+            more_link_text: ''
+            more_link_path: ''
+            strip_tags: false
+            trim: false
+            preserve_tags: ''
+            html: false
+          element_type: ''
+          element_class: ''
+          element_label_type: ''
+          element_label_class: ''
+          element_label_colon: true
+          element_wrapper_type: ''
+          element_wrapper_class: ''
+          element_default_classes: true
+          empty: ''
+          hide_empty: false
+          empty_zero: false
+          hide_alter_empty: true
+          type: separator
+          separator: ', '
+          link_to_taxonomy: true
+          limit: false
+          vids:
+            books: '0'
       pager:
         type: full
         options:
@@ -680,10 +737,9 @@ display:
             changed: changed
             operations: operations
             langcode: langcode
-            translation_status: translation_status
             translation_outdated: translation_outdated
             depth: depth
-          default: changed
+          default: '-1'
           info:
             node_bulk_form:
               align: ''
@@ -691,14 +747,14 @@ display:
               empty_column: false
               responsive: ''
             title:
-              sortable: true
+              sortable: false
               default_sort_order: asc
               align: ''
               separator: ''
               empty_column: false
               responsive: ''
             type:
-              sortable: true
+              sortable: false
               default_sort_order: asc
               align: ''
               separator: ''
@@ -710,34 +766,27 @@ display:
               align: ''
               separator: ''
               empty_column: false
-              responsive: priority-low
+              responsive: ''
             status:
-              sortable: true
+              sortable: false
               default_sort_order: asc
               align: ''
               separator: ''
               empty_column: false
               responsive: ''
             changed:
-              sortable: true
-              default_sort_order: desc
+              sortable: false
+              default_sort_order: asc
               align: ''
               separator: ''
               empty_column: false
-              responsive: priority-low
+              responsive: ''
             operations:
               align: ''
               separator: ''
               empty_column: false
               responsive: ''
             langcode:
-              sortable: true
-              default_sort_order: asc
-              align: ''
-              separator: ''
-              empty_column: false
-              responsive: ''
-            translation_status:
               sortable: false
               default_sort_order: asc
               align: ''
@@ -759,13 +808,18 @@ display:
               empty_column: false
               responsive: ''
           override: true
-          sticky: true
+          sticky: false
           summary: ''
-          empty_table: true
+          empty_table: false
           caption: ''
           description: ''
       row:
         type: fields
+        options:
+          default_field_elements: true
+          inline: {  }
+          separator: ''
+          hide_empty: false
       query:
         type: views_query
       relationships:

+ 0 - 50
web/sites/development.services.yml

@@ -3,56 +3,6 @@
 # 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:

+ 18 - 6
web/themes/custom/rorschach/css-compiled/styles.css

@@ -12,22 +12,21 @@ table {
     border: 1px solid #333;
     text-align: center;
     font-weight: bold;
-    padding: 1rem; }
+    padding: 1rem;
+    background-color: grey; }
   table tbody td {
     border: 1px solid #333;
     text-align: center;
     padding: 1rem; }
 
-#paragraph-id--226 td {
+#paragraph-id--226 tbody td {
   text-align: start;
   padding: 0rem;
   padding-left: 1rem;
   padding-right: 1rem; }
 
-#paragraph-id--226 tbody {
-  border-collapse: collapse; }
-  #paragraph-id--226 tbody tr {
-    border-collapse: collapse; }
+#paragraph-id--226 tbody tr {
+  border: red; }
 
 #paragraph-id--227 td {
   text-align: start; }
@@ -154,6 +153,19 @@ table {
     grid-column: 1 / span 10;
     grid-row: 6; }
 
+.region-sidebar-second {
+  margin: 2rem; }
+
+.region-sidebar-first {
+  margin: 2rem; }
+
+.sidebar {
+  display: flex;
+  flex-direction: row; }
+
+.block-system-breadcrumb-block {
+  margin: 4rem; }
+
 a {
   text-decoration: none; }
 

+ 9 - 9
web/themes/custom/rorschach/scss/components/_tablefields.scss

@@ -13,6 +13,7 @@ table{
         text-align: center; 
         font-weight: bold;
         padding: 1rem;
+        background-color: grey;
     }
 
     tbody td {
@@ -25,17 +26,16 @@ table{
 
 
 #paragraph-id--226{
-    td{
-        text-align: start;
-        padding: 0rem;
-        padding-left: 1rem;
-        padding-right: 1rem;
-
-    }
     tbody {
-        border-collapse:collapse;   
+        td{
+            text-align: start;
+            padding: 0rem;
+            padding-left: 1rem;
+            padding-right: 1rem;
+    
+        }        
         tr{
-            border-collapse:collapse;   
+            border:red;   
         }
     }
 }

+ 13 - 26
web/themes/custom/rorschach/scss/global/_layout.scss

@@ -65,32 +65,19 @@
       }  
 }
 
-// .path-frontpage{
-//     margin: 0;
-// }
-// .path-node {
-//     margin: 0;
+.region-sidebar-second{
+    margin: 2rem;
+}
 
-// main{
-//     width: 100%;
-// }
-// .main-content{
-//     margin-top: 7rem;
-// }
 
-//     .field--name-field-titre{
-//         .field__item{
-//             color: $blue-dark;
-//             font-weight: 900;
-//             font-size: 2rem;
-//         }
-//         .field__label{
-//             visibility: hidden;
-//         }
-//     } 
-// .inter-titre {
-//     color: $blue-light;
-//     // text-transform: uppercase;
-// }
-// }
+.region-sidebar-first{
+    margin: 2rem;
+}
+.sidebar{
+    display: flex;
+    flex-direction: row;
+}
 
+.block-system-breadcrumb-block{
+    margin: 4rem;
+}

+ 15 - 13
web/themes/custom/rorschach/templates/layout/page.html.twig

@@ -65,20 +65,22 @@
       {% endif %} #}
 
     </main>
-    <aside role="book navigation">
-      {% if page.sidebar_first %}
-        <aside class="layout-sidebar-first" role="complementary">
-          {{ page.sidebar_first }}
-        </aside>
-      {% endif %}
+    <aside class="layout-sidebar" role="book navigation">
+      <div class="sidebar">
+        {% if page.sidebar_first %}
+          <aside class="layout-sidebar-first" role="complementary">
+            {{ page.sidebar_first }}
+          </aside>
+        {% endif %}
 
-      {% if page.sidebar_second %}
-        <aside class="layout-sidebar-second" role="complementary">
-          {{ page.sidebar_second }}
-        </aside>
-      {% endif %}
-      <div class="book-navigation">
-        {{ page.sidebar }}
+        {% if page.sidebar_second %}
+          <aside class="layout-sidebar-second" role="complementary">
+            {{ page.sidebar_second }}
+          </aside>
+        {% endif %}
+        <div class="book-navigation">
+          {{ page.sidebar }}
+        </div>
       </div>
     </aside>
 

+ 21 - 0
web/themes/custom/rorschach/templates/partials/image-formatter.html.twig

@@ -0,0 +1,21 @@
+{#
+/**
+ * @file
+ * Default theme implementation to display a formatted image field.
+ *
+ * Available variables:
+ * - image: A collection of image data.
+ * - image_style: An optional image style.
+ * - url: An optional URL the image can be linked to.
+ *
+ * @see template_preprocess_image_formatter()
+ *
+ * @ingroup themeable
+ */
+#}
+{% if url %}
+  {{ link(image, url) }}
+{% else %}
+  {{ image }}
+  {{attributes}}
+{% endif %}