Skip to content

Instantly share code, notes, and snippets.


David Darnes daviddarnes

View GitHub Profile
daviddarnes / head.html
Last active August 29, 2015 14:08
Anchor Themes head meta
View head.html
<link rel="alternate" type="application/rss+xml" title="RSS" href="/feeds/rss">
<link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="generator" content="CMS name">
<!-- Open graph meta -->
<meta property="og:type" content="website">
<meta property="og:site_name" content="Website title">
daviddarnes /
Last active August 29, 2015 14:10
Films I like but you might too
  • Taken
  • Unknown
  • Bourne Identity (and the rest of Matts)
  • Ronin
  • Old Boy (original)
  • Hostel (fair bit of action for a horror)
  • Eagle Eye
  • The Transporter (the sequels aren't as good)
  • I am Legend
  • Inception
View mods.css
body {
background-color: #333;
color: #B8B8B8;
text-align: center;
h2 {
font-weight: 500;
daviddarnes / dabblet.html
Created May 24, 2012 21:49
To the Batmobile!
View dabblet.html
<!DOCTYPE html>
body, html {
height: 100%;
overflow: hidden;
margin: 0;
padding: 0;
background: black;
daviddarnes / parallax-scrolling.js
Created October 20, 2015 08:48
Parallax scrolling with JavaScript
View parallax-scrolling.js
// Parallax header content
window.onscroll = function emParallax() {
if(window.pageYOffset>1) {
document.getElementById("parallax").style["-webkit-transform"] = "translateY("+(window.pageYOffset/3)+"px)";
} else {
document.getElementById("parallax").style["-webkit-transform"] = "translateY(0px)";
daviddarnes / Anchor Custom Article Field
Created May 26, 2013 10:54
For outputting a custom field marked with 'image' in the database within an article.
View Anchor Custom Article Field
This is to show a custom field from an article.
It will need to be created in the metadata section before it can be used in the post edit area.
In this case the custom field will need to be called 'image' and be set as an image custom field in the dropdown for type.
$image = article_custom_field('image'); // Applying a variable to the custom field, so it can be reused with ease
if ( !empty($image) ) : // Check if the field is empty, if it is the process stops here
View GFM-rouge-configuation.html
Liquid highlight with language type: {% hightlight html %}
<figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;html&gt;</span>
<span class="nt">&lt;p&gt;</span>Hi world<span class="nt">&lt;/p&gt;</span>
<span class="nt">&lt;/html&gt;</span></code><button class="button--copy">Copy <span class="octicon octicon-clippy"></span></button></pre></figure>
Backticks with language type: ``` html
<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;html&gt;</span>
daviddarnes /
Last active March 17, 2016 17:09
I'm compiling a list of references on "rich data" or markup metadata, if you have something to add then please do in the comments below
daviddarnes / _config.yml
Last active April 7, 2016 14:52
Jekyll head meta
View _config.yml
# Permalinks
permalink: pretty
# Posts
excerpt_separator: <!-- more -->
# Site info
url: ""
title: "David Darnes"
description: "Web Designer & Front-end Developer"