baron 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/baron.gemspec +24 -2
- data/lib/baron.rb +52 -20
- data/spec/baron_article_spec.rb +2 -2
- data/spec/baron_blog_engine_spec.rb +13 -10
- data/spec/baron_theme_spec.rb +29 -0
- data/spec/sample_data/config.ru +1 -1
- data/spec/sample_data/pages/test.rhtml +44 -0
- data/spec/sample_data/themes/typography/templates/layout.rhtml +3 -3
- data/spec/sample_data/themes/typography/theme_config.yml +9 -0
- data/spec/sample_data/themes/typography/typography/css/app.css +58 -0
- data/spec/sample_data/themes/typography/typography/css/bootstrap-responsive.css +1092 -0
- data/spec/sample_data/themes/typography/typography/css/bootstrap-responsive.min.css +9 -0
- data/spec/sample_data/themes/typography/typography/css/bootstrap.css +6039 -0
- data/spec/sample_data/themes/typography/typography/css/bootstrap.min.css +9 -0
- data/spec/sample_data/themes/typography/typography/img/github.png +0 -0
- data/spec/sample_data/themes/typography/typography/img/glyphicons-halflings-white.png +0 -0
- data/spec/sample_data/themes/typography/typography/img/glyphicons-halflings.png +0 -0
- data/spec/sample_data/themes/typography/typography/img/instagram.png +0 -0
- data/spec/sample_data/themes/typography/typography/js/bootstrap.js +2159 -0
- data/spec/sample_data/themes/typography/typography/js/bootstrap.min.js +6 -0
- data/spec/sample_data/themes/typography/typography/js/image_alt.js +12 -0
- data/spec/sample_data/themes/typography/typography/js/read_later.js +14 -0
- data/spec/sample_data/themes/typography/typography/templates/archives.rhtml +18 -0
- data/spec/sample_data/themes/typography/typography/templates/article.rhtml +14 -0
- data/spec/sample_data/themes/typography/typography/templates/category.rhtml +17 -0
- data/spec/sample_data/themes/typography/typography/templates/error.rhtml +3 -0
- data/spec/sample_data/themes/typography/typography/templates/home.rhtml +28 -0
- data/spec/sample_data/themes/typography/typography/templates/layout.rhtml +141 -0
- metadata +24 -2
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.8
|
data/baron.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "baron"
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Nathan Buggia"]
|
12
|
-
s.date = "2013-03-
|
12
|
+
s.date = "2013-03-23"
|
13
13
|
s.description = "What's in the box: (1) Publish to Heroku using Git (2) Author articles in markdown (3) Article categories (4) Multiple permalink formats supported (5) Redirects (6) Advanced SEO optimizations and Google Analytics/ Webmaster Tools support. Uses Rack, RSpec, Bootstrap, JQuery, Disqus, Thin"
|
14
14
|
s.email = "nbuggia@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -25,6 +25,7 @@ Gem::Specification.new do |s|
|
|
25
25
|
"spec/baron_article_spec.rb",
|
26
26
|
"spec/baron_blog_engine_spec.rb",
|
27
27
|
"spec/baron_spec.rb",
|
28
|
+
"spec/baron_theme_spec.rb",
|
28
29
|
"spec/sample_data/.gitignore",
|
29
30
|
"spec/sample_data/Gemfile",
|
30
31
|
"spec/sample_data/Rakefile",
|
@@ -39,6 +40,7 @@ Gem::Specification.new do |s|
|
|
39
40
|
"spec/sample_data/images/robert-frost-small.png",
|
40
41
|
"spec/sample_data/images/robert-frost.png",
|
41
42
|
"spec/sample_data/pages/about.rhtml",
|
43
|
+
"spec/sample_data/pages/test.rhtml",
|
42
44
|
"spec/sample_data/resources/feed.rss",
|
43
45
|
"spec/sample_data/resources/redirects.txt",
|
44
46
|
"spec/sample_data/resources/robots.txt",
|
@@ -61,6 +63,26 @@ Gem::Specification.new do |s|
|
|
61
63
|
"spec/sample_data/themes/typography/templates/error.rhtml",
|
62
64
|
"spec/sample_data/themes/typography/templates/home.rhtml",
|
63
65
|
"spec/sample_data/themes/typography/templates/layout.rhtml",
|
66
|
+
"spec/sample_data/themes/typography/theme_config.yml",
|
67
|
+
"spec/sample_data/themes/typography/typography/css/app.css",
|
68
|
+
"spec/sample_data/themes/typography/typography/css/bootstrap-responsive.css",
|
69
|
+
"spec/sample_data/themes/typography/typography/css/bootstrap-responsive.min.css",
|
70
|
+
"spec/sample_data/themes/typography/typography/css/bootstrap.css",
|
71
|
+
"spec/sample_data/themes/typography/typography/css/bootstrap.min.css",
|
72
|
+
"spec/sample_data/themes/typography/typography/img/github.png",
|
73
|
+
"spec/sample_data/themes/typography/typography/img/glyphicons-halflings-white.png",
|
74
|
+
"spec/sample_data/themes/typography/typography/img/glyphicons-halflings.png",
|
75
|
+
"spec/sample_data/themes/typography/typography/img/instagram.png",
|
76
|
+
"spec/sample_data/themes/typography/typography/js/bootstrap.js",
|
77
|
+
"spec/sample_data/themes/typography/typography/js/bootstrap.min.js",
|
78
|
+
"spec/sample_data/themes/typography/typography/js/image_alt.js",
|
79
|
+
"spec/sample_data/themes/typography/typography/js/read_later.js",
|
80
|
+
"spec/sample_data/themes/typography/typography/templates/archives.rhtml",
|
81
|
+
"spec/sample_data/themes/typography/typography/templates/article.rhtml",
|
82
|
+
"spec/sample_data/themes/typography/typography/templates/category.rhtml",
|
83
|
+
"spec/sample_data/themes/typography/typography/templates/error.rhtml",
|
84
|
+
"spec/sample_data/themes/typography/typography/templates/home.rhtml",
|
85
|
+
"spec/sample_data/themes/typography/typography/templates/layout.rhtml",
|
64
86
|
"spec/spec_helper.rb"
|
65
87
|
]
|
66
88
|
s.homepage = "https://github.com/nbuggia/baron-blog-engine-gem"
|
data/lib/baron.rb
CHANGED
@@ -57,15 +57,14 @@ module Baron
|
|
57
57
|
end
|
58
58
|
|
59
59
|
class PageController
|
60
|
-
def initialize articles_parts, categories, max_articles, params, config
|
61
|
-
@categories, @params, @config = categories, params, config
|
60
|
+
def initialize articles_parts, categories, max_articles, params, theme, config
|
61
|
+
@categories, @params, @theme, @config = categories, params, theme, config
|
62
62
|
stop_at = (:all == max_articles) ? articles_parts.count : max_articles
|
63
63
|
@articles = articles_parts.take(stop_at).map { |file_parts| Article.new(file_parts, @config) }
|
64
64
|
@article = @articles.first
|
65
65
|
end
|
66
66
|
|
67
67
|
def render_html partial_template, layout_template
|
68
|
-
@theme_root = "/themes/#{@config[:theme]}"
|
69
68
|
@content = ERB.new(File.read(partial_template)).result(binding)
|
70
69
|
if @content[0..99].include? '<html'
|
71
70
|
return @content
|
@@ -102,25 +101,26 @@ module Baron
|
|
102
101
|
categories = get_all_categories
|
103
102
|
params = {:page_name => route.first, :rss_feed => get_feed_path}
|
104
103
|
params[:page_title] = (route.first == @config[:root] ? '' : "#{route.first.capitalize} #{@config[:title_delimiter]} ") + "#{@config[:title]}"
|
104
|
+
theme = Theme.new(@config)
|
105
105
|
|
106
106
|
begin
|
107
107
|
|
108
108
|
# RSS feed... /feed.rss
|
109
109
|
body = if mime_type == :rss
|
110
|
-
PageController.new(get_all_articles, categories, @config[:article_max], params, @config) .
|
110
|
+
PageController.new(get_all_articles, categories, @config[:article_max], params, theme, @config) .
|
111
111
|
render_rss(get_system_resource('feed.rss'))
|
112
112
|
|
113
113
|
# Robots... /robots.txt
|
114
114
|
elsif route.first == 'robots'
|
115
|
-
PageController.new(get_all_articles, categories, @config[:article_max], params, @config) .
|
115
|
+
PageController.new(get_all_articles, categories, @config[:article_max], params, theme, @config) .
|
116
116
|
render_rss(get_system_resource('robots.txt'))
|
117
117
|
|
118
118
|
# Home page... /
|
119
119
|
elsif route.first == @config[:root]
|
120
120
|
all_articles = get_all_articles
|
121
121
|
params[:page_forward] = '/page/2/' if @config[:article_max] < all_articles.count
|
122
|
-
PageController.new(all_articles, categories, @config[:article_max], params, @config) .
|
123
|
-
render_html(
|
122
|
+
PageController.new(all_articles, categories, @config[:article_max], params, theme, @config) .
|
123
|
+
render_html(theme.get_template(route.first), theme.get_template('layout'))
|
124
124
|
|
125
125
|
# Pagination... /page/2, /page/2/
|
126
126
|
elsif route.first == 'page' && route.count == 2
|
@@ -137,33 +137,33 @@ module Baron
|
|
137
137
|
params[:page_forward] = "/page/#{(page_num+1).to_s}/" if show_next
|
138
138
|
params[:page_title] = "Page #{page_num.to_s} #{@config[:title_delimiter]} #{@config[:title]}"
|
139
139
|
|
140
|
-
PageController.new(articles_on_this_page, categories, @config[:article_max], params, @config) .
|
141
|
-
render_html(
|
140
|
+
PageController.new(articles_on_this_page, categories, @config[:article_max], params, theme, @config) .
|
141
|
+
render_html(theme.get_template('home'), theme.get_template('layout'))
|
142
142
|
|
143
143
|
# System routes... /robots.txt, /archives
|
144
144
|
elsif route.first == 'archives' or route.first == 'robots'
|
145
145
|
max_articles = ('archives' == route.first) ? :all : @config[:article_max]
|
146
|
-
PageController.new(get_all_articles, categories, max_articles, params, @config) .
|
147
|
-
render_html(
|
146
|
+
PageController.new(get_all_articles, categories, max_articles, params, theme, @config) .
|
147
|
+
render_html(theme.get_template(route.first), theme.get_template('layout'))
|
148
148
|
|
149
149
|
# Custom pages... /about, /contact-us
|
150
150
|
elsif is_route_custom_page? route.first
|
151
|
-
PageController.new(get_all_articles, categories, @config[:article_max], params, @config) .
|
152
|
-
render_html(get_page_template(route.first),
|
151
|
+
PageController.new(get_all_articles, categories, @config[:article_max], params, theme, @config) .
|
152
|
+
render_html(get_page_template(route.first), theme.get_template('layout'))
|
153
153
|
|
154
154
|
# Category home pages... /projects/, /photography/, /poems/, etc
|
155
155
|
elsif is_route_category_home? route.last
|
156
156
|
filtered_articles = get_all_articles.select { |h| h[:category] == route.last }
|
157
157
|
params[:page_name] = route.last.gsub('-', ' ').titleize
|
158
|
-
PageController.new(filtered_articles, categories, :all, params, @config) .
|
159
|
-
render_html(
|
158
|
+
PageController.new(filtered_articles, categories, :all, params, theme, @config) .
|
159
|
+
render_html(theme.get_template('category'), theme.get_template('layout'))
|
160
160
|
|
161
161
|
# Articles... /posts/2013/01/18/my-article-title, /posts/category/2013/my-article-title, etc
|
162
162
|
else
|
163
163
|
article = [ find_single_article(route.last) ]
|
164
164
|
params[:page_title] = "#{article.first[:filename].gsub('-',' ').titleize} #{@config[:title_delimiter]} #{@config[:title]}"
|
165
|
-
PageController.new(article, categories, 1, params, @config) .
|
166
|
-
render_html(
|
165
|
+
PageController.new(article, categories, 1, params, theme, @config) .
|
166
|
+
render_html(theme.get_template('article'), theme.get_template('layout'))
|
167
167
|
end
|
168
168
|
|
169
169
|
return :body => body, :type => mime_type, :status => 200
|
@@ -173,8 +173,8 @@ module Baron
|
|
173
173
|
# 404 Page Not Found
|
174
174
|
params[:error_message] = 'Page not found'
|
175
175
|
params[:error_code] = '404'
|
176
|
-
body = PageController.new([], categories, 0, params, @config) .
|
177
|
-
render_html(
|
176
|
+
body = PageController.new([], categories, 0, params, theme, @config) .
|
177
|
+
render_html(theme.get_template('error'), theme.get_template('layout'))
|
178
178
|
|
179
179
|
return :body => body, :type => :html, :status => 404
|
180
180
|
end
|
@@ -232,6 +232,15 @@ module Baron
|
|
232
232
|
get_all_categories.each { |h| return true if h[:node_name] == path_node }
|
233
233
|
return false
|
234
234
|
end
|
235
|
+
|
236
|
+
def load_theme_config filename_and_path
|
237
|
+
bar = {}
|
238
|
+
metadata = File.read(filename_and_path)
|
239
|
+
YAML.load(metadata).each_pair { |key, value| bar[key.downcase.to_sym] = value }
|
240
|
+
bar
|
241
|
+
rescue Errno::ENOENT => e
|
242
|
+
return {}
|
243
|
+
end
|
235
244
|
|
236
245
|
def get_pages_path() "#{@config[:sample_data_path]}pages/" end
|
237
246
|
def get_articles_path() "#{@config[:sample_data_path]}articles" end
|
@@ -240,6 +249,29 @@ module Baron
|
|
240
249
|
def get_system_resource(name) "#{@config[:sample_data_path]}resources/#{name}" end
|
241
250
|
def get_feed_path() "#{@config[:url]}/feed.rss" end
|
242
251
|
end
|
252
|
+
|
253
|
+
class Theme < Hash
|
254
|
+
def initialize config
|
255
|
+
@config = config
|
256
|
+
self[:root] = "/themes/#{config[:theme]}"
|
257
|
+
self[:name] = config[:theme]
|
258
|
+
self[:file_root] = "#{@config[:sample_data_path]}themes/#{@config[:theme]}".squeeze('/')
|
259
|
+
load_config("#{self[:file_root]}/theme_config.yml")
|
260
|
+
end
|
261
|
+
|
262
|
+
def load_config filename_and_path
|
263
|
+
metadata = File.read(filename_and_path)
|
264
|
+
YAML.load(metadata).each_pair { |key, value| self[key.downcase.to_sym] = value }
|
265
|
+
rescue Errno::ENOENT => e
|
266
|
+
puts "Warning: unable to load config file : " + filename_and_path
|
267
|
+
end
|
268
|
+
|
269
|
+
def root() self[:root] end
|
270
|
+
|
271
|
+
def get_template name
|
272
|
+
"#{self[:file_root]}/templates/#{name}.rhtml".squeeze('/')
|
273
|
+
end
|
274
|
+
end
|
243
275
|
|
244
276
|
class Article < Hash
|
245
277
|
def initialize file_parts, config = {}
|
@@ -289,7 +321,7 @@ module Baron
|
|
289
321
|
|
290
322
|
def load_article filename_and_path
|
291
323
|
metadata, self[:body] = File.read(filename_and_path).split(/\n\n/, 2)
|
292
|
-
YAML.load(metadata).each_pair { |
|
324
|
+
YAML.load(metadata).each_pair { |key, value| self[key.downcase.to_sym] = value }
|
293
325
|
end
|
294
326
|
|
295
327
|
def markdown text
|
data/spec/baron_article_spec.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
###
|
4
|
-
# Tests Baron::
|
4
|
+
# Tests Baron::Article class
|
5
5
|
#
|
6
6
|
# This class represents an individual article
|
7
7
|
|
8
|
-
describe "Baron::
|
8
|
+
describe "Baron::Article" do
|
9
9
|
before :all do
|
10
10
|
@config = load_config()
|
11
11
|
@article_parts = {:filename_and_path => "#{SAMPLE_DATA_PATH}articles/favorites/1916-01-01-the-road-not-taken.txt",
|
@@ -17,11 +17,6 @@ describe "Baron::BlogEngine" do
|
|
17
17
|
@blog_engine.get_pages_path.should == SAMPLE_DATA_PATH + 'pages/'
|
18
18
|
@blog_engine.get_articles_path.should == SAMPLE_DATA_PATH + 'articles'
|
19
19
|
@blog_engine.get_page_template('about').should == SAMPLE_DATA_PATH + 'pages/about.rhtml'
|
20
|
-
@blog_engine.get_theme_template('article').should == SAMPLE_DATA_PATH + 'themes/typography/templates/article.rhtml'
|
21
|
-
@blog_engine.get_theme_template('category').should == SAMPLE_DATA_PATH + 'themes/typography/templates/category.rhtml'
|
22
|
-
@blog_engine.get_theme_template('error').should == SAMPLE_DATA_PATH + 'themes/typography/templates/error.rhtml'
|
23
|
-
@blog_engine.get_theme_template('home').should == SAMPLE_DATA_PATH + 'themes/typography/templates/home.rhtml'
|
24
|
-
@blog_engine.get_theme_template('layout').should == SAMPLE_DATA_PATH + 'themes/typography/templates/layout.rhtml'
|
25
20
|
@blog_engine.get_system_resource('redirects.txt').should == SAMPLE_DATA_PATH + 'resources/redirects.txt'
|
26
21
|
@blog_engine.get_system_resource('robots.txt').should == SAMPLE_DATA_PATH + 'resources/robots.txt'
|
27
22
|
@blog_engine.get_system_resource('feeds.rss').should == SAMPLE_DATA_PATH + 'resources/feeds.rss'
|
@@ -43,16 +38,24 @@ describe "Baron::BlogEngine" do
|
|
43
38
|
it "finds all articles" do
|
44
39
|
articles_fileparts = @blog_engine.get_all_articles()
|
45
40
|
articles_fileparts.count.should == 7
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
articles_fileparts
|
41
|
+
end
|
42
|
+
|
43
|
+
it "parses all article fileparts" do
|
44
|
+
articles_fileparts = @blog_engine.get_all_articles()
|
45
|
+
articles_fileparts[0][:filename_and_path].should == SAMPLE_DATA_PATH + 'articles/favorites/1916-01-01-the-road-not-taken.txt'
|
46
|
+
articles_fileparts[0][:date].should == '1916-01-01'
|
47
|
+
articles_fileparts[0][:filename].should == 'the-road-not-taken'
|
48
|
+
articles_fileparts[0][:category].should == 'favorites'
|
49
|
+
articles_fileparts[1][:filename_and_path].should == SAMPLE_DATA_PATH + 'articles/north of boston/1914-01-05-A-Hundred-callers.txt'
|
50
|
+
articles_fileparts[1][:date].should == '1914-01-05'
|
51
|
+
articles_fileparts[1][:filename].should == 'a-hundred-callers'
|
52
|
+
articles_fileparts[1][:category].should == 'north of boston'
|
50
53
|
articles_fileparts.last[:filename_and_path].should == SAMPLE_DATA_PATH + 'articles/other authors/1909-01-02-If.txt'
|
51
54
|
articles_fileparts.last[:date].should == '1909-01-02'
|
52
55
|
articles_fileparts.last[:filename].should == 'if'
|
53
56
|
articles_fileparts.last[:category].should == 'other authors'
|
54
57
|
end
|
55
|
-
|
58
|
+
|
56
59
|
it "returns all article parts" do
|
57
60
|
@blog_engine.get_all_articles().each do |article_parts|
|
58
61
|
article_parts[:filename_and_path].should_not == nil
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
###
|
4
|
+
# Tests Baron::Theme class
|
5
|
+
#
|
6
|
+
# This class represents an individual article
|
7
|
+
|
8
|
+
describe "Baron::Theme" do
|
9
|
+
before :all do
|
10
|
+
@config = load_config()
|
11
|
+
@theme = Baron::Theme.new(@config)
|
12
|
+
end
|
13
|
+
|
14
|
+
it "finds all parameters in theme_config.yml" do
|
15
|
+
@theme.root.should == '/themes/typography'
|
16
|
+
@theme[:root].should == '/themes/typography'
|
17
|
+
@theme[:masthead_url].should == "http://www.my-corporation.com"
|
18
|
+
@theme[:param_test].should == "FOOBAR"
|
19
|
+
@theme[:company_description].should == "Insert content here"
|
20
|
+
end
|
21
|
+
|
22
|
+
it "finds all the rendering templates" do
|
23
|
+
@theme.get_template('article').should == SAMPLE_DATA_PATH + 'themes/typography/templates/article.rhtml'
|
24
|
+
@theme.get_template('category').should == SAMPLE_DATA_PATH + 'themes/typography/templates/category.rhtml'
|
25
|
+
@theme.get_template('error').should == SAMPLE_DATA_PATH + 'themes/typography/templates/error.rhtml'
|
26
|
+
@theme.get_template('home').should == SAMPLE_DATA_PATH + 'themes/typography/templates/home.rhtml'
|
27
|
+
@theme.get_template('layout').should == SAMPLE_DATA_PATH + 'themes/typography/templates/layout.rhtml'
|
28
|
+
end
|
29
|
+
end
|
data/spec/sample_data/config.ru
CHANGED
@@ -0,0 +1,44 @@
|
|
1
|
+
<h1>Test Page</h1>
|
2
|
+
<p>
|
3
|
+
This page lists all the variables that are available to any renderingfile
|
4
|
+
(e.g. ends in .rhtml).
|
5
|
+
</p>
|
6
|
+
<p>
|
7
|
+
Access them through <code><%= @params[:page_name] %></code>, where
|
8
|
+
<code>:page_name</code> is the name of the attribute you would like to access.
|
9
|
+
</p>
|
10
|
+
|
11
|
+
<h2>@theme</h2>
|
12
|
+
<p>
|
13
|
+
Gives you access to metadata about the theme, including parameters defined in
|
14
|
+
the <code>themes/theme/theme_config.yml</code> file.
|
15
|
+
</p>
|
16
|
+
<section style="font-family:'Courier New'; padding-bottom:1em;"><%= @theme.inspect %></section>
|
17
|
+
|
18
|
+
<h2>@params</h2>
|
19
|
+
<p>
|
20
|
+
Gives you access to some useful data created during the page rendering.
|
21
|
+
</p>
|
22
|
+
<section style="font-family:'Courier New'; padding-bottom:1em;"><%= @params.inspect %></section>
|
23
|
+
|
24
|
+
<h2>@config</h2>
|
25
|
+
<p>
|
26
|
+
Gives you access to all the attribute/ value pairs specified in your
|
27
|
+
<code>config.ru</code> file.
|
28
|
+
</p>
|
29
|
+
<section style="font-family:'Courier New'; padding-bottom:1em;"><%= @config.inspect %></section>
|
30
|
+
|
31
|
+
<h2>@categories</h2>
|
32
|
+
<p>
|
33
|
+
Gives you access to your list of categories and associated metadata. Useful
|
34
|
+
for creating a nav bar.
|
35
|
+
</p>
|
36
|
+
<section style="font-family:'Courier New'; padding-bottom:1em;"><%= @categories.inspect %></section>
|
37
|
+
|
38
|
+
<h2>@articles</h2>
|
39
|
+
<p>
|
40
|
+
Gives you access to each article returned with your request (the most
|
41
|
+
recent <code>@config[:max_articles]</code>). This also includes any
|
42
|
+
additional attribute/ value pairs specified in the article header.
|
43
|
+
</p>
|
44
|
+
<section style="font-family:'Courier New'; padding-bottom:1em;"><%= @articles.inspect %></section>
|
@@ -12,9 +12,9 @@
|
|
12
12
|
<script type="text/javascript" src="//use.typekit.net/xgg5zca.js"></script>
|
13
13
|
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
|
14
14
|
|
15
|
-
<link href="<%= @
|
16
|
-
<link href="<%= @
|
17
|
-
<link href="<%= @
|
15
|
+
<link href="<%= @theme.root %>/css/bootstrap.css" rel="stylesheet">
|
16
|
+
<link href="<%= @theme.root %>/css/app.css" rel="stylesheet">
|
17
|
+
<link href="<%= @theme.root %>/css/bootstrap-responsive.css" rel="stylesheet">
|
18
18
|
|
19
19
|
<!-- [if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
20
20
|
|
@@ -0,0 +1,58 @@
|
|
1
|
+
body {font-family:"source-sans-pro", sans-serif; font-size:18px; line-height:1.6em; color: #444; border-top:3px solid #069;}
|
2
|
+
h1, h2, h3 {font-family:"museo-sans", sans-serif; padding-top:0; margin-top:0;}
|
3
|
+
h1 {font-size:2.6em; line-height:1.3em; color:#444; text-align:center; }
|
4
|
+
h2 {color: #444; font-size: 1.4em;}
|
5
|
+
h3 {text-transform: uppercase; font-size:0.9em;}
|
6
|
+
h4 {text-transform: uppercase; font-size:0.76em;}
|
7
|
+
|
8
|
+
.small {font-size:0.8em;}
|
9
|
+
.center {text-align: center;}
|
10
|
+
|
11
|
+
|
12
|
+
a:link, a:hover, a:visited, a:active {color:#069;}
|
13
|
+
a:link.subtle, a:hover.subtle, a:visited.subtle, a:active.subtle {color:#444;}
|
14
|
+
|
15
|
+
/* Site Layout Template */
|
16
|
+
|
17
|
+
a:hover.logo {border:20px solid #eee; border-top-style:none; border-bottom-style:none; padding:0 2em 0 2em; border-radius:1em;}
|
18
|
+
|
19
|
+
div.content-strip {max-width: 38em; margin: 0 auto;}
|
20
|
+
|
21
|
+
#header {padding-top:2em;}
|
22
|
+
#header-image {display:block; text-align:center;}
|
23
|
+
#blog-title {text-align:center; font-size:1.8em; line-height:1.8em; padding-top:1em;}
|
24
|
+
.blog-title {font-size:1.2em;}
|
25
|
+
|
26
|
+
#content {padding-top:2em; padding-bottom:5em;}
|
27
|
+
|
28
|
+
#navigation {padding-top:1em;}
|
29
|
+
#navigation a:link, #navigation a:hover, #navigation a:visited, #navigation a:active {color:#08c;}
|
30
|
+
.navigation-wrapper {background-color:#eee;}
|
31
|
+
#navigation ul {list-style-type:none; margin-left:0;}
|
32
|
+
#navigation li {padding-top:0.3em; padding-bottom: 0.3em;}
|
33
|
+
|
34
|
+
|
35
|
+
#footer {text-align:center; font-size:0.8em; line-height:0.8em; padding-top:1em; padding-bottom:1em;}
|
36
|
+
#footer p {margin:1em 0 1em 0}
|
37
|
+
.footer-wrapper {background-color:#eee;}
|
38
|
+
|
39
|
+
/* Index Template */
|
40
|
+
|
41
|
+
#articles {font-size: 1.3em;}
|
42
|
+
#articles ol {list-style-type:none; margin-left:0;}
|
43
|
+
#articles li {width:100%; line-height:1.3em; padding-top:0.5em; padding-bottom: 0.5em; border-bottom:solid 1px #cecece;}
|
44
|
+
#articles .article-title {float: left;}
|
45
|
+
#articles time {float:right; color:#999; text-transform:uppercase; font-size:0.8em; vertical-align:baseline;}
|
46
|
+
#articles span {color:#ccc; font-size:0.5em; text-transform:uppercase;}
|
47
|
+
/*#articles a {overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:22em;}*/
|
48
|
+
|
49
|
+
#pagination {padding-top:1em;}
|
50
|
+
|
51
|
+
|
52
|
+
/* Article Template */
|
53
|
+
|
54
|
+
.post-details {font-size:0.8em; color:#888; padding-top:0.7em; padding-bottom:1.3em; text-align:center;}
|
55
|
+
|
56
|
+
article li {line-height:1.3em; padding-top:0.3em; padding-bottom:0.3em;}
|
57
|
+
article p {padding:0.5em 0 0.5em 0;}
|
58
|
+
article table, article th, article td {border: 1px solid #444;}
|