{"id":18866207,"url":"https://github.com/localgovdrupal/localgov_base","last_synced_at":"2025-10-05T11:57:06.940Z","repository":{"id":37088258,"uuid":"362045773","full_name":"localgovdrupal/localgov_base","owner":"localgovdrupal","description":"The base theme for LocalGov Drupal websites.","archived":false,"fork":false,"pushed_at":"2025-02-15T18:57:57.000Z","size":1082,"stargazers_count":9,"open_issues_count":37,"forks_count":17,"subscribers_count":9,"default_branch":"1.x","last_synced_at":"2025-02-16T00:25:55.016Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Twig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/localgovdrupal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-27T08:56:15.000Z","updated_at":"2025-02-11T12:20:35.000Z","dependencies_parsed_at":"2022-07-14T05:30:29.598Z","dependency_job_id":"f5ecd040-a1cf-42ea-8832-fc5d495b306c","html_url":"https://github.com/localgovdrupal/localgov_base","commit_stats":{"total_commits":417,"total_committers":23,"mean_commits":"18.130434782608695","dds":0.3477218225419664,"last_synced_commit":"263cab9d25c293ec2cd540a607b49d3076f376e7"},"previous_names":[],"tags_count":86,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localgovdrupal%2Flocalgov_base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localgovdrupal%2Flocalgov_base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localgovdrupal%2Flocalgov_base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localgovdrupal%2Flocalgov_base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/localgovdrupal","download_url":"https://codeload.github.com/localgovdrupal/localgov_base/tar.gz/refs/heads/1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239816067,"owners_count":19701750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T05:05:56.438Z","updated_at":"2025-10-05T11:57:06.934Z","avatar_url":"https://github.com/localgovdrupal.png","language":"Twig","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ntitle: LocalGov Base Theme\n---\n\n# LocalGov Drupal Base Theme\n\nWelcome to the LocalGov Drupal base theme.\n\nWe 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.\n\n## Supported releases\n\nWe now have a 2.x and a 1.x branch.\n\n- All new feature development work will be against the 2.x branch\n- The 1.x branch will continue to have bug fixes until the end of December 2025.\n\nEveryone is encouraged to upgrade to the 2.x branch, but please see release notes regarding changes to the grid system layouts, moving from flex to css grids.\n\nhttps://github.com/localgovdrupal/localgov_base/releases/tag/2.0.0\n\n## Notes on upgrading from 1.x to 2.x\n\nIn the 2.x branch, we have re-written our grid system to use CSS Grid instead of Flexbox.\n\nThis makes the CSS for the grid simpler. It should also fix lots of minor spacing issues (negative left/right margin on grid containers).\n\nImportant: We recommend testing your layouts before deploying.\n\nIn some cases, if you have made customisations to the layout in a child theme, removing these changes might be advisable.\n\nIn some cases, the changes needed in child themes are to change the width specification on grid child items from\n\"width: calc(...) \" to \"grid-column: span 3\" for example.\n\n## Inline Documentation\nInstead 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.\n\nThe theme includes an automatically-generated list of all the CSS variables in [variables.md](./variables.md).\n\n## Sub-theme\nTo create a sub-theme, you simply need to run the sub-theme creation script that is in the `/scripts` directory, like so:\n\n```bash\n  cd web/themes/contrib/localgov_base/\n  bash scripts/create_subtheme.sh\n```\n\nYou need to enter two items when creating a sub-theme:\n1. The name of the theme, this can be anything and can include spaces, e.g. Super Council\n2. The machine name for the theme, this must start with a letter and use only lowercase letters and underscores, e.g. super_council\n\n## Custom Styles\nHopefully most of the custom styles you will need are set via CSS custom properties in the `/css/base/variables.css` file in your sub-theme.\n\nThis is where you set your colours, fonts, spacing, etc. Then you \"apply\" these variables where needed, like so:\n\n```css\n  :root {\n    /* Set/Override Variables */\n    --color-accent: red;\n    --spacing-largest: 5rem;\n\n    /* Apply Variables */\n    --color-link: var(--color-accent);\n    --breadcrumbs-background-color: var(--color-accent);\n    --section-spacing-vertical-header: var(--spacing-largest);\n  }\n```\n\nIf 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.\n\n## Automated CSS Coding Standards\nTo 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.\n\nSimply run `npm install` to get the necessary packages, then run one of the following commands to scan the files and fix any issues.\n\n- \"start\": \"npm run lint:css \u0026\u0026 npm run lint:js\",\n- \"start:fix\": \"npm run lint:css:fix \u0026\u0026 npm run lint:js:fix\",\n- \"lint:css\": \"stylelint \\\"**/*.css\\\"\",\n- \"lint:css:fix\": \"stylelint \\\"**/*.css\\\" --fix\",\n- \"lint:js\": \"eslint \\\"**/*.js\\\"\",\n- \"lint:js:fix\": \"eslint \\\"**/*.js\\\" --fix\",\n\n### start\nThis command will run the linter on your CSS and JS files and give you are report in your terminal of any issues. found.\n\n### start:fix\nThis command will do the same as `start` but will also attempt to fix any issues it finds, such as using correct quote marks, fixing indentation, etc.\n\nIt's advisable to run `start` after you run this command to see if there was anything the automated linter couldn't fix.\n\n### lint:css\nThis is the same as `start` except it only checks the CSS files.\n\n### lint:css:fix\nThis is the same as `start:fix` except it only affects the CSS files.\n\n### lint:js\nThis is the same as `start` except it only checks the JS files.\n\n### lint:js:fix\nThis is the same as `start:fix` except it only affects the JS files.\n\n### Troubleshooting\nIf you get an error, such as node not being able to find prettier, you might need to install the packages from Drupal core's `package.json`. All of our linting extends Drupal core's linting to make sure we are always following Drupal's exact coding standards. To do so, simply `cd web/core` and then `npm install`.\n\nIf you still cannot run the linter, make sure you are using the correct version of Node. We have a `.nvmrc` file to help you. Run `nvm use` from your theme directory to install the correct version.\n\n## Maintainers\n\nThis project is currently maintained by:\n\n - Mark Conroy https://github.com/markconroy\n - Maria Young https://github.com/msayoung\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalgovdrupal%2Flocalgov_base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocalgovdrupal%2Flocalgov_base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalgovdrupal%2Flocalgov_base/lists"}