Skip to content

Instantly share code, notes, and snippets.

@MrBlank
MrBlank / cascade-navigation.xsl
Last active Aug 29, 2015
Cascade Server Page Navigation
View cascade-navigation.xsl
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- Import basic stylesheet -->
<xsl:import href="/_internal/stylesheets/globals"/>
<xsl:output indent="yes" method="xml"/>
<!--
This stylesheet should be used with the 'index-nav' block set to
"Start at the current page with folder hierarchy, and also include siblings"
User Metadata:
@MrBlank
MrBlank / Squarespace-Avenue-track-portfolio-clicks
Last active Aug 29, 2015
Squarespace: Track portfolio clicks to GA with the Avenue theme
View Squarespace-Avenue-track-portfolio-clicks
<script>
// Google analytics
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-937700-1', 'joshnichols.com');
ga('send', 'pageview');
</script>
@MrBlank
MrBlank / basic-tumbler.xsl
Created May 5, 2009
Symphony - Basic Tumbler.com API Utility
View basic-tumbler.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Name: Basic Tumbler.com API Utility
Version: 1.1
Author: Josh Nichols <mrblank@gmail.com>
URL: http://www.joshnichols.com/
Description:
This utility transforms a basic Tumblr.com XML source into XHTML. Each post is grouped by date and is marked up in a way that allows for easy styling with CSS.
@MrBlank
MrBlank / Widon't XSLT
Last active May 23, 2016
Remove unsightly widows by adding a non-breaking space between the last two words in a string.
View Widon't XSLT
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!--
Name: Widon't XSLT
Version: 1.0
Author: Oleg Kurapov
URL: http://www.2sheds.ru/blog/2007/06/widont-in-xslt-dont-be-a-widow-maker/
Description:
@MrBlank
MrBlank / miz-wp-customizer
Last active Jan 5, 2018
WordPress Customizer for Mizzou signature - rough version
View miz-wp-customizer
<?php
/**
* Create Logo Setting and Upload Control
*/
function miz_customizer_settings($wp_customize)
{
// add a setting for the site logo
$wp_customize->add_setting('miz_theme_logo');
View _font-open-sans.scss
/**
* Open Sans
*/
// We are only suporting .woff formats. Add more if you need them.
// Import using a mixin. Set booliam value to 'true' on the weights needed to import. The defaults are all 'false'.
/*
@include font-open-sans(
$light-300: 'true',
$regular-400: 'true',
@MrBlank
MrBlank / scanlines-mixins.scss
Last active Jun 4, 2020
Arcade Pixel Font - CRT Scanlines!
View scanlines-mixins.scss
/*
* Inspired by Arcade Game Typography
* https://www.itsnicethat.com/articles/toshi-omagari-arcade-game-typography-publication-graphic-design-231019
*/
/* scanlines - Creates a repeating-linear-gradient over text
*
* @param $font-size (Required) in px
* @param $line-height (Required) in px
* @param $colors (Required) at least one color, each color makes a scanline