diff --git a/css/components/page-sections.css b/css/components/page-sections.css index 94cbb8d..dd78fe1 100644 --- a/css/components/page-sections.css +++ b/css/components/page-sections.css @@ -1,3 +1,31 @@ +/* + Overrides from + localgov_paragraphs/modules/localgov_subsites_paragraphs/css/localgov-subsites-paragraphs.css + + This is so that we only have the gap specified in our grid/custom CSS between + columns in page sections, rather than our gap + this extra padding. +*/ +.paragraph--type--page-section .layout__region { + padding-bottom: 0; +} +.paragraph--type--page-section .layout--twocol .layout__region--first { + padding-right: 0; +} +.paragraph--type--page-section .layout--twocol .layout__region--second { + padding-left: 0; +} +.paragraph--type--page-section .layout--threecol-33-34-33 .layout__region--first { + padding-right: 0; +} +.paragraph--type--page-section .layout--threecol-33-34-33 .layout__region--second { + padding-right: 0; + padding-left: 0; +} +.paragraph--type--page-section .layout--threecol-33-34-33 .layout__region--third { + padding-left: 0; +} + +/* Page sections */ .lgd-page-section { color: var(--color-page-section-text-color); background-color: var(--color-page-section-background-color); diff --git a/templates/layouts/four-col/layout--localgov-fourcol-25-25-25-25.html.twig b/templates/layouts/four-col/layout--localgov-fourcol-25-25-25-25.html.twig new file mode 100644 index 0000000..b2bf7c9 --- /dev/null +++ b/templates/layouts/four-col/layout--localgov-fourcol-25-25-25-25.html.twig @@ -0,0 +1,51 @@ +{# +/** + * @file + * Default theme implementation for a three column layout. + * + * This template provides a three column 33%-34%-33% display layout, with + * additional areas for the top and the bottom. + * + * Available variables: + * - content: The content for this layout. + * - attributes: HTML attributes for the layout
. + * + * @ingroup themeable + */ +#} +{% + set classes = [ + 'layout', + 'layout--fourcol-25-25-25-25', + 'lgd-row', + ] +%} +{% if content %} + + + {% if content.first %} +
+ {{ content.first }} +
+ {% endif %} + + {% if content.second %} +
+ {{ content.second }} +
+ {% endif %} + + {% if content.third %} +
+ {{ content.third }} +
+ {% endif %} + + {% if content.fourth %} +
+ {{ content.fourth }} +
+ {% endif %} + +
+{% endif %} diff --git a/templates/layouts/one-col/layout--localgov-onecol.html.twig b/templates/layouts/one-col/layout--localgov-onecol.html.twig new file mode 100644 index 0000000..5e04abc --- /dev/null +++ b/templates/layouts/one-col/layout--localgov-onecol.html.twig @@ -0,0 +1,26 @@ +{# +/** + * @file + * Default theme implementation to display a one-column layout. + * + * Available variables: + * - content: The content for this layout. + * - attributes: HTML attributes for the layout
. + * + * @ingroup themeable + */ +#} +{% + set classes = [ + 'layout', + 'layout--onecol', + 'lgd-row', + ] +%} +{% if content %} + +
+ {{ content.content }} +
+
+{% endif %} diff --git a/templates/layouts/one-col/layout--onecol--flexible.html.twig b/templates/layouts/one-col/layout--onecol--flexible.html.twig new file mode 100644 index 0000000..ce6d578 --- /dev/null +++ b/templates/layouts/one-col/layout--onecol--flexible.html.twig @@ -0,0 +1,25 @@ +{# +/** + * @file + * Theme template to display a one-column **flexible** layout. + * + * Available variables: + * - content: The content for this layout. + * - attributes: HTML attributes for the layout
. + */ +#} +{% + set classes = [ + 'layout', + 'layout--onecol', + 'layout--onecol__flexible', + 'lgd-row', + ] +%} +{% if content %} + +
+ {{ content.content }} +
+
+{% endif %} diff --git a/templates/layouts/one-col/layout--onecol.html.twig b/templates/layouts/one-col/layout--onecol.html.twig new file mode 100644 index 0000000..113325e --- /dev/null +++ b/templates/layouts/one-col/layout--onecol.html.twig @@ -0,0 +1,25 @@ +{# +/** + * @file + * Theme override to display a one-column layout. + * + * Available variables: + * - in_preview: Whether the plugin is being rendered in preview mode. + * - content: The content for this layout. + * - attributes: HTML attributes for the layout
. + */ +#} +{% + set classes = [ + 'layout', + 'layout--onecol', + 'lgd-row', + ] +%} +{% if content %} + +
+ {{ content.content }} +
+
+{% endif %} diff --git a/templates/layouts/three-col/layout--localgov-threecol-33-34-33.html.twig b/templates/layouts/three-col/layout--localgov-threecol-33-34-33.html.twig new file mode 100644 index 0000000..219c39c --- /dev/null +++ b/templates/layouts/three-col/layout--localgov-threecol-33-34-33.html.twig @@ -0,0 +1,45 @@ +{# +/** + * @file + * Default theme implementation for a three column layout. + * + * This template provides a three column 33%-34%-33% display layout, with + * additional areas for the top and the bottom. + * + * Available variables: + * - content: The content for this layout. + * - attributes: HTML attributes for the layout
. + * + * @ingroup themeable + */ +#} +{% + set classes = [ + 'layout', + 'layout--threecol-33-34-33', + 'lgd-row', + ] +%} +{% if content %} + + + {% if content.first %} +
+ {{ content.first }} +
+ {% endif %} + + {% if content.second %} +
+ {{ content.second }} +
+ {% endif %} + + {% if content.third %} +
+ {{ content.third }} +
+ {% endif %} + +
+{% endif %} diff --git a/templates/layouts/three-col/layout--threecol-33-34-33.html.twig b/templates/layouts/three-col/layout--threecol-33-34-33.html.twig new file mode 100644 index 0000000..99c0a5f --- /dev/null +++ b/templates/layouts/three-col/layout--threecol-33-34-33.html.twig @@ -0,0 +1,54 @@ +{# +/** + * @file + * Theme override for a three column layout. + * + * This template provides a three column 33%-34%-33% display layout, with + * additional areas for the top and the bottom. + * + * Available variables: + * - in_preview: Whether the plugin is being rendered in preview mode. + * - content: The content for this layout. + * - attributes: HTML attributes for the layout
. + */ +#} +{% + set classes = [ + 'layout', + 'layout--threecol-33-34-33', + 'lgd-row', + ] +%} +{% if content %} + + {% if content.top %} +
+ {{ content.top }} +
+ {% endif %} + + {% if content.first %} +
+ {{ content.first }} +
+ {% endif %} + + {% if content.second %} +
+ {{ content.second }} +
+ {% endif %} + + {% if content.third %} +
+ {{ content.third }} +
+ {% endif %} + + {% if content.bottom %} +
+ {{ content.bottom }} +
+ {% endif %} +
+{% endif %} diff --git a/templates/layouts/two-col/layout--localgov-twocol.html.twig b/templates/layouts/two-col/layout--localgov-twocol.html.twig new file mode 100644 index 0000000..f3ce61d --- /dev/null +++ b/templates/layouts/two-col/layout--localgov-twocol.html.twig @@ -0,0 +1,36 @@ +{# +/** + * @file + * Default theme implementation to display a two-column layout. + * + * Available variables: + * - content: The content for this layout. + * - attributes: HTML attributes for the layout
. + * + * @ingroup themeable + */ +#} +{% + set classes = [ + 'layout', + 'layout--twocol', + 'lgd-row', + ] +%} +{% if content %} + + + {% if content.first %} +
+ {{ content.first }} +
+ {% endif %} + + {% if content.second %} +
+ {{ content.second }} +
+ {% endif %} + +
+{% endif %} diff --git a/templates/layouts/two-col/layout--twocol.html.twig b/templates/layouts/two-col/layout--twocol.html.twig new file mode 100644 index 0000000..35f0f08 --- /dev/null +++ b/templates/layouts/two-col/layout--twocol.html.twig @@ -0,0 +1,45 @@ +{# +/** + * @file + * Theme override to display a two-column layout. + * + * Available variables: + * - in_preview: Whether the plugin is being rendered in preview mode. + * - content: The content for this layout. + * - attributes: HTML attributes for the layout
. + */ +#} +{% + set classes = [ + 'layout', + 'layout--twocol', + 'lgd-row', + ] +%} +{% if content %} + + {% if content.top %} +
+ {{ content.top }} +
+ {% endif %} + + {% if content.first %} +
+ {{ content.first }} +
+ {% endif %} + + {% if content.second %} +
+ {{ content.second }} +
+ {% endif %} + + {% if content.bottom %} +
+ {{ content.bottom }} +
+ {% endif %} +
+{% endif %}