Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR Ahead of 1.2.8 Release #191

Merged
merged 11 commits into from
Apr 25, 2022
Merged
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 #}