From 0899f1f393f0a775e47125857a8784932e9b9b64 Mon Sep 17 00:00:00 2001 From: Haris Khan <hariskhan201718@gmail.com> Date: Wed, 23 Apr 2025 12:36:17 +0500 Subject: [PATCH] feat: Add two footer layout options to theme --- .../block/copyright/copyright.component.yml | 36 ++++++ .../block/copyright/copyright.stories.json | 1 + .../block/copyright/copyright.stories.twig | 28 +++++ components/block/copyright/copyright.twig | 45 +++++++ .../block/mainblock/mainblock.stories.twig | 2 +- .../organisedby/organisedby.component.yml | 36 ++++++ .../organisedby/organisedby.stories.json | 1 + .../organisedby/organisedby.stories.twig | 28 +++++ components/block/organisedby/organisedby.twig | 49 ++++++++ components/block/when/when.component.yml | 36 ++++++ components/block/when/when.stories.json | 1 + components/block/when/when.stories.twig | 28 +++++ components/block/when/when.twig | 45 +++++++ components/block/where/where.component.yml | 36 ++++++ components/block/where/where.stories.json | 1 + components/block/where/where.stories.twig | 28 +++++ components/block/where/where.twig | 45 +++++++ .../footerfour/footerfour.component.yml | 35 ++++++ .../footer/footerfour/footerfour.stories.json | 1 + .../footer/footerfour/footerfour.stories.twig | 68 +++++++++++ components/footer/footerfour/footerfour.twig | 64 ++++++++++ .../footer/footerone/footerone.component.yml | 35 ++++++ .../footer/footerone/footerone.stories.json | 1 + .../footer/footerone/footerone.stories.twig | 68 +++++++++++ components/footer/footerone/footerone.twig | 64 ++++++++++ .../footerthree/footerthree.component.yml | 35 ++++++ .../footerthree/footerthree.stories.json | 1 + .../footerthree/footerthree.stories.twig | 68 +++++++++++ .../footer/footerthree/footerthree.twig | 64 ++++++++++ .../footer/footertwo/footertwo.component.yml | 35 ++++++ .../footer/footertwo/footertwo.stories.json | 1 + .../footer/footertwo/footertwo.stories.twig | 68 +++++++++++ components/footer/footertwo/footertwo.twig | 64 ++++++++++ .../views/mainview/mainview.stories.twig | 2 +- .../block.block.tailpine_copyright.yml | 23 ++++ .../block.block.tailpine_footerfour.yml | 23 ++++ .../block.block.tailpine_footerone.yml | 23 ++++ .../block.block.tailpine_footerthree.yml | 23 ++++ .../block.block.tailpine_footertwo.yml | 23 ++++ .../block.block.tailpine_organisedby.yml | 23 ++++ config/install/block.block.tailpine_when.yml | 23 ++++ config/install/block.block.tailpine_where.yml | 23 ++++ config/install/tailpine.settings.yml | 1 + tailpine.theme | 15 ++- .../block/block--tailpine-copyright.html.twig | 29 +++++ .../block--tailpine-organisedby.html.twig | 29 +++++ .../block/block--tailpine-when.html.twig | 29 +++++ .../block/block--tailpine-where.html.twig | 29 +++++ .../footer-styles/footer--style1.html.twig | 27 +++++ .../footer-styles/footer--style2.html.twig | 112 ++++++++++++++++++ templates/footer/menu--footer-four.html.twig | 22 ++++ templates/footer/menu--footer-one.html.twig | 22 ++++ templates/footer/menu--footer-three.html.twig | 22 ++++ templates/footer/menu--footer-two.html.twig | 22 ++++ templates/layout/page.html.twig | 9 +- theme-settings.php | 24 +++- 56 files changed, 1679 insertions(+), 17 deletions(-) create mode 100644 components/block/copyright/copyright.component.yml create mode 100644 components/block/copyright/copyright.stories.json create mode 100644 components/block/copyright/copyright.stories.twig create mode 100644 components/block/copyright/copyright.twig create mode 100644 components/block/organisedby/organisedby.component.yml create mode 100644 components/block/organisedby/organisedby.stories.json create mode 100644 components/block/organisedby/organisedby.stories.twig create mode 100644 components/block/organisedby/organisedby.twig create mode 100644 components/block/when/when.component.yml create mode 100644 components/block/when/when.stories.json create mode 100644 components/block/when/when.stories.twig create mode 100644 components/block/when/when.twig create mode 100644 components/block/where/where.component.yml create mode 100644 components/block/where/where.stories.json create mode 100644 components/block/where/where.stories.twig create mode 100644 components/block/where/where.twig create mode 100644 components/footer/footerfour/footerfour.component.yml create mode 100644 components/footer/footerfour/footerfour.stories.json create mode 100644 components/footer/footerfour/footerfour.stories.twig create mode 100644 components/footer/footerfour/footerfour.twig create mode 100644 components/footer/footerone/footerone.component.yml create mode 100644 components/footer/footerone/footerone.stories.json create mode 100644 components/footer/footerone/footerone.stories.twig create mode 100644 components/footer/footerone/footerone.twig create mode 100644 components/footer/footerthree/footerthree.component.yml create mode 100644 components/footer/footerthree/footerthree.stories.json create mode 100644 components/footer/footerthree/footerthree.stories.twig create mode 100644 components/footer/footerthree/footerthree.twig create mode 100644 components/footer/footertwo/footertwo.component.yml create mode 100644 components/footer/footertwo/footertwo.stories.json create mode 100644 components/footer/footertwo/footertwo.stories.twig create mode 100644 components/footer/footertwo/footertwo.twig create mode 100644 config/install/block.block.tailpine_copyright.yml create mode 100644 config/install/block.block.tailpine_footerfour.yml create mode 100644 config/install/block.block.tailpine_footerone.yml create mode 100644 config/install/block.block.tailpine_footerthree.yml create mode 100644 config/install/block.block.tailpine_footertwo.yml create mode 100644 config/install/block.block.tailpine_organisedby.yml create mode 100644 config/install/block.block.tailpine_when.yml create mode 100644 config/install/block.block.tailpine_where.yml create mode 100644 templates/block/block--tailpine-copyright.html.twig create mode 100644 templates/block/block--tailpine-organisedby.html.twig create mode 100644 templates/block/block--tailpine-when.html.twig create mode 100644 templates/block/block--tailpine-where.html.twig create mode 100644 templates/footer-styles/footer--style1.html.twig create mode 100644 templates/footer-styles/footer--style2.html.twig create mode 100644 templates/footer/menu--footer-four.html.twig create mode 100644 templates/footer/menu--footer-one.html.twig create mode 100644 templates/footer/menu--footer-three.html.twig create mode 100644 templates/footer/menu--footer-two.html.twig diff --git a/components/block/copyright/copyright.component.yml b/components/block/copyright/copyright.component.yml new file mode 100644 index 0000000..07fc015 --- /dev/null +++ b/components/block/copyright/copyright.component.yml @@ -0,0 +1,36 @@ +$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json + +name: mainblock +label: 'Main Block' +description: 'Generic block component with optional title and content.' +category: 'Blocks' + +schema: + properties: + plugin_id: + type: string + description: 'The ID of the block implementation.' + default: '' + label: + type: string + description: 'The configured label of the block.' + default: '' + configuration: + type: object + properties: + provider: + type: string + description: 'The module or provider of the block.' + default: 'custom' + title_prefix: + type: string + description: 'Additional markup before the block title.' + default: '' + title_suffix: + type: string + description: 'Additional markup after the block title.' + default: '' + content: + type: string + description: 'The main content of the block.' + default: '<p>Block content here.</p>' diff --git a/components/block/copyright/copyright.stories.json b/components/block/copyright/copyright.stories.json new file mode 100644 index 0000000..d26310c --- /dev/null +++ b/components/block/copyright/copyright.stories.json @@ -0,0 +1 @@ +{"title":"Components\/Copyright","parameters":{"server":{"url":"https:\/\/site-yaamava.ddev.site\/storybook\/stories\/render"}},"stories":[{"name":"Default Block","args":{"plugin_id":"custom_block_plugin","label":"Sample Block Title","configuration":{"provider":"custom"},"title_prefix":"<span class=\"title-prefix\">Prefix<\/span>","title_suffix":"<span class=\"title-suffix\">Suffix<\/span>","content":"<p>This is the block content.<\/p>"},"parameters":{"server":{"id":"eyJwYXRoIjoidGhlbWVzXC9jdXN0b21cL3RhaWxwaW5lXC9jb21wb25lbnRzXC9ibG9ja1wvY29weXJpZ2h0XC9jb3B5cmlnaHQuc3Rvcmllcy50d2lnIiwiaWQiOiJkZWZhdWx0In0%3D"}}}]} \ No newline at end of file diff --git a/components/block/copyright/copyright.stories.twig b/components/block/copyright/copyright.stories.twig new file mode 100644 index 0000000..72cd4bf --- /dev/null +++ b/components/block/copyright/copyright.stories.twig @@ -0,0 +1,28 @@ +{% stories copyright with { title: 'Components/block/Copyright' } %} + +{% story default with { + name: 'Default Block', + args: { + plugin_id: 'custom_block_plugin', + label: 'Sample Block Title', + configuration: { + provider: 'custom' + }, + title_prefix: '<span class="title-prefix">Prefix</span>', + title_suffix: '<span class="title-suffix">Suffix</span>', + content: '<p>This is the block content.</p>' + } +} %} + +{% embed 'tailpine:copyright' with { + plugin_id: plugin_id, + label: label, + configuration: configuration, + title_prefix: title_prefix, + title_suffix: title_suffix, + content: content + }%}{% endembed %} + +{% endstory %} + +{% endstories %} diff --git a/components/block/copyright/copyright.twig b/components/block/copyright/copyright.twig new file mode 100644 index 0000000..114d7c4 --- /dev/null +++ b/components/block/copyright/copyright.twig @@ -0,0 +1,45 @@ +{# +/** + * @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. + * - in_preview: Whether the plugin is being rendered in preview mode. + * - 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, + ] +%} +<div{{ attributes.addClass(classes) }}> + {{ title_prefix }} + {% if label %} + <h2{{ title_attributes }}>{{ label }}</h2> + {% endif %} + {{ title_suffix }} + {% block content %} + {{ content }} + {% endblock %} +</div> diff --git a/components/block/mainblock/mainblock.stories.twig b/components/block/mainblock/mainblock.stories.twig index 4eb4bb9..9f7faf7 100644 --- a/components/block/mainblock/mainblock.stories.twig +++ b/components/block/mainblock/mainblock.stories.twig @@ -1,4 +1,4 @@ -{% stories blocks with { title: 'Components/Block' } %} +{% stories blocks with { title: 'Components/Block/mainblock' } %} {% story default with { name: 'Default Block', diff --git a/components/block/organisedby/organisedby.component.yml b/components/block/organisedby/organisedby.component.yml new file mode 100644 index 0000000..257afa6 --- /dev/null +++ b/components/block/organisedby/organisedby.component.yml @@ -0,0 +1,36 @@ +$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json + +name: where +label: 'Main Block' +description: 'Generic block component with optional title and content.' +category: 'Blocks' + +schema: + properties: + plugin_id: + type: string + description: 'The ID of the block implementation.' + default: '' + label: + type: string + description: 'The configured label of the block.' + default: '' + configuration: + type: object + properties: + provider: + type: string + description: 'The module or provider of the block.' + default: 'custom' + title_prefix: + type: string + description: 'Additional markup before the block title.' + default: '' + title_suffix: + type: string + description: 'Additional markup after the block title.' + default: '' + content: + type: string + description: 'The main content of the block.' + default: '<p>Block content here.</p>' diff --git a/components/block/organisedby/organisedby.stories.json b/components/block/organisedby/organisedby.stories.json new file mode 100644 index 0000000..c8a282e --- /dev/null +++ b/components/block/organisedby/organisedby.stories.json @@ -0,0 +1 @@ +{"title":"Components\/block\/organisedby","parameters":{"server":{"url":"https:\/\/site-yaamava.ddev.site\/storybook\/stories\/render"}},"stories":[{"name":"Default Organised By","args":{"plugin_id":"custom_block_plugin","label":"Sample Block Title","configuration":{"provider":"custom"},"title_prefix":"<span class=\"title-prefix\">Prefix<\/span>","title_suffix":"<span class=\"title-suffix\">Suffix<\/span>","content":"<p>This is the block content.<\/p>"},"parameters":{"server":{"id":"eyJwYXRoIjoidGhlbWVzXC9jdXN0b21cL3RhaWxwaW5lXC9jb21wb25lbnRzXC9ibG9ja1wvb3JnYW5pc2VkYnlcL29yZ2FuaXNlZGJ5LnN0b3JpZXMudHdpZyIsImlkIjoiZGVmYXVsdCJ9"}}}]} \ No newline at end of file diff --git a/components/block/organisedby/organisedby.stories.twig b/components/block/organisedby/organisedby.stories.twig new file mode 100644 index 0000000..3c885d4 --- /dev/null +++ b/components/block/organisedby/organisedby.stories.twig @@ -0,0 +1,28 @@ +{% stories organisedby with { title: 'Components/block/organisedby' } %} + +{% story default with { + name: 'Default Organised By', + args: { + plugin_id: 'custom_block_plugin', + label: 'Sample Block Title', + configuration: { + provider: 'custom' + }, + title_prefix: '<span class="title-prefix">Prefix</span>', + title_suffix: '<span class="title-suffix">Suffix</span>', + content: '<p>This is the block content.</p>' + } +} %} + +{% embed 'tailpine:where' with { + plugin_id: plugin_id, + label: label, + configuration: configuration, + title_prefix: title_prefix, + title_suffix: title_suffix, + content: content + }%}{% endembed %} + +{% endstory %} + +{% endstories %} diff --git a/components/block/organisedby/organisedby.twig b/components/block/organisedby/organisedby.twig new file mode 100644 index 0000000..2c53603 --- /dev/null +++ b/components/block/organisedby/organisedby.twig @@ -0,0 +1,49 @@ +{# +/** + * @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. + * - in_preview: Whether the plugin is being rendered in preview mode. + * - 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, + 'flex', + 'gap-[50px]', + 'justify-center', + 'md:justify-start' + ] +%} +<div{{ attributes.addClass(classes) }}> + {{ title_prefix }} + {% if label %} + <h2{{ title_attributes }} class="text-xs font-normal leading-5.5 tracking-[3%]">{{ label }}</h2> + {% endif %} + {{ title_suffix }} + {% block content %} + {{ content }} + {% endblock %} +</div> diff --git a/components/block/when/when.component.yml b/components/block/when/when.component.yml new file mode 100644 index 0000000..91bbc9b --- /dev/null +++ b/components/block/when/when.component.yml @@ -0,0 +1,36 @@ +$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json + +name: when +label: 'Main Block' +description: 'Generic block component with optional title and content.' +category: 'Blocks' + +schema: + properties: + plugin_id: + type: string + description: 'The ID of the block implementation.' + default: '' + label: + type: string + description: 'The configured label of the block.' + default: '' + configuration: + type: object + properties: + provider: + type: string + description: 'The module or provider of the block.' + default: 'custom' + title_prefix: + type: string + description: 'Additional markup before the block title.' + default: '' + title_suffix: + type: string + description: 'Additional markup after the block title.' + default: '' + content: + type: string + description: 'The main content of the block.' + default: '<p>Block content here.</p>' diff --git a/components/block/when/when.stories.json b/components/block/when/when.stories.json new file mode 100644 index 0000000..ac3dc1b --- /dev/null +++ b/components/block/when/when.stories.json @@ -0,0 +1 @@ +{"title":"Components\/block\/when","parameters":{"server":{"url":"https:\/\/site-yaamava.ddev.site\/storybook\/stories\/render"}},"stories":[{"name":"Default When","args":{"plugin_id":"custom_block_plugin","label":"Sample Block Title","configuration":{"provider":"custom"},"title_prefix":"<span class=\"title-prefix\">Prefix<\/span>","title_suffix":"<span class=\"title-suffix\">Suffix<\/span>","content":"<p>This is the block content.<\/p>"},"parameters":{"server":{"id":"eyJwYXRoIjoidGhlbWVzXC9jdXN0b21cL3RhaWxwaW5lXC9jb21wb25lbnRzXC9ibG9ja1wvd2hlblwvd2hlbi5zdG9yaWVzLnR3aWciLCJpZCI6ImRlZmF1bHQifQ%3D%3D"}}}]} \ No newline at end of file diff --git a/components/block/when/when.stories.twig b/components/block/when/when.stories.twig new file mode 100644 index 0000000..0b565b1 --- /dev/null +++ b/components/block/when/when.stories.twig @@ -0,0 +1,28 @@ +{% stories when with { title: 'Components/block/when' } %} + +{% story default with { + name: 'Default When', + args: { + plugin_id: 'custom_block_plugin', + label: 'Sample Block Title', + configuration: { + provider: 'custom' + }, + title_prefix: '<span class="title-prefix">Prefix</span>', + title_suffix: '<span class="title-suffix">Suffix</span>', + content: '<p>This is the block content.</p>' + } +} %} + +{% embed 'tailpine:when' with { + plugin_id: plugin_id, + label: label, + configuration: configuration, + title_prefix: title_prefix, + title_suffix: title_suffix, + content: content + }%}{% endembed %} + +{% endstory %} + +{% endstories %} diff --git a/components/block/when/when.twig b/components/block/when/when.twig new file mode 100644 index 0000000..114d7c4 --- /dev/null +++ b/components/block/when/when.twig @@ -0,0 +1,45 @@ +{# +/** + * @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. + * - in_preview: Whether the plugin is being rendered in preview mode. + * - 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, + ] +%} +<div{{ attributes.addClass(classes) }}> + {{ title_prefix }} + {% if label %} + <h2{{ title_attributes }}>{{ label }}</h2> + {% endif %} + {{ title_suffix }} + {% block content %} + {{ content }} + {% endblock %} +</div> diff --git a/components/block/where/where.component.yml b/components/block/where/where.component.yml new file mode 100644 index 0000000..257afa6 --- /dev/null +++ b/components/block/where/where.component.yml @@ -0,0 +1,36 @@ +$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json + +name: where +label: 'Main Block' +description: 'Generic block component with optional title and content.' +category: 'Blocks' + +schema: + properties: + plugin_id: + type: string + description: 'The ID of the block implementation.' + default: '' + label: + type: string + description: 'The configured label of the block.' + default: '' + configuration: + type: object + properties: + provider: + type: string + description: 'The module or provider of the block.' + default: 'custom' + title_prefix: + type: string + description: 'Additional markup before the block title.' + default: '' + title_suffix: + type: string + description: 'Additional markup after the block title.' + default: '' + content: + type: string + description: 'The main content of the block.' + default: '<p>Block content here.</p>' diff --git a/components/block/where/where.stories.json b/components/block/where/where.stories.json new file mode 100644 index 0000000..0a2a163 --- /dev/null +++ b/components/block/where/where.stories.json @@ -0,0 +1 @@ +{"title":"Components\/block\/where","parameters":{"server":{"url":"https:\/\/site-yaamava.ddev.site\/storybook\/stories\/render"}},"stories":[{"name":"Default where","args":{"plugin_id":"custom_block_plugin","label":"Sample Block Title","configuration":{"provider":"custom"},"title_prefix":"<span class=\"title-prefix\">Prefix<\/span>","title_suffix":"<span class=\"title-suffix\">Suffix<\/span>","content":"<p>This is the block content.<\/p>"},"parameters":{"server":{"id":"eyJwYXRoIjoidGhlbWVzXC9jdXN0b21cL3RhaWxwaW5lXC9jb21wb25lbnRzXC9ibG9ja1wvd2hlcmVcL3doZXJlLnN0b3JpZXMudHdpZyIsImlkIjoiZGVmYXVsdCJ9"}}}]} \ No newline at end of file diff --git a/components/block/where/where.stories.twig b/components/block/where/where.stories.twig new file mode 100644 index 0000000..6cc3e98 --- /dev/null +++ b/components/block/where/where.stories.twig @@ -0,0 +1,28 @@ +{% stories where with { title: 'Components/block/where' } %} + +{% story default with { + name: 'Default where', + args: { + plugin_id: 'custom_block_plugin', + label: 'Sample Block Title', + configuration: { + provider: 'custom' + }, + title_prefix: '<span class="title-prefix">Prefix</span>', + title_suffix: '<span class="title-suffix">Suffix</span>', + content: '<p>This is the block content.</p>' + } +} %} + +{% embed 'tailpine:where' with { + plugin_id: plugin_id, + label: label, + configuration: configuration, + title_prefix: title_prefix, + title_suffix: title_suffix, + content: content + }%}{% endembed %} + +{% endstory %} + +{% endstories %} diff --git a/components/block/where/where.twig b/components/block/where/where.twig new file mode 100644 index 0000000..114d7c4 --- /dev/null +++ b/components/block/where/where.twig @@ -0,0 +1,45 @@ +{# +/** + * @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. + * - in_preview: Whether the plugin is being rendered in preview mode. + * - 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, + ] +%} +<div{{ attributes.addClass(classes) }}> + {{ title_prefix }} + {% if label %} + <h2{{ title_attributes }}>{{ label }}</h2> + {% endif %} + {{ title_suffix }} + {% block content %} + {{ content }} + {% endblock %} +</div> diff --git a/components/footer/footerfour/footerfour.component.yml b/components/footer/footerfour/footerfour.component.yml new file mode 100644 index 0000000..802d3ee --- /dev/null +++ b/components/footer/footerfour/footerfour.component.yml @@ -0,0 +1,35 @@ +$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json +name: Footer +description: footer Component +props: + type: object + properties: + title: + type: string + title: Title + url: + type: string + title: URL + target: + type: string + title: Target + children: + type: array + title: Sub-menu items + items: + type: object + properties: + title: + type: string + title: Sub-menu Title + url: + type: string + title: Sub-menu URL + target: + type: string + title: Sub-menu Target + children: # Add this to support nested sub-menus + type: array + title: Sub-menu Items + items: + $ref: "#/props" # Recursively refer to the same schema diff --git a/components/footer/footerfour/footerfour.stories.json b/components/footer/footerfour/footerfour.stories.json new file mode 100644 index 0000000..535072c --- /dev/null +++ b/components/footer/footerfour/footerfour.stories.json @@ -0,0 +1 @@ +{"title":"Components\/footer\/footerfour","parameters":{"server":{"url":"https:\/\/site-yaamava.ddev.site\/storybook\/stories\/render"}},"stories":[{"name":"Footer two Example","args":{"title":"Test","url":"https:\/\/google.com","target":"__self"},"parameters":{"server":{"id":"eyJwYXRoIjoidGhlbWVzXC9jdXN0b21cL3RhaWxwaW5lXC9jb21wb25lbnRzXC9mb290ZXJcL2Zvb3RlcmZvdXJcL2Zvb3RlcmZvdXIuc3Rvcmllcy50d2lnIiwiaWQiOiJkZWZhdWx0In0%3D"}}}]} \ No newline at end of file diff --git a/components/footer/footerfour/footerfour.stories.twig b/components/footer/footerfour/footerfour.stories.twig new file mode 100644 index 0000000..3c03866 --- /dev/null +++ b/components/footer/footerfour/footerfour.stories.twig @@ -0,0 +1,68 @@ +{% stories footerfour with { title: 'Components/footer/footerfour' } %} + +{% story default with { + name: 'Footer two Example', + args: { title: "Test", url: "https://google.com", target: "__self" } +} %} + +{% set nestedObject = [ + { + title: "Home", + url: "/", + target: "_self" + }, + { + title: "Services", + url: "/services", + target: "_self", + children: [ + { + title: "Web Development", + url: "/services/web", + target: "_self", + children: [ # Sub-menu of Web Development + { + title: "Frontend", + url: "/services/web/frontend", + target: "_self", + children: [ # Sub-menu of frontend + { + title: "React", + url: "/services/web/frontend/React", + target: "_self", + children: [ # Sub-menu of React + { + title: "Expert", + url: "/services/web/frontend/react/expert", + target: "_self" + } + ] + } + ] + }, + { + title: "Backend", + url: "/services/web/backend", + target: "_self" + } + ] + }, + { + title: "SEO", + url: "/services/seo", + target: "_self" + } + ] + }, + { + title: "About", + url: "/about", + target: "_self" + } +] %} + +{# Pass the nestedObject to the component #} +{% embed 'tailpine:footerfour' with { nested: nestedObject } %}{% endembed %} +{% endstory %} + +{% endstories %} diff --git a/components/footer/footerfour/footerfour.twig b/components/footer/footerfour/footerfour.twig new file mode 100644 index 0000000..cfaede1 --- /dev/null +++ b/components/footer/footerfour/footerfour.twig @@ -0,0 +1,64 @@ +{# +/** + * @file + * Theme override to display a menu. + * + * Available variables: + * - menu_name: The machine name of the menu. + * - items: A nested list of menu items. Each menu item contains: + * - attributes: HTML attributes for the menu item. + * - below: The menu item child items. + * - title: The menu link title. + * - url: The menu link URL, instance of \Drupal\Core\Url + * - localized_options: Menu link localized options. + * - is_expanded: TRUE if the link has visible children within the current + * menu tree. + * - is_collapsed: TRUE if the link has children within the current menu tree + * that are not currently visible. + * - in_active_trail: TRUE if the link is in the active trail. + */ +#} +{% import _self as menus %} + +{# + We call a macro which calls itself to render the full tree. + @see https://twig.symfony.com/doc/3.x/tags/macro.html +#} +{{ menus.menu_links(items, attributes, 0) }} + +{% macro menu_links(items, attributes, menu_level) %} + {% import _self as menus %} + {% if items %} + {% if menu_level == 0 %} + <ul{{attributes.addClass('menuflexflex-colgap-2.5')}}> + {% else %} + <ul class="menu flex flex-col gap-2.5"> + {% endif %} + {% for item in items %} + {% + set classes = [ + 'menu-item', + item.is_expanded ? 'menu-item--expanded', + item.is_collapsed ? 'menu-item--collapsed', + item.in_active_trail ? 'menu-item--active-trail', + ] + %} + <li{{item.attributes.addClass(classes)}}> + {# {{ link(item.title, item.url) }} #} + {% if item.url is empty or item.url.toString() == '<nolink>' %} + <span class="text-body-bg text-sm md:text-lg font-normal text-white hover:text-blue-600"> + {{ item.title }} + </span> + {% else %} + <a href="{{ item.url }}" target="{{ item.target }}" class="text-body-bg hover:text-blue-600 text-sm md:text-lg font-normal text-white"> + {{ item.title }} + </a> + {% endif %} + {% if item.below %} + {{ menus.menu_links(item.below, attributes, menu_level + 1) }} + {% endif %} + </li> + {% endfor %} + </ul> + {% endif %} + {% endmacro %} diff --git a/components/footer/footerone/footerone.component.yml b/components/footer/footerone/footerone.component.yml new file mode 100644 index 0000000..802d3ee --- /dev/null +++ b/components/footer/footerone/footerone.component.yml @@ -0,0 +1,35 @@ +$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json +name: Footer +description: footer Component +props: + type: object + properties: + title: + type: string + title: Title + url: + type: string + title: URL + target: + type: string + title: Target + children: + type: array + title: Sub-menu items + items: + type: object + properties: + title: + type: string + title: Sub-menu Title + url: + type: string + title: Sub-menu URL + target: + type: string + title: Sub-menu Target + children: # Add this to support nested sub-menus + type: array + title: Sub-menu Items + items: + $ref: "#/props" # Recursively refer to the same schema diff --git a/components/footer/footerone/footerone.stories.json b/components/footer/footerone/footerone.stories.json new file mode 100644 index 0000000..14c734a --- /dev/null +++ b/components/footer/footerone/footerone.stories.json @@ -0,0 +1 @@ +{"title":"Components\/footer\/footerone","parameters":{"server":{"url":"https:\/\/site-yaamava.ddev.site\/storybook\/stories\/render"}},"stories":[{"name":"Footer one Example","args":{"title":"Test","url":"https:\/\/google.com","target":"__self"},"parameters":{"server":{"id":"eyJwYXRoIjoidGhlbWVzXC9jdXN0b21cL3RhaWxwaW5lXC9jb21wb25lbnRzXC9mb290ZXJcL2Zvb3Rlcm9uZVwvZm9vdGVyb25lLnN0b3JpZXMudHdpZyIsImlkIjoiZGVmYXVsdCJ9"}}}]} \ No newline at end of file diff --git a/components/footer/footerone/footerone.stories.twig b/components/footer/footerone/footerone.stories.twig new file mode 100644 index 0000000..4bc89ba --- /dev/null +++ b/components/footer/footerone/footerone.stories.twig @@ -0,0 +1,68 @@ +{% stories footerone with { title: 'Components/footer/footerone' } %} + +{% story default with { + name: 'Footer one Example', + args: { title: "Test", url: "https://google.com", target: "__self" } +} %} + +{% set nestedObject = [ + { + title: "Home", + url: "/", + target: "_self" + }, + { + title: "Services", + url: "/services", + target: "_self", + children: [ + { + title: "Web Development", + url: "/services/web", + target: "_self", + children: [ # Sub-menu of Web Development + { + title: "Frontend", + url: "/services/web/frontend", + target: "_self", + children: [ # Sub-menu of frontend + { + title: "React", + url: "/services/web/frontend/React", + target: "_self", + children: [ # Sub-menu of React + { + title: "Expert", + url: "/services/web/frontend/react/expert", + target: "_self" + } + ] + } + ] + }, + { + title: "Backend", + url: "/services/web/backend", + target: "_self" + } + ] + }, + { + title: "SEO", + url: "/services/seo", + target: "_self" + } + ] + }, + { + title: "About", + url: "/about", + target: "_self" + } +] %} + +{# Pass the nestedObject to the component #} +{% embed 'tailpine:footerone' with { nested: nestedObject } %}{% endembed %} +{% endstory %} + +{% endstories %} diff --git a/components/footer/footerone/footerone.twig b/components/footer/footerone/footerone.twig new file mode 100644 index 0000000..cfaede1 --- /dev/null +++ b/components/footer/footerone/footerone.twig @@ -0,0 +1,64 @@ +{# +/** + * @file + * Theme override to display a menu. + * + * Available variables: + * - menu_name: The machine name of the menu. + * - items: A nested list of menu items. Each menu item contains: + * - attributes: HTML attributes for the menu item. + * - below: The menu item child items. + * - title: The menu link title. + * - url: The menu link URL, instance of \Drupal\Core\Url + * - localized_options: Menu link localized options. + * - is_expanded: TRUE if the link has visible children within the current + * menu tree. + * - is_collapsed: TRUE if the link has children within the current menu tree + * that are not currently visible. + * - in_active_trail: TRUE if the link is in the active trail. + */ +#} +{% import _self as menus %} + +{# + We call a macro which calls itself to render the full tree. + @see https://twig.symfony.com/doc/3.x/tags/macro.html +#} +{{ menus.menu_links(items, attributes, 0) }} + +{% macro menu_links(items, attributes, menu_level) %} + {% import _self as menus %} + {% if items %} + {% if menu_level == 0 %} + <ul{{attributes.addClass('menuflexflex-colgap-2.5')}}> + {% else %} + <ul class="menu flex flex-col gap-2.5"> + {% endif %} + {% for item in items %} + {% + set classes = [ + 'menu-item', + item.is_expanded ? 'menu-item--expanded', + item.is_collapsed ? 'menu-item--collapsed', + item.in_active_trail ? 'menu-item--active-trail', + ] + %} + <li{{item.attributes.addClass(classes)}}> + {# {{ link(item.title, item.url) }} #} + {% if item.url is empty or item.url.toString() == '<nolink>' %} + <span class="text-body-bg text-sm md:text-lg font-normal text-white hover:text-blue-600"> + {{ item.title }} + </span> + {% else %} + <a href="{{ item.url }}" target="{{ item.target }}" class="text-body-bg hover:text-blue-600 text-sm md:text-lg font-normal text-white"> + {{ item.title }} + </a> + {% endif %} + {% if item.below %} + {{ menus.menu_links(item.below, attributes, menu_level + 1) }} + {% endif %} + </li> + {% endfor %} + </ul> + {% endif %} + {% endmacro %} diff --git a/components/footer/footerthree/footerthree.component.yml b/components/footer/footerthree/footerthree.component.yml new file mode 100644 index 0000000..802d3ee --- /dev/null +++ b/components/footer/footerthree/footerthree.component.yml @@ -0,0 +1,35 @@ +$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json +name: Footer +description: footer Component +props: + type: object + properties: + title: + type: string + title: Title + url: + type: string + title: URL + target: + type: string + title: Target + children: + type: array + title: Sub-menu items + items: + type: object + properties: + title: + type: string + title: Sub-menu Title + url: + type: string + title: Sub-menu URL + target: + type: string + title: Sub-menu Target + children: # Add this to support nested sub-menus + type: array + title: Sub-menu Items + items: + $ref: "#/props" # Recursively refer to the same schema diff --git a/components/footer/footerthree/footerthree.stories.json b/components/footer/footerthree/footerthree.stories.json new file mode 100644 index 0000000..4c96458 --- /dev/null +++ b/components/footer/footerthree/footerthree.stories.json @@ -0,0 +1 @@ +{"title":"Components\/footer\/footerthree","parameters":{"server":{"url":"https:\/\/site-yaamava.ddev.site\/storybook\/stories\/render"}},"stories":[{"name":"Footer two Example","args":{"title":"Test","url":"https:\/\/google.com","target":"__self"},"parameters":{"server":{"id":"eyJwYXRoIjoidGhlbWVzXC9jdXN0b21cL3RhaWxwaW5lXC9jb21wb25lbnRzXC9mb290ZXJcL2Zvb3RlcnRocmVlXC9mb290ZXJ0aHJlZS5zdG9yaWVzLnR3aWciLCJpZCI6ImRlZmF1bHQifQ%3D%3D"}}}]} \ No newline at end of file diff --git a/components/footer/footerthree/footerthree.stories.twig b/components/footer/footerthree/footerthree.stories.twig new file mode 100644 index 0000000..3df6b92 --- /dev/null +++ b/components/footer/footerthree/footerthree.stories.twig @@ -0,0 +1,68 @@ +{% stories footerthree with { title: 'Components/footer/footerthree' } %} + +{% story default with { + name: 'Footer two Example', + args: { title: "Test", url: "https://google.com", target: "__self" } +} %} + +{% set nestedObject = [ + { + title: "Home", + url: "/", + target: "_self" + }, + { + title: "Services", + url: "/services", + target: "_self", + children: [ + { + title: "Web Development", + url: "/services/web", + target: "_self", + children: [ # Sub-menu of Web Development + { + title: "Frontend", + url: "/services/web/frontend", + target: "_self", + children: [ # Sub-menu of frontend + { + title: "React", + url: "/services/web/frontend/React", + target: "_self", + children: [ # Sub-menu of React + { + title: "Expert", + url: "/services/web/frontend/react/expert", + target: "_self" + } + ] + } + ] + }, + { + title: "Backend", + url: "/services/web/backend", + target: "_self" + } + ] + }, + { + title: "SEO", + url: "/services/seo", + target: "_self" + } + ] + }, + { + title: "About", + url: "/about", + target: "_self" + } +] %} + +{# Pass the nestedObject to the component #} +{% embed 'tailpine:footerthree' with { nested: nestedObject } %}{% endembed %} +{% endstory %} + +{% endstories %} diff --git a/components/footer/footerthree/footerthree.twig b/components/footer/footerthree/footerthree.twig new file mode 100644 index 0000000..cfaede1 --- /dev/null +++ b/components/footer/footerthree/footerthree.twig @@ -0,0 +1,64 @@ +{# +/** + * @file + * Theme override to display a menu. + * + * Available variables: + * - menu_name: The machine name of the menu. + * - items: A nested list of menu items. Each menu item contains: + * - attributes: HTML attributes for the menu item. + * - below: The menu item child items. + * - title: The menu link title. + * - url: The menu link URL, instance of \Drupal\Core\Url + * - localized_options: Menu link localized options. + * - is_expanded: TRUE if the link has visible children within the current + * menu tree. + * - is_collapsed: TRUE if the link has children within the current menu tree + * that are not currently visible. + * - in_active_trail: TRUE if the link is in the active trail. + */ +#} +{% import _self as menus %} + +{# + We call a macro which calls itself to render the full tree. + @see https://twig.symfony.com/doc/3.x/tags/macro.html +#} +{{ menus.menu_links(items, attributes, 0) }} + +{% macro menu_links(items, attributes, menu_level) %} + {% import _self as menus %} + {% if items %} + {% if menu_level == 0 %} + <ul{{attributes.addClass('menuflexflex-colgap-2.5')}}> + {% else %} + <ul class="menu flex flex-col gap-2.5"> + {% endif %} + {% for item in items %} + {% + set classes = [ + 'menu-item', + item.is_expanded ? 'menu-item--expanded', + item.is_collapsed ? 'menu-item--collapsed', + item.in_active_trail ? 'menu-item--active-trail', + ] + %} + <li{{item.attributes.addClass(classes)}}> + {# {{ link(item.title, item.url) }} #} + {% if item.url is empty or item.url.toString() == '<nolink>' %} + <span class="text-body-bg text-sm md:text-lg font-normal text-white hover:text-blue-600"> + {{ item.title }} + </span> + {% else %} + <a href="{{ item.url }}" target="{{ item.target }}" class="text-body-bg hover:text-blue-600 text-sm md:text-lg font-normal text-white"> + {{ item.title }} + </a> + {% endif %} + {% if item.below %} + {{ menus.menu_links(item.below, attributes, menu_level + 1) }} + {% endif %} + </li> + {% endfor %} + </ul> + {% endif %} + {% endmacro %} diff --git a/components/footer/footertwo/footertwo.component.yml b/components/footer/footertwo/footertwo.component.yml new file mode 100644 index 0000000..802d3ee --- /dev/null +++ b/components/footer/footertwo/footertwo.component.yml @@ -0,0 +1,35 @@ +$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json +name: Footer +description: footer Component +props: + type: object + properties: + title: + type: string + title: Title + url: + type: string + title: URL + target: + type: string + title: Target + children: + type: array + title: Sub-menu items + items: + type: object + properties: + title: + type: string + title: Sub-menu Title + url: + type: string + title: Sub-menu URL + target: + type: string + title: Sub-menu Target + children: # Add this to support nested sub-menus + type: array + title: Sub-menu Items + items: + $ref: "#/props" # Recursively refer to the same schema diff --git a/components/footer/footertwo/footertwo.stories.json b/components/footer/footertwo/footertwo.stories.json new file mode 100644 index 0000000..838dc01 --- /dev/null +++ b/components/footer/footertwo/footertwo.stories.json @@ -0,0 +1 @@ +{"title":"Components\/footer\/footertwo","parameters":{"server":{"url":"https:\/\/site-yaamava.ddev.site\/storybook\/stories\/render"}},"stories":[{"name":"Footer two Example","args":{"title":"Test","url":"https:\/\/google.com","target":"__self"},"parameters":{"server":{"id":"eyJwYXRoIjoidGhlbWVzXC9jdXN0b21cL3RhaWxwaW5lXC9jb21wb25lbnRzXC9mb290ZXJcL2Zvb3RlcnR3b1wvZm9vdGVydHdvLnN0b3JpZXMudHdpZyIsImlkIjoiZGVmYXVsdCJ9"}}}]} \ No newline at end of file diff --git a/components/footer/footertwo/footertwo.stories.twig b/components/footer/footertwo/footertwo.stories.twig new file mode 100644 index 0000000..559c0c7 --- /dev/null +++ b/components/footer/footertwo/footertwo.stories.twig @@ -0,0 +1,68 @@ +{% stories footertwo with { title: 'Components/footer/footertwo' } %} + +{% story default with { + name: 'Footer two Example', + args: { title: "Test", url: "https://google.com", target: "__self" } +} %} + +{% set nestedObject = [ + { + title: "Home", + url: "/", + target: "_self" + }, + { + title: "Services", + url: "/services", + target: "_self", + children: [ + { + title: "Web Development", + url: "/services/web", + target: "_self", + children: [ # Sub-menu of Web Development + { + title: "Frontend", + url: "/services/web/frontend", + target: "_self", + children: [ # Sub-menu of frontend + { + title: "React", + url: "/services/web/frontend/React", + target: "_self", + children: [ # Sub-menu of React + { + title: "Expert", + url: "/services/web/frontend/react/expert", + target: "_self" + } + ] + } + ] + }, + { + title: "Backend", + url: "/services/web/backend", + target: "_self" + } + ] + }, + { + title: "SEO", + url: "/services/seo", + target: "_self" + } + ] + }, + { + title: "About", + url: "/about", + target: "_self" + } +] %} + +{# Pass the nestedObject to the component #} +{% embed 'tailpine:footertwo' with { nested: nestedObject } %}{% endembed %} +{% endstory %} + +{% endstories %} diff --git a/components/footer/footertwo/footertwo.twig b/components/footer/footertwo/footertwo.twig new file mode 100644 index 0000000..cfaede1 --- /dev/null +++ b/components/footer/footertwo/footertwo.twig @@ -0,0 +1,64 @@ +{# +/** + * @file + * Theme override to display a menu. + * + * Available variables: + * - menu_name: The machine name of the menu. + * - items: A nested list of menu items. Each menu item contains: + * - attributes: HTML attributes for the menu item. + * - below: The menu item child items. + * - title: The menu link title. + * - url: The menu link URL, instance of \Drupal\Core\Url + * - localized_options: Menu link localized options. + * - is_expanded: TRUE if the link has visible children within the current + * menu tree. + * - is_collapsed: TRUE if the link has children within the current menu tree + * that are not currently visible. + * - in_active_trail: TRUE if the link is in the active trail. + */ +#} +{% import _self as menus %} + +{# + We call a macro which calls itself to render the full tree. + @see https://twig.symfony.com/doc/3.x/tags/macro.html +#} +{{ menus.menu_links(items, attributes, 0) }} + +{% macro menu_links(items, attributes, menu_level) %} + {% import _self as menus %} + {% if items %} + {% if menu_level == 0 %} + <ul{{attributes.addClass('menuflexflex-colgap-2.5')}}> + {% else %} + <ul class="menu flex flex-col gap-2.5"> + {% endif %} + {% for item in items %} + {% + set classes = [ + 'menu-item', + item.is_expanded ? 'menu-item--expanded', + item.is_collapsed ? 'menu-item--collapsed', + item.in_active_trail ? 'menu-item--active-trail', + ] + %} + <li{{item.attributes.addClass(classes)}}> + {# {{ link(item.title, item.url) }} #} + {% if item.url is empty or item.url.toString() == '<nolink>' %} + <span class="text-body-bg text-sm md:text-lg font-normal text-white hover:text-blue-600"> + {{ item.title }} + </span> + {% else %} + <a href="{{ item.url }}" target="{{ item.target }}" class="text-body-bg hover:text-blue-600 text-sm md:text-lg font-normal text-white"> + {{ item.title }} + </a> + {% endif %} + {% if item.below %} + {{ menus.menu_links(item.below, attributes, menu_level + 1) }} + {% endif %} + </li> + {% endfor %} + </ul> + {% endif %} + {% endmacro %} diff --git a/components/views/mainview/mainview.stories.twig b/components/views/mainview/mainview.stories.twig index 557cf02..1d61fff 100644 --- a/components/views/mainview/mainview.stories.twig +++ b/components/views/mainview/mainview.stories.twig @@ -1,4 +1,4 @@ -{% stories views with { title: 'Components/Views' } %} +{% stories views with { title: 'Components/Views/mainview' } %} {% story default with { name: 'Default View', diff --git a/config/install/block.block.tailpine_copyright.yml b/config/install/block.block.tailpine_copyright.yml new file mode 100644 index 0000000..02feb2d --- /dev/null +++ b/config/install/block.block.tailpine_copyright.yml @@ -0,0 +1,23 @@ +status: true +dependencies: + content: + - 'block_content:basic:1aa397ee-16dd-4170-a613-923b983440d4' + module: + - block_content + theme: + - tailpine +id: tailpine_copyright +theme: tailpine +region: footer +weight: -9 +provider: null +plugin: 'block_content:1aa397ee-16dd-4170-a613-923b983440d4' +settings: + id: 'block_content:1aa397ee-16dd-4170-a613-923b983440d4' + label: Copyright + label_display: '0' + provider: block_content + status: true + info: '' + view_mode: full +visibility: { } diff --git a/config/install/block.block.tailpine_footerfour.yml b/config/install/block.block.tailpine_footerfour.yml new file mode 100644 index 0000000..1b74dd3 --- /dev/null +++ b/config/install/block.block.tailpine_footerfour.yml @@ -0,0 +1,23 @@ +status: true +dependencies: + config: + - system.menu.footer-four + module: + - system + theme: + - tailpine +id: tailpine_footerfour +theme: tailpine +region: footer +weight: -13 +provider: null +plugin: 'system_menu_block:footer-four' +settings: + id: 'system_menu_block:footer-four' + label: 'QUICK LINKS Three' + label_display: visible + provider: system + level: 1 + depth: 0 + expand_all_items: false +visibility: { } diff --git a/config/install/block.block.tailpine_footerone.yml b/config/install/block.block.tailpine_footerone.yml new file mode 100644 index 0000000..5b7293f --- /dev/null +++ b/config/install/block.block.tailpine_footerone.yml @@ -0,0 +1,23 @@ +status: true +dependencies: + config: + - system.menu.footer-one + module: + - system + theme: + - tailpine +id: tailpine_footerone +theme: tailpine +region: footer +weight: -16 +provider: null +plugin: 'system_menu_block:footer-one' +settings: + id: 'system_menu_block:footer-one' + label: 'QUICK LINKS' + label_display: visible + provider: system + level: 1 + depth: 0 + expand_all_items: false +visibility: { } diff --git a/config/install/block.block.tailpine_footerthree.yml b/config/install/block.block.tailpine_footerthree.yml new file mode 100644 index 0000000..b2ba8f4 --- /dev/null +++ b/config/install/block.block.tailpine_footerthree.yml @@ -0,0 +1,23 @@ +status: true +dependencies: + config: + - system.menu.footer-three + module: + - system + theme: + - tailpine +id: tailpine_footerthree +theme: tailpine +region: footer +weight: -14 +provider: null +plugin: 'system_menu_block:footer-three' +settings: + id: 'system_menu_block:footer-three' + label: 'QUICK LINKS Two' + label_display: visible + provider: system + level: 1 + depth: 0 + expand_all_items: false +visibility: { } diff --git a/config/install/block.block.tailpine_footertwo.yml b/config/install/block.block.tailpine_footertwo.yml new file mode 100644 index 0000000..ebe5437 --- /dev/null +++ b/config/install/block.block.tailpine_footertwo.yml @@ -0,0 +1,23 @@ +status: true +dependencies: + config: + - system.menu.footer-two + module: + - system + theme: + - tailpine +id: tailpine_footertwo +theme: tailpine +region: footer +weight: -15 +provider: null +plugin: 'system_menu_block:footer-two' +settings: + id: 'system_menu_block:footer-two' + label: INFO + label_display: visible + provider: system + level: 1 + depth: 0 + expand_all_items: false +visibility: { } diff --git a/config/install/block.block.tailpine_organisedby.yml b/config/install/block.block.tailpine_organisedby.yml new file mode 100644 index 0000000..ee2bffc --- /dev/null +++ b/config/install/block.block.tailpine_organisedby.yml @@ -0,0 +1,23 @@ +status: true +dependencies: + content: + - 'block_content:basic:96434efc-7b5d-4d64-8f31-02a628ccd80b' + module: + - block_content + theme: + - tailpine +id: tailpine_organisedby +theme: tailpine +region: footer +weight: -10 +provider: null +plugin: 'block_content:96434efc-7b5d-4d64-8f31-02a628ccd80b' +settings: + id: 'block_content:96434efc-7b5d-4d64-8f31-02a628ccd80b' + label: 'ORGANISED BY' + label_display: visible + provider: block_content + status: true + info: '' + view_mode: full +visibility: { } diff --git a/config/install/block.block.tailpine_when.yml b/config/install/block.block.tailpine_when.yml new file mode 100644 index 0000000..d4326e7 --- /dev/null +++ b/config/install/block.block.tailpine_when.yml @@ -0,0 +1,23 @@ +status: true +dependencies: + content: + - 'block_content:basic:96b0df85-84e3-4ec9-b094-aeb51ef27e9a' + module: + - block_content + theme: + - tailpine +id: tailpine_when +theme: tailpine +region: footer +weight: -12 +provider: null +plugin: 'block_content:96b0df85-84e3-4ec9-b094-aeb51ef27e9a' +settings: + id: 'block_content:96b0df85-84e3-4ec9-b094-aeb51ef27e9a' + label: WHEN + label_display: '0' + provider: block_content + status: true + info: '' + view_mode: full +visibility: { } diff --git a/config/install/block.block.tailpine_where.yml b/config/install/block.block.tailpine_where.yml new file mode 100644 index 0000000..fb0a92f --- /dev/null +++ b/config/install/block.block.tailpine_where.yml @@ -0,0 +1,23 @@ +status: true +dependencies: + content: + - 'block_content:basic:2b1ec8bd-ef50-4911-9fd6-947efcb6c846' + module: + - block_content + theme: + - tailpine +id: tailpine_where +theme: tailpine +region: footer +weight: -11 +provider: null +plugin: 'block_content:2b1ec8bd-ef50-4911-9fd6-947efcb6c846' +settings: + id: 'block_content:2b1ec8bd-ef50-4911-9fd6-947efcb6c846' + label: WHERE + label_display: '0' + provider: block_content + status: true + info: '' + view_mode: full +visibility: { } diff --git a/config/install/tailpine.settings.yml b/config/install/tailpine.settings.yml index 684b60d..a23cb4b 100644 --- a/config/install/tailpine.settings.yml +++ b/config/install/tailpine.settings.yml @@ -15,4 +15,5 @@ tailpine_success_color: "#14A44D" tailpine_warning_color: "#E4A11B" tailpine_error_color: "#DC4C64" header_class: "style1" +footer_class: "style1" daisyui_enable: false diff --git a/tailpine.theme b/tailpine.theme index 2a6c44b..6382b86 100644 --- a/tailpine.theme +++ b/tailpine.theme @@ -145,6 +145,13 @@ function tailpine_preprocess_page(array &$variables): void } else { $variables['header_fixed_class'] = ''; } + // Set the footer template. + $footer_style = theme_get_setting('footer_class') ?: 'style1'; + $variables['footer_template'] = 'footer--' . $footer_style; + + if (!isset($variables['logo'])) { + $variables['logo'] = theme_get_setting('logo.url'); + } } function tailpine_preprocess_menu(array &$variables) @@ -184,7 +191,8 @@ function tailpine_preprocess_menu(array &$variables) -function tailpine_page_attachments_alter(array &$attachments) { +function tailpine_page_attachments_alter(array &$attachments) +{ // Retrieve the 'daisyui_enable' setting from the theme configuration. $theme = \Drupal::theme()->getActiveTheme()->getName(); $daisyui_enabled = \Drupal::config($theme . '.settings')->get('daisyui_enable'); @@ -207,8 +215,7 @@ function tailpine_page_attachments_alter(array &$attachments) { if (!in_array('tailpine/daisyui_styles', $libraries)) { $libraries[] = 'tailpine/daisyui_styles'; } - } - else { + } else { // If DaisyUI is not enabled, ensure 'tailpine/main' is attached and 'tailpine/daisyui_styles' is not. $key = array_search('tailpine/daisyui_styles', $libraries); if ($key !== FALSE) { @@ -220,4 +227,4 @@ function tailpine_page_attachments_alter(array &$attachments) { } } } -} \ No newline at end of file +} diff --git a/templates/block/block--tailpine-copyright.html.twig b/templates/block/block--tailpine-copyright.html.twig new file mode 100644 index 0000000..0b37ec8 --- /dev/null +++ b/templates/block/block--tailpine-copyright.html.twig @@ -0,0 +1,29 @@ +{# +/** + * @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. + * - in_preview: Whether the plugin is being rendered in preview mode. + * - 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() + */ +#} +{{ include('tailpine:copyright')}} diff --git a/templates/block/block--tailpine-organisedby.html.twig b/templates/block/block--tailpine-organisedby.html.twig new file mode 100644 index 0000000..3e7ee3a --- /dev/null +++ b/templates/block/block--tailpine-organisedby.html.twig @@ -0,0 +1,29 @@ +{# +/** + * @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. + * - in_preview: Whether the plugin is being rendered in preview mode. + * - 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() + */ +#} +{{ include('tailpine:organisedby')}} diff --git a/templates/block/block--tailpine-when.html.twig b/templates/block/block--tailpine-when.html.twig new file mode 100644 index 0000000..90029d9 --- /dev/null +++ b/templates/block/block--tailpine-when.html.twig @@ -0,0 +1,29 @@ +{# +/** + * @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. + * - in_preview: Whether the plugin is being rendered in preview mode. + * - 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() + */ +#} +{{ include('tailpine:when')}} diff --git a/templates/block/block--tailpine-where.html.twig b/templates/block/block--tailpine-where.html.twig new file mode 100644 index 0000000..7a54ea3 --- /dev/null +++ b/templates/block/block--tailpine-where.html.twig @@ -0,0 +1,29 @@ +{# +/** + * @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. + * - in_preview: Whether the plugin is being rendered in preview mode. + * - 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() + */ +#} +{{ include('tailpine:where')}} diff --git a/templates/footer-styles/footer--style1.html.twig b/templates/footer-styles/footer--style1.html.twig new file mode 100644 index 0000000..d1e7af8 --- /dev/null +++ b/templates/footer-styles/footer--style1.html.twig @@ -0,0 +1,27 @@ +<footer class="container w-full max-w-[1920px] max-auto style-one" x-data x-init=" + if ($el.classList.contains('style-one')) { + $el.querySelectorAll('nav h2').forEach(el => el.style.display = 'none'); + } + "> + <div class="px-4 pt-12 pb-8 md:px-12 md:py-16 bg-body text-white grid grid-cols-4 gap-4 md:grid-cols-8 xl:grid-cols-12"> + <div class="links_box col-start-1 col-span-4 md:col-span-8 xl:col-span-12 gap-x-4 gap-y-8 grid grid-cols-4 md:grid-cols-8 xl:grid-cols-12 xl:row-start-1"> + <div class="footer-one col-start-1 col-span-2 md:col-span-4 xl:col-span-3 xl:row-start-1"> + {{ page.footer.tailpine_footerone }} + </div> + <div class="footer-two col-start-3 col-span-2 md:col-span-4 md:col-start-5 xl:col-start-4 xl:col-span-3 xl:row-start-1"> + {{ page.footer.tailpine_footertwo }} + </div> + <div class="footer-three col-start-1 col-span-2 md:col-span-4 xl:col-span-3 xl:col-start-7 xl:row-start-1"> + {{ page.footer.tailpine_footerthree }} + </div> + <div class="footer-four col-start-3 col-span-2 md:col-span-4 md:col-start-5 xl:col-start-10 xl:col-span-3 xl:row-start-1"> + {{ page.footer.tailpine_footerfour }} + </div> + </div> + <div class="copyright col-start-1 md:mt-4 col-span-4 md:col-span-8 xl:col-span-12 xl:row-start-2 grid grid-cols-4 md:grid-cols-8 xl:grid-cols-12 xl:row-start-1"> + <div class="copyright-text col-start-1 col-span-4 md:col-span-8 xl:col-span-12 xl:row-start-1"> + {{ page.footer.tailpine_copyright }} + </div> + </div> + </div> +</footer> diff --git a/templates/footer-styles/footer--style2.html.twig b/templates/footer-styles/footer--style2.html.twig new file mode 100644 index 0000000..c57330b --- /dev/null +++ b/templates/footer-styles/footer--style2.html.twig @@ -0,0 +1,112 @@ +<footer + class="max-w-[1920px] mx-auto w-full bg-body text-body-bg font-roboto px-[clamp(20px,5vw,100px)] pt-[clamp(37px,5vw,76px)] pb-[clamp(52px,5vw,80px)] grid grid-cols-4 col-start-1 col-span-4 md:grid md:grid-cols-8 md:col-start-1 md:col-span-8 xl:grid xl:grid-cols-12 xl:col-start-1 xl:col-span-12 style-two" x-data x-init=" + if ($el.classList.contains('style-two')) { + $el.querySelectorAll('nav h2').forEach(el => { + el.classList.add( + 'font-bold', + 'text-xl', + 'tracking-[3%]', + 'leading-5.5', + 'font-bold', + 'mb-[10px]', + 'border-body-bg', + 'border-b', + 'md:pb-[15px]', + 'pb-[15px]' + + ); + }); + } + if ($el.classList.contains('style-two')) { + $el.querySelectorAll('nav ul li a').forEach(el => { + el.classList.add( + 'font-normal', + 'opacity-70' + ); + }); + } + if ($el.classList.contains('style-two')) { + $el.querySelectorAll('.copyright p').forEach(el => { + el.style.setProperty('text-align', 'end', 'important'); + }); + } + const updateAlignmentTwo = () => { + const shouldApply = $el.classList.contains('style-two') && window.innerWidth < 768; + $el.querySelectorAll('.copyright p').forEach(el => { + if (shouldApply) { + el.style.setProperty('text-align', 'center', 'important'); + } else { + el.classList.remove('font-normal'); + el.style.setProperty('text-align', 'end', 'important'); + } + }); + }; + + // Initial run + updateAlignmentTwo(); + + // Update on resize + window.addEventListener('resize', updateAlignmentTwo); + + + const updateAlignment = () => { + const shouldApply = $el.classList.contains('style-two') && window.innerWidth < 1280; + $el.querySelectorAll('.when p').forEach(el => { + if (shouldApply) { + el.classList.add('font-normal'); + el.style.setProperty('text-align', 'start', 'important'); + } else { + el.classList.remove('font-normal'); + el.style.setProperty('text-align', 'end', 'important'); + } + }); + }; + + // Initial run + updateAlignment(); + + // Update on resize + window.addEventListener('resize', updateAlignment); + "> + <!-- 1st --> + <div class="grid grid-cols-4 col-start-1 col-span-4 md:grid md:grid-cols-8 xl:grid-cols-12 md:col-start-1 md:col-span-8 xl:col-span-12"> + <div class="col-start-1 col-span-3 md:col-start-1 md:col-span-5 xl:col-start-1 xl:col-span-4"> + {{ page.footer.tailpine_where }} + </div> + <div class="col-start-4 col-span-1 md:col-start-6 xl:col-start-5 md:col-span-3 xl:col-span-4 md:text-end xl:text-center"> + {% if logo %} + <div class="col-span-4 md:col-span-2 xl:col-span-3"> + <a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home" class="inline-block"> + <img src="{{ logo }}" alt="{{ 'Site logo'|t }}" class="w-auto h-auto"/> + </a> + </div> + {% endif %} + </div> + <div class="when mt-4 col-span-3 md:col-span-4 xl:col-span-4 xl:text-end"> + {{ page.footer.tailpine_when }} + </div> + </div> + + <!-- 2nd --> + <div class="pt-[clamp(54px,3vw,35px)] grid grid-cols-4 col-start-1 col-span-4 gap-5 md:grid md:grid-cols-8 md:col-start-1 md:col-span-8 xl:grid xl:grid-cols-12 xl:col-start-1 xl:col-span-12 xl:gap-8 "> + <div class="col-start-1 col-span-2 md:col-start-1 md:col-span-4 xl:col-start-1 xl:col-span-4"> + {{ page.footer.tailpine_footerone }} + </div> + <div class="col-start-3 col-span-2 md:col-start-5 md:col-span-4 xl:col-start-5 xl:col-span-4"> + {{ page.footer.tailpine_footertwo }} + </div> + <div class="col-start-1 col-span-4 md:col-start-1 md:col-span-4 xl:col-start-9 xl:col-span-4"> + {{ page.footer.tailpine_footerthree }} + </div> + </div> + <!-- 3rd --> + <div class="grid grid-cols-4 col-start-1 col-span-4 gap-5 md:grid md:grid-cols-8 md:col-start-1 md:col-span-8 xl:grid xl:grid-cols-12 xl:col-start-1 xl:col-span-12 xl:gap-8 "> + <div class="col-start-1 col-span-4 mt-9 md:col-start-1 md:col-span-4 md:mt-11 xl:col-start-1 xl:col-span-3 xl-mt-3"> + {{ page.footer.tailpine_organisedby }} + </div> + <div class="copyright col-start-1 col-span-4 mt-9 md:col-start-6 md:col-span-4 md:mt-11 xl:col-start-10 xl:col-span-3 xl-mt-3"> + {{ page.footer.tailpine_copyright }} + </div> + </div> + +</footer> diff --git a/templates/footer/menu--footer-four.html.twig b/templates/footer/menu--footer-four.html.twig new file mode 100644 index 0000000..2670e97 --- /dev/null +++ b/templates/footer/menu--footer-four.html.twig @@ -0,0 +1,22 @@ +{# +/** + * @file + * Theme override to display a menu. + * + * Available variables: + * - menu_name: The machine name of the menu. + * - items: A nested list of menu items. Each menu item contains: + * - attributes: HTML attributes for the menu item. + * - below: The menu item child items. + * - title: The menu link title. + * - url: The menu link URL, instance of \Drupal\Core\Url + * - localized_options: Menu link localized options. + * - is_expanded: TRUE if the link has visible children within the current + * menu tree. + * - is_collapsed: TRUE if the link has children within the current menu tree + * that are not currently visible. + * - in_active_trail: TRUE if the link is in the active trail. + */ +#} +{# {% embed 'tailpine:footerone' with { nested: array_for_sdc } %}{% endembed %} #} +{{ include('tailpine:footerfour')}} \ No newline at end of file diff --git a/templates/footer/menu--footer-one.html.twig b/templates/footer/menu--footer-one.html.twig new file mode 100644 index 0000000..c46baa8 --- /dev/null +++ b/templates/footer/menu--footer-one.html.twig @@ -0,0 +1,22 @@ +{# +/** + * @file + * Theme override to display a menu. + * + * Available variables: + * - menu_name: The machine name of the menu. + * - items: A nested list of menu items. Each menu item contains: + * - attributes: HTML attributes for the menu item. + * - below: The menu item child items. + * - title: The menu link title. + * - url: The menu link URL, instance of \Drupal\Core\Url + * - localized_options: Menu link localized options. + * - is_expanded: TRUE if the link has visible children within the current + * menu tree. + * - is_collapsed: TRUE if the link has children within the current menu tree + * that are not currently visible. + * - in_active_trail: TRUE if the link is in the active trail. + */ +#} +{# {% embed 'tailpine:footerone' with { nested: array_for_sdc } %}{% endembed %} #} +{{ include('tailpine:footerone')}} \ No newline at end of file diff --git a/templates/footer/menu--footer-three.html.twig b/templates/footer/menu--footer-three.html.twig new file mode 100644 index 0000000..8057c22 --- /dev/null +++ b/templates/footer/menu--footer-three.html.twig @@ -0,0 +1,22 @@ +{# +/** + * @file + * Theme override to display a menu. + * + * Available variables: + * - menu_name: The machine name of the menu. + * - items: A nested list of menu items. Each menu item contains: + * - attributes: HTML attributes for the menu item. + * - below: The menu item child items. + * - title: The menu link title. + * - url: The menu link URL, instance of \Drupal\Core\Url + * - localized_options: Menu link localized options. + * - is_expanded: TRUE if the link has visible children within the current + * menu tree. + * - is_collapsed: TRUE if the link has children within the current menu tree + * that are not currently visible. + * - in_active_trail: TRUE if the link is in the active trail. + */ +#} +{# {% embed 'tailpine:footerone' with { nested: array_for_sdc } %}{% endembed %} #} +{{ include('tailpine:footerthree')}} \ No newline at end of file diff --git a/templates/footer/menu--footer-two.html.twig b/templates/footer/menu--footer-two.html.twig new file mode 100644 index 0000000..d167231 --- /dev/null +++ b/templates/footer/menu--footer-two.html.twig @@ -0,0 +1,22 @@ +{# +/** + * @file + * Theme override to display a menu. + * + * Available variables: + * - menu_name: The machine name of the menu. + * - items: A nested list of menu items. Each menu item contains: + * - attributes: HTML attributes for the menu item. + * - below: The menu item child items. + * - title: The menu link title. + * - url: The menu link URL, instance of \Drupal\Core\Url + * - localized_options: Menu link localized options. + * - is_expanded: TRUE if the link has visible children within the current + * menu tree. + * - is_collapsed: TRUE if the link has children within the current menu tree + * that are not currently visible. + * - in_active_trail: TRUE if the link is in the active trail. + */ +#} +{# {% embed 'tailpine:footertwo' with { nested: array_for_sdc } %}{% endembed %} #} +{{ include('tailpine:footertwo')}} diff --git a/templates/layout/page.html.twig b/templates/layout/page.html.twig index 7f743f5..cc08dc4 100644 --- a/templates/layout/page.html.twig +++ b/templates/layout/page.html.twig @@ -83,10 +83,7 @@ </main> - {% if page.footer %} - <footer role="contentinfo"> - {{ page.footer }} - </footer> - {% endif %} +{% include '@tailpine/templates/footer-styles/' ~ footer_template ~ '.html.twig' %} -</div>{# /.layout-container #} + +</div> diff --git a/theme-settings.php b/theme-settings.php index bbf19fa..5dc8200 100644 --- a/theme-settings.php +++ b/theme-settings.php @@ -244,6 +244,13 @@ function tailpine_form_system_theme_settings_alter(&$form, FormStateInterface $f '#group' => 'tailpine', ]; + //Footer styles + $form['footer_settings'] = [ + '#type' => 'details', + '#title' => t('Footer Styles'), + '#group' => 'tailpine', + ]; + $form['colors']['scheme'] = [ '#type' => 'details', '#collapsible' => TRUE, @@ -327,6 +334,17 @@ function tailpine_form_system_theme_settings_alter(&$form, FormStateInterface $f 'style6' => t('Style 6: Branding and Menu left, Actions right'), ], ]; + $form['footer_settings']['footer_settings_container']['footer_class'] = [ + '#type' => 'select', + '#title' => t('Choose a footer Style'), + '#default_value' => theme_get_setting('footer_class'), + '#options' => [ + 'style1' => t('Style 1: Style One'), + 'style2' => t('Style 2: Style Two'), + 'style3' => t('Style 3: Style Three'), + 'style4' => t('Style 4: Style Four'), + ], + ]; $form['header_settings']['header_settings_container']['header_fixed'] = [ '#type' => 'checkbox', '#title' => t('Fix Header to Top'), @@ -338,10 +356,9 @@ function tailpine_form_system_theme_settings_alter(&$form, FormStateInterface $f $form['daisyui_enable'] = [ '#type' => 'checkbox', '#title' => t('Enable daisyUI Styles'), - '#description' => t('Check this box to enable the daisyUI CSS plugin. Run this command once to generate the daisyUI.css file. <strong> npm run build:daisy</strong>') , + '#description' => t('Check this box to enable the daisyUI CSS plugin. Run this command once to generate the daisyUI.css file. <strong> npm run build:daisy</strong>'), '#default_value' => theme_get_setting('daisyui_enable') ]; - } /** * Handles the color callback for the theme settings form. @@ -358,6 +375,3 @@ function colorCallback($form, FormStateInterface $form_state) { return $form['colors']['scheme']['color_container']; } - - - -- GitLab