localgovdrupal / localgov_base
The base theme for LocalGov Drupal websites.
Installs: 77 496
Dependents: 3
Suggesters: 0
Security: 0
Stars: 9
Watchers: 9
Forks: 15
Open Issues: 43
Language:Twig
Type:drupal-theme
- 1.x-dev
- 1.8.2
- 1.8.1
- 1.8.0
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.1
- 1.6.0
- 1.5.0
- 1.4.22
- 1.4.21
- 1.4.20
- 1.4.19
- 1.4.18
- 1.4.17
- 1.4.16
- 1.4.15
- 1.4.14
- 1.4.13
- 1.4.12
- 1.4.11
- 1.4.10
- 1.4.9
- 1.4.8
- 1.4.7
- 1.4.6
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.1
- 1.3.0
- 1.2.30
- 1.2.29
- 1.2.28
- 1.2.27
- 1.2.26
- 1.2.25
- 1.2.24
- 1.2.23
- 1.2.22
- 1.2.21
- 1.2.20
- 1.2.19
- 1.2.18
- 1.2.17
- 1.2.16
- 1.2.15
- 1.2.14
- 1.2.13
- 1.2.12
- 1.2.11
- 1.2.10
- 1.2.9
- 1.2.8
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.2
- 1.0.1
- 1.0.0
- 1.0.0-beta11
- 1.0.0-beta10
- 1.0.0-beta9
- 1.0.0-beta8
- 1.0.0-beta7
- 1.0.0-beta6
- 1.0.0-beta5
- 1.0.0-beta4
- 1.0.0-beta3
- 1.0.0-beta2
- 1.0.0-beta1
- dev-feature/421-contact-component
- dev-feature/675-stacked-header
- dev-fix/691-eslint-fixes
- dev-fix/681-eslint-fixes
- dev-fix/684-eslint-fixes
- dev-fix/682-eslint-fixes
- dev-fix/680-eslint-back-to-top
- dev-fix/686-eslint-fixes
- dev-hotfix-file-name-eslint-subtheme-generator
- dev-feature/678-eslint-for-js
- dev-release-1.x
- dev-672/chore-remove-ckeditor-wysiwyg-css
- dev-670/fix-theme-generator-housekeeping-region
- dev-feature/568-card-template
- dev-feature/eslint-stylelint-testing
- dev-fix/1.x/added-return-types
- dev-feature/664-vertical-guide-nav
- dev-fix/415-focus-states-for-statuses
- dev-563/announcements-for-wysiwyg-alerts
- dev-feature/661-banner-primary-link
- dev-fix/1.x/minor-rector-fixes
- dev-fix/657-newsroom-teaser-space
- dev-592-move-components-to-use-new-single-directory-components-module
- dev-fix/654-lint-css
- dev-fix/653-update-stylelint-items
- dev-fix/651-tidy-up-logical-properties
- dev-fix/642-input-border-colour
- dev-feature/579-overflow-for-tables-in-tablefield
- dev-feature/628-use-logical-properties-for-css
- dev-feature/644-housekeeping-region
- dev-feature/627-modern-css-fields
- dev-fix/hide-empty-facets-form-controls
- dev-fix/hide-empty-facets-form
- dev-feature/621-breadcrumbs-twig-block
- dev-feature/633-facet-forms-support
- dev-fix/631-remove-localgov_base_helper-module
- dev-feature/623-fix-tests
- dev-fix/1.x/629-schema-errors
- dev-fix/612/alt-text-service-map-field
- dev-feature/303/sticky-header
- dev-fix/618/page-target-area
- dev-feature/1.x/add-expand-collapse-to-accordion
- dev-fix/607/quick-fact-semantics
- dev-fix/611/blockquote-wysiwyg
- dev-feature/614/hide-guides-steps-nav
- dev-feature/1.x/add-last-updated-date
- dev-feature/1.x/responsive-tables
- dev-fix/1.x/set-color-on-service-status-heading
- dev-312-add-back-to-top-button
- dev-564-use-prev-next-twig-for-publications-prev-next
- dev-427/fix/stop-jaws-reading-decorative-text
- dev-591/fix/footer-heading-colours
- dev-fix/578-header-services-button-focus
- dev-fix/580/alert-banner-dialog
- dev-fix/575/open-accordions-when-printing
- dev-feature/572/use-node-20-for-linting
- dev-fix/570/remove-d8-d9-support
- dev-fix/1.x/drupal-11-support
- dev-550/subsite-menu-extras-default-colors
- dev-531/icon-for-callout-and-alerts
- dev-532/add-to-calendar
- dev-560/subtitle-variable
- dev-545/prev-next-template
- dev-555/focus-effect-labelled-icon
- dev-547/default-table-styling
- dev-552/lint-css
- dev-feature/1.x-548-layout-paragraphs-builder
- dev-feature/1.x/526-new-region
- dev-539/adds-x-logo-formerly-twitter
- dev-536/grid-system-for-views
- dev-fix/minor-spelling-fixes
- dev-529/check-for-heading-calloutbox
- dev-fix/use-strict-comparisons
- dev-fix/1.x/496-change-directory-venue-text-field-to-email-field
- dev-518/sticky-tabs-for-logged-in-users
- dev-517/close-secondary-menu-when-clicking-outside
- dev-fix/1.x/499-search-box-visibility
- dev-515/feature/scoped-backgrounds-page-sections
- dev-localgov_base_issue_509
- dev-fix/1.x/501-hide-pager-items-bullit-points-markers
- dev-fix/1.x/497-disabled-blocks-get-rendered
- dev-495/feature/unpublished-pages
- dev-justinepocock-patch-2-1
- dev-justinepocock-patch-2
- dev-31/bug/background-color-quotes
- dev-491-localgov_base-directly-access-value-property-of-lede-in-localgov-page-header-blockhtmltwig
- dev-422-show-titles-of-previousnext-pages-in-guide-navigation-buttonslinks
- dev-482/1.x/phpstan-error
- dev-483/1.x/extra-page-section-variables
- dev-425/feature/print-stylesheet
- dev-464/bug/background-colour-for-unpublished
- dev-474/bug/width-of-focussed-radio
- dev-feature/1.x/container-for-blog-channel/456
- dev-feature/1.x/responsive-media-with-text/468
- dev-feature/1.x/input-focus-459
- dev-feature/1.x/contact-style/421
- dev-feature/1.x/ckeditor5-styles
- dev-feature/1.x/alert-success/460
- dev-feature/1.x/guide-overview-optional-title
- dev-bug/1.x/fixes-header-toggles-when-empty-primary-region/452
- dev-feature/1.x/focus-guide-title-when-linking-to-it/450
- dev-feature/1.x/make-guide-skip-focusable/448
- dev-bug/1.x/styling-for-single-checkbox-items/397
- dev-feature/1.x/styling-for-single-checkbox-items/397
- dev-feature/1.x/sub-menu-focus/411
- dev-feature/1.x/links-guide-prev-next-to-guide-content/416
- dev-feature/1.x/guide-navigation/433
- dev-bug/1.x/revert-links-inline-block/423
- dev-bug/1.x/persistent-messages/244
- dev-feature/add-cookie-compliance-extend
- dev-fix/1.x/244-stop-messages-being-cached
- dev-bug/1.x/link-paragraph/437
- dev-bug/1.x/styling-skip-to-content-link/373
- dev-bug/1.x/container-for-service-statuses/412
- dev-feature/1.x/hide-banner-image-from-screenreaders/419
- dev-feature/1.x/title-color-call-out-box/410
- dev-feature/1.x/urls-on-contacts-for-services/398
- dev-feature/1.x/inline-block-links/396
- dev-bug/1.x/toolbar-contrast/391
- dev-feature/1.x/css-linter/403
- dev-bug/1.x/stepbystep-focus/393
- dev-feature/1.x/extend-core-stylelint/399
- dev-feature/1.x/columns-for-secondary-menu/387
- dev-feature/1.x/375-alert-banner-minor-close-button-hover
- dev-feature/1.x/377-matching-label-for-menu-and-aria-label
- dev-feature/1.x/376-focus-state-for-logo
- dev-feature/1.x/remove-ie11-support/349
- dev-fix/363-remove-filesize-from-file-link-template
- dev-feature/1.x/drupal-10-support/333
- dev-feature/1.x/edit-description/358
- dev-feature/1.x/styling-for-preview-link/343
- dev-feature/1.x/colour-for-slogan/339
- dev-feature/drupal-10
- dev-feature/1.x/generic-icon-calls/345
- dev-feature/337-maintainers
- dev-feature/1.x/add-support-for-site-slogan/317
- dev-bug/1.x/pager-horizontal-scroll/327
- dev-feature/1.x/324-duplicate-ids
- dev-bug/1.x/breadcrumb-colour-322
- dev-feature/1.x/embedded-views
- dev-bug/1.x/page-section-width-320
- dev-feature/1.x/blog-author-styles
- dev-bug/1.x/breadcrumb-margin-315
- dev-bug/1.x/title-colour-death-notable-person/310
- dev-clean-up/1.x/calc-for-sizes/307
- dev-feature/wysiwyg-styles-ckedior-298
- dev-feature/1.x/sticky-footer/301
- dev-feature/view-embed-hide-heading-level
- dev-bug/1.x/fieldset-form-errors/294
- dev-feature/1.x/background-colours-page-sections/290
- dev-feature/template-for-embedded-views
- dev-fix/localgov-directories-229-empty-views-map
- dev-bug/1.x/link-media-files-to-file/292
- dev-bug/1.x/layout-classes-not-breaking-out/287
- dev-feature/blogs
- dev-bug/1.x/283-tab-contrast-error
- dev-feature/1.x/green-ticks
- dev-feature/1.x/favicons-block/278
- dev-feature/1.x/form-input-fonts/276
- dev-feature/1.x/style-form-errors/274
- dev-feature/1.x/form-element-template
- dev-feature/1.x/add-checkmark-icon/268
- dev-feature/1.x/styles-for-sitewide-search-header/264
- dev-feature/1.x/dont-break-columns/261
- dev-feature/1.x/more-icons/258
- dev-feature/1.x-arrow-icons/256
- dev-feature/1.x/fonts-for-form-inputs/254
- dev-feature/1.x/sensible-default-for-paragraph-layout
- dev-feature/1.x/status-page-templates/251
- dev-feature/1.x/newsroom-teaser-template/249
- dev-feature/1.x/magnifiying-glass-svg/245
- dev-fix/1.x/radios-other/241
- dev-feature/1.x/239-template-page-section
- dev-fix/1.x/url-form-elements/236
- dev-bug/1.x/updates-subtheme-docs/227
- dev-bug/1.x/video
- dev-fix/github-workflow-update-2022-06-22
- dev-feature/1.x/link-template
- dev-feature/1.x/122-component-labels
- dev-feature/1.x/grid-vertical-center/218
- dev-feature/1.x/more-icons/215
- dev-feature/1.x/footer-colors-text-links/213
- dev-bug/1.x/box-links-margin/211
- dev-feature/1.x/video-displau
- dev-feature/68-styleguide-tab
- dev-feature/70-site-design-headings
- dev-bug/1.x-add-dot-classes-for-headings/195
- dev-feature/1.x-add-gitignore-to-subtheme-generator/189
- dev-feature/1.x-position-relative-main-canvas/187
- dev-feature/1.x-moderngov/174
- dev-bug/1.x-alignment-of-icons-for-status-messages/176
- dev-bug/1.x-fix-subtheme-command-to-work-on-mac-and-linux/170
- dev-feature/1.x-nvmrc-package-json-subtheme/164
- dev-feature/1.x-better-header-layout/167
- dev-bug/1.x-better-layout-header-icons/165
- dev-bug/1.x-system-messages-not-displaying/154
- dev-feature/1.x-stroke-colour-for-leaflet-maps/60
- dev-bug/1.x-css-aggregation-breaks/153
- dev-bug/1.x-header-js-when-empty-primary-menu/155
- dev-feature/1.x-default-theming-for-forms/150
- dev-bug/1.x-ie11-no-js-working/147
- dev-bug/1.x-resize-on-scroll-hides-menu/142
- dev-bug/1.x-removed-redundant-aria-attribute/141
- dev-feature/1.x-border-for-box-links/138
- dev-bug/1.x-banner-secondary-image-full-width/135
- dev-feature/1.x-grid-spacing-variable/129
- dev-feature/1.x-mobile-menu-pattern/121
- dev-bug/1.x-main-outline-safari/130
- dev-feature/1.x-tablet-breakpoint-for-grid/120
- dev-feature/117-service-landing-page-thirds
- dev-bug/1.x-service-landing-page-email-link/95
- dev-feature/105-width-medium
- dev-bug/1.x-news-surrouding-div/97
- dev-bug/1.x-alert-banner-title/93
- dev-bug/1.x-format-datetime-attribute/94
- dev-bug/1.x-duplicate-empty-span/92
- dev-bug/1.x-close-nav-in-step-by-step-navigation/96
- dev-feature/1.x-header-search/89
- dev-feature/1.x-theming-default-search/76
- dev-feature/1.x-README.md/68
- dev-feature/1.x-key-facts-paragraph-type/38
- dev-feature/65-composer-json
This package is auto-updated.
Last update: 2024-12-19 12:58:54 UTC
README
LocalGov Drupal Base Theme
Welcome to the LocalGov Drupal base theme.
We developed this theme with scalability, ease of use, and ease of customisation in mind. Making this base theme a great start point for any website using the LocalGov Drupal distribution.
Inline Documentation
Instead of creating documentation for the theme and storing it in a wiki or something else that is likely to not be updated, we have written detailed comments inline with the code. This should make it easier to know exactly what code block any specific documentation item refers to.
The theme includes an automatically-generated list of all the CSS variables in variables.md.
Sub-theme
To create a sub-theme, you simply need to run the sub-theme creation script that is in the /scripts
directory, like so:
cd web/themes/contrib/localgov_base/
bash scripts/create_subtheme.sh
You need to enter two items when creating a sub-theme:
- The name of the theme, this can be anything and can include spaces, e.g. Super Council
- The machine name for the theme, this must start with a letter and use only lowercase letters and underscores, e.g. super_council
Custom Styles
Hopefully most of the custom styles you will need are set via CSS custom properties in the /css/variables.css
file in your sub-theme.
This is where you set your colours, fonts, spacing, etc. Then you "apply" these variables where needed, like so:
:root { /* Set/Override Variables */ --color-accent: red; --spacing-largest: 5rem; /* Apply Variables */ --color-link: var(--color-accent); --breadcrumbs-background-color: var(--color-accent); --section-spacing-vertical-header: var(--spacing-largest); }
If you need to add any CSS overrides, you can create custom CSS files for these and then a library/libraries to attach them to your components.
Automated CSS Coding Standards
To make sure we follow Drupal's CSS coding standards (without having to think about it), there is a handy npm
script to automatically scan and fix any CSS coding standards violations.
Simple run npm install
to get the necessary packages, then run npm start
to scan the files and fix any issues.
Maintainers
This project is currently maintained by:
- Mark Conroy https://github.com/markconroy
- Maria Young https://github.com/msayoung