Skip to content

Commit d715a1c

Browse files
committed
first commit
0 parents  commit d715a1c

File tree

107 files changed

+9271
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+9271
-0
lines changed

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
_site
2+
.DS_Store
3+
*.sublime-project
4+
*.sublime-workspace
5+
codekit-config.json
6+
node_modules
7+
Gemfile.lock
8+
.sass-cache

.jshintrc

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"bitwise": true,
3+
"browser": true,
4+
"curly": true,
5+
"eqeqeq": true,
6+
"eqnull": true,
7+
"es5": false,
8+
"esnext": true,
9+
"immed": true,
10+
"jquery": true,
11+
"latedef": true,
12+
"newcap": true,
13+
"noarg": true,
14+
"node": true,
15+
"strict": false,
16+
"trailing": false,
17+
"undef": true,
18+
"multistr": true,
19+
"expr": true
20+
}

404.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
layout: page
3+
title: "Page Not Found"
4+
description: "Page not found. Your pixels are in another canvas."
5+
comments: false
6+
share: false
7+
permalink: /404.html
8+
---
9+
10+
Sorry, but the page you were trying to view does not exist --- perhaps you can try searching for it below.
11+
12+
<script type="text/javascript">
13+
var GOOG_FIXURL_LANG = 'en';
14+
var GOOG_FIXURL_SITE = '{{ site.url }}'
15+
</script>
16+
<script type="text/javascript"
17+
src="//linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js">
18+
</script>

Gemfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'jekyll'
4+
gem 'sass'
5+
gem 'octopress', '~> 3.0.0.rc.12'
6+
gem 'jekyll-sitemap'

Gruntfile.js

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
'use strict';
2+
module.exports = function(grunt) {
3+
4+
grunt.initConfig({
5+
jshint: {
6+
options: {
7+
jshintrc: '.jshintrc'
8+
},
9+
all: [
10+
'Gruntfile.js',
11+
'assets/js/*.js',
12+
'assets/js/plugins/*.js',
13+
'!assets/js/scripts.min.js'
14+
]
15+
},
16+
uglify: {
17+
dist: {
18+
files: {
19+
'assets/js/scripts.min.js': [
20+
'assets/js/plugins/*.js',
21+
'assets/js/_*.js'
22+
]
23+
}
24+
}
25+
},
26+
imagemin: {
27+
dist: {
28+
options: {
29+
optimizationLevel: 7,
30+
progressive: true
31+
},
32+
files: [{
33+
expand: true,
34+
cwd: 'images/',
35+
src: '{,*/}*.{png,jpg,jpeg}',
36+
dest: 'images/'
37+
}]
38+
}
39+
},
40+
svgmin: {
41+
dist: {
42+
files: [{
43+
expand: true,
44+
cwd: 'images/',
45+
src: '{,*/}*.svg',
46+
dest: 'images/'
47+
}]
48+
}
49+
},
50+
watch: {
51+
js: {
52+
files: [
53+
'<%= jshint.all %>'
54+
],
55+
tasks: ['jshint','uglify']
56+
}
57+
},
58+
clean: {
59+
dist: [
60+
'assets/js/scripts.min.js'
61+
]
62+
}
63+
});
64+
65+
// Load tasks
66+
grunt.loadNpmTasks('grunt-contrib-clean');
67+
grunt.loadNpmTasks('grunt-contrib-jshint');
68+
grunt.loadNpmTasks('grunt-contrib-uglify');
69+
grunt.loadNpmTasks('grunt-contrib-watch');
70+
grunt.loadNpmTasks('grunt-contrib-imagemin');
71+
grunt.loadNpmTasks('grunt-svgmin');
72+
73+
// Register tasks
74+
grunt.registerTask('default', [
75+
'clean',
76+
'uglify',
77+
'imagemin',
78+
'svgmin'
79+
]);
80+
grunt.registerTask('dev', [
81+
'watch'
82+
]);
83+
84+
};

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2014 Michael Rose
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# HPSTR Jekyll Theme
2+
3+
They say three times the charm, so here is another free responsive Jekyll theme for you. I've learned a ton since open sourcing [my first two themes](https://mademistakes.com/work/jekyll-themes/), and wanted to try a few new things this time around. If you've used my previous themes most of this should be familiar territory.
4+
5+
## What HPSTR brings to the table:
6+
7+
* Modern and minimal design.
8+
* Responsive templates for post, page, and post index `_layouts`. Looks great on mobile, tablet, and desktop devices.
9+
* Gracefully degrades in older browsers. Compatible with Internet Explorer 8+ and all modern browsers.
10+
* Sweet animated menu with support for drop-downs.
11+
* Optional [Disqus](http://disqus.com) comments and social sharing links.
12+
* [Open Graph](https://developers.facebook.com/docs/opengraph/) and [Twitter Cards](https://dev.twitter.com/docs/cards) support for a better social sharing experience.
13+
* Simple [custom 404 page](http://mmistakes.github.io/hpstr-jekyll-theme/404.html) to get you started.
14+
* Stylesheets for Pygments and Coderay [syntax highlighting](http://mmistakes.github.io/hpstr-jekyll-theme/code-highlighting-post/) to make your code examples look snazzy
15+
* [Available in Spanish](https://github.com/cruznick/hpstr-jekyll-theme/tree/es). Thanks [@cruznick](https://github.com/cruznick)!
16+
17+
![HPSTR Theme Preview screenshot](http://mmistakes.github.io/hpstr-jekyll-theme/images/hpstr-jekyll-theme-preview.jpg)
18+
19+
---
20+
21+
## Getting Started
22+
23+
HPSTR takes advantage of Sass and data files to make customizing easier. These features require Jekyll 2.x and will not work with older versions of Jekyll.
24+
25+
To learn how to install and use this theme check out the [Setup Guide](https://mmistakes.github.io/hpstr-jekyll-theme/theme-setup/) for more information.

Rakefile.rb

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
require "rubygems"
2+
require "bundler/setup"
3+
require "stringex"
4+
5+
## -- Config -- ##
6+
7+
public_dir = "public" # compiled site directory
8+
posts_dir = "_posts" # directory for blog files
9+
new_post_ext = "md" # default new post file extension when using the new_post task
10+
new_page_ext = "md" # default new page file extension when using the new_page task
11+
12+
13+
#############################
14+
# Create a new Post or Page #
15+
#############################
16+
17+
# usage rake new_post
18+
desc "Create a new post in #{posts_dir}"
19+
task :new_post, :title do |t, args|
20+
if args.title
21+
title = args.title
22+
else
23+
title = get_stdin("Enter a title for your post: ")
24+
end
25+
filename = "#{posts_dir}/#{Time.now.strftime('%Y-%m-%d')}-#{title.to_url}.#{new_post_ext}"
26+
if File.exist?(filename)
27+
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
28+
end
29+
tags = get_stdin("Enter tags to classify your post (comma separated): ")
30+
puts "Creating new post: #{filename}"
31+
open(filename, 'w') do |post|
32+
post.puts "---"
33+
post.puts "layout: post"
34+
post.puts "title: \"#{title.gsub(/&/,'&amp;')}\""
35+
post.puts "modified: #{Time.now.strftime('%Y-%m-%d %H:%M:%S %z')}"
36+
post.puts "tags: [#{tags}]"
37+
post.puts "image:"
38+
post.puts " feature: "
39+
post.puts " credit: "
40+
post.puts " creditlink: "
41+
post.puts "comments: "
42+
post.puts "share: "
43+
post.puts "---"
44+
end
45+
end
46+
47+
# usage rake new_page
48+
desc "Create a new page"
49+
task :new_page, :title do |t, args|
50+
if args.title
51+
title = args.title
52+
else
53+
title = get_stdin("Enter a title for your page: ")
54+
end
55+
filename = "#{title.to_url}.#{new_page_ext}"
56+
if File.exist?(filename)
57+
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
58+
end
59+
tags = get_stdin("Enter tags to classify your page (comma separated): ")
60+
puts "Creating new page: #{filename}"
61+
open(filename, 'w') do |page|
62+
page.puts "---"
63+
page.puts "layout: page"
64+
page.puts "permalink: /#{title.to_url}/"
65+
page.puts "title: \"#{title}\""
66+
page.puts "modified: #{Time.now.strftime('%Y-%m-%d %H:%M')}"
67+
page.puts "tags: [#{tags}]"
68+
page.puts "image:"
69+
page.puts " feature: "
70+
page.puts " credit: "
71+
page.puts " creditlink: "
72+
page.puts "share: "
73+
page.puts "---"
74+
end
75+
end
76+
77+
def get_stdin(message)
78+
print message
79+
STDIN.gets.chomp
80+
end
81+
82+
def ask(message, valid_options)
83+
if valid_options
84+
answer = get_stdin("#{message} #{valid_options.to_s.gsub(/"/, '').gsub(/, /,'/')} ") while !valid_options.include?(answer)
85+
else
86+
answer = get_stdin(message)
87+
end
88+
answer
89+
end

_config.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
title: Site Title
2+
description: Describe your website here.
3+
disqus_shortname: hpstrtheme
4+
reading_time: true
5+
words_per_minute: 200
6+
# Your site's domain goes here (eg: //mmistakes.github.io, http://mademistakes.com, etc)
7+
# When testing locally leave blank or use http://localhost:4000
8+
url:
9+
10+
# Owner/author information
11+
owner:
12+
name: Your Name
13+
avatar: avatar.jpg
14+
bio: "Your bio goes here. It shouldn't be super long but a good two sentences or two should suffice."
15+
16+
# Social networking links used in footer. Update and remove as you like.
17+
twitter:
18+
facebook:
19+
github:
20+
stackexchange:
21+
linkedin:
22+
instagram:
23+
flickr:
24+
tumblr:
25+
# google plus id, include the '+', eg +mmistakes
26+
google_plus: +yourid
27+
28+
# Background image to be tiled on all pages
29+
background:
30+
31+
# Analytics and webmaster tools stuff goes here
32+
google_analytics:
33+
google_verify:
34+
# https://ssl.bing.com/webmaster/configure/verify/ownership Option 2 content= goes here
35+
bing_verify:
36+
37+
# http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
38+
timezone: America/New_York
39+
future: true
40+
highlighter: pygments
41+
markdown: kramdown
42+
gems:
43+
- jekyll-sitemap
44+
sass:
45+
sass_dir: _sass
46+
style: compressed
47+
48+
# https://github.com/mojombo/jekyll/wiki/Permalinks
49+
permalink: /:categories/:title/
50+
51+
# Amount of post to show on home page
52+
paginate: 5
53+
54+
kramdown:
55+
auto_ids: true
56+
footnote_nr: 1
57+
entity_output: as_char
58+
toc_levels: 1..6
59+
use_coderay: true
60+
61+
coderay:
62+
coderay_line_numbers: nil
63+
coderay_line_numbers_start: 1
64+
coderay_tab_width: 4
65+
coderay_bold_every: 10
66+
coderay_css: class
67+
68+
include: [".htaccess"]
69+
exclude: ["lib", "config.rb", "Capfile", "config", "Gemfile", "Gemfile.lock", "README.md", "LICENSE", "log", "Rakefile", "Rakefile.rb", "tmp", "less", "*.sublime-project", "*.sublime-workspace", "test", "spec", "Gruntfile.js", "package.json", "node_modules"]

_data/navigation.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Menu navigation links
2+
3+
- title: Theme Setup
4+
url: /theme-setup/
5+
6+
- title: External Link
7+
url: http://mademistakes.com

_includes/browser-upgrade.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!--[if lt IE 9]><div class="upgrade"><strong><a href="http://whatbrowser.org/">Your browser is quite old!</strong> Why not upgrade to a different browser to better enjoy this site?</a></div><![endif]-->

_includes/disqus_comments.html

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{% if site.disqus_shortname %}
2+
<script type="text/javascript">
3+
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
4+
var disqus_shortname = '{{ site.disqus_shortname }}'; // required: replace example with your forum shortname
5+
6+
/* * * DON'T EDIT BELOW THIS LINE * * */
7+
(function() {
8+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
9+
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
10+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
11+
})();
12+
13+
/* * * DON'T EDIT BELOW THIS LINE * * */
14+
(function () {
15+
var s = document.createElement('script'); s.async = true;
16+
s.type = 'text/javascript';
17+
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
18+
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
19+
}());
20+
</script>
21+
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
22+
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
23+
{% endif %}

_includes/feed-footer.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
&lt;p&gt;&lt;a href=&quot;{{ site.url }}{{ post.url }}&quot;&gt;{{ post.title | xml_escape }}&lt;/a&gt; was originally published by {{ site.owner.name }} at &lt;a href=&quot;{{ site.url }}&quot;&gt;{{ site.title }}&lt;/a&gt; on {{ post.date | date: "%B %d, %Y" }}.&lt;/p&gt;

0 commit comments

Comments
 (0)