Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ content:
title: Paragraph
title_plural: Paragraphs
edit_mode: open
add_mode: dropdown
add_mode: button
form_display_mode: default
default_paragraph_type: ''
default_paragraph_type: _none
third_party_settings: { }
region: content
promote:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
uuid: ae42a10d-32ba-4ff0-bc81-55e283c0e8ce
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.os2loop_section_page_info_block.os2loop_section_page_attribute
- field.field.paragraph.os2loop_section_page_info_block.os2loop_section_page_info_text
- field.field.paragraph.os2loop_section_page_info_block.os2loop_section_page_title
- paragraphs.paragraphs_type.os2loop_section_page_info_block
module:
- text
id: paragraph.os2loop_section_page_info_block.default
targetEntityType: paragraph
bundle: os2loop_section_page_info_block
mode: default
content:
os2loop_section_page_attribute:
weight: 2
settings: { }
third_party_settings: { }
type: options_select
region: content
os2loop_section_page_info_text:
weight: 1
settings:
rows: 5
placeholder: ''
third_party_settings: { }
type: text_textarea
region: content
os2loop_section_page_title:
weight: 0
settings:
size: 60
placeholder: ''
third_party_settings: { }
type: string_textfield
region: content
hidden:
created: true
status: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
uuid: aef55d3c-c8e3-4cee-b6a9-815775c855d3
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.os2loop_section_page_info_block.os2loop_section_page_attribute
- field.field.paragraph.os2loop_section_page_info_block.os2loop_section_page_info_text
- field.field.paragraph.os2loop_section_page_info_block.os2loop_section_page_title
- paragraphs.paragraphs_type.os2loop_section_page_info_block
module:
- options
- text
id: paragraph.os2loop_section_page_info_block.default
targetEntityType: paragraph
bundle: os2loop_section_page_info_block
mode: default
content:
os2loop_section_page_attribute:
weight: 2
label: hidden
settings: { }
third_party_settings: { }
type: list_default
region: content
os2loop_section_page_info_text:
weight: 1
label: hidden
settings: { }
third_party_settings: { }
type: text_default
region: content
os2loop_section_page_title:
weight: 0
label: hidden
settings:
link_to_entity: false
third_party_settings: { }
type: string
region: content
hidden:
entity_print_view_epub: true
entity_print_view_pdf: true
entity_print_view_word_docx: true
search_api_excerpt: true
1 change: 1 addition & 0 deletions config/sync/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module:
menu_ui: 0
message: 0
node: 0
options: 0
os2loop_documents: 0
os2loop_external: 0
os2loop_flag_content: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dependencies:
config:
- field.storage.node.os2loop_section_page_paragraph
- node.type.os2loop_section_page
- paragraphs.paragraphs_type.os2loop_section_page_info_block
- paragraphs.paragraphs_type.os2loop_section_page_views_refer
module:
- entity_reference_revisions
Expand All @@ -24,6 +25,7 @@ settings:
negate: 0
target_bundles:
os2loop_section_page_views_refer: os2loop_section_page_views_refer
os2loop_section_page_info_block: os2loop_section_page_info_block
target_bundles_drag_drop:
os2loop_documents_highlighted_co:
weight: 6
Expand All @@ -37,6 +39,9 @@ settings:
os2loop_documents_text_and_image:
weight: 9
enabled: false
os2loop_section_page_info_block:
enabled: true
weight: 11
os2loop_section_page_views_refer:
enabled: true
weight: 10
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
uuid: 64f621d0-829d-42e6-b3ce-042639ae41f4
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.os2loop_section_page_attribute
- paragraphs.paragraphs_type.os2loop_section_page_info_block
module:
- options
id: paragraph.os2loop_section_page_info_block.os2loop_section_page_attribute
field_name: os2loop_section_page_attribute
entity_type: paragraph
bundle: os2loop_section_page_info_block
label: Type
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: list_string
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
uuid: 5230c7c3-fccc-43b0-b44b-36515d34183e
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.os2loop_section_page_info_text
- paragraphs.paragraphs_type.os2loop_section_page_info_block
module:
- better_formats
- text
third_party_settings:
better_formats:
allowed_formats_toggle: 1
allowed_formats:
os2loop_section_page: os2loop_section_page
os2loop_question_answer_plain_text: 0
os2loop_question_answer_rich_text: 0
os2loop_post_comment_plain_text: 0
os2loop_post_comment_rich_text: 0
os2loop_documents_body: 0
os2loop_documents_rich_text: 0
os2loop_external: 0
os2loop_message_message: 0
os2loop_page: 0
os2loop_post: 0
os2loop_question_plain_text: 0
os2loop_question_rich_text: 0
default_order_toggle: 0
default_order_wrapper:
formats:
os2loop_question_answer_plain_text:
weight: '0'
os2loop_question_answer_rich_text:
weight: '0'
os2loop_post_comment_plain_text:
weight: '0'
os2loop_post_comment_rich_text:
weight: '0'
os2loop_documents_body:
weight: '0'
os2loop_documents_rich_text:
weight: '0'
os2loop_external:
weight: '0'
os2loop_message_message:
weight: '0'
os2loop_page:
weight: '0'
os2loop_post:
weight: '0'
os2loop_question_plain_text:
weight: '0'
os2loop_question_rich_text:
weight: '0'
os2loop_section_page:
weight: '0'
id: paragraph.os2loop_section_page_info_block.os2loop_section_page_info_text
field_name: os2loop_section_page_info_text
entity_type: paragraph
bundle: os2loop_section_page_info_block
label: 'Information block'
description: ''
required: false

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the text be required? I vote “Yes!”

Copy link
Author

@martinyde martinyde May 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just let the user decide if they want to add text?
They may want to just add a section with a h2 . There will often be a h1 right above it.
I vote "no!"

translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: text_long
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
uuid: 25b9872e-7051-4320-837c-24c277bfbe02
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.os2loop_section_page_title
- paragraphs.paragraphs_type.os2loop_section_page_info_block
id: paragraph.os2loop_section_page_info_block.os2loop_section_page_title
field_name: os2loop_section_page_title
entity_type: paragraph
bundle: os2loop_section_page_info_block
label: Title
description: ''
required: false

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the title be required? I vote “Yes!”

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just let the user decide if they want to add a h2 or not above the text?
Not all content needs a header. There will often be a h1 right above it.
I vote "no!"

translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: string
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
uuid: 2c263d56-8e99-40ba-8e33-6ce7c7813a4a
langcode: en
status: true
dependencies:
module:
- options
- paragraphs
id: paragraph.os2loop_section_page_attribute
field_name: os2loop_section_page_attribute
entity_type: paragraph
type: list_string
settings:
allowed_values:
-
value: highlighted
label: Highlighted
allowed_values_function: ''
module: options
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
uuid: 309b5c74-9ffa-4272-bbb0-367ea5d3c27c
langcode: en
status: true
dependencies:
module:
- paragraphs
- text
id: paragraph.os2loop_section_page_info_text
field_name: os2loop_section_page_info_text
entity_type: paragraph
type: text_long
settings: { }
module: text
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
21 changes: 21 additions & 0 deletions config/sync/field.storage.paragraph.os2loop_section_page_title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
uuid: b7c0d0aa-9885-428c-b7a0-c9b10aaa4e44
langcode: en
status: true
dependencies:
module:
- paragraphs
id: paragraph.os2loop_section_page_title
field_name: os2loop_section_page_title
entity_type: paragraph
type: string
settings:
max_length: 255
is_ascii: false
case_sensitive: false
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
uuid: db078576-3d42-4de9-8994-f0a8ec621169
langcode: en
status: true
dependencies: { }
id: os2loop_section_page_info_block
label: 'Info block'
icon_uuid: null
icon_default: null
description: 'Info block for section pages'
behavior_plugins: { }
1 change: 0 additions & 1 deletion config/sync/user.role.anonymous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ permissions:
- 'use text format os2loop_question_plain_text'
- 'view media'
- 'use text format os2loop_question_rich_text'

1 change: 0 additions & 1 deletion config/sync/user.role.os2loop_user_administrator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,3 @@ permissions:
- 'view revisions'
- 'view the administration theme'
- 'view unpublished paragraphs'

Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,4 @@ a {
@import "./paragraphs/step-by-step";
@import "./paragraphs/highlighted-content";
@import "./paragraphs/text-and-image";
@import "./paragraphs/info-block";
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ $dark-favourite: darken($favourite, 10%);

// Link color
$link-color: #0056b3;

// Attributes
$highlighted: lighten($primary-color, 40%);
$highlighted-border: $primary-color;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.paragraph--type--os2loop-section-page-info-block {
&.is-highlighted {
border: 1px solid $highlighted-border;
background: $highlighted;
// Only add padding if it has border or background color.
padding: 1em;
}
}
Loading