middleman-webcomic 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. data/.gitignore +5 -0
  2. data/ChangeLog.md +11 -0
  3. data/Gemfile +3 -0
  4. data/License +18 -0
  5. data/Rakefile +22 -0
  6. data/Readme.md +22 -0
  7. data/lib/middleman-webcomic/cli.rb +5 -0
  8. data/lib/middleman-webcomic/data.rb +213 -0
  9. data/lib/middleman-webcomic/feature.rb +172 -0
  10. data/lib/middleman-webcomic/mock_app.rb +31 -0
  11. data/lib/middleman-webcomic/pager.rb +51 -0
  12. data/lib/middleman-webcomic/tasks.rb +53 -0
  13. data/lib/middleman-webcomic/template/Gemfile.tt +7 -0
  14. data/lib/middleman-webcomic/template/Rakefile.tt +28 -0
  15. data/lib/middleman-webcomic/template/config.ru +16 -0
  16. data/lib/middleman-webcomic/template/config.tt +71 -0
  17. data/lib/middleman-webcomic/template/source/about.html.slim +11 -0
  18. data/lib/middleman-webcomic/template/source/comics/index.html.slim +14 -0
  19. data/lib/middleman-webcomic/template/source/comics/template.html.slim +1 -0
  20. data/lib/middleman-webcomic/template/source/feed.xml.builder +30 -0
  21. data/lib/middleman-webcomic/template/source/index.html.slim +1 -0
  22. data/lib/middleman-webcomic/template/source/layout.slim +63 -0
  23. data/lib/middleman-webcomic/template/source/robots.txt +3 -0
  24. data/lib/middleman-webcomic/template/source/theme/_comic.slim +4 -0
  25. data/lib/middleman-webcomic/template/source/theme/_layout_tall.slim +17 -0
  26. data/lib/middleman-webcomic/template/source/theme/_layout_wide.slim +16 -0
  27. data/lib/middleman-webcomic/template/source/theme/_sidebar.slim +13 -0
  28. data/lib/middleman-webcomic/template/source/theme/images/favicon.png +0 -0
  29. data/lib/middleman-webcomic/template/source/theme/scripts/app.js.coffee +4 -0
  30. data/lib/middleman-webcomic/template/source/theme/styles/_utils.scss +399 -0
  31. data/lib/middleman-webcomic/template/source/theme/styles/screen.css.sass +89 -0
  32. data/lib/middleman-webcomic/template.rb +30 -0
  33. data/lib/middleman-webcomic/version.rb +7 -0
  34. data/lib/middleman-webcomic.rb +11 -0
  35. data/lib/middleman_init.rb +1 -0
  36. data/middleman-webcomic.gemspec +29 -0
  37. metadata +113 -0
@@ -0,0 +1,89 @@
1
+ @import "_utils"
2
+
3
+ +css-reset
4
+ +grid
5
+
6
+
7
+ body
8
+ font-family: "Helvetica Neue", Helvetica, Sans-Serif
9
+ overflow-y: scroll
10
+ min-width: 1000px
11
+ padding-bottom: 35px
12
+
13
+ div.clear
14
+ clear: both
15
+ overflow: hidden
16
+ height: 0px
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+ #navigation
25
+ background: #EEE
26
+ width: 1000px
27
+ margin: 0 auto
28
+ font-size: 120%
29
+
30
+
31
+ .comic-pager, .comic-latest
32
+ text-align: right
33
+ padding-top: 5px
34
+ padding-bottom: 3px
35
+ font-size: 250%
36
+ a
37
+ color: #555
38
+ padding: 0px 15px
39
+ text-decoration: none
40
+ &:hover
41
+ color: black
42
+ span
43
+ padding: 0px 15px
44
+ color: #CCC
45
+
46
+ .comic-latest
47
+ font-size: 100%
48
+ a
49
+ display: block
50
+ padding-top: 5px
51
+
52
+ ul
53
+ padding: 0
54
+ margin: 0
55
+ list-style: none
56
+ li
57
+ float: left
58
+ a
59
+ display: block
60
+ padding: 10px 10px
61
+ color: #555
62
+ text-decoration: none
63
+ &:hover
64
+ color: black
65
+
66
+ /* Page-based styles/states
67
+ .comic-pager
68
+ display: none
69
+
70
+ .index, .comics
71
+ .comic-pager
72
+ display: block !important
73
+ .comic-latest
74
+ display: none
75
+
76
+ .comics_index
77
+ .comic-pager
78
+ display: none !important
79
+ .comic-latest
80
+ display: block !important
81
+
82
+
83
+ .comic
84
+ padding: 10px
85
+
86
+ .image
87
+ display: inline-block
88
+ // border: 2px solid black
89
+ +box-shadow(0px 2px 6px #999)
@@ -0,0 +1,30 @@
1
+ module Middleman
2
+ module Webcomic
3
+ class Template < Middleman::Templates::Base
4
+ def self.source_root
5
+ File.dirname(__FILE__)
6
+ end
7
+
8
+ def build_scaffold
9
+ template "template/config.tt", File.join(location, "config.rb")
10
+ template "template/Rakefile.tt", File.join(location, "Rakefile")
11
+ template "template/Gemfile.tt", File.join(location, "Gemfile")
12
+ directory "template/source", File.join(location, "source")
13
+
14
+ # empty_directory File.join(location, "source", options[:css_dir])
15
+ # empty_directory File.join(location, "source", options[:js_dir])
16
+ # empty_directory File.join(location, "source", options[:images_dir])
17
+
18
+ empty_directory File.join(location, "comics", "notes")
19
+ empty_directory File.join(location, "comics", "images")
20
+ empty_directory File.join(location, "source", "media", "comics")
21
+ end
22
+
23
+ def generate_rack
24
+ template "template/config.ru", File.join(location, "config.ru")
25
+ end
26
+ end
27
+ end
28
+ end
29
+
30
+ Middleman::Templates.register(:webcomic, Middleman::Webcomic::Template)
@@ -0,0 +1,7 @@
1
+ module Middleman
2
+ module Webcomic
3
+
4
+ VERSION = "0.5.0" unless defined?(::Middleman::Webcomic::VERSION)
5
+
6
+ end
7
+ end
@@ -0,0 +1,11 @@
1
+ # Try to 'force' utf-8 encoding
2
+ if defined? Encoding
3
+ Encoding.default_internal = Encoding.default_external = "UTF-8"
4
+ else
5
+ $KCODE = "UTF-8"
6
+ end
7
+
8
+ require 'middleman-webcomic/version'
9
+ require 'middleman-webcomic/data'
10
+ require 'middleman-webcomic/feature'
11
+ require 'middleman-webcomic/template'
@@ -0,0 +1 @@
1
+ require "middleman-webcomic"
@@ -0,0 +1,29 @@
1
+ lib = File.expand_path('../lib/', __FILE__)
2
+ $:.unshift lib unless $:.include?(lib)
3
+
4
+ require 'middleman-webcomic/version'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{middleman-webcomic}
8
+ s.version = Middleman::Webcomic::VERSION
9
+ s.platform = Gem::Platform::RUBY
10
+ s.rubyforge_project = 'middleman-webcomic'
11
+ s.has_rdoc = false
12
+ s.date = Time.now.strftime "%Y-%m-%d"
13
+
14
+ s.authors = ["Matt McCray"]
15
+ s.email = %q{matt@inkwellian.com}
16
+ s.summary = %q{A MiddleMan extension for generating webcomic sites.}
17
+ s.homepage = %q{https://github.com/darthapo/middleman-webcomic}
18
+ s.description = %q{Use MiddleMan to create your webcomic site with this extension.}
19
+
20
+ s.files = `git ls-files`.split("\n")
21
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
22
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
23
+ s.require_paths = ["lib"]
24
+
25
+ s.add_dependency 'middleman'
26
+ s.add_dependency 'tilt'
27
+ s.add_dependency 'thor'
28
+
29
+ end
metadata ADDED
@@ -0,0 +1,113 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: middleman-webcomic
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Matt McCray
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-09-08 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: middleman
16
+ requirement: &70153896114460 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70153896114460
25
+ - !ruby/object:Gem::Dependency
26
+ name: tilt
27
+ requirement: &70153896114040 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70153896114040
36
+ - !ruby/object:Gem::Dependency
37
+ name: thor
38
+ requirement: &70153896113620 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70153896113620
47
+ description: Use MiddleMan to create your webcomic site with this extension.
48
+ email: matt@inkwellian.com
49
+ executables: []
50
+ extensions: []
51
+ extra_rdoc_files: []
52
+ files:
53
+ - .gitignore
54
+ - ChangeLog.md
55
+ - Gemfile
56
+ - License
57
+ - Rakefile
58
+ - Readme.md
59
+ - lib/middleman-webcomic.rb
60
+ - lib/middleman-webcomic/cli.rb
61
+ - lib/middleman-webcomic/data.rb
62
+ - lib/middleman-webcomic/feature.rb
63
+ - lib/middleman-webcomic/mock_app.rb
64
+ - lib/middleman-webcomic/pager.rb
65
+ - lib/middleman-webcomic/tasks.rb
66
+ - lib/middleman-webcomic/template.rb
67
+ - lib/middleman-webcomic/template/Gemfile.tt
68
+ - lib/middleman-webcomic/template/Rakefile.tt
69
+ - lib/middleman-webcomic/template/config.ru
70
+ - lib/middleman-webcomic/template/config.tt
71
+ - lib/middleman-webcomic/template/source/about.html.slim
72
+ - lib/middleman-webcomic/template/source/comics/index.html.slim
73
+ - lib/middleman-webcomic/template/source/comics/template.html.slim
74
+ - lib/middleman-webcomic/template/source/feed.xml.builder
75
+ - lib/middleman-webcomic/template/source/index.html.slim
76
+ - lib/middleman-webcomic/template/source/layout.slim
77
+ - lib/middleman-webcomic/template/source/robots.txt
78
+ - lib/middleman-webcomic/template/source/theme/_comic.slim
79
+ - lib/middleman-webcomic/template/source/theme/_layout_tall.slim
80
+ - lib/middleman-webcomic/template/source/theme/_layout_wide.slim
81
+ - lib/middleman-webcomic/template/source/theme/_sidebar.slim
82
+ - lib/middleman-webcomic/template/source/theme/images/favicon.png
83
+ - lib/middleman-webcomic/template/source/theme/scripts/app.js.coffee
84
+ - lib/middleman-webcomic/template/source/theme/styles/_utils.scss
85
+ - lib/middleman-webcomic/template/source/theme/styles/screen.css.sass
86
+ - lib/middleman-webcomic/version.rb
87
+ - lib/middleman_init.rb
88
+ - middleman-webcomic.gemspec
89
+ homepage: https://github.com/darthapo/middleman-webcomic
90
+ licenses: []
91
+ post_install_message:
92
+ rdoc_options: []
93
+ require_paths:
94
+ - lib
95
+ required_ruby_version: !ruby/object:Gem::Requirement
96
+ none: false
97
+ requirements:
98
+ - - ! '>='
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ required_rubygems_version: !ruby/object:Gem::Requirement
102
+ none: false
103
+ requirements:
104
+ - - ! '>='
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
107
+ requirements: []
108
+ rubyforge_project: middleman-webcomic
109
+ rubygems_version: 1.8.6
110
+ signing_key:
111
+ specification_version: 3
112
+ summary: A MiddleMan extension for generating webcomic sites.
113
+ test_files: []