Skip to content

Instantly share code, notes, and snippets.

View 5t3ph's full-sized avatar

Stephanie Eckles 5t3ph

View GitHub Profile
@5t3ph
5t3ph / 11ty-setup.md
Created August 23, 2020 02:35
Basic 11ty Starting Point

Begin the Project

npm init -y && npm install @11ty/eleventy

Update scripts in package.json

  "scripts": {
    "develop": "eleventy --serve",
 "build": "eleventy"
@5t3ph
5t3ph / colorized-list-bullets.css
Created July 13, 2021 02:38
3 Quick Modern CSS Examples
/*
OLD hacky way
*/
ul {
list-style: none;
padding: 0;
}
li {
position: relative;
@5t3ph
5t3ph / sass-static-package.json
Last active August 15, 2023 02:56
SASS compile|autoprefix|minimize and browser-sync server for static HTML
/*
Project Structure:
src/
- sass/
- - style.scss
- index.html
npm start - copies src files to dist/ and starts Browsersync server at localhost:3000
npm run build - copies files to dist/ and autoprefixes/minifies css
@5t3ph
5t3ph / gatsby-useLocation-hook-change-theme.js
Last active November 28, 2022 13:16
In Gatsby, leverage Reach Router's useLocation hook along with the query-string package to change user's selected theme, or expand to any values you need from the URL parameters, available on `location.search` from the useLocation hook.
import * as React from 'react';
import { useLocation } from '@reach/router';
import queryString from 'query-string';
const getSelectedTheme = (query) => {
const fallback = 'light';
if (query) {
const queriedTheme = queryString.parse(query);
@5t3ph
5t3ph / element-classes-and-ids-vanilla.css
Last active January 25, 2022 04:06
Tag HTML elements with their class names and IDs to visualize page structure
*[class],
*[id] {
position: relative;
outline: 2px dashed red;
}
*[class]::before, *[class]::after,
*[id]::before,
*[id]::after {
position: absolute;
const HighlightPairedShortcode = require("@11ty/eleventy-plugin-syntaxhighlight/src/HighlightPairedShortcode");
const highlightCodeDemo = (code, lang) => {
const highlightedCode = HighlightPairedShortcode(code, lang);
return highlightedCode;
};
@5t3ph
5t3ph / sugar-cookies.md
Created December 30, 2021 00:22
Classic Sugar Cookies recipe

Classic Sugar Cookies

Adapted from TikTok @chloebluffcakes

Very buttery, and the perfect balance between soft and crunchy. Be sure not to over bake!

  • 1 c butter
  • 1 cup sugar
  • 1 egg
  • 1/2 tsp almond extract
@5t3ph
5t3ph / eleventy-rss-reader-feature-list.md
Created June 1, 2021 18:50
Jamstack RSS Reader with Eleventy - Feature List

Project Requirements

Join my stream on Twitch to help build this app! Feel free to add comments about additional features we should explore.

  • Structure of the RSS item
    • Name of the source
    • Article title
    • Date
    • Excerpt
  • Full article
@5t3ph
5t3ph / 11ty-imgBase.md
Created January 24, 2021 03:27
Set a variable for a directory base path for images in Markdown for 11ty

{% set imgBase %}/img/post-directory/{% endset %}

![Alt text]({{ imgBase }}img-name.png)

$color-primary: purple;
$color-secondary: blue;
$color-support: green;
$theme-colors: (
primary: $color-primary,
secondary: $color-secondary,
support: $color-support
);