Skip to content

Instantly share code, notes, and snippets.

View bridgestew's full-sized avatar

Bridget Stewart bridgestew

View GitHub Profile
@bridgestew
bridgestew / deploy-succeeded.js
Last active February 10, 2019 13:56
Notes-to-Twitter
// package.json shown below to double check nothing is missing
import fetch from 'node-fetch'
import dotenv from 'dotenv'
import Twitter from 'twitter'
import { AllHtmlEntities as Entities } from 'html-entities'
dotenv.config()
// URL of notes JSON feed
// output of file shown below
@bridgestew
bridgestew / _config.yml
Last active August 29, 2015 14:01
Jekyll 2.0 Stuff
url: http://example.com
name: Name
description: Description of site
pages_permalink: true
permalink: /:categories/:title #this didn't work within a scope, anly at root
defaults:
-
scope:
path: "" # empty string for all files
type: "page"
@bridgestew
bridgestew / Same classes, different elements
Last active December 23, 2015 09:49
This illustrates how we can apply styles independent of a specific DOM structure.
<!-- FAQ -->
<div id="faq" class="accordion">
<div class="separator">
<h3 class="accordion__title">
<a href="#faq-content1">FAQ Question 1</a>
</h3>
<div class="accordion__body" id="faq-content1">FAQ Answer 1</div>
</div>
<div class="separator">
<h3 class="accordion__title">
/* ===============================================================
Our "separator" styles, from earlier
=========================================================== */
/* Shorthand is great, but when you just want to tweak one value elsewhere -- long form is your friend */
.separator {
border-bottom-color: #bca785;
border-bottom-width: 1px;
border-bottom-style: dashed;
padding-bottom: 10px;
.separator {
border-bottom: dashed 1px #bca785;
margin-bottom: 10px;
padding-bottom: 10px;
}
#faq > div,
#archive > ul > li {
border-bottom: dashed 1px #bca785;
margin-bottom: 10px;
padding-bottom: 10px;
}
#faq > div {
border-bottom: dashed 1px #bca785;
margin-bottom: 10px;
padding-bottom: 10px;
}
#archive > ul > li {
border-bottom: dashed 1px #bca785;
margin-bottom: 10px;
padding-bottom: 10px;
@bridgestew
bridgestew / Two Concepts: HTML
Last active December 23, 2015 07:59
Early, nearly naked example for the FAQ and Archive HTML
<div id="faq">
<div>
<h3><a href="#">FAQ question</a></h3>
<div>
<p>FAQ answer</p>
</div>
</div>
<div>
<h3><a href="#">FAQ question</a></h3>
<div>
<div class="main">
<!-- FAQ -->
<div id="faq" class="accordion">
<div class="separator">
<h2 class="accordion__title">
<a class="accordion__toggle js-accordion-toggle" href="#faq-content1">
<i class="icn icn--accordion js-accordion-state">Open</i>
FAQ Question 1</a>
</h2>
<div class="accordion__body is-closed">
/* ==============================================================
A few base styles plus column layout
=========================================================== */
.wrap,
.main,
.secondary {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;