Skip to content

Instantly share code, notes, and snippets.

Avatar
🏚️
House falling down, brb

sarah ✈ semark sarahmonster

🏚️
House falling down, brb
View GitHub Profile
View icon
/**
* External dependencies
*/
import React from 'react';
/**
* Internal dependencies
*/
import './_style.scss';
@sarahmonster
sarahmonster / init.coffee
Created May 20, 2019 — forked from tofumatt/init.coffee
Sync Settings for Atom
View init.coffee
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
View .gitconfig
[user]
name = sarah
email = sarah@triggersandsparks.com
[push]
default = matching
[pull]
rebase = true
[rerere]
enabled = true
[color]
@sarahmonster
sarahmonster / deploybot
Created Jan 17, 2017
Ignores for deploybot.
View deploybot
**/*.scss
**/*.md
**/*.txt
**/*.json
**/*.gitignore
**/gulpfile.js
LICENSE
@sarahmonster
sarahmonster / centre.css
Created Jan 17, 2017
Center an absolutely-positioned element, because I'm always forgetting.
View centre.css
thing {
left: 50%;
transform: translate(-50%, 0);
}
@sarahmonster
sarahmonster / _lists.scss
Created Dec 3, 2016
Typographically more-correct lists
View _lists.scss
ul, ol {
margin: 0 0 1.5em 0;
padding: 0;
}
ul {
list-style: disc;
}
ol {
@sarahmonster
sarahmonster / extras.php
Created Nov 25, 2016
Excerpt customisation
View extras.php
/*
* Let's customize our excerpt a bit, so it looks better
* First we decrease the default excerpt length, then
* we give it a proper hellip for the more text.
*/
function themeslug_custom_excerpt_length( $length ) {
return 27;
}
add_filter( 'excerpt_length', 'themeslug_custom_excerpt_length', 999 );
@sarahmonster
sarahmonster / _navigation-top.scss
Last active Nov 15, 2016
Add a priority-plus navigation pattern to WordPress themes. Make sure to remove the menu-toggle button and make the main nav ul display block by default!
View _navigation-top.scss
/* Hide more link unless we need it. */
#more-menu {
display: none;
&.visible {
display: inline-block;
}
}
@sarahmonster
sarahmonster / _breakpoints.scss
Last active Nov 8, 2016
Boilerplate breakpoints mixins.
View _breakpoints.scss
@mixin mobile {
@media (max-width: #{$size__tablet-width - 1px}) {
@content;
}
}
@mixin tablet {
@media (min-width: #{$size__tablet-width}) {
@content;
}
@sarahmonster
sarahmonster / feed.php
Created Sep 29, 2016
This allows for breaking of post content in feeds at the more tag, rather than relying on the excerpt.
View feed.php
<?php
/**
* Customise feed output.
*
* @package Themename
*/
/*
* Break feed content at the <!--more--> tag.
* "For each article in a feed, show" should be set to "full text" for this to work properly.