Skip to content

Commit

Permalink
First big push - includes some demo.ghost.io content
Browse files Browse the repository at this point in the history
  • Loading branch information
biomadeira committed Feb 7, 2015
1 parent 222e4c8 commit 94b903b
Show file tree
Hide file tree
Showing 102 changed files with 24,674 additions and 12 deletions.
Binary file not shown.
20 changes: 20 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
layout: error
title: "404 - Page Not Found"
permalink: 404.html
---

<section class="error-content error-404 js-error-container">
<section class="error-details">
<figure class="error-image">
<img
class="error-ghost"
src="/assets/images/404.png"/>
</figure>
<section class="error-message">
<h1 class="error-code">404</h1>
<h2 class="error-description">Page Not Found</h2>
<a class="error-link" href="{{ site.baseurl }}">Go to the front page →</a>
</section>
</section>
</section>
22 changes: 22 additions & 0 deletions GHOST.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2013 Ghost Foundation - Released under The MIT License.

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
File renamed without changes.
48 changes: 47 additions & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,47 @@
# jasper
# Jasper

This is a port of Ghost's default theme [Casper](https://github.com/tryghost/casper) for Jekyll based on the work of
[Kasper](https://github.com/rosario/kasper). You might well ask at this point why bother making a new port (repo)?
Although this is based on a fork of Kasper, there are some *exciting* additional features, making this port closer
to the full Casper Ghost install. The main difference still is the fact that Jasper expects a single author. With a
bit of tweeking it shouldn't be too difficult to enable a per-post author. Other less important bits that can still be
addressed are the tag-descriptions and parsing 'Test Content' as a single tag, instead of as 'Test' and 'Content'. Feel
free to fork, and improve on this.

## View the live demo

[Jasper](https://biomadeira.github.io/jasper)

Here's the original [Casper](https://demo.ghost.io)

## Jasper theme includes:

* Pagination
* Author page **(New)**
* Tag page(s) **(New)**
* 404 page **(New)**
* Rss
* Google Analytics Tracking code
* Code Syntax Highlight
* Author's profile with picture
* Disqus comments

## How to use it locally

Simply clone this repository, and then run `jekyll serve` inside the directory.

## Thanks

Most of the work has been already done by the Ghost team and Rosario. Many thanks to them :)


## Copyright & License

Copyright (C) 2013-2015 Ghost Foundation - Released under the MIT License.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36 changes: 36 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

# Website info
name: 'Finding The Way Home'
description: "A beautiful narrative written with the world's most elegant publishing platform. The story begins here."

# Author's info
author: 'Casper McFadden'
username: casper
bio: 'A paranormal expert and his daughter bunk in an abandoned house populated by 3 mischievous ghosts and one friendly one.'
location: 'Maine, USA'
url: 'http://biomadeira.github.io/jasper/'
image: '/assets/images/casper.png'

# Jykell configuration
markdown: redcarpet
highlighter: pygments
paginate: 5
language: 'en-uk'
baseurl: /
short_url: 'biomadeira.github.io/jasper'
google_analytics: 'UA-XXXXXXXX-X'
disqus: biomadeira

# Permalinks
permalink: /:title
# permalink: /author/:username
# permalink: /tag/:tag

# Additional settings available on the front-matter
# Site logo in the index.html (as in demo.ghost.io)
# Author's page cover in _layouts/author.html
# The same for page.html and tag.html layouts
# Post's page cover as a per-post basis _posts/...
# Disqus comments as a per-post basis
# ...

14 changes: 14 additions & 0 deletions _includes/analytics.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- Google Analytics Tracking code -->
<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{ site.google_analytics }}']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>
13 changes: 13 additions & 0 deletions _includes/author_pagination.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<nav class="pagination" role="pagination">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<a class="newer-posts" href="/author/{{ site.username }}" title="Previous Page">&laquo; Newer Posts</a>
{% else %}
<a class="newer-posts" href="/author/{{ site.username }}/page{{ paginator.previous_page }}/" title="Previous Page">&laquo; Newer Posts</a>
{% endif %}
{% endif %}
<span class="page-number"> Page {{ paginator.page }} of {{ paginator.total_pages }} </span>
{% if paginator.next_page %}
<a class="older-posts" href="/author/{{ site.username }}/page{{ paginator.next_page }}/" title="Next Page">Older Posts &raquo;</a>
{% endif %}
</nav>
17 changes: 17 additions & 0 deletions _includes/disqus.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = {{ site.disqus }}; // required: replace example with your forum shortname
var disqus_identifier = '{{ page.url }}';
var disqus_url = '{{ site.url }}{{ page.url }}';

/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
3 changes: 3 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<link rel="canonical" href="{{ site.baseurl }}" />
<meta name="generator" content="Jekyll 2.5.3" />
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ site.baseurl }}/rss.xml" />
56 changes: 56 additions & 0 deletions _includes/loop.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<!-- Previous/next page links - only displayed on page 2+ -->
<div class="extra-pagination inner">
{% if page.class == 'home-template' %}
{% include post_pagination.html %}
{% elsif page.class == 'page-template' %}
{% include post_pagination.html %}
{% elsif page.class == 'author-template' %}
{% include author_pagination.html %}
{% elsif page.class == 'tag-template' %}
{% include tag_pagination.html %}
{% else %}
{% include post_pagination.html %}
{% endif %}
</div>

<!-- This is the post loop - each post will be output using this markup -->
{% for post in paginator.posts %}
<article class="post">
<header class="post-header">
<h2 class="post-title"><a href="{{ post.url }}">{{ post.title }}</a></h2>
</header>
<section class="post-excerpt">
<p>{{ post.content | truncatewords: 26 }} <a class="read-more" href="{{ post.url }}">&raquo;</a></p>
</section>
<footer class="post-meta">
{% if site.image %}<img class="author-thumb" src="{{ site.image }}" alt="Author image" nopin="nopin" />{% endif %}
<!-- author -->
<a href='{{ site.baseurl }}author/{{ site.username }}'>{{ site.author }}</a>
<!-- [[tags prefix=" on "]] -->
{% if post.tags.size > 0 %}
on
{% for tag in post.tags %}
{% if forloop.index == post.tags.size %}
<a href='{{ site.baseurl }}tag/{{ tag }}'>{{ tag | capitalize }}</a>
{% else %}
<a href='{{ site.baseurl }}tag/{{ tag }}'>{{ tag | capitalize }}</a>,
{% endif %}
{% endfor %}
{% endif %}
<time class="post-date" datetime="{{ post.date | date:"%Y-%m-%d" }}">{{ post.date | date_to_string }}</time>
</footer>
</article>
{% endfor %}

<!-- Previous/next page links - displayed on every page -->
{% if page.class == 'home-template' %}
{% include post_pagination.html %}
{% elsif page.class == 'page-template' %}
{% include post_pagination.html %}
{% elsif page.class == 'author-template' %}
{% include author_pagination.html %}
{% elsif page.class == 'tag-template' %}
{% include tag_pagination.html %}
{% else %}
{% include post_pagination.html %}
{% endif %}
13 changes: 13 additions & 0 deletions _includes/post_pagination.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<nav class="pagination" role="pagination">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<a class="newer-posts" href="/" title="Previous Page">&laquo; Newer Posts</a>
{% else %}
<a class="newer-posts" href="/page{{ paginator.previous_page }}/" title="Previous Page">&laquo; Newer Posts</a>
{% endif %}
{% endif %}
<span class="page-number"> Page {{ paginator.page }} of {{ paginator.total_pages }} </span>
{% if paginator.next_page %}
<a class="older-posts" href="/page{{ paginator.next_page }}/" title="Next Page">Older Posts &raquo;</a>
{% endif %}
</nav>
13 changes: 13 additions & 0 deletions _includes/tag_pagination.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<nav class="pagination" role="pagination">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<a class="newer-posts" href="/tag/{{ page.tag }}" title="Previous Page">&laquo; Newer Posts</a>
{% else %}
<a class="newer-posts" href="/tag/{{ page.tag }}/page{{ paginator.previous_page }}/" title="Previous Page">&laquo; Newer Posts</a>
{% endif %}
{% endif %}
<span class="page-number"> Page {{ paginator.page }} of {{ paginator.total_pages }} </span>
{% if paginator.next_page %}
<a class="older-posts" href="/tag/{{ page.tag }}/page{{ paginator.next_page }}/" title="Next Page">Older Posts &raquo;</a>
{% endif %}
</nav>
44 changes: 44 additions & 0 deletions _layouts/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<!-- [[! Document Settings ]] -->
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<title>{{ page.title }}</title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes" />

<link rel="shortcut icon" href="/assets/images/favicon.ico">
<meta http-equiv="cleartype" content="on">

<link rel="stylesheet" type='text/css' href='//fonts.googleapis.com/css?family=Open+Sans:400,300,700'>
<link rel="stylesheet" href="/assets/css/ghost.min.css">
</head>
<body class="">
<main role="main" id="main">
<div id="container">
<section class="error-content error-404 js-error-container">
<section class="error-details">
<figure class="error-image">
<img
class="error-ghost"
src="/assets/images/404.png"/>
</figure>
<section class="error-message">
<h1 class="error-code">404asda</h1>
<h2 class="error-description">{{ content }}</h2>
<a class="error-link" href="{{ site.baseurl }}">Go to the front page →</a>
</section>
</section>
</section>
</div>
</main>
<!-- Add Google Analytics -->
{% include analytics.html %}
</body>
</html>
17 changes: 17 additions & 0 deletions _layouts/atom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
{% if page.grouptype == 'category' %}
<title>{{ site.short_url }} - Category: {{ page.category }}</title>
{% else %}
<title>{{ site.short_url }}</title>
{% endif %}
<link>{{ site.full_url }}</link>
<description>{{ site.description }}</description>
<language>{{ site.language }}</language>
<managingEditor> {{ site.author }}</managingEditor>
<atom:link href="rss" rel="self" type="application/rss+xml" />
{{content}}
</channel>
</rss>
46 changes: 46 additions & 0 deletions _layouts/author.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
layout: default
title: Author
cover: '/assets/images/cover1.jpg'
class: 'author-template'
---
<!-- < 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 page.cover %}" style="background-image: url({{ page.cover }}) {% else %}no-cover{% endif %}">
<nav class="main-nav overlay clearfix">
<a class="back-button icon-arrow-left" href="{{ site.baseurl }}">Home</a>
<a class="subscribe-button icon-feed" href="{{ site.baseurl }}author/{{ site.username }}/rss.xml">{{ site.author }}</a>
</nav>
</header>

<section class="author-profile inner">
{% if site.image %}
<figure class="author-image">
<div class="img" style="background-image: url({{ site.image }})"><span class="hidden">{{ site.author }}'s Picture</span></div>
</figure>
{% endif %}
<h1 class="author-title">{{ site.author }}</h1>
{% if site.bio %}
<h2 class="author-bio">{{ site.bio }}</h2>
{% endif %}
<div class="author-meta">
{% if site.location %}<span class="author-location icon-location">{{ site.location }}</span>{% endif %}
{% if site.url %}<span class="author-link icon-link"><a href="{{ site.url }}">{{ site.short_url }}</a></span>{% endif %}
<!-- <span class="author-stats"><i class="icon-stats"></i> [[plural ../pagination.total empty='No posts' singular='% post' plural='% posts']]</span> -->
<span class="author-stats"><i class="icon-stats"></i>{% if paginator.total_posts == 0 %}No posts{% elsif paginator.total_posts == 1 %}1 post{% else %}{{ paginator.total_posts }} posts{% endif %}</span>
</div>
</section>
<!-- /author -->

<!-- The main content area on the homepage -->
<main id="content" class="content" role="main">

<!-- The tag below includes the post loop - partials/loop.hbs -->
{% include loop.html %}

</main>
Loading

0 comments on commit 94b903b

Please sign in to comment.