commit
7345d0dbe7
16 changed files with 2745 additions and 0 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,56 @@
@@ -0,0 +1,56 @@
|
||||
/** |
||||
* Main JS file for Casper behaviours |
||||
*/ |
||||
|
||||
/* globals jQuery, document */ |
||||
(function ($, undefined) { |
||||
"use strict"; |
||||
|
||||
var $document = $(document); |
||||
|
||||
$document.ready(function () { |
||||
|
||||
var $postContent = $(".post-content"); |
||||
$postContent.fitVids(); |
||||
|
||||
$(".scroll-down").arctic_scroll(); |
||||
|
||||
$(".menu-button, .nav-cover, .nav-close").on("click", function(e){ |
||||
e.preventDefault(); |
||||
$("body").toggleClass("nav-opened nav-closed"); |
||||
}); |
||||
|
||||
}); |
||||
|
||||
// Arctic Scroll by Paul Adam Davis
|
||||
// https://github.com/PaulAdamDavis/Arctic-Scroll
|
||||
$.fn.arctic_scroll = function (options) { |
||||
|
||||
var defaults = { |
||||
elem: $(this), |
||||
speed: 500 |
||||
}, |
||||
|
||||
allOptions = $.extend(defaults, options); |
||||
|
||||
allOptions.elem.click(function (event) { |
||||
event.preventDefault(); |
||||
var $this = $(this), |
||||
$htmlBody = $('html, body'), |
||||
offset = ($this.attr('data-offset')) ? $this.attr('data-offset') : false, |
||||
position = ($this.attr('data-position')) ? $this.attr('data-position') : false, |
||||
toMove; |
||||
|
||||
if (offset) { |
||||
toMove = parseInt(offset); |
||||
$htmlBody.stop(true, false).animate({scrollTop: ($(this.hash).offset().top + toMove) }, allOptions.speed); |
||||
} else if (position) { |
||||
toMove = parseInt(position); |
||||
$htmlBody.stop(true, false).animate({scrollTop: toMove }, allOptions.speed); |
||||
} else { |
||||
$htmlBody.stop(true, false).animate({scrollTop: ($(this.hash).offset().top) }, allOptions.speed); |
||||
} |
||||
}); |
||||
|
||||
}; |
||||
})(jQuery); |
@ -0,0 +1,67 @@
@@ -0,0 +1,67 @@
|
||||
/*global jQuery */ |
||||
/*jshint browser:true */ |
||||
/*! |
||||
* FitVids 1.1 |
||||
* |
||||
* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
|
||||
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
|
||||
* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
|
||||
* |
||||
*/ |
||||
|
||||
(function( $ ){ |
||||
|
||||
"use strict"; |
||||
|
||||
$.fn.fitVids = function( options ) { |
||||
var settings = { |
||||
customSelector: null |
||||
}; |
||||
|
||||
if(!document.getElementById('fit-vids-style')) { |
||||
// appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
|
||||
var head = document.head || document.getElementsByTagName('head')[0]; |
||||
var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}'; |
||||
var div = document.createElement('div'); |
||||
div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>'; |
||||
head.appendChild(div.childNodes[1]); |
||||
} |
||||
|
||||
if ( options ) { |
||||
$.extend( settings, options ); |
||||
} |
||||
|
||||
return this.each(function(){ |
||||
var selectors = [ |
||||
"iframe[src*='player.vimeo.com']", |
||||
"iframe[src*='youtube.com']", |
||||
"iframe[src*='youtube-nocookie.com']", |
||||
"iframe[src*='kickstarter.com'][src*='video.html']", |
||||
"object", |
||||
"embed" |
||||
]; |
||||
|
||||
if (settings.customSelector) { |
||||
selectors.push(settings.customSelector); |
||||
} |
||||
|
||||
var $allVideos = $(this).find(selectors.join(',')); |
||||
$allVideos = $allVideos.not("object object"); // SwfObj conflict patch
|
||||
|
||||
$allVideos.each(function(){ |
||||
var $this = $(this); |
||||
if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; } |
||||
var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(), |
||||
width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(), |
||||
aspectRatio = height / width; |
||||
if(!$this.attr('id')){ |
||||
var videoID = 'fitvid' + Math.floor(Math.random()*999999); |
||||
$this.attr('id', videoID); |
||||
} |
||||
$this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%"); |
||||
$this.removeAttr('height').removeAttr('width'); |
||||
}); |
||||
}); |
||||
}; |
||||
// Works with either jQuery or Zepto
|
||||
})( window.jQuery || window.Zepto ); |
@ -0,0 +1,41 @@
@@ -0,0 +1,41 @@
|
||||
{{!< default}} |
||||
{{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}} |
||||
|
||||
{{!-- The big featured header --}} |
||||
|
||||
{{!-- Everything inside the #author tags pulls data from the author --}} |
||||
{{#author}} |
||||
<header class="main-header author-head {{#if cover}}" style="background-image: url({{cover}}){{else}}no-cover{{/if}}"> |
||||
<nav class="main-nav overlay clearfix"> |
||||
{{#if @blog.logo}}<a class="blog-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>{{/if}} |
||||
{{#if @blog.navigation}} |
||||
<a class="menu-button icon-menu" href="#"><span class="word">Menu</span></a> |
||||
{{/if}} |
||||
</nav> |
||||
</header> |
||||
|
||||
<section class="author-profile inner"> |
||||
{{#if image}} |
||||
<figure class="author-image"> |
||||
<div class="img" style="background-image: url({{image}})"><span class="hidden">{{name}}'s Picture</span></div> |
||||
</figure> |
||||
{{/if}} |
||||
<h1 class="author-title">{{name}}</h1> |
||||
{{#if bio}} |
||||
<h2 class="author-bio">{{bio}}</h2> |
||||
{{/if}} |
||||
<div class="author-meta"> |
||||
{{#if location}}<span class="author-location icon-location">{{location}}</span>{{/if}} |
||||
{{#if website}}<span class="author-link icon-link"><a href="{{website}}">{{website}}</a></span>{{/if}} |
||||
<span class="author-stats"><i class="icon-stats"></i> {{plural ../pagination.total empty='No posts' singular='% post' plural='% posts'}}</span> |
||||
</div> |
||||
</section> |
||||
{{/author}} |
||||
|
||||
{{!-- The main content area on the homepage --}} |
||||
<main class="content" role="main"> |
||||
|
||||
{{!-- The tag below includes the post loop - partials/loop.hbs --}} |
||||
{{> "loop"}} |
||||
|
||||
</main> |
@ -0,0 +1,49 @@
@@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
{{!-- Document Settings --}} |
||||
<meta charset="utf-8" /> |
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
||||
|
||||
{{!-- Page Meta --}} |
||||
<title>{{meta_title}}</title> |
||||
<meta name="description" content="{{meta_description}}" /> |
||||
|
||||
{{!-- Mobile Meta --}} |
||||
<meta name="HandheldFriendly" content="True" /> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
||||
|
||||
{{!-- Brand icon --}} |
||||
<link rel="shortcut icon" href="{{asset "favicon.ico"}}"> |
||||
|
||||
{{!-- Styles'n'Scripts --}} |
||||
<link href="https://fonts.googleapis.com/css?family=Lato|Oxygen" rel="stylesheet"> |
||||
<link rel="stylesheet" type="text/css" href="{{asset "css/screen.css"}}" /> |
||||
|
||||
|
||||
{{!-- Ghost outputs important style and meta data with this tag --}} |
||||
{{ghost_head}} |
||||
</head> |
||||
<body class="{{body_class}} nav-closed"> |
||||
|
||||
{{!-- The blog navigation links --}} |
||||
{{navigation}} |
||||
|
||||
<div class="site-wrapper"> |
||||
|
||||
{{!-- All the main content gets inserted here, index.hbs, post.hbs, etc --}} |
||||
{{{body}}} |
||||
|
||||
</div> |
||||
|
||||
{{!-- jQuery needs to come before `{{ghost_foot}}` so that jQuery can be used in code injection --}} |
||||
<script type="text/javascript" src="//code.jquery.com/jquery-1.12.0.min.js"></script> |
||||
{{!-- Ghost outputs important scripts and data with this tag --}} |
||||
{{ghost_foot}} |
||||
{{!-- Fitvids makes video embeds responsive and awesome --}} |
||||
<script type="text/javascript" src="{{asset "js/jquery.fitvids.js"}}"></script> |
||||
{{!-- The main JavaScript file for Casper --}} |
||||
<script type="text/javascript" src="{{asset "js/index.js"}}"></script> |
||||
|
||||
</body> |
||||
</html> |
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
{{!< default}} |
||||
{{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}} |
||||
|
||||
{{!-- The big featured header --}} |
||||
<header class="main-header {{#if @blog.cover}}" style="background-image: url({{@blog.cover}}){{else}}no-cover{{/if}}"> |
||||
<nav class="main-nav overlay clearfix"> |
||||
{{#if @blog.logo}}<a class="blog-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>{{/if}} |
||||
{{#if @blog.navigation}} |
||||
<a class="menu-button icon-menu" href="#"><span class="word">Menu</span></a> |
||||
{{/if}} |
||||
</nav> |
||||
<div class="vertical"> |
||||
<div class="main-header-content inner"> |
||||
<h1 class="page-title">{{@blog.title}}</h1> |
||||
<h2 class="page-description">{{@blog.description}}</h2> |
||||
</div> |
||||
</div> |
||||
<a class="scroll-down icon-arrow-left" href="#content" data-offset="-45"><span class="hidden">Scroll Down</span></a> |
||||
</header> |
||||
|
||||
{{!-- The main content area on the homepage --}} |
||||
<main id="content" class="content" role="main"> |
||||
|
||||
{{!-- The tag below includes the post loop - partials/loop.hbs --}} |
||||
{{> "loop"}} |
||||
|
||||
</main> |
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
{ |
||||
"name": "christiaangoossens/chrg.nl", |
||||
"description": "The theme for chrg.nl", |
||||
"version": "0.0.1", |
||||
"engines": { |
||||
"ghost": ">=0.9.0 <1.0.0" |
||||
}, |
||||
"author": { |
||||
"name": "Christiaan Goossens", |
||||
"email": "contact@christiaangoossens.nl" |
||||
}, |
||||
"gpm": { |
||||
"type": "theme" |
||||
} |
||||
} |
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
{{!< default}} |
||||
|
||||
{{!-- This is a page template. A page outputs content just like any other post, and has all the same |
||||
attributes by default, but you can also customise it to behave differently if you prefer. --}} |
||||
|
||||
{{!-- Everything inside the #post tags pulls data from the page --}} |
||||
{{#post}} |
||||
|
||||
<header class="main-header post-head {{#if image}}" style="background-image: url({{image}}){{else}}no-cover{{/if}}"> |
||||
<nav class="main-nav {{#if image}}overlay{{/if}} clearfix"> |
||||
{{#if @blog.logo}}<a class="blog-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>{{/if}} |
||||
{{#if @blog.navigation}} |
||||
<a class="menu-button icon-menu" href="#"><span class="word">Menu</span></a> |
||||
{{/if}} |
||||
</nav> |
||||
</header> |
||||
|
||||
<main class="content" role="main"> |
||||
<article class="{{post_class}}"> |
||||
|
||||
<header class="post-header"> |
||||
<h1 class="post-title">{{title}}</h1> |
||||
</header> |
||||
|
||||
<section class="post-content"> |
||||
{{content}} |
||||
</section> |
||||
|
||||
</article> |
||||
</main> |
||||
{{/post}} |
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
{{!-- Previous/next page links - only displayed on page 2+ --}} |
||||
<div class="extra-pagination inner"> |
||||
{{pagination}} |
||||
</div> |
||||
|
||||
{{!-- This is the post loop - each post will be output using this markup --}} |
||||
{{#foreach posts}} |
||||
<article class="{{post_class}}"> |
||||
<header class="post-header"> |
||||
<h2 class="post-title"><a href="{{url}}">{{title}}</a></h2> |
||||
</header> |
||||
<section class="post-excerpt"> |
||||
<p>{{excerpt words="26"}} <a class="read-more" href="{{url}}">»</a></p> |
||||
</section> |
||||
<footer class="post-meta"> |
||||
{{#if author.image}}<img class="author-thumb" src="{{author.image}}" alt="{{author.name}}" nopin="nopin" />{{/if}} |
||||
{{author}} |
||||
{{tags prefix=" on "}} |
||||
<time class="post-date" datetime="{{date format="YYYY-MM-DD"}}">{{date format="DD MMMM YYYY"}}</time> |
||||
</footer> |
||||
</article> |
||||
{{/foreach}} |
||||
|
||||
{{!-- Previous/next page links - displayed on every page --}} |
||||
{{pagination}} |
@ -0,0 +1,17 @@
@@ -0,0 +1,17 @@
|
||||
<div class="nav"> |
||||
<h3 class="nav-title">Menu</h3> |
||||
<a href="#" class="nav-close"> |
||||
<span class="hidden">Close</span> |
||||
</a> |
||||
<ul> |
||||
{{#foreach navigation}} |
||||
<li class="nav-{{slug}}{{#if current}} nav-current{{/if}}"><a href="{{url absolute="true"}}">{{label}}</a></li> |
||||
{{/foreach}} |
||||
</ul> |
||||
{{#if @labs.subscribers}} |
||||
<a class="subscribe-button" href="{{@blog.url}}/subscribe/">Subscribe</a> |
||||
{{else}} |
||||
<a class="subscribe-button icon-feed" href="{{@blog.url}}/rss/">Subscribe</a> |
||||
{{/if}} |
||||
</div> |
||||
<span class="nav-cover"></span> |
@ -0,0 +1,110 @@
@@ -0,0 +1,110 @@
|
||||
{{!< default}} |
||||
|
||||
{{!-- The comment above "< default" means - insert everything in this file into |
||||
the {{{body}}} of the default.hbs template, containing the blog header/footer. --}} |
||||
|
||||
{{!-- Everything inside the #post tags pulls data from the post --}} |
||||
{{#post}} |
||||
|
||||
<header class="main-header post-head {{#if image}}" style="background-image: url({{image}}){{else}}no-cover{{/if}}"> |
||||
<nav class="main-nav {{#if image}}overlay{{/if}} clearfix"> |
||||
{{#if @blog.logo}}<a class="blog-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>{{/if}} |
||||
{{#if @blog.navigation}} |
||||
<a class="menu-button icon-menu" href="#"><span class="word">Menu</span></a> |
||||
{{/if}} |
||||
</nav> |
||||
</header> |
||||
|
||||
<main class="content" role="main"> |
||||
<article class="{{post_class}}"> |
||||
|
||||
<header class="post-header"> |
||||
<h1 class="post-title">{{title}}</h1> |
||||
<section class="post-meta"> |
||||
<time class="post-date" datetime="{{date format="YYYY-MM-DD"}}">{{date format="DD MMMM YYYY"}}</time> {{tags prefix=" on "}} |
||||
</section> |
||||
</header> |
||||
|
||||
<section class="post-content"> |
||||
{{content}} |
||||
</section> |
||||
|
||||
<footer class="post-footer"> |
||||
|
||||
{{!-- Everything inside the #author tags pulls data from the author --}} |
||||
{{#author}} |
||||
|
||||
{{#if image}} |
||||
<figure class="author-image"> |
||||
<a class="img" href="{{url}}" style="background-image: url({{image}})"><span class="hidden">{{name}}'s Picture</span></a> |
||||
</figure> |
||||
{{/if}} |
||||
|
||||
<section class="author"> |
||||
<h4><a href="{{url}}">{{name}}</a></h4> |
||||
|
||||
{{#if bio}} |
||||
<p>{{bio}}</p> |
||||
{{else}} |
||||
<p>Read <a href="{{url}}">more posts</a> by this author.</p> |
||||
{{/if}} |
||||
<div class="author-meta"> |
||||
{{#if location}}<span class="author-location icon-location">{{location}}</span>{{/if}} |
||||
{{#if website}}<span class="author-link icon-link"><a href="{{website}}">{{website}}</a></span>{{/if}} |
||||
</div> |
||||
</section> |
||||
|
||||
{{/author}} |
||||
|
||||
<section class="share"> |
||||
<h4>Share this post</h4> |
||||
<a class="icon-twitter" href="https://twitter.com/intent/tweet?text={{encode title}}&url={{url absolute="true"}}" |
||||
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;"> |
||||
<span class="hidden">Twitter</span> |
||||
</a> |
||||
<a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{url absolute="true"}}" |
||||
onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;"> |
||||
<span class="hidden">Facebook</span> |
||||
</a> |
||||
<a class="icon-google-plus" href="https://plus.google.com/share?url={{url absolute="true"}}" |
||||
onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;"> |
||||
<span class="hidden">Google+</span> |
||||
</a> |
||||
</section> |
||||
|
||||
{{!-- Email subscribe form at the bottom of the page --}} |
||||
{{#if @labs.subscribers}} |
||||
<section class="gh-subscribe"> |
||||
<h3 class="gh-subscribe-title">Subscribe to {{@blog.title}}</h3> |
||||
<p>Get the latest posts delivered right to your inbox.</p> |
||||
{{subscribe_form placeholder="Your email address"}} |
||||
<span class="gh-subscribe-rss">or subscribe <a href="http://cloud.feedly.com/#subscription/feed/{{@blog.url}}/rss/">via RSS</a> with Feedly!</span> |
||||
</section> |
||||
{{/if}} |
||||
|
||||
</footer> |
||||
|
||||
</article> |
||||
</main> |
||||
|
||||
{{!-- Links to Previous/Next posts --}} |
||||
<aside class="read-next"> |
||||
{{#next_post}} |
||||
<a class="read-next-story {{#if image}}" style="background-image: url({{image}}){{else}}no-cover{{/if}}" href="{{url}}"> |
||||
<section class="post"> |
||||
<h2>{{title}}</h2> |
||||
<p>{{excerpt words="19"}}…</p> |
||||
</section> |
||||
</a> |
||||
{{/next_post}} |
||||
{{#prev_post}} |
||||
<a class="read-next-story prev {{#if image}}" style="background-image: url({{image}}){{else}}no-cover{{/if}}" href="{{url}}"> |
||||
<section class="post"> |
||||
<h2>{{title}}</h2> |
||||
<p>{{excerpt words="19"}}…</p> |
||||
</section> |
||||
</a> |
||||
{{/prev_post}} |
||||
</aside> |
||||
|
||||
{{/post}} |
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
{{!< default}} |
||||
{{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}} |
||||
|
||||
{{!-- If we have a tag cover, display that - else blog cover - else nothing --}} |
||||
<header class="main-header tag-head {{#if tag.image}}" style="background-image: url({{tag.image}}){{else}}{{#if @blog.cover}}" style="background-image: url({{@blog.cover}}){{else}}no-cover{{/if}}{{/if}}"> |
||||
<nav class="main-nav overlay clearfix"> |
||||
{{#if @blog.logo}}<a class="blog-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>{{/if}} |
||||
{{#if @blog.navigation}} |
||||
<a class="menu-button icon-menu" href="#"><span class="word">Menu</span></a> |
||||
{{/if}} |
||||
</nav> |
||||
<div class="vertical"> |
||||
{{#tag}} |
||||
<div class="main-header-content inner"> |
||||
<h1 class="page-title">{{name}}</h1> |
||||
<h2 class="page-description"> |
||||
{{#if description}} |
||||
{{description}} |
||||
{{else}} |
||||
A {{../pagination.total}}-post collection |
||||
{{/if}} |
||||
</h2> |
||||
</div> |
||||
{{/tag}} |
||||
</div> |
||||
</header> |
||||
|
||||
{{!-- The main content area on the homepage --}} |
||||
<main class="content" role="main"> |
||||
|
||||
{{!-- The tag below includes the post loop - partials/loop.hbs --}} |
||||
{{> "loop"}} |
||||
|
||||
</main> |
Loading…
Reference in new issue