Skip to content

Instantly share code, notes, and snippets.

View wvuwebgist's full-sized avatar

wvuwebgist

View GitHub Profile
@wvuwebgist
wvuwebgist / _search-liquid.html
Created January 13, 2021 20:19
Search in CleanSlate CMS using the Liquid templating language.
<form class="form-search" action="https://search.wvu.edu/search" method="get" role="search">
<label for="q">
<span class="form-search__label-text">Search</span>
<input id="q" class="form-search__field" name="q" maxlength="256" placeholder="Search this site..." type="search" />
</label>
<input id="as_sitesearch" name="as_sitesearch" type="hidden" value="{{ site.domain }}" />
<input id="sort" name="sort" type="hidden" value="date:D:L:d1" />
<input id="output" name="output" type="hidden" value="xml_no_dtd" />
<input id="ie" name="ie" type="hidden" value="UTF-8" />
<input id="oe" name="oe" type="hidden" value="UTF-8" />
@wvuwebgist
wvuwebgist / psc-omnialert-system-test.rss
Last active September 18, 2020 13:46
A test feed for WVU PSC's Omnialert messaging system.
<rss xmlns:im="http://purl.org/rss/1.0/item-images/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
<channel>
<copyright>Copyright (c) 2020 Omnilert, LLC</copyright>
<docs>http://www.omnilert.com</docs>
<description>Provides RSS for PSC Web page</description>
<link>http://www.omnilert.com</link>
<title>Webpage</title>
<image>
<title>Webpage</title>
<url>http://rss.omnilert.net/images/omnilert_logo.png</url>
@wvuwebgist
wvuwebgist / emergency-alert-test.json
Created March 12, 2020 19:30
A JSON file to use as a test feed in place of: https://emergency.wvu.edu/emergency.json
{"emergency":{"events":[{"event":{"title":"Testing the system","body":"<p>This is a test of the staging emergency system</p>\r\n","body_plain":"This is a test of the staging emergency system\r\n","author":"Steven Spriggs","created_at":"2020-03-10 19:17:33 -0400","created_at_formatted":"Mar 10th, 2020 at 7:17 PM","updated_at":"2020-03-10 19:30:40 -0400","updated_at_formatted":"Mar 10th, 2020 at 7:30 PM"}}],"status":true,"updated_at":"2020-03-10 19:30:40 -0400","updated_at_formatted":"Mar 10th, 2020 at 7:30 PM"}}
@wvuwebgist
wvuwebgist / cleanslate_files_bg_image_loop.html
Created January 3, 2020 21:30
An example of how to output an inline background image in a style tag from a label in CleanSlate CMS.
<!-- NOTE: We need to make the label unique for each page -->
<!-- We're using the page slug to define the name of the label -->
<!-- EG: If we had https://developer.wvu.edu/html, the label would -->
<!-- be: "html-hero-background". This is the name of the label you'd -->
<!-- create in CleanSlate. If the URL was /html/anchor-tag, it'd be: -->
<!-- "anchor-tag-hero-background" -->
<r:set_var name="bgurl">
<r:page:slug />-hero-background
</r:set_var>
@wvuwebgist
wvuwebgist / profile_index--simple.html
Created January 1, 2020 21:12
A profile index CleanSlate CMS template that only outputs a linked name for each child page.
---
layout: default
---
<r:children:each>
<h2> <!-- Outputs each person's name: -->
<a href="<r:page:url />">
<r:page:content name="wvu-profile__name" />
</a>
</h2>
@wvuwebgist
wvuwebgist / profile_index.html
Created January 1, 2020 18:54
A Profile Index template for CleanSlate CMS.
---
layout: default
---
<div class="wvu-container">
<div id="maincontent" class="main">
<h1><r:page:name /></h1>
<ul class="wvu-profile">
@wvuwebgist
wvuwebgist / profile_individual.html
Created January 1, 2020 17:59
A Profile Individual template for CleanSlate CMS
---
layout: default
---
<div class="wvu-container">
<div id="maincontent" class="main">
<h1 class="wvu-profile__name">
<r:editable_region name="wvu-profile__name" type="simple">
@wvuwebgist
wvuwebgist / dynamic-tags.html
Last active November 22, 2019 18:04
Assign the tags/labels you want to pull dynamically via Custom Data in CleanSlate CMS.
---
layout: default
custom_data_attributes:
- tags_to_pull
---
<!--
Step 1: ☝️ Add the `tags_to_pull` custom data attribute to the
page template you want to output the feed on.
-->
@wvuwebgist
wvuwebgist / cleanslate-custom-page-data-example.yml
Last active January 20, 2020 21:36
An example of the available types and options for Custom Data in CleanSlate CMS.
---
layout: default
# These are the custom data attributes that can be applied to the page.
custom_data_attributes:
- fancy_description:
type: text
title: "Fancy Description"
rows: 6
maxlength: 200
wrap: "soft"
@wvuwebgist
wvuwebgist / w3c-valid.html
Created November 26, 2018 21:16
A barebones, W3C valid HTML page.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>A W3C Valid HTML Document</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>