Skip to content

Commit

Permalink
Merge pull request #191 from localgovdrupal/1.x
Browse files Browse the repository at this point in the history
PR Ahead of 1.2.8 Release
  • Loading branch information
markconroy committed Apr 25, 2022
2 parents 59f9500 + 88c5f0f commit d130d54
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 1 deletion.
4 changes: 4 additions & 0 deletions css/layout/grid.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
flex-wrap: wrap;
}

.lgd-row--centered {
justify-content: center;
}

.lgd-row > * {
margin-right: calc(var(--grid-column-spacing) / 2);
margin-left: calc(var(--grid-column-spacing) / 2);
Expand Down
8 changes: 8 additions & 0 deletions css/layout/layout-utilities.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
@file Utility classes to drop into templates.
*/

/*
Position the main canvas relative so anything further down the page that
might use absolute will not cover the admin toolbar.
*/
.dialog-off-canvas-main-canvas {
position: relative;
}

/*
The main container class that defines how wide our content area is
*/
Expand Down
3 changes: 3 additions & 0 deletions scripts/create_subtheme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ perl -i -pe "s/LGD_SUB_THEME_NAME/$LGD_SUB_THEME_NAME/g" *
perl -i -pe "s/LGD_SUB_THEME/$LGD_SUB_THEME/g" *
echo "+ variables replaced"

cp -r ../../contrib/localgov_base/scripts/subtheme-items/.gitignore .
echo "+ .gitignore copied"

cp -r ../../contrib/localgov_base/scripts/subtheme-items/css .
echo "+ default css copied"

Expand Down
2 changes: 2 additions & 0 deletions scripts/subtheme-items/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.stylelintrc.json
2 changes: 1 addition & 1 deletion scripts/subtheme-items/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
"stylelint-config-standard": "^22.0.0",
"stylelint-order": "^4.1.0"
}
}
}
114 changes: 114 additions & 0 deletions templates/layout/page--moderngov-template.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{% block header %}
{% include '@localgov_base/layout/header.html.twig' with {'page': page} %}
{% endblock %}

<div class="lgd-container padding-horizontal">
{breadcrumb}
</div>

<main class="main" id="main-content"> {# The "skip to content" link jumps to here. #}

<div class="lgd-container">
<div class="lgd-row">
<aside class="lgd-row__one-quarter sidebar sidebar--first">
{sidenav}
</aside>

<div class="lgd-row__three-quarters">
<div class="padding-horizontal">
{content}
</div>
</div>
</div>
</div>
</main>

{# Begin Footer Regions #}
{% block footer_sections %}
{#
Wrap all of the "lgd-footers" in a `footer` element for semantics.
This should ensure that all the contact/housekeeping links/etc
are within the footer element to assist screenreaders and other
automated tools.
#}
<footer class="lgd-footer">

{# Begin Pre-footer #}
{% block pre_footer %}
{% if has_footer_first or has_footer_second or has_footer_third %}
<div class="lgd-footer__pre-footer">
<div class="lgd-container">
<div class="lgd-row">
{% if has_footer_first %}
<div class="lgd-row__one-third">
{{ page.footer_first }}
</div>
{% endif %}

{% if has_footer_second %}
<div class="lgd-row__one-third">
{{ page.footer_second }}
</div>
{% endif %}

{% if has_footer_third %}
<div class="lgd-row__one-third">
{{ page.footer_third }}
</div>
{% endif %}
</div>
</div>
</div>
{% endif %}
{% endblock %}
{# End Pre-footer #}

{# Begin Footer #}
{% block footer %}
{% if has_footer %}
<div class="lgd-footer__footer">
<div class="lgd-container">
<div class="lgd-row">
<div class="lgd-row__full">
{{ page.footer }}
</div>
</div>
</div>
</div>
{% endif %}
{% endblock %}
{# End Footer #}

{# Begin Post-footer #}
{% block post_footer %}
{% if has_lower_footer_first or has_lower_footer_second or has_lower_footer_third %}
<div class="lgd-footer__post-footer">
<div class="lgd-container">
<div class="lgd-row">
{% if has_lower_footer_first %}
<div class="lgd-row__one-third">
{{ page.lower_footer_first }}
</div>
{% endif %}

{% if has_lower_footer_second %}
<div class="lgd-row__one-third">
{{ page.lower_footer_second }}
</div>
{% endif %}

{% if has_lower_footer_third %}
<div class="lgd-row__one-third">
{{ page.lower_footer_third }}
</div>
{% endif %}
</div>
</div>
</div>
{% endif %}
{% endblock %}
{# End Post-footer #}

</footer>
{% endblock %}
{# End Footer Regions #}

0 comments on commit d130d54

Please sign in to comment.