From bf85ff5c882beae9a5e6c9c00334ed72df41ebf9 Mon Sep 17 00:00:00 2001 From: Stuart Clark Date: Sat, 5 Mar 2022 15:31:33 +1100 Subject: [PATCH] [WIP] feat(#47): add layout paragraphs experiment (#48) * feat(#47): add layout paragraphs experiment * feat(#7): add Code paragraph * chore(#47): add layout paragraphs module * chore(#47): update content * fix(#47): adjust articles list on homepage * chore(#47): update path aliases * fix: update linky id * chore(#47): update content --- ...ty_form_display.paragraph.code.default.yml | 37 ++++ ....entity_view_display.node.article.full.yml | 3 +- ...ty_view_display.paragraph.code.default.yml | 29 +++ ...field.field.node.article.field_content.yml | 5 + .../field.field.paragraph.code.field_code.yml | 19 ++ ...field.field.paragraph.code.field_title.yml | 19 ++ .../field.storage.paragraph.field_code.yml | 19 ++ .../sync/paragraphs.paragraphs_type.code.yml | 23 +++ .../sync/pathauto.pattern.type_title_date.yml | 8 +- drupal/config/sync/user.role.anonymous.yml | 1 + .../config/sync/user.role.authenticated.yml | 1 + drupal/config/sync/user.role.author.yml | 3 + ....1fa80033-4308-4b5a-a604-468481c06d32.json | 22 ++- ....210ac08c-c7b6-4531-985f-03b8a680cf1c.json | 93 +++++++++ ....dc9ab18e-0004-4953-8a94-d9d9c155edac.json | 93 +++++++++ drupal/content/meta/index.json | 51 ++++- ....3b8ab24d-8ebc-46f1-a1c1-f680fb9ee52f.json | 186 ++++++++++++++++++ ....02face99-ce1e-4389-bfa1-883973e1c0d6.json | 56 ++++++ ....198b4bcb-20ac-463d-88cc-7588bcebcb0a.json | 55 ++++++ ....2ec08bd2-6bdb-44d3-8b7f-414de24e329b.json | 59 ++++++ ....40f19070-ec2a-490f-a919-a4cdc9a24e8b.json | 55 ++++++ ....56e3e7ab-557b-48e5-ad5f-81349614ea85.json | 52 +++++ ....7505defe-176f-4c26-8fad-3ca9b54ff242.json | 52 +++++ ....75f4b8da-e642-450a-8469-336cf840cbfb.json | 55 ++++++ ....881e257e-89ca-47b3-9762-7ba2afc6151a.json | 55 ++++++ ....8936cfa7-ae90-474e-84e3-b2a4db6f8d83.json | 52 +++++ ....a72bda71-92a4-4230-bcd1-524385a39579.json | 55 ++++++ ....b6775b26-4757-4c72-9ffe-5b57540363ad.json | 52 +++++ ....cdbf743c-7908-4556-9367-50361f496157.json | 52 +++++ ....dc05b18d-1738-4bbb-b7d6-ace41cafad6d.json | 52 +++++ ....dffe195b-273f-46f4-8b07-fe237f5d6805.json | 64 ++++++ ....6d095b23-03d4-4a9f-be61-ac27f711eb26.json | 27 +++ ...7a0bc0db-57fe-46d7-b30a-4cbf2430379a.json} | 4 +- .../druxt/entity/paragraph/code/Default.vue | 29 +++ .../entity/paragraph/section/Default.vue | 10 + .../druxt/layout-paragraph/Onecol.vue | 32 +++ .../druxt/layout-paragraph/Twocol.vue | 87 ++++++++ nuxt/nuxt.config.js | 5 +- nuxt/package.json | 1 + nuxt/pages/index.vue | 4 +- nuxt/yarn.lock | 5 + 41 files changed, 1562 insertions(+), 20 deletions(-) create mode 100644 drupal/config/sync/core.entity_form_display.paragraph.code.default.yml create mode 100644 drupal/config/sync/core.entity_view_display.paragraph.code.default.yml create mode 100644 drupal/config/sync/field.field.paragraph.code.field_code.yml create mode 100644 drupal/config/sync/field.field.paragraph.code.field_title.yml create mode 100644 drupal/config/sync/field.storage.paragraph.field_code.yml create mode 100644 drupal/config/sync/paragraphs.paragraphs_type.code.yml create mode 100644 drupal/content/linky.210ac08c-c7b6-4531-985f-03b8a680cf1c.json create mode 100644 drupal/content/linky.dc9ab18e-0004-4953-8a94-d9d9c155edac.json create mode 100644 drupal/content/node.3b8ab24d-8ebc-46f1-a1c1-f680fb9ee52f.json create mode 100644 drupal/content/paragraph.02face99-ce1e-4389-bfa1-883973e1c0d6.json create mode 100644 drupal/content/paragraph.198b4bcb-20ac-463d-88cc-7588bcebcb0a.json create mode 100644 drupal/content/paragraph.2ec08bd2-6bdb-44d3-8b7f-414de24e329b.json create mode 100644 drupal/content/paragraph.40f19070-ec2a-490f-a919-a4cdc9a24e8b.json create mode 100644 drupal/content/paragraph.56e3e7ab-557b-48e5-ad5f-81349614ea85.json create mode 100644 drupal/content/paragraph.7505defe-176f-4c26-8fad-3ca9b54ff242.json create mode 100644 drupal/content/paragraph.75f4b8da-e642-450a-8469-336cf840cbfb.json create mode 100644 drupal/content/paragraph.881e257e-89ca-47b3-9762-7ba2afc6151a.json create mode 100644 drupal/content/paragraph.8936cfa7-ae90-474e-84e3-b2a4db6f8d83.json create mode 100644 drupal/content/paragraph.a72bda71-92a4-4230-bcd1-524385a39579.json create mode 100644 drupal/content/paragraph.b6775b26-4757-4c72-9ffe-5b57540363ad.json create mode 100644 drupal/content/paragraph.cdbf743c-7908-4556-9367-50361f496157.json create mode 100644 drupal/content/paragraph.dc05b18d-1738-4bbb-b7d6-ace41cafad6d.json create mode 100644 drupal/content/paragraph.dffe195b-273f-46f4-8b07-fe237f5d6805.json create mode 100644 drupal/content/path_alias.6d095b23-03d4-4a9f-be61-ac27f711eb26.json rename drupal/content/{path_alias.806fb505-592e-4297-ab4c-8a1bfc620a30.json => path_alias.7a0bc0db-57fe-46d7-b30a-4cbf2430379a.json} (74%) create mode 100644 nuxt/components/druxt/entity/paragraph/code/Default.vue create mode 100644 nuxt/components/druxt/entity/paragraph/section/Default.vue create mode 100644 nuxt/components/druxt/layout-paragraph/Onecol.vue create mode 100644 nuxt/components/druxt/layout-paragraph/Twocol.vue diff --git a/drupal/config/sync/core.entity_form_display.paragraph.code.default.yml b/drupal/config/sync/core.entity_form_display.paragraph.code.default.yml new file mode 100644 index 0000000..ef28e53 --- /dev/null +++ b/drupal/config/sync/core.entity_form_display.paragraph.code.default.yml @@ -0,0 +1,37 @@ +uuid: a1ec81f8-796e-47db-9928-8ebc78ce7a6d +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.code.field_code + - field.field.paragraph.code.field_title + - paragraphs.paragraphs_type.code +id: paragraph.code.default +targetEntityType: paragraph +bundle: code +mode: default +content: + field_code: + type: string_textarea + weight: 1 + region: content + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + field_title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + layout_paragraphs_fields: + weight: -200 + region: content + settings: { } + third_party_settings: { } +hidden: + created: true + status: true diff --git a/drupal/config/sync/core.entity_view_display.node.article.full.yml b/drupal/config/sync/core.entity_view_display.node.article.full.yml index 98f7119..4ad2343 100644 --- a/drupal/config/sync/core.entity_view_display.node.article.full.yml +++ b/drupal/config/sync/core.entity_view_display.node.article.full.yml @@ -17,6 +17,7 @@ dependencies: - node.type.article module: - entity_reference_revisions + - layout_paragraphs - title_field_for_manage_display - user id: node.article.full @@ -33,7 +34,7 @@ content: weight: 4 region: content field_content: - type: entity_reference_revisions_entity_view + type: layout_paragraphs label: hidden settings: view_mode: default diff --git a/drupal/config/sync/core.entity_view_display.paragraph.code.default.yml b/drupal/config/sync/core.entity_view_display.paragraph.code.default.yml new file mode 100644 index 0000000..bdecef9 --- /dev/null +++ b/drupal/config/sync/core.entity_view_display.paragraph.code.default.yml @@ -0,0 +1,29 @@ +uuid: c68fa08a-6112-4fbd-863d-53ccf1a2b412 +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.code.field_code + - field.field.paragraph.code.field_title + - paragraphs.paragraphs_type.code +id: paragraph.code.default +targetEntityType: paragraph +bundle: code +mode: default +content: + field_code: + type: basic_string + label: hidden + settings: { } + third_party_settings: { } + weight: 1 + region: content + field_title: + type: string + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + weight: 0 + region: content +hidden: { } diff --git a/drupal/config/sync/field.field.node.article.field_content.yml b/drupal/config/sync/field.field.node.article.field_content.yml index 0c0b5bf..5709742 100644 --- a/drupal/config/sync/field.field.node.article.field_content.yml +++ b/drupal/config/sync/field.field.node.article.field_content.yml @@ -7,6 +7,7 @@ dependencies: - node.type.article - paragraphs.paragraphs_type.card - paragraphs.paragraphs_type.card_group + - paragraphs.paragraphs_type.code - paragraphs.paragraphs_type.jumbotron - paragraphs.paragraphs_type.link - paragraphs.paragraphs_type.media @@ -36,6 +37,7 @@ settings: link: link media: media section: section + code: code repository: repository negate: 0 target_bundles_drag_drop: @@ -45,6 +47,9 @@ settings: card_group: weight: -19 enabled: true + code: + weight: 15 + enabled: true entity_reference: weight: -18 enabled: false diff --git a/drupal/config/sync/field.field.paragraph.code.field_code.yml b/drupal/config/sync/field.field.paragraph.code.field_code.yml new file mode 100644 index 0000000..450a275 --- /dev/null +++ b/drupal/config/sync/field.field.paragraph.code.field_code.yml @@ -0,0 +1,19 @@ +uuid: 15f252c4-198a-4c82-af93-7c5fbc56f471 +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_code + - paragraphs.paragraphs_type.code +id: paragraph.code.field_code +field_name: field_code +entity_type: paragraph +bundle: code +label: Code +description: '' +required: true +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string_long diff --git a/drupal/config/sync/field.field.paragraph.code.field_title.yml b/drupal/config/sync/field.field.paragraph.code.field_title.yml new file mode 100644 index 0000000..1cdb406 --- /dev/null +++ b/drupal/config/sync/field.field.paragraph.code.field_title.yml @@ -0,0 +1,19 @@ +uuid: e8b07de4-46e1-4419-8752-c595172110b3 +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_title + - paragraphs.paragraphs_type.code +id: paragraph.code.field_title +field_name: field_title +entity_type: paragraph +bundle: code +label: 'File name' +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/drupal/config/sync/field.storage.paragraph.field_code.yml b/drupal/config/sync/field.storage.paragraph.field_code.yml new file mode 100644 index 0000000..91df64c --- /dev/null +++ b/drupal/config/sync/field.storage.paragraph.field_code.yml @@ -0,0 +1,19 @@ +uuid: 117fcc66-180a-4801-8c1b-3fe9ad77f704 +langcode: en +status: true +dependencies: + module: + - paragraphs +id: paragraph.field_code +field_name: field_code +entity_type: paragraph +type: string_long +settings: + case_sensitive: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/drupal/config/sync/paragraphs.paragraphs_type.code.yml b/drupal/config/sync/paragraphs.paragraphs_type.code.yml new file mode 100644 index 0000000..1db3070 --- /dev/null +++ b/drupal/config/sync/paragraphs.paragraphs_type.code.yml @@ -0,0 +1,23 @@ +uuid: e3c6ec6e-d8b4-42fa-a788-41ab19196fc9 +langcode: en +status: true +dependencies: + module: + - entity_display_mode + - paragraphs_ee + - paragraphs_library +third_party_settings: + paragraphs_library: + allow_library_conversion: true + paragraphs_ee: + paragraphs_categories: + basics: basics + entity_display_mode: + display_configuration: + field_name: '' +id: code +label: Code +icon_uuid: null +icon_default: null +description: '' +behavior_plugins: { } diff --git a/drupal/config/sync/pathauto.pattern.type_title_date.yml b/drupal/config/sync/pathauto.pattern.type_title_date.yml index 7bbbf86..dc5d535 100644 --- a/drupal/config/sync/pathauto.pattern.type_title_date.yml +++ b/drupal/config/sync/pathauto.pattern.type_title_date.yml @@ -5,14 +5,14 @@ dependencies: module: - node id: type_title_date -label: content-type/title-date +label: content-types/title-date type: 'canonical_entities:node' -pattern: '[node:content-type]/[node:title]-[node:created:custom:Ymd]' +pattern: '[node:content-type]s/[node:title]-[node:created:custom:Ymd]' selection_criteria: - aa57e4fa-b821-4360-a10d-05bdee8316b6: + 450295b6-675c-4150-b470-7089aa19733f: id: node_type negate: false - uuid: aa57e4fa-b821-4360-a10d-05bdee8316b6 + uuid: 450295b6-675c-4150-b470-7089aa19733f context_mapping: node: node bundles: diff --git a/drupal/config/sync/user.role.anonymous.yml b/drupal/config/sync/user.role.anonymous.yml index 35ababc..8609aea 100644 --- a/drupal/config/sync/user.role.anonymous.yml +++ b/drupal/config/sync/user.role.anonymous.yml @@ -25,6 +25,7 @@ permissions: - 'view media' - 'view paragraph content card' - 'view paragraph content card_group' + - 'view paragraph content code' - 'view paragraph content entity_reference' - 'view paragraph content jumbotron' - 'view paragraph content link' diff --git a/drupal/config/sync/user.role.authenticated.yml b/drupal/config/sync/user.role.authenticated.yml index ad69cb7..0aef2f5 100644 --- a/drupal/config/sync/user.role.authenticated.yml +++ b/drupal/config/sync/user.role.authenticated.yml @@ -21,6 +21,7 @@ permissions: - 'view media' - 'view paragraph content card' - 'view paragraph content card_group' + - 'view paragraph content code' - 'view paragraph content entity_reference' - 'view paragraph content jumbotron' - 'view paragraph content link' diff --git a/drupal/config/sync/user.role.author.yml b/drupal/config/sync/user.role.author.yml index 52735d4..bd893be 100644 --- a/drupal/config/sync/user.role.author.yml +++ b/drupal/config/sync/user.role.author.yml @@ -52,6 +52,7 @@ permissions: - 'create page content' - 'create paragraph content card' - 'create paragraph content card_group' + - 'create paragraph content code' - 'create paragraph content entity_reference' - 'create paragraph content jumbotron' - 'create paragraph content link' @@ -64,6 +65,7 @@ permissions: - 'create video media' - 'delete paragraph content card' - 'delete paragraph content card_group' + - 'delete paragraph content code' - 'delete paragraph content entity_reference' - 'delete paragraph content jumbotron' - 'delete paragraph content link' @@ -94,6 +96,7 @@ permissions: - 'update content translations' - 'update paragraph content card' - 'update paragraph content card_group' + - 'update paragraph content code' - 'update paragraph content entity_reference' - 'update paragraph content jumbotron' - 'update paragraph content link' diff --git a/drupal/content/linky.1fa80033-4308-4b5a-a604-468481c06d32.json b/drupal/content/linky.1fa80033-4308-4b5a-a604-468481c06d32.json index 316cca0..2a78146 100644 --- a/drupal/content/linky.1fa80033-4308-4b5a-a604-468481c06d32.json +++ b/drupal/content/linky.1fa80033-4308-4b5a-a604-468481c06d32.json @@ -47,19 +47,31 @@ ], "changed": [ { - "value": "2021-11-19T04:12:53+00:00", + "value": "2022-03-04T06:35:37+00:00", "format": "Y-m-d\\TH:i:sP" } ], "checked": [ { - "value": "1970-01-01T00:00:00+00:00", + "value": "2022-03-04T06:35:37+00:00", "format": "Y-m-d\\TH:i:sP" } ], - "internal": [], - "http_method": [], - "http_status": [], + "internal": [ + { + "value": false + } + ], + "http_method": [ + { + "value": "HEAD" + } + ], + "http_status": [ + { + "value": 200 + } + ], "message": [], "destination": [], "excluded": [ diff --git a/drupal/content/linky.210ac08c-c7b6-4531-985f-03b8a680cf1c.json b/drupal/content/linky.210ac08c-c7b6-4531-985f-03b8a680cf1c.json new file mode 100644 index 0000000..7436c25 --- /dev/null +++ b/drupal/content/linky.210ac08c-c7b6-4531-985f-03b8a680cf1c.json @@ -0,0 +1,93 @@ +{ + "uuid": [ + { + "value": "210ac08c-c7b6-4531-985f-03b8a680cf1c" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "user_id": [ + { + "target_type": "user", + "target_uuid": "fb85df17-bbd5-4b75-890e-e010d6410ac0" + } + ], + "revision_created": [ + { + "value": "2022-03-01T01:47:11+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "revision_uid": [ + { + "target_type": "user", + "target_uuid": "fb85df17-bbd5-4b75-890e-e010d6410ac0" + } + ], + "revision_log": [ + { + "value": "Created new Managed Link" + } + ], + "link": [ + { + "uri": "https:\/\/www.drupal.org\/project\/layout_paragraphs", + "title": "Layouts Paragraphs module", + "options": [] + } + ], + "created": [ + { + "value": "2022-03-01T01:47:11+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "changed": [ + { + "value": "2022-03-04T06:35:37+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "checked": [ + { + "value": "2022-03-04T06:35:37+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "internal": [ + { + "value": false + } + ], + "http_method": [ + { + "value": "HEAD" + } + ], + "http_status": [ + { + "value": 200 + } + ], + "message": [], + "destination": [], + "excluded": [ + { + "value": false + } + ], + "reason": [], + "error": [ + { + "value": false + } + ], + "error_count": [ + { + "value": 0 + } + ] +} \ No newline at end of file diff --git a/drupal/content/linky.dc9ab18e-0004-4953-8a94-d9d9c155edac.json b/drupal/content/linky.dc9ab18e-0004-4953-8a94-d9d9c155edac.json new file mode 100644 index 0000000..66b9aca --- /dev/null +++ b/drupal/content/linky.dc9ab18e-0004-4953-8a94-d9d9c155edac.json @@ -0,0 +1,93 @@ +{ + "uuid": [ + { + "value": "dc9ab18e-0004-4953-8a94-d9d9c155edac" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "user_id": [ + { + "target_type": "user", + "target_uuid": "fb85df17-bbd5-4b75-890e-e010d6410ac0" + } + ], + "revision_created": [ + { + "value": "2022-03-04T06:21:12+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "revision_uid": [ + { + "target_type": "user", + "target_uuid": "fb85df17-bbd5-4b75-890e-e010d6410ac0" + } + ], + "revision_log": [ + { + "value": "Created new Managed Link" + } + ], + "link": [ + { + "uri": "https:\/\/github.com\/Decipher\/druxt-layout-paragraphs", + "title": "DruxtLayoutParagraphs", + "options": [] + } + ], + "created": [ + { + "value": "2022-03-04T06:21:12+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "changed": [ + { + "value": "2022-03-04T06:35:37+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "checked": [ + { + "value": "2022-03-04T06:35:37+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "internal": [ + { + "value": false + } + ], + "http_method": [ + { + "value": "HEAD" + } + ], + "http_status": [ + { + "value": 200 + } + ], + "message": [], + "destination": [], + "excluded": [ + { + "value": false + } + ], + "reason": [], + "error": [ + { + "value": false + } + ], + "error_count": [ + { + "value": 0 + } + ] +} \ No newline at end of file diff --git a/drupal/content/meta/index.json b/drupal/content/meta/index.json index 36486f6..fde5907 100644 --- a/drupal/content/meta/index.json +++ b/drupal/content/meta/index.json @@ -15,9 +15,6 @@ "paragraph.2c96d295-5784-4bdd-a034-d419e183e912" ], "paragraph.eecd0902-9072-4126-b005-c884861c7c90": [], - "path_alias.806fb505-592e-4297-ab4c-8a1bfc620a30": [ - "node.5e5812bb-7afe-4f4d-a2ac-c0c35115a96c" - ], "block_content.01b799f4-47b7-45d7-91b3-175e8b67625d": [ "user.fb85df17-bbd5-4b75-890e-e010d6410ac0" ], @@ -37,5 +34,49 @@ "paragraph.21e2a554-4949-415a-8720-710b558f37a5": [], "redirect.1ac749e8-6a97-4139-a588-9edc29d3b494": [ "user.fb85df17-bbd5-4b75-890e-e010d6410ac0" - ] -} + ], + "paragraph.198b4bcb-20ac-463d-88cc-7588bcebcb0a": [], + "linky.210ac08c-c7b6-4531-985f-03b8a680cf1c": [ + "user.fb85df17-bbd5-4b75-890e-e010d6410ac0" + ], + "paragraph.56e3e7ab-557b-48e5-ad5f-81349614ea85": [], + "paragraph.881e257e-89ca-47b3-9762-7ba2afc6151a": [], + "paragraph.dc05b18d-1738-4bbb-b7d6-ace41cafad6d": [], + "paragraph.7505defe-176f-4c26-8fad-3ca9b54ff242": [], + "node.3b8ab24d-8ebc-46f1-a1c1-f680fb9ee52f": [ + "user.fb85df17-bbd5-4b75-890e-e010d6410ac0", + "taxonomy_term.789f893f-87c6-4f2d-85de-484a7ae850f7", + "taxonomy_term.95c7fc60-bf15-4867-a0cf-bce941748e6e", + "paragraph.198b4bcb-20ac-463d-88cc-7588bcebcb0a", + "paragraph.56e3e7ab-557b-48e5-ad5f-81349614ea85", + "paragraph.881e257e-89ca-47b3-9762-7ba2afc6151a", + "paragraph.dc05b18d-1738-4bbb-b7d6-ace41cafad6d", + "paragraph.7505defe-176f-4c26-8fad-3ca9b54ff242", + "paragraph.75f4b8da-e642-450a-8469-336cf840cbfb", + "paragraph.b6775b26-4757-4c72-9ffe-5b57540363ad", + "paragraph.40f19070-ec2a-490f-a919-a4cdc9a24e8b", + "paragraph.a72bda71-92a4-4230-bcd1-524385a39579", + "paragraph.8936cfa7-ae90-474e-84e3-b2a4db6f8d83", + "paragraph.dffe195b-273f-46f4-8b07-fe237f5d6805", + "paragraph.2ec08bd2-6bdb-44d3-8b7f-414de24e329b", + "paragraph.02face99-ce1e-4389-bfa1-883973e1c0d6" + ], + "paragraph.75f4b8da-e642-450a-8469-336cf840cbfb": [], + "paragraph.b6775b26-4757-4c72-9ffe-5b57540363ad": [], + "paragraph.cdbf743c-7908-4556-9367-50361f496157": [], + "paragraph.40f19070-ec2a-490f-a919-a4cdc9a24e8b": [], + "paragraph.a72bda71-92a4-4230-bcd1-524385a39579": [], + "paragraph.8936cfa7-ae90-474e-84e3-b2a4db6f8d83": [], + "linky.dc9ab18e-0004-4953-8a94-d9d9c155edac": [ + "user.fb85df17-bbd5-4b75-890e-e010d6410ac0" + ], + "paragraph.dffe195b-273f-46f4-8b07-fe237f5d6805": [], + "paragraph.02face99-ce1e-4389-bfa1-883973e1c0d6": [], + "path_alias.7a0bc0db-57fe-46d7-b30a-4cbf2430379a": [ + "node.5e5812bb-7afe-4f4d-a2ac-c0c35115a96c" + ], + "path_alias.6d095b23-03d4-4a9f-be61-ac27f711eb26": [ + "node.3b8ab24d-8ebc-46f1-a1c1-f680fb9ee52f" + ], + "paragraph.2ec08bd2-6bdb-44d3-8b7f-414de24e329b": [] +} \ No newline at end of file diff --git a/drupal/content/node.3b8ab24d-8ebc-46f1-a1c1-f680fb9ee52f.json b/drupal/content/node.3b8ab24d-8ebc-46f1-a1c1-f680fb9ee52f.json new file mode 100644 index 0000000..38a3613 --- /dev/null +++ b/drupal/content/node.3b8ab24d-8ebc-46f1-a1c1-f680fb9ee52f.json @@ -0,0 +1,186 @@ +{ + "uuid": [ + { + "value": "3b8ab24d-8ebc-46f1-a1c1-f680fb9ee52f" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "type": [ + { + "target_id": "article", + "target_type": "node_type", + "target_uuid": "099b71bc-a724-4c2b-aa00-039950b719ec" + } + ], + "revision_timestamp": [ + { + "value": "2022-03-05T04:22:25+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "revision_uid": [ + { + "target_type": "user", + "target_uuid": "fb85df17-bbd5-4b75-890e-e010d6410ac0" + } + ], + "revision_log": [ + { + "value": "Updated the Content and Meta tags fields" + } + ], + "status": [ + { + "value": true + } + ], + "uid": [ + { + "target_type": "user", + "target_uuid": "fb85df17-bbd5-4b75-890e-e010d6410ac0" + } + ], + "title": [ + { + "value": "Layout Paragraphs module" + } + ], + "created": [ + { + "value": "2022-03-01T01:29:30+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "changed": [ + { + "value": "2022-03-05T04:22:25+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "promote": [ + { + "value": true + } + ], + "sticky": [ + { + "value": false + } + ], + "default_langcode": [ + { + "value": true + } + ], + "revision_translation_affected": [ + { + "value": true + } + ], + "path": [ + { + "alias": "\/articles\/layout-paragraphs-module-20220301", + "langcode": "en", + "pathauto": 1 + } + ], + "content_translation_source": [ + { + "value": "und" + } + ], + "content_translation_outdated": [ + { + "value": false + } + ], + "field_display_title": [ + { + "value": "Layout Paragraphs module" + } + ], + "field_article_category": [ + { + "target_type": "taxonomy_term", + "target_uuid": "789f893f-87c6-4f2d-85de-484a7ae850f7" + } + ], + "field_article_type": [ + { + "target_type": "taxonomy_term", + "target_uuid": "95c7fc60-bf15-4867-a0cf-bce941748e6e" + } + ], + "field_content": [ + { + "target_type": "paragraph", + "target_uuid": "198b4bcb-20ac-463d-88cc-7588bcebcb0a" + }, + { + "target_type": "paragraph", + "target_uuid": "56e3e7ab-557b-48e5-ad5f-81349614ea85" + }, + { + "target_type": "paragraph", + "target_uuid": "881e257e-89ca-47b3-9762-7ba2afc6151a" + }, + { + "target_type": "paragraph", + "target_uuid": "dc05b18d-1738-4bbb-b7d6-ace41cafad6d" + }, + { + "target_type": "paragraph", + "target_uuid": "7505defe-176f-4c26-8fad-3ca9b54ff242" + }, + { + "target_type": "paragraph", + "target_uuid": "75f4b8da-e642-450a-8469-336cf840cbfb" + }, + { + "target_type": "paragraph", + "target_uuid": "b6775b26-4757-4c72-9ffe-5b57540363ad" + }, + { + "target_type": "paragraph", + "target_uuid": "40f19070-ec2a-490f-a919-a4cdc9a24e8b" + }, + { + "target_type": "paragraph", + "target_uuid": "a72bda71-92a4-4230-bcd1-524385a39579" + }, + { + "target_type": "paragraph", + "target_uuid": "8936cfa7-ae90-474e-84e3-b2a4db6f8d83" + }, + { + "target_type": "paragraph", + "target_uuid": "dffe195b-273f-46f4-8b07-fe237f5d6805" + }, + { + "target_type": "paragraph", + "target_uuid": "2ec08bd2-6bdb-44d3-8b7f-414de24e329b" + }, + { + "target_type": "paragraph", + "target_uuid": "02face99-ce1e-4389-bfa1-883973e1c0d6" + } + ], + "field_content_supplementary": [], + "field_description": [ + { + "value": "There are many complaints about the Paragraphs module, but it's a module I wouldn't build a Drupal site without, Decoupled or otherwise.\r\n\r\nComplexity with nested paragraphs is a common issue though, but usually a necessary evil.\r\n\r\nHowever we recently implemented the Layout Paragraphs module into the Foundry Drupal backend, and I've been really happy with what I've seen.\r\n\r\nSo today I'm experimenting with Druxt and the Layout Paragraphs module" + } + ], + "field_image": [], + "field_meta_tags": [], + "field_published": [ + { + "value": "2022-03-01T12:29:30+11:00" + } + ], + "field_video": [] +} \ No newline at end of file diff --git a/drupal/content/paragraph.02face99-ce1e-4389-bfa1-883973e1c0d6.json b/drupal/content/paragraph.02face99-ce1e-4389-bfa1-883973e1c0d6.json new file mode 100644 index 0000000..4a55fa1 --- /dev/null +++ b/drupal/content/paragraph.02face99-ce1e-4389-bfa1-883973e1c0d6.json @@ -0,0 +1,56 @@ +{ + "uuid": [ + { + "value": "02face99-ce1e-4389-bfa1-883973e1c0d6" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "type": [ + { + "target_id": "text_formatted", + "target_type": "paragraphs_type", + "target_uuid": "71da2b1b-bfa1-4dae-8638-7f791512512d" + } + ], + "status": [ + { + "value": true + } + ], + "created": [ + { + "value": "2022-03-04T06:23:39+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "behavior_settings": [ + { + "value": { + "layout_paragraphs": { + "parent_uuid": "2ec08bd2-6bdb-44d3-8b7f-414de24e329b", + "region": "content" + } + } + } + ], + "default_langcode": [ + { + "value": true + } + ], + "revision_translation_affected": [ + { + "value": true + } + ], + "field_text_formatted": [ + { + "value": "

While the module in its current state it's already able to do everything I need for the moment, there's still more improvements to be made, and more features to be added.<\/p>\r\n\r\n

Default slots, a Mixin and Storybook integration all need to be added to simplify the theming process.<\/p>\r\n\r\n

And of course, more experiments to be done; Drag'n'Drop editing from the frontend is high on the list.<\/p>\r\n", + "format": "formatted" + } + ] +} \ No newline at end of file diff --git a/drupal/content/paragraph.198b4bcb-20ac-463d-88cc-7588bcebcb0a.json b/drupal/content/paragraph.198b4bcb-20ac-463d-88cc-7588bcebcb0a.json new file mode 100644 index 0000000..785a0a1 --- /dev/null +++ b/drupal/content/paragraph.198b4bcb-20ac-463d-88cc-7588bcebcb0a.json @@ -0,0 +1,55 @@ +{ + "uuid": [ + { + "value": "198b4bcb-20ac-463d-88cc-7588bcebcb0a" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "type": [ + { + "target_id": "section", + "target_type": "paragraphs_type", + "target_uuid": "36879357-96f7-4b56-8bf3-f91b01e4638d" + } + ], + "status": [ + { + "value": true + } + ], + "created": [ + { + "value": "2022-03-01T01:36:43+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "behavior_settings": [ + { + "value": { + "layout_paragraphs": { + "layout": "layout_onecol", + "config": { + "label": "" + }, + "parent_uuid": null, + "region": null + } + } + } + ], + "default_langcode": [ + { + "value": true + } + ], + "revision_translation_affected": [], + "field_title": [ + { + "value": "What does the Layout Paragraphs module do?" + } + ] +} \ No newline at end of file diff --git a/drupal/content/paragraph.2ec08bd2-6bdb-44d3-8b7f-414de24e329b.json b/drupal/content/paragraph.2ec08bd2-6bdb-44d3-8b7f-414de24e329b.json new file mode 100644 index 0000000..6b12176 --- /dev/null +++ b/drupal/content/paragraph.2ec08bd2-6bdb-44d3-8b7f-414de24e329b.json @@ -0,0 +1,59 @@ +{ + "uuid": [ + { + "value": "2ec08bd2-6bdb-44d3-8b7f-414de24e329b" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "type": [ + { + "target_id": "section", + "target_type": "paragraphs_type", + "target_uuid": "36879357-96f7-4b56-8bf3-f91b01e4638d" + } + ], + "status": [ + { + "value": true + } + ], + "created": [ + { + "value": "2022-03-05T04:17:45+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "behavior_settings": [ + { + "value": { + "layout_paragraphs": { + "layout": "layout_onecol", + "config": { + "label": "" + }, + "parent_uuid": null, + "region": null + } + } + } + ], + "default_langcode": [ + { + "value": true + } + ], + "revision_translation_affected": [ + { + "value": true + } + ], + "field_title": [ + { + "value": "What next?" + } + ] +} \ No newline at end of file diff --git a/drupal/content/paragraph.40f19070-ec2a-490f-a919-a4cdc9a24e8b.json b/drupal/content/paragraph.40f19070-ec2a-490f-a919-a4cdc9a24e8b.json new file mode 100644 index 0000000..ac1e58a --- /dev/null +++ b/drupal/content/paragraph.40f19070-ec2a-490f-a919-a4cdc9a24e8b.json @@ -0,0 +1,55 @@ +{ + "uuid": [ + { + "value": "40f19070-ec2a-490f-a919-a4cdc9a24e8b" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "type": [ + { + "target_id": "section", + "target_type": "paragraphs_type", + "target_uuid": "36879357-96f7-4b56-8bf3-f91b01e4638d" + } + ], + "status": [ + { + "value": true + } + ], + "created": [ + { + "value": "2022-03-01T04:27:01+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "behavior_settings": [ + { + "value": { + "layout_paragraphs": { + "layout": "layout_onecol", + "config": { + "label": "" + }, + "parent_uuid": null, + "region": null + } + } + } + ], + "default_langcode": [ + { + "value": true + } + ], + "revision_translation_affected": [], + "field_title": [ + { + "value": "Time to experiment" + } + ] +} \ No newline at end of file diff --git a/drupal/content/paragraph.56e3e7ab-557b-48e5-ad5f-81349614ea85.json b/drupal/content/paragraph.56e3e7ab-557b-48e5-ad5f-81349614ea85.json new file mode 100644 index 0000000..9db9540 --- /dev/null +++ b/drupal/content/paragraph.56e3e7ab-557b-48e5-ad5f-81349614ea85.json @@ -0,0 +1,52 @@ +{ + "uuid": [ + { + "value": "56e3e7ab-557b-48e5-ad5f-81349614ea85" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "type": [ + { + "target_id": "text_formatted", + "target_type": "paragraphs_type", + "target_uuid": "71da2b1b-bfa1-4dae-8638-7f791512512d" + } + ], + "status": [ + { + "value": true + } + ], + "created": [ + { + "value": "2022-03-01T01:39:56+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "behavior_settings": [ + { + "value": { + "layout_paragraphs": { + "parent_uuid": "198b4bcb-20ac-463d-88cc-7588bcebcb0a", + "region": "content" + } + } + } + ], + "default_langcode": [ + { + "value": true + } + ], + "revision_translation_affected": [], + "field_text_formatted": [ + { + "value": "

When you have the Layouts Paragraphs module<\/a> installed and configured correctly, which is not something that this post is going to cover, Layout Paragraphs allows you to create Sections<\/strong> for your Paragraphs.<\/p>\r\n\r\n

Each section has it's own settings and layouts, and layouts can of course have regions; one column, two column, etc.<\/p>\r\n", + "format": "formatted" + } + ] +} \ No newline at end of file diff --git a/drupal/content/paragraph.7505defe-176f-4c26-8fad-3ca9b54ff242.json b/drupal/content/paragraph.7505defe-176f-4c26-8fad-3ca9b54ff242.json new file mode 100644 index 0000000..3a0c947 --- /dev/null +++ b/drupal/content/paragraph.7505defe-176f-4c26-8fad-3ca9b54ff242.json @@ -0,0 +1,52 @@ +{ + "uuid": [ + { + "value": "7505defe-176f-4c26-8fad-3ca9b54ff242" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "type": [ + { + "target_id": "text_formatted", + "target_type": "paragraphs_type", + "target_uuid": "71da2b1b-bfa1-4dae-8638-7f791512512d" + } + ], + "status": [ + { + "value": true + } + ], + "created": [ + { + "value": "2022-03-01T01:44:56+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "behavior_settings": [ + { + "value": { + "layout_paragraphs": { + "parent_uuid": "881e257e-89ca-47b3-9762-7ba2afc6151a", + "region": "second" + } + } + } + ], + "default_langcode": [ + { + "value": true + } + ], + "revision_translation_affected": [], + "field_text_formatted": [ + { + "value": "

This allows the content creator the ability to make layout decisions within the content, while still allowing the frontend developer full control over the output.<\/p>\r\n", + "format": "formatted" + } + ] +} \ No newline at end of file diff --git a/drupal/content/paragraph.75f4b8da-e642-450a-8469-336cf840cbfb.json b/drupal/content/paragraph.75f4b8da-e642-450a-8469-336cf840cbfb.json new file mode 100644 index 0000000..0701a30 --- /dev/null +++ b/drupal/content/paragraph.75f4b8da-e642-450a-8469-336cf840cbfb.json @@ -0,0 +1,55 @@ +{ + "uuid": [ + { + "value": "75f4b8da-e642-450a-8469-336cf840cbfb" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "type": [ + { + "target_id": "section", + "target_type": "paragraphs_type", + "target_uuid": "36879357-96f7-4b56-8bf3-f91b01e4638d" + } + ], + "status": [ + { + "value": true + } + ], + "created": [ + { + "value": "2022-03-01T02:01:43+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "behavior_settings": [ + { + "value": { + "layout_paragraphs": { + "layout": "layout_onecol", + "config": { + "label": "" + }, + "parent_uuid": null, + "region": null + } + } + } + ], + "default_langcode": [ + { + "value": true + } + ], + "revision_translation_affected": [], + "field_title": [ + { + "value": "But does it work with Druxt?" + } + ] +} \ No newline at end of file diff --git a/drupal/content/paragraph.881e257e-89ca-47b3-9762-7ba2afc6151a.json b/drupal/content/paragraph.881e257e-89ca-47b3-9762-7ba2afc6151a.json new file mode 100644 index 0000000..70da77c --- /dev/null +++ b/drupal/content/paragraph.881e257e-89ca-47b3-9762-7ba2afc6151a.json @@ -0,0 +1,55 @@ +{ + "uuid": [ + { + "value": "881e257e-89ca-47b3-9762-7ba2afc6151a" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "type": [ + { + "target_id": "section", + "target_type": "paragraphs_type", + "target_uuid": "36879357-96f7-4b56-8bf3-f91b01e4638d" + } + ], + "status": [ + { + "value": true + } + ], + "created": [ + { + "value": "2022-03-01T01:41:02+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "behavior_settings": [ + { + "value": { + "layout_paragraphs": { + "layout": "layout_twocol", + "config": { + "label": "" + }, + "parent_uuid": null, + "region": null + } + } + } + ], + "default_langcode": [ + { + "value": true + } + ], + "revision_translation_affected": [], + "field_title": [ + { + "value": "Experimenting with two coloums" + } + ] +} \ No newline at end of file diff --git a/drupal/content/paragraph.8936cfa7-ae90-474e-84e3-b2a4db6f8d83.json b/drupal/content/paragraph.8936cfa7-ae90-474e-84e3-b2a4db6f8d83.json new file mode 100644 index 0000000..cb03757 --- /dev/null +++ b/drupal/content/paragraph.8936cfa7-ae90-474e-84e3-b2a4db6f8d83.json @@ -0,0 +1,52 @@ +{ + "uuid": [ + { + "value": "8936cfa7-ae90-474e-84e3-b2a4db6f8d83" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "type": [ + { + "target_id": "text_formatted", + "target_type": "paragraphs_type", + "target_uuid": "71da2b1b-bfa1-4dae-8638-7f791512512d" + } + ], + "status": [ + { + "value": true + } + ], + "created": [ + { + "value": "2022-03-01T04:26:36+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "behavior_settings": [ + { + "value": { + "layout_paragraphs": { + "parent_uuid": "a72bda71-92a4-4230-bcd1-524385a39579", + "region": "content" + } + } + } + ], + "default_langcode": [ + { + "value": true + } + ], + "revision_translation_affected": [], + "field_text_formatted": [ + { + "value": "

All the required data to replicate the Layout Paragraphs behaviour is thankfully available in the provided JSON:API data, which allows for a relatively simple custom Druxt module to provide templates that can be used by the frontend developer.<\/p>\r\n\r\n

I was happy enough with the results of the experiment, that I actually published the result as the DruxtLayoutParagraphs<\/a><\/strong> module.<\/p>\r\n", + "format": "formatted" + } + ] +} \ No newline at end of file diff --git a/drupal/content/paragraph.a72bda71-92a4-4230-bcd1-524385a39579.json b/drupal/content/paragraph.a72bda71-92a4-4230-bcd1-524385a39579.json new file mode 100644 index 0000000..ca46154 --- /dev/null +++ b/drupal/content/paragraph.a72bda71-92a4-4230-bcd1-524385a39579.json @@ -0,0 +1,55 @@ +{ + "uuid": [ + { + "value": "a72bda71-92a4-4230-bcd1-524385a39579" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "type": [ + { + "target_id": "section", + "target_type": "paragraphs_type", + "target_uuid": "36879357-96f7-4b56-8bf3-f91b01e4638d" + } + ], + "status": [ + { + "value": true + } + ], + "created": [ + { + "value": "2022-03-01T04:21:35+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "behavior_settings": [ + { + "value": { + "layout_paragraphs": { + "layout": "layout_onecol", + "config": { + "label": "" + }, + "parent_uuid": null, + "region": null + } + } + } + ], + "default_langcode": [ + { + "value": true + } + ], + "revision_translation_affected": [], + "field_title": [ + { + "value": "The results" + } + ] +} \ No newline at end of file diff --git a/drupal/content/paragraph.b6775b26-4757-4c72-9ffe-5b57540363ad.json b/drupal/content/paragraph.b6775b26-4757-4c72-9ffe-5b57540363ad.json new file mode 100644 index 0000000..0b15b5f --- /dev/null +++ b/drupal/content/paragraph.b6775b26-4757-4c72-9ffe-5b57540363ad.json @@ -0,0 +1,52 @@ +{ + "uuid": [ + { + "value": "b6775b26-4757-4c72-9ffe-5b57540363ad" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "type": [ + { + "target_id": "text_formatted", + "target_type": "paragraphs_type", + "target_uuid": "71da2b1b-bfa1-4dae-8638-7f791512512d" + } + ], + "status": [ + { + "value": true + } + ], + "created": [ + { + "value": "2022-03-01T02:10:28+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "behavior_settings": [ + { + "value": { + "layout_paragraphs": { + "parent_uuid": "75f4b8da-e642-450a-8469-336cf840cbfb", + "region": "content" + } + } + } + ], + "default_langcode": [ + { + "value": true + } + ], + "revision_translation_affected": [], + "field_text_formatted": [ + { + "value": "

That's a good question, and as I write these specific words I don't yet have the answer, I'm pretty confident it will work though, because:<\/p>\r\n\r\n

Druxt module components use a Vue based theming system that allows the frontend developer, in this case me, to create a correctly named component in the Nuxt components directory allowing full control over the rendered markup.<\/p>\r\n\r\n

This means that I can create a Field theme component that targets any Layout Paragraphs, nuxt\/components\/druxt\/field\/LayoutParagraphs.vue<\/strong>, and pass the field data through to a custom DruxtLayoutParagraph<\/strong> module.<\/p>\r\n", + "format": "formatted" + } + ] +} \ No newline at end of file diff --git a/drupal/content/paragraph.cdbf743c-7908-4556-9367-50361f496157.json b/drupal/content/paragraph.cdbf743c-7908-4556-9367-50361f496157.json new file mode 100644 index 0000000..69b8255 --- /dev/null +++ b/drupal/content/paragraph.cdbf743c-7908-4556-9367-50361f496157.json @@ -0,0 +1,52 @@ +{ + "uuid": [ + { + "value": "cdbf743c-7908-4556-9367-50361f496157" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "type": [ + { + "target_id": "text_formatted", + "target_type": "paragraphs_type", + "target_uuid": "71da2b1b-bfa1-4dae-8638-7f791512512d" + } + ], + "status": [ + { + "value": true + } + ], + "created": [ + { + "value": "2022-03-01T02:22:37+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "behavior_settings": [ + { + "value": { + "layout_paragraphs": { + "parent_uuid": "75f4b8da-e642-450a-8469-336cf840cbfb", + "region": "content" + } + } + } + ], + "default_langcode": [ + { + "value": true + } + ], + "revision_translation_affected": [], + "field_text_formatted": [ + { + "value": "

If all goes well, which it did, I can then filter this field so that it only renders the Section paragraphs, and then I can create a Section paragraph template (DruxtEntityParagraphSection.vue<\/strong>) to render the actual content paragraphs.<\/p>\r\n", + "format": "formatted" + } + ] +} \ No newline at end of file diff --git a/drupal/content/paragraph.dc05b18d-1738-4bbb-b7d6-ace41cafad6d.json b/drupal/content/paragraph.dc05b18d-1738-4bbb-b7d6-ace41cafad6d.json new file mode 100644 index 0000000..86836ef --- /dev/null +++ b/drupal/content/paragraph.dc05b18d-1738-4bbb-b7d6-ace41cafad6d.json @@ -0,0 +1,52 @@ +{ + "uuid": [ + { + "value": "dc05b18d-1738-4bbb-b7d6-ace41cafad6d" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "type": [ + { + "target_id": "text_formatted", + "target_type": "paragraphs_type", + "target_uuid": "71da2b1b-bfa1-4dae-8638-7f791512512d" + } + ], + "status": [ + { + "value": true + } + ], + "created": [ + { + "value": "2022-03-01T01:43:37+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "behavior_settings": [ + { + "value": { + "layout_paragraphs": { + "parent_uuid": "881e257e-89ca-47b3-9762-7ba2afc6151a", + "region": "first" + } + } + } + ], + "default_langcode": [ + { + "value": true + } + ], + "revision_translation_affected": [], + "field_text_formatted": [ + { + "value": "

The module provides a very easy to use javascript interface allowing me to add my paragraphs into the regions, preview them and rearrange the content with buttons or drag and drop.<\/p>\r\n", + "format": "formatted" + } + ] +} \ No newline at end of file diff --git a/drupal/content/paragraph.dffe195b-273f-46f4-8b07-fe237f5d6805.json b/drupal/content/paragraph.dffe195b-273f-46f4-8b07-fe237f5d6805.json new file mode 100644 index 0000000..41d89bb --- /dev/null +++ b/drupal/content/paragraph.dffe195b-273f-46f4-8b07-fe237f5d6805.json @@ -0,0 +1,64 @@ +{ + "uuid": [ + { + "value": "dffe195b-273f-46f4-8b07-fe237f5d6805" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "type": [ + { + "target_id": "repository", + "target_type": "paragraphs_type", + "target_uuid": "438a9c1b-2af9-4468-8d21-2c5388f7e401" + } + ], + "status": [ + { + "value": true + } + ], + "created": [ + { + "value": "2022-03-04T06:21:07+00:00", + "format": "Y-m-d\\TH:i:sP" + } + ], + "behavior_settings": [ + { + "value": { + "layout_paragraphs": { + "parent_uuid": "a72bda71-92a4-4230-bcd1-524385a39579", + "region": "content" + } + } + } + ], + "default_langcode": [ + { + "value": true + } + ], + "revision_translation_affected": [], + "field_description": [ + { + "value": "

The module adds a Field template and the DruxtLayoutParagraph component to render any fields using the Layout Paragraph field formatter.<\/p>\r\n\r\n

As with other modules, component options are provided theming the module component based on the layout used in Drupal. E.g, ~\/components\/druxt\/layout-paragraph\/Onecol.vue<\/p>\r\n\r\n

 <\/p>\r\n", + "format": "formatted" + } + ], + "field_gitpod": [ + { + "value": false + } + ], + "field_url": [ + { + "uri": "https:\/\/github.com\/Decipher\/druxt-layout-paragraphs", + "title": "", + "options": [] + } + ] +} \ No newline at end of file diff --git a/drupal/content/path_alias.6d095b23-03d4-4a9f-be61-ac27f711eb26.json b/drupal/content/path_alias.6d095b23-03d4-4a9f-be61-ac27f711eb26.json new file mode 100644 index 0000000..88f09aa --- /dev/null +++ b/drupal/content/path_alias.6d095b23-03d4-4a9f-be61-ac27f711eb26.json @@ -0,0 +1,27 @@ +{ + "uuid": [ + { + "value": "6d095b23-03d4-4a9f-be61-ac27f711eb26" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "path": [ + { + "value": "\/node\/3b8ab24d-8ebc-46f1-a1c1-f680fb9ee52f" + } + ], + "alias": [ + { + "value": "\/articles\/layout-paragraphs-module-20220301" + } + ], + "status": [ + { + "value": true + } + ] +} \ No newline at end of file diff --git a/drupal/content/path_alias.806fb505-592e-4297-ab4c-8a1bfc620a30.json b/drupal/content/path_alias.7a0bc0db-57fe-46d7-b30a-4cbf2430379a.json similarity index 74% rename from drupal/content/path_alias.806fb505-592e-4297-ab4c-8a1bfc620a30.json rename to drupal/content/path_alias.7a0bc0db-57fe-46d7-b30a-4cbf2430379a.json index 1bec8a1..d9c1018 100644 --- a/drupal/content/path_alias.806fb505-592e-4297-ab4c-8a1bfc620a30.json +++ b/drupal/content/path_alias.7a0bc0db-57fe-46d7-b30a-4cbf2430379a.json @@ -1,7 +1,7 @@ { "uuid": [ { - "value": "806fb505-592e-4297-ab4c-8a1bfc620a30" + "value": "7a0bc0db-57fe-46d7-b30a-4cbf2430379a" } ], "langcode": [ @@ -16,7 +16,7 @@ ], "alias": [ { - "value": "\/article\/hello-world-20211126" + "value": "\/articles\/hello-world-20211126" } ], "status": [ diff --git a/nuxt/components/druxt/entity/paragraph/code/Default.vue b/nuxt/components/druxt/entity/paragraph/code/Default.vue new file mode 100644 index 0000000..ef3041f --- /dev/null +++ b/nuxt/components/druxt/entity/paragraph/code/Default.vue @@ -0,0 +1,29 @@ + + + diff --git a/nuxt/components/druxt/entity/paragraph/section/Default.vue b/nuxt/components/druxt/entity/paragraph/section/Default.vue new file mode 100644 index 0000000..2afe63d --- /dev/null +++ b/nuxt/components/druxt/entity/paragraph/section/Default.vue @@ -0,0 +1,10 @@ + + + diff --git a/nuxt/components/druxt/layout-paragraph/Onecol.vue b/nuxt/components/druxt/layout-paragraph/Onecol.vue new file mode 100644 index 0000000..7908644 --- /dev/null +++ b/nuxt/components/druxt/layout-paragraph/Onecol.vue @@ -0,0 +1,32 @@ + + + diff --git a/nuxt/components/druxt/layout-paragraph/Twocol.vue b/nuxt/components/druxt/layout-paragraph/Twocol.vue new file mode 100644 index 0000000..7522bb1 --- /dev/null +++ b/nuxt/components/druxt/layout-paragraph/Twocol.vue @@ -0,0 +1,87 @@ + + + diff --git a/nuxt/nuxt.config.js b/nuxt/nuxt.config.js index e29f9eb..362ffcb 100644 --- a/nuxt/nuxt.config.js +++ b/nuxt/nuxt.config.js @@ -36,10 +36,13 @@ export default { '@nuxtjs/markdownit', '@nuxtjs/moment', '@nuxtjs/tailwindcss', + // DruxtJS: https://druxtjs.org + 'druxt-layout-paragraphs', + 'druxt-site', ], // Modules: https://go.nuxtjs.dev/config-modules - modules: ['druxt-site'], + modules: [], // DruxtJS: https://druxtjs.org druxt: { diff --git a/nuxt/package.json b/nuxt/package.json index 6b05fc8..11051b6 100644 --- a/nuxt/package.json +++ b/nuxt/package.json @@ -33,6 +33,7 @@ "@tailwindcss/typography": "^0.4.1", "core-js": "3.18.3", "daisyui": "^1.16.2", + "druxt-layout-paragraphs": "^0.1.0", "druxt-site": "^0.11.0", "ellipsize": "^0.2.0", "nuxt": "2.15.8", diff --git a/nuxt/pages/index.vue b/nuxt/pages/index.vue index 027c268..0bbc3ac 100644 --- a/nuxt/pages/index.vue +++ b/nuxt/pages/index.vue @@ -23,13 +23,13 @@

Latest