Compare commits

...

11 Commits
1.0.1 ... 1.1.0

Author SHA1 Message Date
8bf2b72e69 Remove MS specific font feature styling 2014-09-25 19:28:43 +03:00
5968231807 Fix IE font feature rendering
See #124 (again)
2014-09-25 19:23:25 +03:00
e07d0d8775 Post image support 2014-09-25 17:35:06 +03:00
63535cf5ce 1.1.0 2014-09-25 16:42:27 +03:00
75c81be9c3 Typography overhaul 2014-09-25 16:41:04 +03:00
144be310a0 Merge pull request #132 from jeremija/image-width-fix
Fixed bug where image width changes on refresh
2014-09-15 20:57:47 +01:00
a149b03a2f Fixes variable image width bug
closes #95
 - added onload event listeners to images
2014-09-15 21:51:59 +02:00
72ba094f2f Merge pull request #130 from jillesme/master
Optimize index.js and add style consistency
2014-09-15 18:46:46 +01:00
2cf5c0cb87 Optimize index.js and add style consistency
Declared all jQuery objects once where needed instead of diving into the DOM multiple times for the same object.

Added style consistency between variable declarations, if/else statements and functions.
2014-09-07 23:34:40 +02:00
e669b29895 Merge pull request #129 from Douten/patch-1
Fix bouncing scroll-down arrow bug in webkit
2014-09-03 13:13:01 +01:00
bcce1e9a08 Fix bouncing scroll-down arrow bug in webkit
Webkit transform currently requires a vendor prefix. Without it, the arrow bounces and rotate to the original un-rotated state. See https://www.dropbox.com/s/46sjiihtjya42s8/wk-rotate.mov
2014-09-03 01:16:53 -04:00
6 changed files with 187 additions and 199 deletions

View File

@ -175,17 +175,16 @@ html {
} }
body { body {
-webkit-font-feature-settings: 'kern' 1;
-moz-font-feature-settings: 'kern' 1;
-ms-font-feature-settings: 'kern' 1;
-o-font-feature-settings: 'kern' 1;
font-feature-settings: 'kern' 1;
height: 100%; height: 100%;
max-height: 100%; max-height: 100%;
font-family: "PT Serif", serif; font-family: "Merriweather", serif;
font-size: 2.2rem; letter-spacing: 0.01rem;
line-height: 1.7em; font-size: 1.8rem;
line-height: 1.75em;
color: #3A4145; color: #3A4145;
-webkit-font-feature-settings: 'kern' 1;
-moz-font-feature-settings: 'kern' 1;
-o-font-feature-settings: 'kern' 1;
} }
::-moz-selection { ::-moz-selection {
@ -200,40 +199,38 @@ h1, h2, h3,
h4, h5, h6 { h4, h5, h6 {
-webkit-font-feature-settings: 'dlig' 1, 'liga' 1, 'lnum' 1, 'kern' 1; -webkit-font-feature-settings: 'dlig' 1, 'liga' 1, 'lnum' 1, 'kern' 1;
-moz-font-feature-settings: 'dlig' 1, 'liga' 1, 'lnum' 1, 'kern' 1; -moz-font-feature-settings: 'dlig' 1, 'liga' 1, 'lnum' 1, 'kern' 1;
-ms-font-feature-settings: 'dlig' 1, 'liga' 1, 'lnum' 1, 'kern' 1;
-o-font-feature-settings: 'dlig' 1, 'liga' 1, 'lnum' 1, 'kern' 1; -o-font-feature-settings: 'dlig' 1, 'liga' 1, 'lnum' 1, 'kern' 1;
font-feature-settings: 'dlig' 1, 'liga' 1, 'lnum' 1, 'kern' 1;
color: #2E2E2E; color: #2E2E2E;
line-height: 1.15em; line-height: 1.15em;
margin: 0 0 0.3em 0; margin: 0 0 0.4em 0;
font-family: "Open Sans", sans-serif; font-family: "Open Sans", sans-serif;
} }
h1 { h1 {
font-size: 5.6rem; font-size: 5rem;
letter-spacing: -2px; letter-spacing: -2px;
text-indent: -3px; text-indent: -3px;
} }
h2 { h2 {
font-size: 4.4rem; font-size: 3.6rem;
letter-spacing: -1px; letter-spacing: -1px;
} }
h3 { h3 {
font-size: 3.9rem; font-size: 3rem;
} }
h4 { h4 {
font-size: 3.1rem; font-size: 2.5rem;
} }
h5 { h5 {
font-size: 2.8rem; font-size: 2rem;
} }
h6 { h6 {
font-size: 2.2rem; font-size: 2rem;
} }
a { a {
@ -248,14 +245,12 @@ a:hover {
p, ul, ol, dl { p, ul, ol, dl {
-webkit-font-feature-settings: 'liga' 1, 'onum' 1, 'kern' 1; -webkit-font-feature-settings: 'liga' 1, 'onum' 1, 'kern' 1;
-moz-font-feature-settings: 'liga' 1, 'onum' 1, 'kern' 1; -moz-font-feature-settings: 'liga' 1, 'onum' 1, 'kern' 1;
-ms-font-feature-settings: 'liga' 1, 'onum' 1, 'kern' 1;
-o-font-feature-settings: 'liga' 1, 'onum' 1, 'kern' 1; -o-font-feature-settings: 'liga' 1, 'onum' 1, 'kern' 1;
font-feature-settings: 'liga' 1, 'onum' 1, 'kern' 1; margin: 0 0 1.75em 0;
margin: 0 0 1.7em 0;
} }
ol, ul { ol, ul {
padding-left: 0; padding-left: 3rem;
} }
ol ol, ul ul, ol ol, ul ul,
@ -281,6 +276,14 @@ dl dd {
margin-bottom: 1em margin-bottom: 1em
} }
li {
margin: 0.4em 0;
}
li li {
margin: 0;
}
hr { hr {
display: block; display: block;
height: 1px; height: 1px;
@ -293,8 +296,8 @@ hr {
blockquote { blockquote {
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
margin: 1.7em 0 1.7em -2.2em; margin: 1.75em 0 1.75em -2.2em;
padding: 0 0 0 1.6em; padding: 0 0 0 1.75em;
border-left: #4A4A4A 0.4em solid; border-left: #4A4A4A 0.4em solid;
} }
@ -335,7 +338,7 @@ code, tt {
pre { pre {
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
margin: 0 0 1.7em 0; margin: 0 0 1.75em 0;
border: #E3EDF3 1px solid; border: #E3EDF3 1px solid;
width: 100%; width: 100%;
padding: 10px; padding: 10px;
@ -375,7 +378,7 @@ kbd {
table { table {
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
margin: 1.7em 0; margin: 1.75em 0;
width: 100%; width: 100%;
max-width: 100%; max-width: 100%;
background-color: transparent; background-color: transparent;
@ -417,7 +420,7 @@ table.plain tbody > tr:nth-child(odd) > th {
iframe, .fluid-width-video-wrapper { iframe, .fluid-width-video-wrapper {
display: block; display: block;
margin: 1.6em 0; margin: 1.75em 0;
} }
/* When a video is inside the fitvids wrapper, drop the /* When a video is inside the fitvids wrapper, drop the
@ -451,7 +454,7 @@ margin on the iframe, cause it breaks stuff. */
.inner { .inner {
position: relative; position: relative;
width: 80%; width: 80%;
max-width: 780px; max-width: 710px;
margin: 0 auto; margin: 0 auto;
} }
@ -508,6 +511,7 @@ margin on the iframe, cause it breaks stuff. */
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
color: rgba(255,255,255,0.7); color: rgba(255,255,255,0.7);
-webkit-transform: rotate(-90deg);
transform: rotate(-90deg); transform: rotate(-90deg);
-webkit-animation: bounce 4s 2s infinite; -webkit-animation: bounce 4s 2s infinite;
animation: bounce 4s 2s infinite; animation: bounce 4s 2s infinite;
@ -579,6 +583,7 @@ margin on the iframe, cause it breaks stuff. */
text-transform: uppercase; text-transform: uppercase;
line-height: 35px; line-height: 35px;
border-radius: 3px; border-radius: 3px;
background: rgba(0,0,0,0.1);
transition: all ease 0.3s; transition: all ease 0.3s;
} }
.back-button:before { .back-button:before {
@ -605,6 +610,7 @@ margin on the iframe, cause it breaks stuff. */
line-height: 35px; line-height: 35px;
white-space: nowrap; white-space: nowrap;
border-radius: 3px; border-radius: 3px;
background: rgba(0,0,0,0.1);
transition: all ease 0.3s; transition: all ease 0.3s;
} }
.subscribe-button:before { .subscribe-button:before {
@ -625,7 +631,9 @@ margin on the iframe, cause it breaks stuff. */
background: -webkit-linear-gradient(top, rgba(0,0,0,0.2) 0%,rgba(0,0,0,0) 100%); background: -webkit-linear-gradient(top, rgba(0,0,0,0.2) 0%,rgba(0,0,0,0) 100%);
background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%,rgba(0,0,0,0) 100%); background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%,rgba(0,0,0,0) 100%);
} }
.no-cover .main-nav.overlay { .no-cover .main-nav.overlay,
.no-cover .back-button,
.no-cover .subscribe-button {
background: none; background: none;
} }
@ -635,13 +643,13 @@ margin on the iframe, cause it breaks stuff. */
.main-nav.overlay .back-button, .main-nav.overlay .back-button,
.main-nav.overlay .subscribe-button { .main-nav.overlay .subscribe-button {
border-color: #fff; border-color: rgba(255,255,255,0.6);
} }
.main-nav.overlay a:hover { .main-nav.overlay a:hover {
color: #222; color: #222;
border-color: rgba(255,255,255,0.8); border-color: #fff;
background: rgba(255,255,255,0.8); background: #fff;
transition: all 0.1s ease; transition: all 0.1s ease;
} }
@ -655,7 +663,7 @@ margin on the iframe, cause it breaks stuff. */
/* The details of your blog. Defined in ghost/settings/ */ /* The details of your blog. Defined in ghost/settings/ */
.page-title { .page-title {
margin: 10px 0 10px 0; margin: 10px 0 10px 0;
font-size: 5.6rem; font-size: 5rem;
letter-spacing: -1px; letter-spacing: -1px;
font-weight: 700; font-weight: 700;
font-family: "Open Sans", sans-serif; font-family: "Open Sans", sans-serif;
@ -664,11 +672,11 @@ margin on the iframe, cause it breaks stuff. */
.page-description { .page-description {
margin: 0; margin: 0;
font-size: 2.2rem; font-size: 2rem;
line-height: 1.5em; line-height: 1.5em;
font-weight: 400; font-weight: 400;
font-family: "PT Serif", serif; font-family: "Merriweather", serif;
letter-spacing: 0; letter-spacing: 0.01rem;
color: rgba(255,255,255,0.8); color: rgba(255,255,255,0.8);
} }
@ -710,7 +718,7 @@ margin on the iframe, cause it breaks stuff. */
.post { .post {
position: relative; position: relative;
width: 80%; width: 80%;
max-width: 780px; max-width: 710px;
margin: 4rem auto; margin: 4rem auto;
padding-bottom: 4rem; padding-bottom: 4rem;
border-bottom: #EBF2F6 1px solid; border-bottom: #EBF2F6 1px solid;
@ -738,7 +746,7 @@ margin on the iframe, cause it breaks stuff. */
} }
body:not(.post-template) .post-title { body:not(.post-template) .post-title {
font-size: 4rem; font-size: 3.6rem;
} }
.post-title a { .post-title a {
@ -747,6 +755,8 @@ body:not(.post-template) .post-title {
.post-excerpt p { .post-excerpt p {
margin: 0; margin: 0;
font-size: 0.9em;
line-height: 1.7em;
} }
.read-more { .read-more {
@ -755,7 +765,7 @@ body:not(.post-template) .post-title {
.post-meta { .post-meta {
display: block; display: block;
margin: 2rem 0 0.6rem 0; margin: 1.75rem 0 0 0;
font-family: "Open Sans", sans-serif; font-family: "Open Sans", sans-serif;
font-size: 1.5rem; font-size: 1.5rem;
line-height: 2.2rem; line-height: 2.2rem;
@ -906,7 +916,7 @@ body:not(.post-template) .post-title {
.post-footer p { .post-footer p {
margin: 1rem 0; margin: 1rem 0;
font-size: 1.4rem; font-size: 1.4rem;
line-height: 1.6em; line-height: 1.75em;
} }
/* list of author links - location / url */ /* list of author links - location / url */
@ -1045,6 +1055,18 @@ body:not(.post-template) .post-title {
6. Author profile 6. Author profile
========================================================================== */ ========================================================================== */
.post-head.main-header {
height: 65%;
min-height: 180px;
}
.no-cover.post-head.main-header {
height: 85px;
min-height: 0;
margin-bottom: 0;
background: transparent;
}
.tag-head.main-header { .tag-head.main-header {
height: 40%; height: 40%;
min-height: 180px; min-height: 180px;
@ -1144,7 +1166,8 @@ body:not(.post-template) .post-title {
/* Location, website, and link */ /* Location, website, and link */
.author-profile .author-meta { .author-profile .author-meta {
margin: 2rem 0; margin: 2rem 0;
font-family: "PT Serif", serif; font-family: "Merriweather", serif;
letter-spacing: 0.01rem;
font-size: 1.7rem; font-size: 1.7rem;
} }
.author-meta span { .author-meta span {
@ -1185,7 +1208,7 @@ body:not(.post-template) .post-title {
.pagination { .pagination {
position: relative; position: relative;
width: 80%; width: 80%;
max-width: 780px; max-width: 710px;
margin: 4rem auto; margin: 4rem auto;
font-family: "Open Sans", sans-serif; font-family: "Open Sans", sans-serif;
font-size: 1.3rem; font-size: 1.3rem;
@ -1276,7 +1299,7 @@ body:not(.post-template) .post-title {
border-top: #EBF2F6 1px solid; border-top: #EBF2F6 1px solid;
font-family: "Open Sans", sans-serif; font-family: "Open Sans", sans-serif;
font-size: 1rem; font-size: 1rem;
line-height: 1.7em; line-height: 1.75em;
color: #BBC7CC; color: #BBC7CC;
} }
@ -1305,73 +1328,7 @@ body:not(.post-template) .post-title {
/* ========================================================================== /* ==========================================================================
10. Media Queries - Smaller than 1600px 10. Media Queries - Smaller than 900px
========================================================================== */
@media only screen and (max-width: 1600px) {
.page-title {
font-size: 5rem;
}
.page-description {
font-size: 2rem;
line-height: 1.5em;
}
.post {
font-size: 0.9em;
line-height: 1.65em;
}
p, ul, ol, dl {
margin: 0 0 1.65em 0;
}
.post,
.inner,
.pagination {
max-width: 710px;
}
h1, h2, h3,
h4, h5, h6 {
margin: 0 0 0.4em 0;
}
h1 {
font-size: 5rem;
}
h2 {
font-size: 4rem;
}
h3 {
font-size: 3.5rem;
}
h4 {
font-size: 2.8rem;
}
h5 {
font-size: 2.5rem;
}
h6 {
font-size: 2rem;
}
body:not(.post-template) .post-title {
font-size: 3.6rem;
}
}
/* ==========================================================================
11. Media Queries - Smaller than 900px
========================================================================== */ ========================================================================== */
@media only screen and (max-width: 900px) { @media only screen and (max-width: 900px) {
@ -1394,7 +1351,8 @@ body:not(.post-template) .post-title {
padding: 15% 0; padding: 15% 0;
} }
.scroll-down { display: none; } .scroll-down,
.home-template .main-header:after { display: none; }
.archive-template .main-header { .archive-template .main-header {
min-height: 180px; min-height: 180px;
@ -1416,7 +1374,7 @@ body:not(.post-template) .post-title {
} }
.post { .post {
font-size: 0.8em font-size: 0.95em
} }
body:not(.post-template) .post-title { body:not(.post-template) .post-title {
@ -1472,11 +1430,20 @@ body:not(.post-template) .post-title {
font-size: 1.6rem; font-size: 1.6rem;
} }
.post-head.main-header {
height:45%;
}
.tag-head.main-header, .tag-head.main-header,
.author-head.main-header { .author-head.main-header {
height: 30%; height: 30%;
} }
.no-cover.post-head.main-header {
height: 55px;
padding: 0;
}
.no-cover.author-head.main-header { .no-cover.author-head.main-header {
padding: 0; padding: 0;
} }
@ -1485,13 +1452,13 @@ body:not(.post-template) .post-title {
/* ========================================================================== /* ==========================================================================
12. Media Queries - Smaller than 500px 11. Media Queries - Smaller than 500px
========================================================================== */ ========================================================================== */
@media only screen and (max-width: 500px) { @media only screen and (max-width: 500px) {
.main-header { .main-header {
margin-bottom: 0; margin-bottom: 15px;
height: 40%; height: 40%;
} }
@ -1525,6 +1492,7 @@ body:not(.post-template) .post-title {
line-height: 41px; line-height: 41px;
border-radius: 0; border-radius: 0;
color: #2e2e2e; color: #2e2e2e;
background: transparent;
} }
.back-button:hover, .back-button:hover,
.subscribe-button:hover { .subscribe-button:hover {
@ -1577,7 +1545,7 @@ body:not(.post-template) .post-title {
margin-left: 16px; margin-left: 16px;
margin-right: 16px; margin-right: 16px;
padding-bottom: 2rem; padding-bottom: 2rem;
line-height: 1.55em; line-height: 1.65em;
} }
.post-date { .post-date {
@ -1593,18 +1561,22 @@ body:not(.post-template) .post-title {
} }
hr { hr {
margin: 1.6em 0; margin: 1.75em 0;
} }
p, ul, ol, dl { p, ul, ol, dl {
font-size: 0.95em; font-size: 0.95em;
margin: 0 0 2rem 0; margin: 0 0 2.5rem 0;
} }
.page-title { .page-title {
font-size: 3rem; font-size: 3rem;
} }
.post-excerpt p {
font-size: 0.85em;
}
.page-description { .page-description {
font-size: 1.6rem; font-size: 1.6rem;
} }
@ -1615,33 +1587,33 @@ body:not(.post-template) .post-title {
} }
h1 { h1 {
font-size: 3rem; font-size: 2.8rem;
letter-spacing: -1px; letter-spacing: -1px;
} }
h2 { h2 {
font-size: 2.6rem; font-size: 2.4rem;
letter-spacing: 0; letter-spacing: 0;
} }
h3 { h3 {
font-size: 2.4rem;
}
h4 {
font-size: 2.1rem; font-size: 2.1rem;
} }
h5 { h4 {
font-size: 1.9rem; font-size: 1.9rem;
} }
h5 {
font-size: 1.8rem;
}
h6 { h6 {
font-size: 1.7rem; font-size: 1.8rem;
} }
body:not(.post-template) .post-title { body:not(.post-template) .post-title {
font-size: 2.6rem; font-size: 2.5rem;
} }
.post-template .post { .post-template .post {
@ -1667,6 +1639,7 @@ body:not(.post-template) .post-title {
.post-meta { .post-meta {
font-size: 1.3rem; font-size: 1.3rem;
margin-top: 1rem;
} }
.post-footer { .post-footer {
@ -1692,7 +1665,7 @@ body:not(.post-template) .post-title {
.author-meta li { .author-meta li {
float: none; float: none;
margin: 0; margin: 0;
line-height: 1.6em; line-height: 1.75em;
} }
.author-meta li:before { .author-meta li:before {
@ -1717,6 +1690,10 @@ body:not(.post-template) .post-title {
padding-bottom: 2rem; padding-bottom: 2rem;
} }
.post-head.main-header {
height: 30%;
}
.tag-head.main-header, .tag-head.main-header,
.author-head.main-header { .author-head.main-header {
height: 20%; height: 20%;
@ -1727,7 +1704,7 @@ body:not(.post-template) .post-title {
} }
.author-profile .author-meta span { .author-profile .author-meta span {
font-size: 1.5rem; font-size: 1.4rem;
} }
.archive-template .main-header .page-description { .archive-template .main-header .page-description {
@ -1738,7 +1715,7 @@ body:not(.post-template) .post-title {
/* ========================================================================== /* ==========================================================================
13. Animations 12. Animations
========================================================================== */ ========================================================================== */
/* Used to fade in title/desc on the home page */ /* Used to fade in title/desc on the home page */
@ -1801,4 +1778,4 @@ body:not(.post-template) .post-title {
/* ========================================================================== /* ==========================================================================
End of file. Animations should be the last thing here. Do not add stuff End of file. Animations should be the last thing here. Do not add stuff
below this point, or it will probably fuck everything up. below this point, or it will probably fuck everything up.
========================================================================== */ ========================================================================== */

View File

@ -2,27 +2,58 @@
* Main JS file for Casper behaviours * Main JS file for Casper behaviours
*/ */
/*globals jQuery, document */ /* globals jQuery, document */
(function ($) { (function ($, sr, undefined) {
"use strict"; "use strict";
$(document).ready(function(){ var $document = $(document),
$(".post-content").fitVids(); // debouncing function from John Hann
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
debounce = function (func, threshold, execAsap) {
var timeout;
function casperFullImg() { return function debounced () {
$("img").each( function() { var obj = this, args = arguments;
var contentWidth = $(".post-content").outerWidth(); // Width of the content function delayed () {
var imageWidth = $(this)[0].naturalWidth; // Original image resolution if (!execAsap) {
func.apply(obj, args);
if (imageWidth >= contentWidth) { }
$(this).addClass('full-img'); timeout = null;
} else {
$(this).removeClass('full-img');
} }
});
if (timeout) {
clearTimeout(timeout);
} else if (execAsap) {
func.apply(obj, args);
}
timeout = setTimeout(delayed, threshold || 100);
};
}; };
$document.ready(function () {
var $postContent = $(".post-content");
$postContent.fitVids();
function updateImageWidth() {
var $this = $(this),
contentWidth = $postContent.outerWidth(), // Width of the content
imageWidth = this.naturalWidth; // Original image resolution
if (imageWidth >= contentWidth) {
$this.addClass('full-img');
} else {
$this.removeClass('full-img');
}
}
var $img = $("img").on('load', updateImageWidth);
function casperFullImg() {
$img.each(updateImageWidth);
}
casperFullImg(); casperFullImg();
$(window).smartresize(casperFullImg); $(window).smartresize(casperFullImg);
@ -30,61 +61,38 @@
}); });
}(jQuery)); // smartresize
jQuery.fn[sr] = function(fn) { return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); };
(function($,sr){ // Arctic Scroll by Paul Adam Davis
// https://github.com/PaulAdamDavis/Arctic-Scroll
// debouncing function from John Hann
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
var debounce = function (func, threshold, execAsap) {
var timeout;
return function debounced () {
var obj = this, args = arguments;
function delayed () {
if (!execAsap)
func.apply(obj, args);
timeout = null;
};
if (timeout)
clearTimeout(timeout);
else if (execAsap)
func.apply(obj, args);
timeout = setTimeout(delayed, threshold || 100);
};
}
// smartresize
jQuery.fn[sr] = function(fn){ return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); };
})(jQuery,'smartresize');
// Arctic Scroll by Paul Adam Davis
// https://github.com/PaulAdamDavis/Arctic-Scroll
(function ($) {
$.fn.arctic_scroll = function (options) { $.fn.arctic_scroll = function (options) {
var defaults = { var defaults = {
elem: $(this), elem: $(this),
speed: 500 speed: 500
}; },
var options = $.extend(defaults, options);
options.elem.click(function(event){ allOptions = $.extend(defaults, options);
allOptions.elem.click(function (event) {
event.preventDefault(); event.preventDefault();
var offset = ($(this).attr('data-offset')) ? $(this).attr('data-offset') : false, var $this = $(this),
position = ($(this).attr('data-position')) ? $(this).attr('data-position') : false; $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) { if (offset) {
var toMove = parseInt(offset); toMove = parseInt(offset);
$('html,body').stop(true, false).animate({scrollTop: ($(this.hash).offset().top + toMove) }, options.speed); $htmlBody.stop(true, false).animate({scrollTop: ($(this.hash).offset().top + toMove) }, allOptions.speed);
} else if (position) { } else if (position) {
var toMove = parseInt(position); toMove = parseInt(position);
$('html,body').stop(true, false).animate({scrollTop: toMove }, options.speed); $htmlBody.stop(true, false).animate({scrollTop: toMove }, allOptions.speed);
} else { } else {
$('html,body').stop(true, false).animate({scrollTop: ($(this.hash).offset().top) }, options.speed); $htmlBody.stop(true, false).animate({scrollTop: ($(this.hash).offset().top) }, allOptions.speed);
} }
}); });
}; };
})(jQuery); })(jQuery, 'smartresize');

View File

@ -16,7 +16,7 @@
{{! Styles'n'Scripts }} {{! Styles'n'Scripts }}
<link rel="stylesheet" type="text/css" href="{{asset "css/screen.css"}}" /> <link rel="stylesheet" type="text/css" href="{{asset "css/screen.css"}}" />
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=PT+Serif:400,700,400italic|Open+Sans:700,400" /> <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 outputs important style and meta data with this tag }}
{{ghost_head}} {{ghost_head}}

View File

@ -1,5 +1,4 @@
{ {
"name": "Casper", "name": "Casper",
"version": "1.0.1" "version": "1.1.0"
} }

View File

@ -10,13 +10,13 @@
<h2 class="post-title"><a href="{{url}}">{{{title}}}</a></h2> <h2 class="post-title"><a href="{{url}}">{{{title}}}</a></h2>
</header> </header>
<section class="post-excerpt"> <section class="post-excerpt">
<p>{{excerpt words="30"}} <a class="read-more" href="{{url}}">&raquo;</a></p> <p>{{excerpt words="26"}} <a class="read-more" href="{{url}}">&raquo;</a></p>
</section> </section>
<footer class="post-meta"> <footer class="post-meta">
{{#if author.image}}<img class="author-thumb" src="{{author.image}}" alt="Author image" nopin="nopin" />{{/if}} {{#if author.image}}<img class="author-thumb" src="{{author.image}}" alt="Author image" nopin="nopin" />{{/if}}
{{author}} {{author}}
{{tags prefix=" on "}} {{tags prefix=" on "}}
<time class="post-date" datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMMM YYYY"}}</time> <time class="post-date" datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMMM YYYY"}}</time>
</footer> </footer>
</article> </article>
{{/foreach}} {{/foreach}}

View File

@ -3,16 +3,19 @@
{{! The comment above "< default" means - insert everything in this file into {{! The comment above "< default" means - insert everything in this file into
the {body} of the default.hbs template, which contains our header/footer. }} the {body} of the default.hbs template, which contains our header/footer. }}
<nav class="main-nav clearfix"> {{! Everything inside the #post tags pulls data from the post }}
<a class="back-button icon-arrow-left" href="{{@blog.url}}">Home</a> {{#post}}
<a class="subscribe-button icon-feed" href="{{@blog.url}}/rss/">Subscribe</a>
</nav> <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">
<a class="back-button icon-arrow-left" href="{{@blog.url}}">Home</a>
<a class="subscribe-button icon-feed" href="{{@blog.url}}/rss/">Subscribe</a>
</nav>
</header>
<main class="content" role="main"> <main class="content" role="main">
<article class="{{post_class}}"> <article class="{{post_class}}">
{{! Everything inside the #post tags pulls data from the post }}
{{#post}}
<header class="post-header"> <header class="post-header">
<h1 class="post-title">{{title}}</h1> <h1 class="post-title">{{title}}</h1>
@ -70,7 +73,8 @@
</footer> </footer>
{{/post}}
</article> </article>
</main> </main>
{{/post}}