dof-dss / nicsdru_origins_theme
DoF Origins base theme
Installs: 15 036
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 7
Forks: 2
Language:SCSS
Type:drupal-custom-theme
Requires
- php: >=8.0
- dev-10.x-dev
- 10.x-dev
- 10.1.6
- 10.1.5
- 10.1.4
- 10.1.3
- 10.1.2
- 10.1.1
- 9.1.1
- 0.5.0
- 0.4.6
- 0.4.5
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.19
- 0.3.18
- 0.3.17
- 0.3.16
- 0.3.15
- 0.3.14
- 0.3.13
- 0.3.12
- v0.3.11
- 0.3.10
- 0.3.9
- 0.3.8
- 0.3.7
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- 0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- dev-dependabot/npm_and_yarn/follow-redirects-1.15.4
- dev-dependabot/npm_and_yarn/axios-1.6.0
- dev-_main
This package is auto-updated.
Last update: 2025-02-24 12:28:11 UTC
README
nicsdru_origins_theme
This repository contains code for a Drupal 8 theme from which NICS sites could be sub-themed from.
Table of contents
- Quick start
- What's included
- Bugs and feature requests
- Using the NPM scripts
- Sub-theming
- Documentation
Quick start
- Download the latest release or clone the repo:
git clone https://github.com/dof-dss/nicsdru_origins_theme.git
. npm install
NB: you encounter issues with the image optimisation libraries if you don't have libjpeg library available on the host machine. To fix thisbrew install libjpeg
.
What's included
The theme uses NPM scripts and packages to create tooling to:
- write and compile scss to css
- apply appropriate prefixing for css rules
- write and uglify js
- detect features the user’s browser has to offer (via Modernizr)
- code linting
- optimise and compress images for the web
Within the download you'll find the following directories and files, logically grouping common assets, you'll see something like this:
nicsdru_origins_theme/
└── config/
│ ├── install/
│ ├── .sass-lint.yml
│ ├── modernizr-config.json
│ ├── postcss.config.js
└── css/
└── images/
└── js/
└── src/
│ ├── images/
│ ├── js/
│ ├── scss/
│ ├── styleguide/
└── templates/
│ ├── block/
│ ├── content/
│ ├── field/
│ ├── layout/
│ ├── misc/
│ ├── navigation/
│ ├── user/
└── .gitignore
└── composer.json
└── imagemin.js
└── nicsdru-origins-theme.breakpoints.yml
└── nicsdru-origins-theme.info.yml
└── nicsdru-origins-theme.layouts.yml
└── nicsdru-origins-theme.libraries.yml
└── nicsdru-origins-theme.theme
└── package.json
└── README.md
└── screenshot.png
Using the NPM scripts
The package.json
includes the following commands and tasks:
Task | Description |
---|---|
npm run build |
npm run build compiles files into their build directories ready for use in a production environment. Uses Sass, Autoprefixer, Modernizr and UglifyJS. |
npm run watch |
Watches for changes to scss and js files & compiles them for development purposes. |
npm run lint |
Will run all .scss and .js files through their respective linting tools - eslint & sass-lint, note however that linting is also performed as part of the the build scripts. This is useful for finding issues being flagged by the linting rules. To only lint css or js files, prefix the lint command with the file type you which to scope the linting to eg npm run css-lint or npm run js-lint |
Run npm run
to see all the npm scripts.
Sub-theming
TODO: add in how to sub-theme from this theme.
Documentation
TODO: add documentation.