-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
574446b
commit 9938747
Showing
16 changed files
with
2,533 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}}" /> | ||
|
||
<meta name="HandheldFriendly" content="True" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
|
||
<link rel="shortcut icon" href="{{asset "favicon.ico"}}"> | ||
|
||
{{! Styles'n'Scripts }} | ||
<link rel="stylesheet" type="text/css" href="{{asset "css/screen.css"}}" /> | ||
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Merriweather:300,700,700italic,300italic|Open+Sans:700,400" /> | ||
|
||
{{! Ghost outputs important style and meta data with this tag }} | ||
{{ghost_head}} | ||
</head> | ||
<body class="{{body_class}} nav-closed"> | ||
|
||
{{navigation}} | ||
|
||
<div class="site-wrapper"> | ||
|
||
{{! Everything else gets inserted here }} | ||
{{{body}}} | ||
|
||
<footer class="site-footer clearfix"> | ||
<section class="copyright"><a href="{{@blog.url}}">{{@blog.title}}</a> © {{date format="YYYY"}}</section> | ||
<section class="poweredby">Proudly published with <a href="https://ghost.org">Ghost</a></section> | ||
</footer> | ||
|
||
</div> | ||
|
||
{{! Ghost outputs important scripts and data with this tag }} | ||
{{ghost_foot}} | ||
|
||
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script> | ||
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "Casper", | ||
"version": "1.2.5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<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}}" role="presentation"><a href="{{url absolute="true"}}">{{label}}</a></li> | ||
{{/foreach}} | ||
</ul> | ||
<a class="subscribe-button icon-feed" href="{{@blog.url}}/rss/">Subscribe</a> | ||
</div> | ||
<span class="nav-cover"></span> |
Oops, something went wrong.