Skip to content

Instantly share code, notes, and snippets.

@achisholm
achisholm / ui-colours.scss
Last active March 11, 2018 10:48
A set of nice UI Colours
$turqouise: #1abc9c;
$green-sea: #16a085;
$emerald: #2ecc71;
$nephritis: #27ae60;
$peter-river: #3498db;
$belize-hole: #2980b9;
$amethyst: #9b59b6;
$wisteria: #8e44ad;
$wet-asphalt: #34495e;
$midnight-blue: #2c3e50;
ZE2 9AW - Perrie Beanie's, Skaw, Shetland
M1 5AN - Manchester
W13 8DL - The Duke of Kent, London
@achisholm
achisholm / comment-headers.scss
Last active March 11, 2018 07:45
SASS header comments for dividing large files into sections and sub-sections.
//******************************************************************************
// Page Header.
//
// Styles for the main <header> section and including the main banner, main
// search form and social media links.
//******************************************************************************
//==============================================================================
// Section Heading.
//
@achisholm
achisholm / bem-nesting.scss
Created March 11, 2018 07:59
The okay-way to nest BEM-style selectors
.block {
// Declarations for `.block`
&__element {
// Declarations for `.block__element`
}
&--modifier {
// CSS declarations for `.block--modifier`
@achisholm
achisholm / breakpoint-groups.md
Last active March 11, 2018 10:14
Mixins for clean and readable RWD @ media includes.

Note: Don't just copy & paste this. ADAPT THE WIDTHS TO SUIT THE CONTENT.

TODO notes to self:

  • Decide and articulate where you stand with most appropriate unit. em, px, or something else?
  • Naming system – is mobile, tablet, desktop really the best method for naming the main horizontal divisions?
  • Add sets of -up and -only suffixed mixins.
{
"productCount": "2",
"total": "&pound;&nbsp;106.00",
"signedIn": true,
"customerName": "Alan",
"related_products_html": "<tr class=\"atb-confirmation js-atb-confirmation template\"><td colspan=\"6\"><div class=\"atb-confirmation-header\"><span class=\"atb-confirmation-header__icon icon icon--check\"></span><h1 class=\"atb-confirmation-header__title\">1 item add to <a href=\"/tcl/order.html\">your basket</a>.</h1><div class=\"atb-confirmation-header__close-control js-atb-close\">Dismiss <span class=\"icon icon--cross-2\"></span></div></div><div class=\"atb-related is-hidden\"><div class=\"atb-related__title\">Related items you may need</div><div class=\"atb-related__sub-title\">Lamps</div><table class=\"atb-related__table product-table p-t-0 product-table--ex-vat\"><tbody class=\"product-table__tbody\"><tr class=\"product-table__tr product\"><td class=\"product-table__td product__image\"><a href=\"\"><img src=\"https://www.tlc-direct.co.uk/Images/Products/size_1/LTFGL8ESCL.JPG\" width=\"1
const path = require('path');
const webpack = require('webpack')
const CleanWebpackPlugin = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = env => {
return {
mode: env.mode,
entry: {
extends /_includes/_layout
block vars
-
var options = {
pageTitle: "Christmas &amp; Bank Holiday Opening Times",
htmlClasses: "smooth-scroll"
}
block append stylesheets
@achisholm
achisholm / bespoke-cutting-service.txt
Last active April 29, 2021 10:15
Summary of function names in the bespoke cutting service JS app
// set/initialise app-scope vars
var productData
var orderData
isEmpty() - // Checks if an object is empty;
document 'keypress' listener // For some elements, simulate a click when enter key is pressed during focus.
var steps
var app = {
STEPS: [],
DOM_ELEMENTS: {
buttonBack, // #buttonBack element
buttonContinue, // #buttonContinue element
buttonPlaceOrder, // #buttonPlaceOrder element
colourSelect, // #colour element
componentList, // #componentList element
inputFields,
lengthInputFieldTemplate, // #templateLengthInputField element