nesta-plugin-blogazine 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/README.md +43 -0
- data/Rakefile +1 -0
- data/lib/nesta-plugin-blogazine.rb +3 -0
- data/lib/nesta-plugin-blogazine/init.rb +19 -0
- data/lib/nesta-plugin-blogazine/version.rb +7 -0
- data/nesta-plugin-blogazine.gemspec +28 -0
- metadata +87 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# Art direction plugin for Nesta
|
2
|
+
|
3
|
+
Art directed blogs (or "blogazines") use a different design on every
|
4
|
+
page (the [PeepCode blog][] is a good example). It's easy to implement
|
5
|
+
with Nesta, but easier still if you install this plugin.
|
6
|
+
|
7
|
+
[PeepCode blog]: http://blog.peepcode.com/archives
|
8
|
+
|
9
|
+
It adds a `page_design` helper method that you can use to serve a
|
10
|
+
different stylesheet for each page on your site. Update your site's
|
11
|
+
layout template to call the helper when serving your stylesheet:
|
12
|
+
|
13
|
+
%link(href="/css/#{page_design}.css" media="screen" rel="stylesheet")
|
14
|
+
|
15
|
+
You can specify the name of a default stylesheet to use on pages that
|
16
|
+
don't specify their own design. If you don't specify a default the
|
17
|
+
plugin assumes that you want to render a stylesheet called 'master.css',
|
18
|
+
but you can override that by passing in the name of your default
|
19
|
+
stylesheet:
|
20
|
+
|
21
|
+
%link(href="/css/#{page_design('application')}.css" media="screen" rel="stylesheet")
|
22
|
+
|
23
|
+
Then create one stylesheet for each unique design, and drop it into your
|
24
|
+
`views` folder (so you might have `views/design-1.sass` or
|
25
|
+
`views/trees.scss`).
|
26
|
+
|
27
|
+
Then add some metadata to the top of each page inside `content/pages`
|
28
|
+
that should use one of your hand crafted designs. For example:
|
29
|
+
|
30
|
+
Design: trees
|
31
|
+
Date: 10 Sep 2011
|
32
|
+
Categories: blog/nature
|
33
|
+
|
34
|
+
# Deciduous woodland
|
35
|
+
|
36
|
+
Your blog post starts here...
|
37
|
+
|
38
|
+
You can share common styles between designs using Sass's ability to import
|
39
|
+
other Sass files. At the top of `trees.sass` you could write:
|
40
|
+
|
41
|
+
@import "master"
|
42
|
+
|
43
|
+
// Styles specific to the trees design go here...
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Nesta
|
2
|
+
module Plugin
|
3
|
+
module Blogazine
|
4
|
+
module Helpers
|
5
|
+
def page_design(default = 'master')
|
6
|
+
if @page && @page.metadata('design')
|
7
|
+
@page.metadata('design')
|
8
|
+
else
|
9
|
+
default
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
class App
|
17
|
+
helpers Nesta::Plugin::Blogazine::Helpers
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "nesta-plugin-blogazine/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "nesta-plugin-blogazine"
|
7
|
+
s.version = Nesta::Plugin::Blogazine::VERSION
|
8
|
+
s.authors = ["Graham Ashton"]
|
9
|
+
s.email = ["graham@effectif.com"]
|
10
|
+
s.homepage = ""
|
11
|
+
s.summary = %q{Art directed blog support for Nesta}
|
12
|
+
s.description = <<-EOF
|
13
|
+
Art directed blogs (or "blogazines") use a different design on every
|
14
|
+
page. It's easy to implement with Nesta, but easier still if you install
|
15
|
+
this plugin.
|
16
|
+
EOF
|
17
|
+
|
18
|
+
s.rubyforge_project = "nesta-plugin-blogazine"
|
19
|
+
|
20
|
+
s.files = `git ls-files`.split("\n")
|
21
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
22
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
23
|
+
s.require_paths = ["lib"]
|
24
|
+
|
25
|
+
# specify any dependencies here; for example:
|
26
|
+
s.add_dependency("nesta", ">= 0.9.11")
|
27
|
+
s.add_development_dependency("rake")
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: nesta-plugin-blogazine
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Graham Ashton
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-09-10 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: nesta
|
16
|
+
requirement: &70210981536100 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.9.11
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70210981536100
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rake
|
27
|
+
requirement: &70210981533120 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70210981533120
|
36
|
+
description: ! 'Art directed blogs (or "blogazines") use a different design on every
|
37
|
+
|
38
|
+
page. It''s easy to implement with Nesta, but easier still if you install
|
39
|
+
|
40
|
+
this plugin.
|
41
|
+
|
42
|
+
'
|
43
|
+
email:
|
44
|
+
- graham@effectif.com
|
45
|
+
executables: []
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- .gitignore
|
50
|
+
- Gemfile
|
51
|
+
- README.md
|
52
|
+
- Rakefile
|
53
|
+
- lib/nesta-plugin-blogazine.rb
|
54
|
+
- lib/nesta-plugin-blogazine/init.rb
|
55
|
+
- lib/nesta-plugin-blogazine/version.rb
|
56
|
+
- nesta-plugin-blogazine.gemspec
|
57
|
+
homepage: ''
|
58
|
+
licenses: []
|
59
|
+
post_install_message:
|
60
|
+
rdoc_options: []
|
61
|
+
require_paths:
|
62
|
+
- lib
|
63
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
segments:
|
70
|
+
- 0
|
71
|
+
hash: 3077598422929656201
|
72
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
segments:
|
79
|
+
- 0
|
80
|
+
hash: 3077598422929656201
|
81
|
+
requirements: []
|
82
|
+
rubyforge_project: nesta-plugin-blogazine
|
83
|
+
rubygems_version: 1.8.8
|
84
|
+
signing_key:
|
85
|
+
specification_version: 3
|
86
|
+
summary: Art directed blog support for Nesta
|
87
|
+
test_files: []
|