middleman-ganbaruzoi 0.0.2

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.
Files changed (34) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/Gemfile +3 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +56 -0
  6. data/Rakefile +1 -0
  7. data/lib/middleman-ganbaruzoi.rb +5 -0
  8. data/lib/middleman-ganbaruzoi/template.rb +57 -0
  9. data/lib/middleman-ganbaruzoi/template/shared/Gemfile +7 -0
  10. data/lib/middleman-ganbaruzoi/template/shared/config.rb +89 -0
  11. data/lib/middleman-ganbaruzoi/template/source/css/_grid.sass +53 -0
  12. data/lib/middleman-ganbaruzoi/template/source/css/_media-queries.sass +23 -0
  13. data/lib/middleman-ganbaruzoi/template/source/css/_mixin.sass +99 -0
  14. data/lib/middleman-ganbaruzoi/template/source/css/_module.sass +57 -0
  15. data/lib/middleman-ganbaruzoi/template/source/css/_normalize.scss +425 -0
  16. data/lib/middleman-ganbaruzoi/template/source/css/_variable.sass +21 -0
  17. data/lib/middleman-ganbaruzoi/template/source/css/style.sass +69 -0
  18. data/lib/middleman-ganbaruzoi/template/source/index.html.slim +51 -0
  19. data/lib/middleman-ganbaruzoi/template/source/js/all.js.coffee +14 -0
  20. data/lib/middleman-ganbaruzoi/template/source/js/core/jquery-1.11.1.min.js +4 -0
  21. data/lib/middleman-ganbaruzoi/template/source/js/core/jquery-2.1.1.min.js +4 -0
  22. data/lib/middleman-ganbaruzoi/template/source/js/core/jquery.easing-1.3.min.js +44 -0
  23. data/lib/middleman-ganbaruzoi/template/source/js/core/jquery.transit-0.99.min.js +22 -0
  24. data/lib/middleman-ganbaruzoi/template/source/js/lib/cssua.min.js +7 -0
  25. data/lib/middleman-ganbaruzoi/template/source/js/lib/modernizr.min.js +5 -0
  26. data/lib/middleman-ganbaruzoi/template/source/js/lib/retina.min.js +11 -0
  27. data/lib/middleman-ganbaruzoi/template/source/layouts/_footer.slim +4 -0
  28. data/lib/middleman-ganbaruzoi/template/source/layouts/_header.slim +3 -0
  29. data/lib/middleman-ganbaruzoi/template/source/layouts/_script.slim +42 -0
  30. data/lib/middleman-ganbaruzoi/template/source/layouts/layout.slim +52 -0
  31. data/lib/middleman-ganbaruzoi/version.rb +5 -0
  32. data/lib/middleman_extension.rb +1 -0
  33. data/middleman-ganbaruzoi.gemspec +26 -0
  34. metadata +132 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e9f9bc4b9bdd09dcc95a6243c4b11fcc9dba2cb9
4
+ data.tar.gz: e6de690ed2f728b08e657bc6c1bfeb9539408abc
5
+ SHA512:
6
+ metadata.gz: 203d1affe0f502fed1bf9833253b037bd2cef6dd5b99cfa980e42506f2b076cda5d6e4058a64b50b04a69e5c2bcf02ac2b690f041727c688621e57f357a23fe7
7
+ data.tar.gz: dfd808984897ecd15e13a68bb3a1016f4d074794d4a713bdb52a2e86b5dbc6d31d6adca31f486fa3488b50f68a94a8fe4e9a535b2d9aff7758e61ab29f7afb5d
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 RYO NAKAE
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,56 @@
1
+ # middleman-ganbaruzoi
2
+
3
+ Middleman-Ganbaruzoi is a boilerplate of middleman using using Slim, Sass and CoffeeScript.
4
+
5
+ <img src="http://f.cl.ly/items/00201Z12410h1W2N0r2j/%E5%86%99%E7%9C%9F%202014-06-07%2022%2011%2032_1.png" width="450" alt="今日も一日がんばるぞい!">
6
+
7
+
8
+ ## Ready:
9
+
10
+ * Slim
11
+ * Sass(SASS) + Compass
12
+ * CoffeeScript
13
+ * CSS Autoprefixer
14
+ * LiveReload
15
+
16
+
17
+ ## Install
18
+
19
+ $ gem install middleman
20
+
21
+ $ gem install middleman-ganbaruzoi
22
+
23
+ $ middleman init project_name --template ganbaruzoi
24
+
25
+
26
+ ## Run
27
+
28
+ $ cd project_name
29
+
30
+ $ middleman server
31
+
32
+
33
+ ## Author
34
+
35
+ ### RYO NAKAE
36
+
37
+ Web Designer in Kyoto, Japan.
38
+
39
+ * [Portfolio](http://brdr.jp)
40
+ * [Twitter](https://twitter.com/ryo_dg)
41
+ * [JAYPEG](https://jypg.net/ryo_dg)
42
+ * [Dribbble](https://dribbble.com/ryo_dg)
43
+ * [GitHub](https://github.com/ryonakae)
44
+
45
+
46
+ ## Change Log
47
+
48
+ ### 0.0.2 (2014-08-18)
49
+
50
+ * `README.md`修正したやつをrubygems.orgに反映してなかったので、もうよく分からんのでアップデートした
51
+
52
+ ### 0.0.1 (2014-08-18)
53
+
54
+ * RubyGem化(なのでバージョンは新たに0.0.1からスタート)
55
+ * `layouts`以下のヘッダーやらのパーシャルファイルに、`_header.slim`のようにアンダースコアを先頭に追加した
56
+ * `README.md`修正
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,5 @@
1
+ require 'middleman-core'
2
+ require 'middleman-ganbaruzoi/version'
3
+ require 'middleman-ganbaruzoi/template'
4
+
5
+ Middleman::Templates.register :ganbaruzoi, Middleman::Ganbaruzoi::Template
@@ -0,0 +1,57 @@
1
+ require 'middleman-core/templates'
2
+
3
+ module Middleman
4
+ module Ganbaruzoi
5
+
6
+ class Template < Middleman::Templates::Base
7
+ class_option 'css_dir',
8
+ default: 'css',
9
+ desc: 'The path to the css files'
10
+ class_option 'js_dir',
11
+ default: 'js',
12
+ desc: 'The path to the javascript files'
13
+ class_option 'images_dir',
14
+ default: 'img',
15
+ desc: 'The path to the image files'
16
+
17
+ def self.source_root
18
+ File.join(File.dirname(__FILE__), 'template')
19
+ end
20
+
21
+ def build_scaffold
22
+ template 'shared/Gemfile', File.join(location, 'Gemfile')
23
+ template 'shared/config.rb', File.join(location, 'config.rb')
24
+ copy_file 'source/index.html.slim', File.join(location, 'source/index.html.slim')
25
+ copy_file 'source/layouts/layout.slim', File.join(location, 'source/layouts/layout.slim')
26
+ copy_file 'source/layouts/_header.slim', File.join(location, 'source/layouts/_header.slim')
27
+ copy_file 'source/layouts/_footer.slim', File.join(location, 'source/layouts/_footer.slim')
28
+ copy_file 'source/layouts/_script.slim', File.join(location, 'source/layouts/_script.slim')
29
+
30
+ empty_directory File.join(location, 'source', options[:css_dir])
31
+ copy_file 'source/css/style.sass', File.join(location, 'source', options[:css_dir], 'style.sass')
32
+ copy_file 'source/css/_grid.sass', File.join(location, 'source', options[:css_dir], '_grid.sass')
33
+ copy_file 'source/css/_media-queries.sass', File.join(location, 'source', options[:css_dir], '_media-queries.sass')
34
+ copy_file 'source/css/_mixin.sass', File.join(location, 'source', options[:css_dir], '_mixin.sass')
35
+ copy_file 'source/css/_module.sass', File.join(location, 'source', options[:css_dir], '_module.sass')
36
+ copy_file 'source/css/_normalize.scss', File.join(location, 'source', options[:css_dir], '_normalize.scss')
37
+ copy_file 'source/css/_variable.sass', File.join(location, 'source', options[:css_dir], '_variable.sass')
38
+
39
+ empty_directory File.join(location, 'source', options[:js_dir])
40
+ copy_file 'source/js/all.js.coffee', File.join(location, 'source', options[:js_dir], 'all.js.coffee')
41
+ empty_directory File.join(location, 'source', '#{options[:js_dir]}/core')
42
+ copy_file 'source/js/core/jquery-1.11.1.min.js', File.join(location, 'source', '#{options[:js_dir]}/core', 'jquery-1.11.1.min.js')
43
+ copy_file 'source/js/core/jquery-2.1.1.min.js', File.join(location, 'source', '#{options[:js_dir]}/core', 'jquery-2.1.1.min.js')
44
+ copy_file 'source/js/core/jquery.easing-1.3.min.js', File.join(location, 'source', '#{options[:js_dir]}/core', 'jquery.easing-1.3.min.js')
45
+ copy_file 'source/js/core/jquery.transit-0.99.min.js', File.join(location, 'source', '#{options[:js_dir]}/core', 'jquery.transit-0.99.min.js')
46
+ empty_directory File.join(location, 'source', '#{options[:js_dir]}/lib')
47
+ copy_file 'source/js/lib/cssua.min.js', File.join(location, 'source', '#{options[:js_dir]}/lib', 'cssua.min.js')
48
+ copy_file 'source/js/lib/modernizr.min.js', File.join(location, 'source', '#{options[:js_dir]}/lib', 'modernizr.min.js')
49
+ copy_file 'source/js/lib/retina.min.js', File.join(location, 'source', '#{options[:js_dir]}/lib', 'retina.min.js')
50
+
51
+ empty_directory File.join(location, 'source', options[:images_dir])
52
+ end
53
+ end
54
+ end
55
+ end
56
+
57
+ Middleman::Templates.register :ganbaruzoi, Middleman::Ganbaruzoi::Template
@@ -0,0 +1,7 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem "middleman", "~><%= Middleman::VERSION %>"
4
+ gem "middleman-autoprefixer", "~> 0.2.3"
5
+ gem "middleman-deploy", '~> 0.3.0'
6
+ gem "middleman-livereload", "~> 3.1.0"
7
+ gem "slim", "~> 2.0"
@@ -0,0 +1,89 @@
1
+ ###
2
+ # Compass
3
+ ###
4
+ compass_config do |config|
5
+ config.output_style = :expanded
6
+ config.line_comments = false
7
+ end
8
+
9
+ ###
10
+ # Page options, layouts, aliases and proxies
11
+ ###
12
+
13
+ # Per-page layout changes:
14
+ #
15
+ # With no layout
16
+ # page "/path/to/file.html", :layout => false
17
+ #
18
+ # With alternative layout
19
+ # page "/path/to/file.html", :layout => :otherlayout
20
+ #
21
+ # A path which all have the same layout
22
+ # with_layout :admin do
23
+ # page "/admin/*"
24
+ # end
25
+
26
+ # Proxy pages (http://middlemanapp.com/basics/dynamic-pages/)
27
+ # proxy "/this-page-has-no-template.html", "/template-file.html", :locals => {
28
+ # :which_fake_page => "Rendering a fake page with a local variable" }
29
+
30
+ ###
31
+ # Helpers
32
+ ###
33
+
34
+ # Automatic image dimensions on image_tag helper
35
+ activate :automatic_image_sizes
36
+
37
+ # Reload the browser automatically whenever files change
38
+ configure :development do
39
+ activate :livereload
40
+
41
+ activate :autoprefixer, browsers: ['last 2 version', 'ie 8', 'ie 9']
42
+ end
43
+
44
+ # Methods defined in the helpers block are available in templates
45
+ # helpers do
46
+ # def some_helper
47
+ # "Helping"
48
+ # end
49
+ # end
50
+
51
+ ###
52
+ # Gem
53
+ ###
54
+ # Slim Options
55
+ require 'slim'
56
+ set :slim, { :pretty => true, :sort_attrs => false, :format => :html5 }
57
+
58
+ set :css_dir, 'css'
59
+ set :js_dir, 'js'
60
+ set :images_dir, 'img'
61
+ set :fonts_dir, 'font'
62
+
63
+ # Build-specific configuration
64
+ configure :build do
65
+ activate :autoprefixer, browsers: ['last 2 version', 'ie 8', 'ie 9']
66
+
67
+ # For example, change the Compass output style for deployment
68
+ activate :minify_css
69
+
70
+ # Minify Javascript on build
71
+ activate :minify_javascript
72
+
73
+ # Enable cache buster
74
+ # activate :asset_hash
75
+
76
+ # Use relative URLs
77
+ activate :relative_assets
78
+ set :relative_links, true
79
+
80
+ # Or use a different image path
81
+ # set :http_prefix, "/Content/images/"
82
+ end
83
+
84
+ # Deploy
85
+ activate :deploy do |deploy|
86
+ deploy.build_before = true
87
+ deploy.method = :git
88
+ deploy.branch = 'gh-pages'
89
+ end
@@ -0,0 +1,53 @@
1
+ $gridMargin: 15px
2
+
3
+ .l-container
4
+ width: 960px
5
+ margin-right: auto
6
+ margin-left: auto
7
+ overflow: hidden
8
+
9
+ .l-row
10
+ +clearFix
11
+ margin-right: $gridMargin * -1
12
+ margin-left: $gridMargin * -1
13
+ box-sizing: content-box
14
+
15
+ [class*="l-grid-"]
16
+ float: left
17
+ padding-right: $gridMargin
18
+ padding-left: $gridMargin
19
+ min-height: 1px
20
+
21
+ @for $i from 1 through 12
22
+ .l-grid-#{$i}
23
+ width: (100% / 12) * $i
24
+
25
+
26
+ // PC Large
27
+ +mediaquery-pc-large
28
+ .l-container
29
+ width: 1180px
30
+
31
+
32
+ // Tablet
33
+ +mediaquery-tablet
34
+ .l-container
35
+ width: 740px
36
+
37
+
38
+ // Small Tablet
39
+ +mediaquery-tablet-small
40
+ .l-container
41
+ width: auto
42
+ padding-left: 4%
43
+ padding-right: 4%
44
+
45
+ .l-row
46
+ margin-right: 0
47
+ margin-left: 0
48
+
49
+ [class*="l-grid-"]
50
+ float: none
51
+ padding-right: 0
52
+ padding-left: 0
53
+ width: auto !important
@@ -0,0 +1,23 @@
1
+ // Media Queries Styles
2
+ // Retina
3
+ +mediaquery-retina
4
+
5
+
6
+ // PC Large
7
+ +mediaquery-pc-large
8
+
9
+
10
+ // PC
11
+ +mediaquery-pc
12
+
13
+
14
+ // Tablet
15
+ +mediaquery-tablet
16
+
17
+
18
+ // Small Tablet
19
+ +mediaquery-tablet-small
20
+
21
+
22
+ // SmartPhone
23
+ +mediaquery-smartphone
@@ -0,0 +1,99 @@
1
+ // Clearfix
2
+ =clearFix
3
+ &:after
4
+ clear: both
5
+ content: ""
6
+ display: block
7
+
8
+ // Text Replace
9
+ =textReplace
10
+ overflow: hidden
11
+ text-indent: 100%
12
+ white-space: nowrap
13
+
14
+ a
15
+ display: block
16
+ height: 100%
17
+ width: 100%
18
+
19
+ // Inline Block
20
+ =inlineBlock
21
+ display: inline-block
22
+ vertical-align: top
23
+ *display: inline
24
+ *zoom: 1
25
+
26
+
27
+ // Media Queries Settings
28
+ // Retina
29
+ =mediaquery-retina
30
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 1.5dppx)
31
+ @content
32
+
33
+ // PC Large
34
+ =mediaquery-pc-large
35
+ @media only screen and (min-width: 1200px)
36
+ @content
37
+
38
+ // PC
39
+ =mediaquery-pc
40
+ @media only screen and (min-width: 980px) and (max-width: 1199px)
41
+ @content
42
+
43
+ // Tablet
44
+ =mediaquery-tablet
45
+ @media only screen and (min-width: 768px) and (max-width: 979px)
46
+ @content
47
+
48
+ // Small Tablet
49
+ =mediaquery-tablet-small
50
+ @media only screen and (max-width: 767px)
51
+ @content
52
+
53
+ // SmartPhone
54
+ =mediaquery-smartphone
55
+ @media only screen and (max-width: 480px)
56
+ @content
57
+
58
+
59
+ // Extend
60
+ // CSS Transition Easing
61
+ // Default
62
+ $linear: cubic-bezier(0.250, 0.250, 0.750, 0.750)
63
+ $ease: cubic-bezier(0.250, 0.100, 0.250, 1.000)
64
+ $ease-in: cubic-bezier(0.420, 0.000, 1.000, 1.000)
65
+ $ease-out: cubic-bezier(0.000, 0.000, 0.580, 1.000)
66
+ $ease-in-out: cubic-bezier(0.420, 0.000, 0.580, 1.000)
67
+ // In
68
+ $easeInQuad: cubic-bezier(0.550, 0.085, 0.680, 0.530)
69
+ $easeInCubic: cubic-bezier(0.550, 0.055, 0.675, 0.190)
70
+ $easeInQuart: cubic-bezier(0.895, 0.030, 0.685, 0.220)
71
+ $easeInQuint: cubic-bezier(0.755, 0.050, 0.855, 0.060)
72
+ $easeInSine: cubic-bezier(0.470, 0.000, 0.745, 0.715)
73
+ $easeInExpo: cubic-bezier(0.950, 0.050, 0.795, 0.035)
74
+ $easeInCirc: cubic-bezier(0.600, 0.040, 0.980, 0.335)
75
+ $easeInBack: cubic-bezier(0.600, -0.280, 0.735, 0.045)
76
+ // Out
77
+ $easeOutQuad: cubic-bezier(0.250, 0.460, 0.450, 0.940)
78
+ $easeOutCubic: cubic-bezier(0.215, 0.610, 0.355, 1.000)
79
+ $easeOutQuart: cubic-bezier(0.165, 0.840, 0.440, 1.000)
80
+ $easeOutQuint: cubic-bezier(0.230, 1.000, 0.320, 1.000)
81
+ $easeOutSine: cubic-bezier(0.390, 0.575, 0.565, 1.000)
82
+ $easeOutExpo: cubic-bezier(0.190, 1.000, 0.220, 1.000)
83
+ $easeOutCirc: cubic-bezier(0.075, 0.820, 0.165, 1.000)
84
+ $easeOutBack: cubic-bezier(0.175, 0.885, 0.320, 1.275)
85
+ // In Out
86
+ $easeInOutQuad: cubic-bezier(0.455, 0.030, 0.515, 0.955)
87
+ $easeInOutCubic: cubic-bezier(0.645, 0.045, 0.355, 1.000)
88
+ $easeInOutQuart: cubic-bezier(0.770, 0.000, 0.175, 1.000)
89
+ $easeInOutQuint: cubic-bezier(0.860, 0.000, 0.070, 1.000)
90
+ $easeInOutSine: cubic-bezier(0.445, 0.050, 0.550, 0.950)
91
+ $easeInOutExpo: cubic-bezier(1.000, 0.000, 0.000, 1.000)
92
+ $easeInOutCirc: cubic-bezier(0.785, 0.135, 0.150, 0.860)
93
+ $easeInOutBack: cubic-bezier(0.680, -0.550, 0.265, 1.550)
94
+
95
+ // animation
96
+ %animation
97
+ transition-duration: 250ms
98
+ transition-timing-function: $ease
99
+ transition-property: all