Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block wvuwebgist

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
wvuwebgist / cleanslate-custom-page-data-example.yml
Last active Feb 19, 2019
An example of the available types and options for Custom Data in CleanSlate CMS.
View cleanslate-custom-page-data-example.yml
layout: default
# These are the custom data attributes that can be applied to the page.
- fancy_description:
type: text
title: Fancy Description
rows: 6
maxlength: 200
wrap: 'soft'
wvuwebgist / w3c-valid.html
Created Nov 26, 2018
A barebones, W3C valid HTML page.
View w3c-valid.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>A W3C Valid HTML Document</title>
<h1>Hello World</h1>
wvuwebgist / nav.html
Created Jul 9, 2018
Output of r:site_menu with the sub_ul_class attribute.
View nav.html
<!-- Output of: -->
<!-- <r:site_menu max_depth="2" ul_class="wvu-nav__items" has_children_class="dropdown" sub_ul_class="sub-menu" /> -->
<!-- -->
<ul class="wvu-nav__items">
<li><a href="#">Home</a></li>
<li class="dropdown">
<a href="#">General Guidelines</a>
<ul class="sub-menu sub-menu--level-1">
<li><a class="cs-external-link " title="" target="_self" href="#">Brand Guidelines</a></li>
wvuwebgist / _random-image-loop--different-sizes.html
Created Jun 15, 2018
CleanSlate: Randomize the hero image and generate variables for different sizes based on a label:
View _random-image-loop--different-sizes.html
<r:comment><!-- Randomize the hero image and generate variables for different sizes based on a label: --></r:comment>
<r:files:each labels="random-image-collection" limit="1" types="image" random="true">
<r:set_var name="image_small"><r:file:image_url size="500x400" /></r:set_var>
<r:set_var name="image_large"><r:file:image_url size="1000x800" /></r:set_var>
.wvu-hero {
background-image: url(<r:var name="image_small" />);
} /* /.wvu-hero */
wvuwebgist / _exclude-labelled-blog-posts.html
Created Mar 19, 2018
CleanSlate: Pull a feed from your blog while excluding certain labels.
View _exclude-labelled-blog-posts.html
<r:blog id="1234"> <!-- Change this to your blog's ID. -->
<r:articles limit="5" tags_op="none" tags="dont-show-stuff-with-this-label" >
<li><a href="<r:article:path />"><r:article:name /></a></li>
wvuwebgist / _featured-blog-post--simple.html
Created Mar 19, 2018
CleanSlate: Simplified example of how to pull a featured blog post.
View _featured-blog-post--simple.html
<r:blog id="1234"> <r:comment><!-- Change to your blog's page id. --></r:comment>
<r:articles tags="featured" limit="1">
<h1><r:article:name /></h1>
wvuwebgist / _featured-blog-post.html
Created Mar 19, 2018
CleanSlate: Add a featured blog post to a page on my site.
View _featured-blog-post.html
<r:blog id="197"> <r:comment><!-- Change to your blog's page ID --></r:comment>
<r:articles:each tags="featured" limit="1"> <r:comment><!-- Change the tag(s) to what you want to feature. Comma separate multiple tags. --></r:comment>
<article class="wvu-article" role="article">
<h2 class="wvu-article__title"><a href="<r:article:path />"><r:article:name /></a></h2>
<p class="wvu-article__meta">
<r:article:author_full_name /> |
<time class="wvu-article__date" datetime="<r:date_format format="iso8601" value="{article:published_at}" />"><r:date_format format="%A, %B %d, %Y" value="{article:published_at}" /></time>
</p> <!-- /.wvu-article__meta -->
<div class="wvu-article__body">
<r:select_html css_selector="p" limit="1">
wvuwebgist / _blog-feed.html
Created Mar 19, 2018
CleanSlate: Pull articles from a blog onto the same site's homepage.
View _blog-feed.html
<r:blog id="1234"> <!-- Change this ID to your blog_index page's ID -->
<r:articles limit="5">
<li><a href="<r:article:path />"><r:article:name /></a>
<r:select_html css_selector="p" limit="2">
<r:article:content name="article-body" />
wvuwebgist / wufoo-remove-iframe-attributes.js
Created Jan 18, 2018
Add a `title` Attribute to Wufoo's <iframe> and remove superflous presentational attributes.
View wufoo-remove-iframe-attributes.js
// --- Add a `title` Attribute to Wufoo's <iframe> and remove ---
// --- superflous presentational attributes ---
// We have to wait until the <iframe> is built to add stuff to it;
// hence, the reason for using the MutationObserver API. It listens
// for when the node is finished building, then we can add & remove stuff.
var wufooOptions = {
wufooId: 'wufoo-xilwg7v0n5ncc2', // The id of the <div> Wufoo gives you for their JS form embed
titleContent: 'Cast your vote by selecting a hat.' // The content for your title attribute
View xslt_transform weather example data.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<rss version="2.0" xmlns:yweather="" xmlns:geo="">
<title>Yahoo! Weather - Lammas, GB</title>
<description>Yahoo! Weather for Lammas, GB</description>
<lastBuildDate>Thu, 17 Mar 2016 7:19 pm GMT</lastBuildDate>
You can’t perform that action at this time.