Skip to content

Instantly share code, notes, and snippets.

View sarahmonster's full-sized avatar
🏚️
House falling down, brb

sarah ✈ semark sarahmonster

🏚️
House falling down, brb
View GitHub Profile
@sarahmonster
sarahmonster / icon
Created June 21, 2019 21:25
React icon
/**
* External dependencies
*/
import React from 'react';
/**
* Internal dependencies
*/
import './_style.scss';
@sarahmonster
sarahmonster / init.coffee
Created May 20, 2019 20:29 — forked from tofumatt/init.coffee
Sync Settings for Atom
# 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 ->
[user]
name = sarah
email = sarah@triggersandsparks.com
[push]
default = matching
[pull]
rebase = true
[rerere]
enabled = true
[color]
@sarahmonster
sarahmonster / deploybot
Created January 17, 2017 20:24
Ignores for deploybot.
**/*.scss
**/*.md
**/*.txt
**/*.json
**/*.gitignore
**/gulpfile.js
LICENSE
@sarahmonster
sarahmonster / centre.css
Created January 17, 2017 18:44
Center an absolutely-positioned element, because I'm always forgetting.
thing {
left: 50%;
transform: translate(-50%, 0);
}
@sarahmonster
sarahmonster / _lists.scss
Created December 3, 2016 02:02
Typographically more-correct lists
ul, ol {
margin: 0 0 1.5em 0;
padding: 0;
}
ul {
list-style: disc;
}
ol {
@sarahmonster
sarahmonster / extras.php
Created November 25, 2016 00:02
Excerpt customisation
/*
* 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 November 15, 2016 18:40
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!
/* Hide more link unless we need it. */
#more-menu {
display: none;
&.visible {
display: inline-block;
}
}
@sarahmonster
sarahmonster / _breakpoints.scss
Last active November 8, 2016 18:05
Boilerplate breakpoints mixins.
@mixin mobile {
@media (max-width: #{$size__tablet-width - 1px}) {
@content;
}
}
@mixin tablet {
@media (min-width: #{$size__tablet-width}) {
@content;
}
@sarahmonster
sarahmonster / feed.php
Created September 29, 2016 08:34
This allows for breaking of post content in feeds at the more tag, rather than relying on the excerpt.
<?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.