Skip to content

Instantly share code, notes, and snippets.

Avatar

Katie Fritz KatieMFritz

View GitHub Profile
@KatieMFritz
KatieMFritz / craft3-ax.md
Last active Nov 15, 2019
Craft 3 plugins for author experience
View craft3-ax.md

Craft 3 plugins for better author experience

Annotated Notes: For admin notes with automatic timestamps.

Control Panel Body Classes: Add body classes to various Control Panel screens for easier styling (in combination with Control Panel CSS).

Control Panel CSS: To make style tweaks to the control panel. See web/cp.css for styles.

Control Panel Nav: Custom navigation menus for each user type, for easier navigation.

@KatieMFritz
KatieMFritz / 0_Auto-Color-Swatches.md
Last active Feb 21, 2019
Automatic Color Swatches for Pattern Lab Node Gulp Mustache
View 0_Auto-Color-Swatches.md

Automatic Color Swatches for Pattern Lab Node Gulp Mustache

1. Install the necessary packages:

npm install --save-dev gulp-sass-json
npm install --save-dev gulp-rename
npm install --save-dev gulp-replace
@KatieMFritz
KatieMFritz / 0_Color-Swatches-From-YAML.md
Last active Sep 27, 2017
Color swatches from YAML array for Pattern Lab Node edition
@KatieMFritz
KatieMFritz / 0_Yarn_PHP_Pattern_Lab.md
Last active Jun 30, 2017
Add scss and parallel task support to PatternLab2 edition-php-twig-standard using Yarn.
View 0_Yarn_PHP_Pattern_Lab.md

Setup

  1. Assuming you already have npm, install Yarn: npm install --global yarn
  2. Add package.json to the root of your Pattern Lab. Change the name and version if you'd like.
  3. Install dependencies with yarn install
  4. Set up your CSS folder structure to match the sass-watch script, or edit the script to match your structure.

Folder structure

source
-- css
@KatieMFritz
KatieMFritz / 0_Sassy_Pattern_Lab.md
Last active Oct 3, 2019
Add scss support to PatternLab2 edition-node-gulp
View 0_Sassy_Pattern_Lab.md

First install patternlab/edition-node-gulp.

Then update package.json and run npm install in the command line.

Then update gulpfile.js, then patternlab-config.json.

If you're renaming your default stylesheet, update it in source/_meta/_00-head.mustache.

Once everything is updated, test with gulp patternlab:build.

You can’t perform that action at this time.