Skip to content

Commit 5804bcf

Browse files
author
Rosario
committed
Update to Casper v1.1.1 - Update jQuery - Adding partial templates - Clean up custom main.scss
1 parent 087da7d commit 5804bcf

27 files changed

+1409
-947
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Feel free to fork, change, modify and re-use it.
55

66
## How to use it
77

8-
Simply clone this repository, and then run `jekyll -w serve` inside the directory.
8+
Simply clone this repository, and then run `jekyll serve` inside the directory.
99

1010
Kasper theme includes:
1111

_config.yml

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ markdown: redcarpet
66
highlighter: pygments
77
logo: false
88
paginate: 15
9+
baseurl: /
10+
domain_name: 'http://yourblog-domain.com'
911

1012
# Details for the RSS feed generator
1113
url: 'blog url'

_includes/disqus.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<section class="disqus">
2+
<div id="disqus_thread"></div>
3+
<script type="text/javascript">
4+
5+
var disqus_shortname = '';
6+
var disqus_developer = 0; // developer mode is on
7+
(function() {
8+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
9+
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
10+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
11+
})();
12+
</script>
13+
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
14+
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
15+
</section>

_includes/pagination.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<nav class="pagination" role="pagination">
2+
{% if paginator.previous_page %}
3+
{% if paginator.previous_page == 1 %}
4+
<a class="newer-posts" href="/" title="Previous Page">&laquo; Newer Posts</a>
5+
{% else %}
6+
<a class="newer-posts" href="/page{{ paginator.previous_page }}/" title="Previous Page">&laquo; Newer Posts</a>
7+
{% endif %}
8+
{% endif %}
9+
<span class="page-number"> Page {{paginator.page}} of {{paginator.total_pages}} </span>
10+
{% if paginator.next_page %}
11+
<a class="older-posts" href="/page{{ paginator.next_page }}/" title="Next Page">Older Posts &raquo;</a>
12+
{% endif %}
13+
</nav>

_includes/share.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<section class="share">
2+
<h4>Share this post</h4>
3+
<a class="icon-twitter" href="http://twitter.com/share?text={{page.title}}&amp;url={{site.domain_name}}{{ page.url }}"
4+
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
5+
<span class="hidden">Twitter</span>
6+
</a>
7+
<a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{site.domain_name}}{{page.url}}"
8+
onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
9+
<span class="hidden">Facebook</span>
10+
</a>
11+
<a class="icon-google-plus" href="https://plus.google.com/share?url={{site.domain_name}}{{page.url}}"
12+
onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
13+
<span class="hidden">Google+</span>
14+
</a>
15+
</section>

_layouts/default.html

+12-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html>
22
<html>
3-
<head>
3+
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
55
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
66

@@ -11,28 +11,26 @@
1111
<meta name="MobileOptimized" content="320" />
1212
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1313

14-
<link rel="stylesheet" type="text/css" href="/assets/css/normalize.css" />
1514
<link rel="stylesheet" type="text/css" href="/assets/css/screen.css" />
16-
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Noto+Serif:400,700,400italic|Open+Sans:700,400" />
15+
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Merriweather:300,700,700italic,300italic|Open+Sans:700,400" />
1716
<!-- Customisation -->
1817
<link rel="stylesheet" type="text/css" href="/assets/css/main.css" />
1918

2019
</head>
21-
<body class="home-template">
20+
<body class="{% if page.post_class %}{{page.post_class}}{% else %}home-template{% endif %}">
2221

23-
2422
{{ content }}
25-
26-
<footer class="site-footer">
27-
<a class="subscribe icon-feed" href="{{ site.baseurl }}rss.xml"><span class="tooltip">Subscribe!</span></a>
28-
<div class="inner">
29-
<section class="copyright">All content copyright <a href="{{ site.baseurl }}">{{ site.name }}</a> &copy; {{date format="YYYY"}} &bull; All rights reserved.</section>
30-
<section class="poweredby">Made with Jekyll using <a href="http://github.com/rosario/kasper">Kasper theme</a></section>
31-
</div>
23+
<footer class="site-footer clearfix">
24+
<section class="copyright">
25+
<a href="{{ site.baseurl }}">{{ site.name }}</a> &copy;
26+
{{date format="YYYY"}} &bull; All rights reserved.
27+
</section>
28+
<section class="poweredby">Made with Jekyll using
29+
<a href="http://github.com/rosario/kasper">Kasper theme</a>
30+
</section>
3231
</footer>
33-
3432

35-
<script type="text/javascript" src="/assets/js/jquery-1.10.2.min.js"></script>
33+
<script type="text/javascript" src="/assets/js/jquery-1.11.1.min.js"></script>
3634
<script type="text/javascript" src="/assets/js/jquery.fitvids.js"></script>
3735
<script type="text/javascript" src="/assets/js/index.js"></script>
3836

_layouts/page.html

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
---
22
layout: default
3+
post_class: post-template page-template
34
---
45

6+
<nav class="main-nav clearfix">
7+
<a class="back-button icon-arrow-left" href="{{ site.baseurl }}">Home</a>
8+
<a class="subscribe-button icon-feed" href="{{ site.baseurl }}rss.xml">Subscribe</a>
9+
</nav>
10+
11+
512
<main class="content" role="main">
613
<article class="post">
7-
<header class="post-header">
14+
<!-- <header class="post-header">
815
<a id="blog-logo" href="{{site.baseurl}}">
916
{% if site.logo %}
1017
<img src="{{site.logo}}" alt="{{ site.name }}" />
1118
{% else %}
1219
<span class="blog-title">{{ site.name }}</span>
1320
{%endif%}
1421
</a>
15-
</header>
22+
</header> -->
1623

1724
<h1 class="post-title">{{ page.title }}</h1>
1825

_layouts/post.html

+46-52
Original file line numberDiff line numberDiff line change
@@ -2,95 +2,89 @@
22
layout: default
33
disqus: false
44
archive: false
5+
post_class: post-template
56
---
67

8+
<header class="main-header post-head {% if page.cover %}" style="background-image: url({{ page.cover }}) {%else%}no-cover{% endif %}">
9+
<nav class="main-nav {% if page.cover %} overlay {% endif %} clearfix">
10+
<a class="back-button icon-arrow-left" href="{{ site.baseurl }}">Home</a>
11+
<a class="subscribe-button icon-feed" href="{{ site.baseurl }}rss.xml">Subscribe</a>
12+
</nav>
13+
</header>
14+
715
<main class="content" role="main">
816

917
<article class="post">
18+
1019
<header class="post-header">
20+
<h1 class="post-title">{{ page.title }}</h1>
21+
<section class="post-meta">
22+
<time class="post-date" datetime="{{ page.date | date:"%Y-%m-%d" }}">{{ page.date | date_to_string }}</time>
23+
{% if page.categories.size > 0 %}
24+
{{ page.categories | array_to_sentence_string | prepend: 'on ' }}
25+
{% endif %}
26+
</section>
27+
</header>
28+
29+
<!-- <header class="post-header">
1130
<a id="blog-logo" href="{{site.url}}">
1231
{% if site.logo %}
1332
<img src="{{site.logo}}" alt="{{ site.name }}" />
1433
{% else %}
1534
<span class="blog-title">{{ site.name }}</span>
1635
{%endif%}
1736
</a>
18-
</header>
37+
</header> -->
1938

20-
<span class="post-meta">
21-
<time datetime="{{ page.date | date:"%Y-%m-%d" }}">{{ page.date | date_to_string }}</time>
39+
<!-- <span class="post-meta">
40+
<time datetime="{{ page.date | date:"%Y-%m-%d" }}">{{ page.date | date_to_string }}</time>
2241
{% if page.categories.size > 0 %}
2342
{{ page.categories | array_to_sentence_string | prepend: 'on ' }}
2443
{% endif %}
25-
</span>
44+
</span> -->
2645

27-
<h1 class="post-title">{{ page.title }}</h1>
46+
<!-- <h1 class="post-title">{{ page.title }}</h1> -->
2847

2948
<section class="post-content">
3049
{{content}}
3150
</section>
3251

3352
{% if page.archive %}
3453
<section class="archive">
35-
<h5>Archive</h5>
36-
<ul>
37-
{% for post in site.posts %}
38-
<li><span>{{ post.date | date_to_string }}</span> <a href="{{ post.url }}">{{ post.title }}</a></li>
39-
{% endfor %}
40-
</ul>
54+
<h5>Archive</h5>
55+
<ul>
56+
{% for post in site.posts %}
57+
<li><span>{{ post.date | date_to_string }}</span> <a href="{{ post.url }}">{{ post.title }}</a></li>
58+
{% endfor %}
59+
</ul>
4160
</section>
4261
{% endif %}
4362

4463
<footer class="post-footer">
45-
<!-- If we want to display author's name and bio -->
64+
<!-- If we want to display author's name and bio -->
4665
{% if site.author %}
66+
<figure class="author-image">
67+
<a class="img" href="{{ site.baseurl }}" style="background-image: url(/assets/images/profile.png)">
68+
<span class="hidden">{{site.author}}'s Picture</span></a>
69+
</figure>
4770
<section class="author">
48-
<header> <a href="{{ site.baseurl }}"> <img class="profile" src="/assets/images/profile.png" alt="Author's profile picture"></a></header>
49-
<article>
50-
<!-- Author Name -->
51-
<h4> {{ site.author }} </h4>
52-
<!-- Author Bio -->
53-
<p>
54-
Here goes the author description. You might want to place some links too in here
55-
</p>
56-
</article>
71+
<!-- Author Name -->
72+
<h4> {{ site.author }} </h4>
73+
<!-- Author Bio -->
74+
<p>
75+
Here goes the author description. You might want to place some links too in here
76+
</p>
5777
</section>
5878
{% endif %}
5979

60-
<section class="share">
61-
<h4>Share this post</h4>
62-
<a class="icon-twitter" href="http://twitter.com/share?text={{page.title}}&amp;url={{site.url}}{{ page.url }}"
63-
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
64-
<span class="hidden">Twitter</span>
65-
</a>
66-
<a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{site.url}}{{page.url}}"
67-
onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
68-
<span class="hidden">Facebook</span>
69-
</a>
70-
<a class="icon-google-plus" href="https://plus.google.com/share?url={{site.url}}{{page.url}}"
71-
onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
72-
<span class="hidden">Google+</span>
73-
</a>
74-
</section>
80+
<!-- Share links section -->
81+
{% include share.html %}
7582

83+
<!-- Disqus comments -->
7684
{% if page.disqus %}
77-
<section class="disqus">
78-
<div id="disqus_thread"></div>
79-
<script type="text/javascript">
80-
81-
var disqus_shortname = '';
82-
var disqus_developer = 0; // developer mode is on
83-
(function() {
84-
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
85-
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
86-
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
87-
})();
88-
</script>
89-
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
90-
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
91-
</section>
85+
{% include disqus.html %}
9286
{% endif %}
93-
87+
9488
</footer>
9589

9690
</article>

about.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ layout: page
33
title: About me
44
---
55

6-
This is where you could put your "About me" page.
6+
This is a static page. It could be an 'about page' if you'd like.

assets/css/main.scss

+4-45
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,11 @@
11
---
22
# Let's add a comment to make this file sass-y.
3+
# Change this file for any custom CSS.
34
---
45

5-
/* Font size of 2.0 is too big, I'll reduce it */
6-
body {
7-
font-size: 1.9rem;
8-
}
9-
10-
/* Adding some text shadow*/
11-
.site-head {
12-
text-shadow: 2px 2px #234;
13-
14-
a {
15-
color: #eee;
16-
}
17-
}
18-
19-
/* The font is too large in the post view. Revert to small size*/
20-
.post-header .blog-title {
21-
font-size: inherit;
22-
}
23-
24-
/* Reduce font size and add line-height*/
25-
pre {
26-
font-size: 0.75em;
27-
line-height: 1.4em;
28-
}
29-
30-
/* Author styling */
31-
.author {
32-
margin-bottom: 1em;
33-
34-
header {
35-
float: left;
36-
width: 80px;
37-
}
38-
39-
article {
40-
margin-left: 80px;
41-
min-height: 80px;
42-
padding-left: 20px;
43-
}
44-
}
45-
46-
img.profile {
47-
width: 80px;
48-
height: auto;
49-
border-radius: 50px;
6+
/* We need to add display:inline in order to align the '>>' of the 'read more' link */
7+
.post-excerpt p {
8+
display:inline;
509
}
5110

5211
// Import partials from `sass_dir` (defaults to `_sass`)

0 commit comments

Comments
 (0)