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
2 changes: 2 additions & 0 deletions .github/workflows/localgov_microsites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
branches:
- '2.x'
- '3.x'
pull_request:
branches:
- '2.x'
- '3.x'
workflow_dispatch:

jobs:
Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,32 @@

A sub-theme of LocalGov Base. Please read the README there also.

## Supported releases

We now have a 3.x and a 2.x branch.

- All new feature development work will be against the 3.x branch
- The 2.x branch will continue to have bug fixes until the end of December 2025.

Everyone is encouraged to upgrade to the 3.x branch and localgov_base 2.x, but please see release notes regarding changes to the grid system layouts, moving from flex to css grids.

https://github.com/localgovdrupal/localgov_base/releases/tag/2.0.0

## Notes on upgrading from 2.x to 3.x

The 3.x branch of localgov_microsites_base requires localgov_base 2.x

In the 2.x branch of localgov_base, we have re-written our grid system to use CSS Grid instead of Flexbox.

This makes the CSS for the grid simpler. It should also fix lots of minor spacing issues (negative left/right margin on grid containers).

Important: We recommend testing your layouts before deploying.

In some cases, if you have made customisations to the layout in a child theme, removing these changes might be advisable.

In some cases, the changes needed in child themes are to change the width specification on grid child items from
"width: calc(...) " to "grid-column: span 3" for example.

## Customising the appearance through the UI

A _Microsite Admin_ has the permission to set a number of css variables through the UI. These override the default variables set in /css/variables.css
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "GPL-2.0-or-later",
"require": {
"drupal/twig_tweak": "^3.2",
"localgovdrupal/localgov_base": "^1.7.0",
"localgovdrupal/localgov_base": "^2.0.0",
"localgovdrupal/localgov_microsites_group": "^4.0.0-alpha3"
}
}
22 changes: 12 additions & 10 deletions css/components/footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,20 @@
color: var(--footer-text-color);
}

@media screen and (min-width: 768px) {
.microsite-footer .lgd-row__one-quarter,
.microsite-footer .lgd-row--quarters > * {
width: calc(25% - var(--footer-grid-column-spacing));
}
.region-microsites-footer .lgd-region__inner > .lgd-row:first-of-type {
display: flex;
flex-wrap: wrap;
justify-content: var(--footer-grid-column-justification);
}

.microsite-footer .lgd-row > * {
margin-right: calc(var(--footer-grid-column-spacing) / 2);
margin-left: calc(var(--footer-grid-column-spacing) / 2);
@media (min-width: 48rem) {
.region-microsites-footer .lgd-region__inner > .lgd-row:first-of-type > * {
flex: 0 0 calc(50% - var(--grid-column-spacing));
}
}
@media (min-width: 60rem) {
.region-microsites-footer .lgd-region__inner > .lgd-row:first-of-type > * {
flex: 0 0 calc(25% - var(--grid-column-spacing));

.region-microsites-footer .lgd-region__inner > .lgd-row:first-of-type {
justify-content: var(--footer-grid-column-justification);
}
}
3 changes: 2 additions & 1 deletion js/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
if (
offCanvasToggle &&
!offCanvasToggle.contains(e.target) &&
!offCanvas.contains(e.target)
!offCanvas.contains(e.target) &&
offCanvas.getAttribute("data-expanded") === "true"
) {
handleCloseOffCanvas();
}
Expand Down