Skip to content

Instantly share code, notes, and snippets.

View challahan's full-sized avatar

Christopher Hallahan challahan

View GitHub Profile
@challahan
challahan / craft-cmd-cheat-sheet.md
Last active July 31, 2023 17:45
Craft CMS Templating Quick Reference / Cheat Sheet

Because I'm always looking these up:

Normal Fields

{{ entry.plainTextField }}

{{ entry.dateField|date('M j, Y') }}

Asset Fields (Images)

/* Additional Default Styles for Responsive */
html {
box-sizing: border-box;
}
*,
*::before,
*::after {
box-sizing: inherit; }
@challahan
challahan / clearfix-hallahan.css
Last active April 2, 2016 20:47
Default Clearfix with instructions
/* How to use: whenever you use a float, add the class "clearfix" to the parent element that wraps the elements that are using floats. Don't place clearfix on the items themselves. */
/* Many clearfixes use display: table, but I have had better luck in IE with display: block */
.clearfix:before, .clearfix:after {
content: " ";
display: block;
height: 0;
overflow: hidden;
}
@challahan
challahan / frontmatter.html
Created August 28, 2015 18:50
Default Jekyll Frontmatter
---
layout: default
---
@challahan
challahan / default.html
Created August 28, 2015 18:48
Jekyll Default Layout
{% include header.html %}
{{ content }}
{% include footer.html %}
@challahan
challahan / wireframe.css
Last active August 28, 2015 02:38
Stylesheet for Wireframing
body {
max-width: 1000px;
padding: 1em;
font-family: Helvetica, Arial, sans-serif;
}
div, section, main, aside, header, footer {
border: 1px solid lightgray;
padding: .5em;
margin-bottom: 1em;
@challahan
challahan / stylesheet.html
Last active August 28, 2015 17:32
Non-rendering blocking stylesheet link
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Page Title Goes Here</title>
<meta name="description" content="Page Description Goes Here">
</head>
<body>
@challahan
challahan / doctype.html
Last active August 16, 2026 07:40
Default HTML5 Doctype Template
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Page Title Goes Here</title>
<meta name="description" content="Page Description Goes Here">
</head>
<body>
@challahan
challahan / shrink.js
Created August 24, 2015 05:10
Shrink Header on Scroll
// Shrink the Header on scroll //
$(document).on("scroll", function(){
if
($(document).scrollTop() > 100){
$("header").addClass("shrink");
$("nav").addClass("shrink");
$(".cd-close-nav").addClass("shrink");
}
else