-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf588b7
commit 6bf7692
Showing
12 changed files
with
178 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# Bixal USWDS Drupal base theme | ||
|
||
@TODO document the process to create a new child theme from the starter_theme. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Ignore Theme dist files | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v20.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Bixal USWDS Drupal theme | ||
|
||
@TODO Modify this starter_theme to work with core function to generate theme | ||
https://www.drupal.org/docs/core-modules-and-themes/core-themes/starterkit-theme#s-custom-starterkit-theme | ||
|
||
## Requirements | ||
|
||
Node: https://nodejs.org/en/ | ||
NVM: https://github.com/nvm-sh/nvm | ||
|
||
## Getting started | ||
|
||
### Installing the node package dependencies and running a build | ||
``` | ||
nvm use | ||
npm install | ||
npm run build | ||
``` | ||
|
||
## npm commands | ||
|
||
### Starting a watch for tracking changes and updating compiled files. | ||
|
||
``` | ||
npm run dev | ||
``` | ||
|
||
### Building the assets for deployment | ||
``` | ||
npm run build | ||
``` | ||
|
||
## Resources | ||
|
||
- [USWDS](https://designsystem.digital.gov/) | ||
- [Components overview](https://designsystem.digital.gov/components/overview/) | ||
- [Design Tokens](https://designsystem.digital.gov/design-tokens/) | ||
- [Utilities](https://designsystem.digital.gov/utilities/) | ||
- [Settings](https://designsystem.digital.gov/documentation/settings/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const uswds = require("@uswds/compile"); | ||
const {parallel, watch, series, src} = require("gulp"); | ||
const gulp = require("gulp"); | ||
|
||
/** | ||
* USWDS version | ||
*/ | ||
// Use version 3. | ||
uswds.settings.version = 3; | ||
|
||
/** | ||
* Path settings | ||
* Set as many as you need | ||
* see https://designsystem.digital.gov/documentation/getting-started/developers/phase-two-compile/#step-4-create-path-settings-and-export-compile-functions | ||
*/ | ||
|
||
uswds.paths.dist.theme = './src/sass'; | ||
uswds.paths.src.projectSass = './src/sass'; | ||
uswds.paths.dist.css = './dist/css'; | ||
uswds.paths.dist.img = './dist/img'; | ||
uswds.paths.dist.fonts = './dist/fonts'; | ||
uswds.paths.dist.js = './dist/js'; | ||
|
||
/** | ||
* Exports | ||
* Add as many as you need | ||
*/ | ||
|
||
// Various compile functions. | ||
exports.default = series(uswds.copyAssets, uswds.compile); | ||
exports.init = uswds.init; | ||
exports.compile = uswds.compile; | ||
exports.update = uswds.updateUswds; | ||
exports.copyAssets = uswds.copyAssets; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "uswds_theme", | ||
"version": "3.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build": "npx gulp" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@uswds/compile": "^1.0.0", | ||
"@uswds/uswds": "^3.6.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* * * * * ============================== | ||
* * * * * ============================== | ||
* * * * * ============================== | ||
* * * * * ============================== | ||
======================================== | ||
======================================== | ||
======================================== | ||
---------------------------------------- | ||
USWDS THEME CUSTOM STYLES | ||
---------------------------------------- | ||
!! Copy this file to your project's | ||
sass root. Don't edit the version | ||
in node_modules. | ||
---------------------------------------- | ||
Custom project SASS goes here. | ||
i.e. | ||
@include u-padding-right('05'); | ||
---------------------------------------- | ||
*/ | ||
|
||
@use "uswds-core" as *; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
---------------------------------------- | ||
USWDS with settings overrides | ||
---------------------------------------- | ||
Uncomment the following lines and add a list of changed settings | ||
in the form $setting: value, | ||
---------------------------------------- | ||
*/ | ||
|
||
// | ||
// @use "uswds-core" with ( | ||
// $setting: value, | ||
// $setting: value | ||
// ); | ||
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@forward "uswds-theme"; | ||
@forward "uswds"; | ||
@forward "uswds-theme-custom-styles"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Bixal USWDS Theme | ||
type: theme | ||
description: "Drupal theme for use with USWDS." | ||
core_version_requirement: "^9.4 || ^10" | ||
base theme: bixaluswds | ||
|
||
libraries: | ||
- starter_theme/base | ||
|
||
regions: | ||
admin: "Admin" | ||
header: "Header" | ||
content: "Content" | ||
sidebar: "Sidebar" | ||
footer: "Footer" | ||
no_region: "Blocks for Twig Tweak, hidden, or other purposes" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
base: | ||
version: VERSION | ||
dependencies: | ||
- starter_theme/uswds | ||
|
||
uswds: | ||
version: VERSION | ||
css: | ||
component: | ||
dist/css/styles.css: {} | ||
js: | ||
dist/js/uswds-init.js: {} | ||
dist/js/uswds.js: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* Functions to support theme templates. | ||
*/ | ||
|
||
/** | ||
* Implements hook_preprocess(). | ||
*/ | ||
function starter_theme_preprocess(&$variables) { | ||
$variables['uswds_img_path'] = '/themes/custom/starter_theme/dist/img'; | ||
} |