livingstyleguide 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +60 -35
  3. data/Rakefile +14 -1
  4. data/lib/livingstyleguide/command_line_interface.rb +1 -1
  5. data/lib/livingstyleguide/sass_extensions/functions.rb +7 -0
  6. data/lib/livingstyleguide/tilt_template.rb +1 -0
  7. data/lib/livingstyleguide/version.rb +1 -1
  8. data/stylesheets/livingstyleguide/_layout.scss +1 -1
  9. data/test/integration/command_line_test.rb +12 -0
  10. data/website/.gitignore +22 -0
  11. data/website/Gemfile +13 -0
  12. data/website/README.md +32 -0
  13. data/website/config.rb +37 -0
  14. data/website/source/.htaccess +144 -0
  15. data/website/source/changelog.html.md +95 -0
  16. data/website/source/images/graphics-2x/example-project.png +0 -0
  17. data/website/source/images/graphics-2x/github.png +0 -0
  18. data/website/source/images/graphics-2x/hagenburger.png +0 -0
  19. data/website/source/images/graphics-2x/issues.png +0 -0
  20. data/website/source/images/graphics-2x/livingstyleguide.png +0 -0
  21. data/website/source/images/graphics-2x/made-in-berlin.png +0 -0
  22. data/website/source/images/graphics-2x/rubygems.png +0 -0
  23. data/website/source/images/graphics-2x/twitter.png +0 -0
  24. data/website/source/images/graphics/example-project.png +0 -0
  25. data/website/source/images/graphics/github.png +0 -0
  26. data/website/source/images/graphics/hagenburger.png +0 -0
  27. data/website/source/images/graphics/issues.png +0 -0
  28. data/website/source/images/graphics/livingstyleguide.png +0 -0
  29. data/website/source/images/graphics/made-in-berlin.png +0 -0
  30. data/website/source/images/graphics/rubygems.png +0 -0
  31. data/website/source/images/graphics/twitter.png +0 -0
  32. data/website/source/index.html.haml +49 -0
  33. data/website/source/layouts/markdown.html.haml +40 -0
  34. data/website/source/style/components/_markdown.md +23 -0
  35. data/website/source/style/components/_markdown.sass +52 -0
  36. data/website/source/style/styles.sass +286 -0
  37. data/website/source/styleguide.html.lsg +11 -0
  38. metadata +33 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1970d04e9a56687641d4b2a67dd9df09a45a160
4
- data.tar.gz: 9a17199551d504c4d15907f4d02c3e09b3f2429f
3
+ metadata.gz: fae7e3594785effaf052cd40fb0af960a3ce3937
4
+ data.tar.gz: 0b2130006b424a4476d33f617e4166fea533e7f3
5
5
  SHA512:
6
- metadata.gz: 528adf1d18f8ea2752ea1a6bbdb314518072b189e77fc13ac4713799a9d0f7d4840602fcedcac87ae3610daaebfc7d389f8933dd14c469a0cc190d2894a9293e
7
- data.tar.gz: 464faa2b209f7e5036163d0f1f1d45befd4ac349a0c6f7137ad9dc74e291230bee15938f002d6a200cd0cc8d796036707707d9f3e581ad6fbb436e2da9c68515
6
+ metadata.gz: 89d6cfdad89b7f0a2bf36ec30fd671c38e53287d45888cc679604cbd645b510ec9463858c7eb264232f56945081e124e11de22c40a633abb4e2da055181e4295
7
+ data.tar.gz: 54580676a907f27ead8680565b07ba70af033bc1e55d5addd961dcf0d446b9e3223eaca62bc7cc908aeaf24a78c4e5258a8aa2e83ae481cc235f660905fa1605
data/CHANGELOG.md CHANGED
@@ -1,36 +1,43 @@
1
1
  # Changelog
2
2
 
3
- ## 0.4.1
4
-
5
- * Added anchors (ids) to headlines
3
+ ## 1.0.2
6
4
 
7
- ## 0.4.2
5
+ * Fixed an issue where the command line interface used the input
6
+ filename as the output filename
7
+ * Fixed an error causes by Compass’ `brightness()` function in 1.0.0
8
+ alpha versions
9
+ * Fixed asset URL handling with Middleman and Sprockets
10
+ * **Internal:**
11
+ * Integrated the website into the repository
12
+ * Added the
13
+ [changelog](http://livingstyleguide.org/changelog.html) to the website
14
+ * Automated website deployment after a new version of the gem is
15
+ released
8
16
 
9
- * Added `display` properties to avoid conflicts with resets
10
17
 
11
- ## 0.5.0
12
-
13
- * Added support for Haml code in examples (`haml-example`,
14
- `haml-layout-example`)
18
+ ## 1.0.1
15
19
 
16
- ## 0.5.1
20
+ * Fixed dependencies for broken gems
17
21
 
18
- * Fixed highlighting in Haml code examples
19
- * Use the Haml syntax highlighter
20
22
 
21
- ## 0.5.2
23
+ ## 1.0.0
22
24
 
23
- * More stable CSS
25
+ * New design and API for colors
26
+ * [Show anchors naxt to headlines](https://github.com/hagenburger/livingstyleguide/issues/23)
27
+ * [JSON for config files](https://github.com/hagenburger/livingstyleguide/issues/37)
28
+ * Updated styling of the style guide
24
29
 
25
- ## 0.6.0.alpha.0
26
30
 
27
- * Implemented command line interface
31
+ ## 1.0.0.alpha.3
28
32
 
29
- ## 0.6.0.alpha.1
33
+ * [Cache control for Sprockets](https://github.com/hagenburger/livingstyleguide/issues/25)
34
+ * API to provide [filters in examples](https://github.com/hagenburger/livingstyleguide/issues/22)
35
+ * Dropped `haml-example`, `layout-example`, `javascript-example` and `haml-layout-example`;
36
+ moved into [filters](https://github.com/hagenburger/livingstyleguide/issues/28)
37
+ * [A set of pre-defined filters](https://github.com/hagenburger/livingstyleguide/tree/master/lib/livingstyleguide/filters)
38
+ * [Default filters](https://github.com/hagenburger/livingstyleguide/issues/31) (e. g. all templates should use Haml)
39
+ * [CoffeeScript examples](https://github.com/hagenburger/livingstyleguide/issues/34)
30
40
 
31
- * Added Rails support
32
- * Removed globbing
33
- * Set .html.lsg as default file extension
34
41
 
35
42
  ## 0.6.0.alpha.2
36
43
 
@@ -47,24 +54,42 @@
47
54
  * Custom styles can be set within YAML configuration
48
55
  ([example](https://github.com/hagenburger/livingstyleguide/blob/master/test/fixtures/standalone/styleguide-with-style.html.lsg))
49
56
 
50
- ## 1.0.0.alpha.3
51
57
 
52
- * [Cache control for Sprockets](https://github.com/hagenburger/livingstyleguide/issues/25)
53
- * API to provide [filters in examples](https://github.com/hagenburger/livingstyleguide/issues/22)
54
- * Dropped `haml-example`, `layout-example`, `javascript-example` and `haml-layout-example`;
55
- moved into [filters](https://github.com/hagenburger/livingstyleguide/issues/28)
56
- * [A set of pre-defined filters](https://github.com/hagenburger/livingstyleguide/tree/master/lib/livingstyleguide/filters)
57
- * [Default filters](https://github.com/hagenburger/livingstyleguide/issues/31) (e. g. all templates should use Haml)
58
- * [CoffeeScript examples](https://github.com/hagenburger/livingstyleguide/issues/34)
58
+ ## 0.6.0.alpha.1
59
59
 
60
- ## 1.0.0
60
+ * Added Rails support
61
+ * Removed globbing
62
+ * Set .html.lsg as default file extension
61
63
 
62
- * New design and API for colors
63
- * [Show anchors naxt to headlines](https://github.com/hagenburger/livingstyleguide/issues/23)
64
- * [JSON for config files](https://github.com/hagenburger/livingstyleguide/issues/37)
65
- * Updated styling of the style guide
66
64
 
67
- ## 1.0.1
65
+ ## 0.6.0.alpha.0
68
66
 
69
- * Fixed dependencies for broken gems
67
+ * Implemented command line interface
68
+
69
+
70
+ ## 0.5.2
71
+
72
+ * More stable CSS
73
+
74
+
75
+ ## 0.5.1
76
+
77
+ * Fixed highlighting in Haml code examples
78
+ * Use the Haml syntax highlighter
79
+
80
+
81
+ ## 0.5.0
82
+
83
+ * Added support for Haml code in examples (`haml-example`,
84
+ `haml-layout-example`)
85
+
86
+
87
+ ## 0.4.2
88
+
89
+ * Added `display` properties to avoid conflicts with resets
90
+
91
+
92
+ ## 0.4.1
93
+
94
+ * Added anchors (ids) to headlines
70
95
 
data/Rakefile CHANGED
@@ -9,4 +9,17 @@ Rake::TestTask.new :test do |t|
9
9
  t.verbose = true
10
10
  end
11
11
 
12
- task :default => [:test]
12
+ desc 'Deploys the website to livingstyleguide.org'
13
+ task :deploy do
14
+ Bundler.with_clean_env do
15
+ system 'cd website && bundle && bundle exec middleman build'
16
+ system 'rsync -avz website/build/ lsg@livingstyleguide.org:/home/lsg/html/'
17
+ end
18
+ end
19
+
20
+ task :release do
21
+ Rake::Task['deploy'].execute
22
+ end
23
+
24
+ task :default => [:test]
25
+
@@ -10,7 +10,7 @@ module LivingStyleGuide
10
10
  def compile(file)
11
11
  Compass.add_project_configuration
12
12
  html = Tilt.new(file).render
13
- output_file = file.sub(/\.s[ac]ss\.lsg$/, '')
13
+ output_file = file.sub(/\.lsg$/, '')
14
14
  output_file.sub! /^#{Compass.configuration.sass_dir}/, Compass.configuration.css_dir
15
15
  File.write output_file, html
16
16
  puts "Successfully generated a living style guide at #{output_file}."
@@ -9,4 +9,11 @@ module LivingStyleGuide::SassExtensions::Functions
9
9
  Sass::Script::List.new(variables, :space)
10
10
  end
11
11
 
12
+ if defined?(::Middleman)
13
+ def asset_url(path, prefix)
14
+ Sass::Script::String.new(options[:sprockets][:context].asset_url(path.value, prefix.value))
15
+ end
16
+ end
17
+
12
18
  end
19
+
@@ -32,6 +32,7 @@ module ::Tilt
32
32
  options[:syntax] = @options[:syntax]
33
33
  options[:importer] = LivingStyleGuide::Importer.new('.')
34
34
  options[:sprockets] = { context: @scope }
35
+ options[:custom] = { sprockets_context: @scope }
35
36
  options
36
37
  end
37
38
 
@@ -1,3 +1,3 @@
1
1
  module LivingStyleGuide
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -24,7 +24,7 @@
24
24
 
25
25
  &:hover {
26
26
  -webkit-transform: translateZ(0);
27
- @include filter(brightness(0.7));
27
+ @include filter(unquote("brightness(0.7)"));
28
28
  }
29
29
  }
30
30
 
@@ -0,0 +1,12 @@
1
+ require 'test_helper'
2
+
3
+ describe "LivingStyleGuide::CommandLineInterface" do
4
+
5
+ it "should output the style guide" do
6
+ `./bin/livingstyleguide compile test/fixtures/standalone/style.html.lsg`
7
+ File.exists?('test/fixtures/standalone/style.html').must_equal true
8
+ File.delete 'test/fixtures/standalone/style.html'
9
+ end
10
+
11
+ end
12
+
@@ -0,0 +1,22 @@
1
+ # See http://help.github.com/ignore-files/ for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile ~/.gitignore_global
6
+
7
+ # Ignore bundler config
8
+ /.bundle
9
+
10
+ # Ignore the build directory
11
+ /build
12
+
13
+ # Ignore Sass’ cache
14
+ /.sass-cache
15
+
16
+ # Ignore .DS_store file
17
+ .DS_Store
18
+
19
+ # Ignore Compass’ sprites
20
+ /source/images/graphics-*.png
21
+ /source/fonts/
22
+
data/website/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'compass', '1.0.0.alpha.19'
4
+ gem "middleman", git: 'git@github.com:middleman/middleman.git', branch: 'v3-stable'
5
+ gem 'middleman-livereload', '~> 3.1.0'
6
+ gem 'wdm', '~> 0.1.0', platforms: [:mswin, :mingw]
7
+ gem 'compass-placeholders'
8
+ gem 'livingstyleguide', path: '..'
9
+
10
+ platforms :mri_18 do
11
+ gem 'ruby18_source_location'
12
+ end
13
+
data/website/README.md ADDED
@@ -0,0 +1,32 @@
1
+ Website for The LivingStyleGuide Gem
2
+ ======================================
3
+
4
+ The source of the [website](http://livingstyleguide.org/) of [The LivingStyleGuide Gem](https://github.com/hagenburger/livingstyleguide).
5
+
6
+
7
+ Setup
8
+ -----
9
+
10
+ git clone git@github.com:hagenburger/livingstyleguide-website.git
11
+ cd livingstyleguide-website
12
+ bundle
13
+
14
+
15
+ Development
16
+ -----------
17
+
18
+ cd livingstyleguide-website
19
+ middleman
20
+ open http://localhost:4567/
21
+
22
+ Now you can open the style guide at <http://localhost:4567/>.
23
+
24
+
25
+ Credits
26
+ -------
27
+
28
+ Designed and developed by:
29
+ [Nico Hagenburger](https://github.com/hagenburger)
30
+ [hagenburger.net](http://hagenburger.net)
31
+ @[hagenburger](https://twitter.com/hagenburger)
32
+
data/website/config.rb ADDED
@@ -0,0 +1,37 @@
1
+ require 'compass-placeholders'
2
+
3
+ activate :livereload
4
+
5
+ page '/', layout: false
6
+ page '/changelog.html', layout: :markdown
7
+
8
+ set :css_dir, 'style'
9
+ set :js_dir, 'javascripts'
10
+ set :images_dir, 'images'
11
+
12
+ set :haml, { attr_wrapper: '"', format: :html5 }
13
+
14
+ configure :build do
15
+ activate :minify_css
16
+ activate :minify_javascript
17
+ activate :asset_hash
18
+ activate :relative_assets
19
+ end
20
+
21
+ require 'fileutils'
22
+ Dir.glob 'source/images/graphics/*@2x.png' do |file|
23
+ new_file = file.sub('graphics', 'graphics-2x').sub('@2x', '')
24
+ FileUtils.mv file, new_file
25
+ end
26
+
27
+ helpers do
28
+ def livingstyleguide_gem_version
29
+ # Prefer `git tag` over version.rb as tags are released:
30
+ versions = `git tag`.split(/\n/)
31
+ current = versions.last
32
+ current.sub(/^v/, '')
33
+ rescue
34
+ '0.0.0'
35
+ end
36
+ end
37
+
@@ -0,0 +1,144 @@
1
+ # Use UTF-8 encoding for anything served as `text/html` or `text/plain`.
2
+
3
+ AddDefaultCharset utf-8
4
+
5
+
6
+ # Set default domain
7
+
8
+ <IfModule mod_rewrite.c>
9
+ RewriteEngine On
10
+ RewriteCond %{HTTP_HOST} !=localhost [NC]
11
+ RewriteCond %{HTTP_HOST} !=127.0.0.1
12
+ RewriteCond %{HTTP_HOST} !^livingstyleguide\.org$ [NC]
13
+ RewriteRule ^(.*)$ http://livingstyleguide.org/$1 [R=301,L]
14
+ </IfModule>
15
+
16
+
17
+ # Force UTF-8 for certain file formats.
18
+
19
+ <IfModule mod_mime.c>
20
+ AddCharset utf-8 .atom .css .js .json .rss .vtt .webapp .xml
21
+ </IfModule>
22
+
23
+
24
+ # Block access to directories without a default document.
25
+
26
+ <IfModule mod_autoindex.c>
27
+ Options -Indexes
28
+ </IfModule>
29
+
30
+
31
+ # Block access to hidden files and directories.
32
+
33
+ <IfModule mod_rewrite.c>
34
+ RewriteCond %{SCRIPT_FILENAME} -d [OR]
35
+ RewriteCond %{SCRIPT_FILENAME} -f
36
+ RewriteRule "(^|/)\." - [F]
37
+ </IfModule>
38
+
39
+
40
+ # Compression
41
+
42
+ <IfModule mod_deflate.c>
43
+
44
+ # Force compression for mangled headers.
45
+ # http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping
46
+
47
+ <IfModule mod_setenvif.c>
48
+ <IfModule mod_headers.c>
49
+ SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
50
+ RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
51
+ </IfModule>
52
+ </IfModule>
53
+
54
+
55
+ # Compress all output labeled with one of the following MIME-types
56
+ # (for Apache versions below 2.3.7, you don't need to enable `mod_filter`
57
+ # and can remove the `<IfModule mod_filter.c>` and `</IfModule>` lines
58
+ # as `AddOutputFilterByType` is still in the core directives).
59
+
60
+ <IfModule mod_filter.c>
61
+ AddOutputFilterByType DEFLATE application/atom+xml \
62
+ application/javascript \
63
+ application/json \
64
+ application/rss+xml \
65
+ application/vnd.ms-fontobject \
66
+ application/x-font-ttf \
67
+ application/x-web-app-manifest+json \
68
+ application/xhtml+xml \
69
+ application/xml \
70
+ font/opentype \
71
+ image/svg+xml \
72
+ image/x-icon \
73
+ text/css \
74
+ text/html \
75
+ text/plain \
76
+ text/x-component \
77
+ text/xml
78
+ </IfModule>
79
+
80
+ </IfModule>
81
+
82
+
83
+ # ETag removal (for expires)
84
+
85
+ <IfModule mod_headers.c>
86
+ Header unset ETag
87
+ </IfModule>
88
+
89
+ FileETag None
90
+
91
+
92
+ # Expires headers (for better cache control)
93
+
94
+ <IfModule mod_expires.c>
95
+
96
+ ExpiresActive on
97
+ ExpiresDefault "access plus 1 month"
98
+
99
+ # CSS
100
+ ExpiresByType text/css "access plus 1 year"
101
+
102
+ # Data interchange
103
+ ExpiresByType application/json "access plus 0 seconds"
104
+ ExpiresByType application/xml "access plus 0 seconds"
105
+ ExpiresByType text/xml "access plus 0 seconds"
106
+
107
+ # Favicon (cannot be renamed!)
108
+ ExpiresByType image/x-icon "access plus 1 week"
109
+
110
+ # HTML components (HTCs)
111
+ ExpiresByType text/x-component "access plus 1 month"
112
+
113
+ # HTML
114
+ ExpiresByType text/html "access plus 10 minutes"
115
+
116
+ # JavaScript
117
+ ExpiresByType application/javascript "access plus 1 year"
118
+
119
+ # Manifest files
120
+ ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
121
+ ExpiresByType text/cache-manifest "access plus 0 seconds"
122
+
123
+ # Media
124
+ ExpiresByType audio/ogg "access plus 1 month"
125
+ ExpiresByType image/gif "access plus 1 month"
126
+ ExpiresByType image/jpeg "access plus 1 month"
127
+ ExpiresByType image/png "access plus 1 month"
128
+ ExpiresByType video/mp4 "access plus 1 month"
129
+ ExpiresByType video/ogg "access plus 1 month"
130
+ ExpiresByType video/webm "access plus 1 month"
131
+
132
+ # Web feeds
133
+ ExpiresByType application/atom+xml "access plus 1 hour"
134
+ ExpiresByType application/rss+xml "access plus 1 hour"
135
+
136
+ # Web fonts
137
+ ExpiresByType application/font-woff "access plus 1 month"
138
+ ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
139
+ ExpiresByType application/x-font-ttf "access plus 1 month"
140
+ ExpiresByType font/opentype "access plus 1 month"
141
+ ExpiresByType image/svg+xml "access plus 1 month"
142
+
143
+ </IfModule>
144
+
@@ -0,0 +1,95 @@
1
+ # Changelog
2
+
3
+ ## 1.0.2
4
+
5
+ * Fixed an issue where the command line interface used the input
6
+ filename as the output filename
7
+ * Fixed an error causes by Compass’ `brightness()` function in 1.0.0
8
+ alpha versions
9
+ * Fixed asset URL handling with Middleman and Sprockets
10
+ * **Internal:**
11
+ * Integrated the website into the repository
12
+ * Added the
13
+ [changelog](http://livingstyleguide.org/changelog.html) to the website
14
+ * Automated website deployment after a new version of the gem is
15
+ released
16
+
17
+
18
+ ## 1.0.1
19
+
20
+ * Fixed dependencies for broken gems
21
+
22
+
23
+ ## 1.0.0
24
+
25
+ * New design and API for colors
26
+ * [Show anchors naxt to headlines](https://github.com/hagenburger/livingstyleguide/issues/23)
27
+ * [JSON for config files](https://github.com/hagenburger/livingstyleguide/issues/37)
28
+ * Updated styling of the style guide
29
+
30
+
31
+ ## 1.0.0.alpha.3
32
+
33
+ * [Cache control for Sprockets](https://github.com/hagenburger/livingstyleguide/issues/25)
34
+ * API to provide [filters in examples](https://github.com/hagenburger/livingstyleguide/issues/22)
35
+ * Dropped `haml-example`, `layout-example`, `javascript-example` and `haml-layout-example`;
36
+ moved into [filters](https://github.com/hagenburger/livingstyleguide/issues/28)
37
+ * [A set of pre-defined filters](https://github.com/hagenburger/livingstyleguide/tree/master/lib/livingstyleguide/filters)
38
+ * [Default filters](https://github.com/hagenburger/livingstyleguide/issues/31) (e. g. all templates should use Haml)
39
+ * [CoffeeScript examples](https://github.com/hagenburger/livingstyleguide/issues/34)
40
+
41
+
42
+ ## 0.6.0.alpha.2
43
+
44
+ * Better support for load paths in Rails
45
+ * Fix for colors
46
+ * New YAML based configuration
47
+ ([see this gist](https://gist.github.com/hagenburger/7945859#file-styleguide-1-html-lsg))
48
+ * Option to set the HTML title
49
+ * Custom footer and header HTML
50
+ ([example](https://github.com/hagenburger/livingstyleguide/blob/master/test/fixtures/standalone/styleguide-with-header-footer.html.lsg))
51
+ * Linking of JavaScript files (like jQuery, application.js, …) into the
52
+ style guide
53
+ ([example](https://github.com/hagenburger/livingstyleguide/blob/master/test/fixtures/standalone/styleguide-with-javascript.html.lsg))
54
+ * Custom styles can be set within YAML configuration
55
+ ([example](https://github.com/hagenburger/livingstyleguide/blob/master/test/fixtures/standalone/styleguide-with-style.html.lsg))
56
+
57
+
58
+ ## 0.6.0.alpha.1
59
+
60
+ * Added Rails support
61
+ * Removed globbing
62
+ * Set .html.lsg as default file extension
63
+
64
+
65
+ ## 0.6.0.alpha.0
66
+
67
+ * Implemented command line interface
68
+
69
+
70
+ ## 0.5.2
71
+
72
+ * More stable CSS
73
+
74
+
75
+ ## 0.5.1
76
+
77
+ * Fixed highlighting in Haml code examples
78
+ * Use the Haml syntax highlighter
79
+
80
+
81
+ ## 0.5.0
82
+
83
+ * Added support for Haml code in examples (`haml-example`,
84
+ `haml-layout-example`)
85
+
86
+
87
+ ## 0.4.2
88
+
89
+ * Added `display` properties to avoid conflicts with resets
90
+
91
+
92
+ ## 0.4.1
93
+
94
+ * Added anchors (ids) to headlines
95
+
@@ -0,0 +1,49 @@
1
+ ---
2
+ title: LivingStyleGuide Gem—easily create front-end style guides
3
+ layout: false
4
+ ---
5
+
6
+ !!!html5
7
+ %html
8
+ %head
9
+ %meta(charset="utf-8")
10
+ %meta(http-equiv="X-UA-Compatible" content="IE=edge")
11
+ %meta(name="description" content="The LivingStyleGuide is a Ruby Gem to easily create front-end style guides with markdown while working with Sass/SCSS and Compass.")
12
+ %meta(name="viewport" content="width=device-width, initial-scale=1")
13
+ %meta(name="author" content="Nico Hagenburger")
14
+ %title= data.page.title
15
+ %link(href="#{asset_path(:css, 'styles')}" rel="stylesheet")
16
+ %script(src="//use.typekit.net/nbn2flh.js")
17
+ %script try{Typekit.load();}catch(e){}
18
+ %body.layout
19
+ %header.header
20
+ .header--logo
21
+ %h2.header--slogan The easiest way to create front-end style guides with Sass and Compass
22
+ %span.header--version
23
+ = livingstyleguide_gem_version
24
+ %code.installation
25
+ gem install livingstyleguide
26
+ .links
27
+ %a.links--item.-rubygems-org(href="https://rubygems.org/gems/livingstyleguide") RubyGems.org
28
+ %a.links--item.-github(href="https://github.com/hagenburger/livingstyleguide") Fork me on Github
29
+ %a.links--item.-issues(href="https://github.com/hagenburger/livingstyleguide/issues") Open issues
30
+ %a.links--item.-twitter(href="https://twitter.com/hagenburger") Follow for Updates
31
+ %a.links--item.-example-project(href="https://github.com/hagenburger/livingstyleguide-example") Example Projects
32
+ %footer.footer
33
+ %a.footer--made-in-berlin(href="http://www.hagenburger.net/BLOG/Made-in-Berlin.html") Made in Berlin
34
+ %a.footer--made-by-hagenburger(href="http://www.hagenburger.net") Nico Hagenburger
35
+ %a.footer--contact(href="http://www.hagenburger.net/CONTACT.html") Contact
36
+ %script
37
+ :plain
38
+ var _paq = _paq || [];
39
+ _paq.push(["trackPageView"]);
40
+ _paq.push(["enableLinkTracking"]);
41
+
42
+ (function() {
43
+ var u=(("https:" == document.location.protocol) ? "https" : "http") + "://nh.fornax.uberspace.de/piwik/";
44
+ _paq.push(["setTrackerUrl", u+"piwik.php"]);
45
+ _paq.push(["setSiteId", "2"]);
46
+ var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
47
+ g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
48
+ })();
49
+
@@ -0,0 +1,40 @@
1
+ !!!html5
2
+ %html
3
+ %head
4
+ %meta(charset="utf-8")
5
+ %meta(http-equiv="X-UA-Compatible" content="IE=edge")
6
+ %meta(name="description" content="The LivingStyleGuide is a Ruby Gem to easily create front-end style guides with markdown while working with Sass/SCSS and Compass.")
7
+ %meta(name="viewport" content="width=device-width, initial-scale=1")
8
+ %meta(name="author" content="Nico Hagenburger")
9
+ %title= data.page.title
10
+ %link(href="#{asset_path(:css, 'styles')}" rel="stylesheet")
11
+ %script(src="//use.typekit.net/nbn2flh.js")
12
+ %script try{Typekit.load();}catch(e){}
13
+ %body.layout
14
+ %header.header
15
+ .header--logo
16
+ %h2.header--slogan The easiest way to create front-end style guides with Sass and Compass
17
+ %span.header--version
18
+ = livingstyleguide_gem_version
19
+ .layout--container
20
+ %article.markdown
21
+ = yield
22
+ %footer.footer
23
+ %a.footer--made-in-berlin(href="http://www.hagenburger.net/BLOG/Made-in-Berlin.html") Made in Berlin
24
+ %a.footer--made-by-hagenburger(href="http://www.hagenburger.net") Nico Hagenburger
25
+ %a.footer--contact(href="http://www.hagenburger.net/CONTACT.html") Contact
26
+ %script
27
+ :plain
28
+ var _paq = _paq || [];
29
+ _paq.push(["trackPageView"]);
30
+ _paq.push(["enableLinkTracking"]);
31
+
32
+ (function() {
33
+ var u=(("https:" == document.location.protocol) ? "https" : "http") + "://nh.fornax.uberspace.de/piwik/";
34
+ _paq.push(["setTrackerUrl", u+"piwik.php"]);
35
+ _paq.push(["setSiteId", "2"]);
36
+ var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
37
+ g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
38
+ })();
39
+
40
+
@@ -0,0 +1,23 @@
1
+ Markdown
2
+ ========
3
+
4
+
5
+ ```
6
+ @haml
7
+ ***.markdown***
8
+ :markdown
9
+ # Big Headline
10
+
11
+ ## Medium Headline
12
+
13
+ Lorem ipsum dolor **sit amet,** consectetur adipiscing elit.
14
+ Aenean porta, `nunc at pulvinar porta`, erat lorem congue magna,
15
+ sit amet egestas ante erat in neque. _Suspendisse_ vitae sapien
16
+ et ante feugiat [posuere vitae](#) sit amet urna. Suspendisse
17
+ vestibulum elit nulla, id venenatis enim ultricies quis.
18
+
19
+ * List item
20
+ * Another list item
21
+ * Last list item
22
+ ```
23
+
@@ -0,0 +1,52 @@
1
+ .markdown
2
+ @extend %text-align-left
3
+
4
+ h1
5
+ color: $turquoise
6
+ font-size: 3em
7
+ margin: 0 0 0.5em
8
+
9
+ h2
10
+ color: $pink
11
+ font-size: 2em
12
+ margin: 0 0 0.5em
13
+
14
+ p
15
+ margin: 0 0 0.75em
16
+
17
+ a
18
+ color: darken($turquoise, 20%)
19
+ display: inline
20
+
21
+ &:hover
22
+ color: darken($turquoise, 30%)
23
+
24
+ strong
25
+ @extend %display-inline
26
+ @extend %font-weight-bold
27
+
28
+ em
29
+ @extend %display-inline
30
+ @extend %font-style-italic
31
+
32
+ ul
33
+ margin: 0 0 0.75em
34
+
35
+ li
36
+ margin-left: 3em
37
+
38
+ &:before
39
+ background: $yellow
40
+ content: ""
41
+ height: 6px
42
+ margin: 0.35em 0 0 -0.9em
43
+ position: absolute
44
+ width: 6px
45
+ @include transform(rotateZ(45deg))
46
+
47
+ code
48
+ background: $yellow
49
+ display: inline
50
+ font-family: "courier new", courier, monospace
51
+
52
+
@@ -0,0 +1,286 @@
1
+ @import "compass"
2
+ @import "compass-placeholders"
3
+
4
+ //// FONTS ////
5
+
6
+ @include font-face("Gubia", font-files("GubiaLight.otf"), $weight: 200)
7
+ @include font-face("Gubia", font-files("GubiaRegular.otf"), $weight: normal)
8
+ @include font-face("Gubia", font-files("GubiaBold.otf"), $weight: bold)
9
+ @include font-face("Gubia", font-files("GubiaBlack.otf"), $weight: 800)
10
+
11
+ //// METRICS ////
12
+
13
+ $grid: 4px
14
+ $column-width: 45 * $grid
15
+ $gap-width: 3 * $grid
16
+
17
+
18
+ //// COLORS ////
19
+
20
+ $white: white
21
+ $black: black
22
+ $gray: #7f7f7f
23
+ $pink: #CA1F70
24
+ $light-pink: #FFABC2
25
+ $yellow: #FAFF8C
26
+ $turquoise: #2EF1BD
27
+
28
+ //// SPRITES ////
29
+
30
+ $graphics-spacing: 5 * $grid
31
+ @import "graphics/*.png"
32
+
33
+ $graphics-2x-spacing: 10 * $grid
34
+ @import "graphics-2x/*.png"
35
+
36
+ .graphics-sprite
37
+ background-size: graphics-sprite-width(livingstyleguide)
38
+
39
+
40
+ //// MIXINS ////
41
+
42
+ @mixin for-phones
43
+ @media all and (max-width: 640px)
44
+ @content
45
+
46
+ @mixin for-phones-portrait
47
+ @media all and (max-width: 480px)
48
+ @content
49
+
50
+ @mixin for-phones-landscape
51
+ @media all and (min-width: 481px) and (max-width: 640px)
52
+ @content
53
+
54
+ @mixin for-tablets
55
+ @media all and (min-width: 641px) and (max-width: 1024px)
56
+ @content
57
+
58
+ @mixin for-tablets-portrait
59
+ @media all and (min-width: 641px) and (max-width: 768px)
60
+ @content
61
+
62
+ @mixin for-tablets-landscape
63
+ @media all and (min-width: 769px) and (max-width: 1024px)
64
+ @content
65
+
66
+ @mixin for-tablets-landscape-and-desktops
67
+ @media all and (min-width: 1024px)
68
+ @content
69
+
70
+ @mixin for-desktops
71
+ @media all and (min-width: 1025px)
72
+ @content
73
+
74
+ @mixin for-hires
75
+ @media only all and (-webkit-min-device-pixel-ratio: 1.3), only all and (min--moz-device-pixel-ratio: 1.3), only all and (-o-min-device-pixel-ratio: 1.3/1), only all and (min-device-pixel-ratio: 1.3), only all and (min-resolution: 1.3dppx)
76
+ @content
77
+
78
+
79
+ //// RESET EVERYTHING ////
80
+
81
+ *
82
+ border: none
83
+ border-collapse: collapse
84
+ border-spacing: 0
85
+ color: inherit
86
+ display: block
87
+ font-size: inherit
88
+ font-style: inherit
89
+ font-weight: inherit
90
+ line-height: inherit
91
+ list-style: none
92
+ margin: 0
93
+ padding: 0
94
+ text-align: inherit
95
+ text-decoration: none
96
+ vertical-align: middle
97
+ @include box-sizing(border-box)
98
+
99
+
100
+ head,
101
+ script,
102
+ style
103
+ display: none
104
+
105
+
106
+ //// LAYOUT ////
107
+
108
+ .layout
109
+ background: $white
110
+ color: $black
111
+ font-family: Gubia, "helvetica neue", helvetica, arial, sans-serif
112
+ font-size: 4 * $grid
113
+ line-height: 1.25
114
+ margin: 0 auto (5 * $grid)
115
+ text-align: center
116
+ -webkit-font-smoothing: antialiased
117
+ @include for-tablets-landscape-and-desktops
118
+ width: 5 * ($column-width + $gap-width)
119
+ @include for-tablets
120
+ margin-top: 20 * $grid
121
+ @include for-phones-landscape
122
+ margin-top: 28 * $grid
123
+ @include for-phones-portrait
124
+ margin-top: 34 * $grid
125
+
126
+
127
+ //// HEADER ////
128
+
129
+ .header--logo
130
+ display: block
131
+ margin-left: -32px
132
+ position: relative
133
+ @include graphics-sprite(livingstyleguide, $dimensions: true)
134
+
135
+
136
+ .header--version
137
+ color: $gray
138
+ display: none
139
+ font-size: 1.5rem
140
+ font-weight: bold
141
+ position: absolute
142
+ right: -1em
143
+ top: 0
144
+ @include for-phones
145
+ right: 0
146
+ top: -1em
147
+
148
+
149
+ .header--slogan
150
+ color: $light-pink
151
+ font-weight: bold
152
+ padding-top: 220px
153
+ margin: auto
154
+ width: 300px
155
+
156
+
157
+ //// INSTALLATION ////
158
+
159
+ .installation
160
+ color: $turquoise
161
+ font-family: "courier new", courier, monospace
162
+ font-size: 1.5rem
163
+ left: 550px
164
+ margin: 2em 0
165
+ position: absolute
166
+ text-align: left
167
+ top: 250px
168
+
169
+ &:before
170
+ color: mix($turquoise, $white, 30%)
171
+ content: ">"
172
+ margin: 1px 0 0 -1em
173
+ position: absolute
174
+
175
+
176
+ //// LINKS ////
177
+
178
+ .links
179
+ @extend %pie-clearfix
180
+
181
+
182
+ .links--item
183
+ background: $yellow
184
+ color: $black
185
+ font-size: 24px
186
+ font-weight: bold
187
+ margin: floor($gap-width / 2)
188
+ text-align: left
189
+ padding: (5 * $grid) 0
190
+ position: relative
191
+ @include transition(all 0, background 0.2s)
192
+ @include for-tablets-landscape-and-desktops
193
+ background: transparent
194
+ float: left
195
+ height: $column-width
196
+ text-align: center
197
+ width: $column-width
198
+
199
+ &:hover
200
+ z-index: 5
201
+
202
+ &:after
203
+ background: $yellow
204
+ bottom: 0
205
+ content: ""
206
+ left: 0
207
+ position: absolute
208
+ right: 0
209
+ top: 0
210
+ z-index: -1
211
+ @include transform(rotateZ(45deg))
212
+ @include transition(transform, 0.15s)
213
+
214
+ &:hover:after
215
+ background: $turquoise
216
+ @include transform(rotateZ(-315deg))
217
+
218
+ &:before
219
+ content: ""
220
+ display: inline-block
221
+ margin-right: 3 * $grid
222
+ vertical-align: middle
223
+ z-index: 10
224
+ @include graphics-sprite(rubygems, $dimensions: true)
225
+ @include transition(transform, 0.15s)
226
+ @include for-hires
227
+ background-image: $graphics-2x-sprites
228
+ @include for-tablets-landscape-and-desktops
229
+ display: block
230
+ margin: 0 auto (5 * $grid)
231
+
232
+ &:hover:before
233
+ @include transform(rotateZ(360deg))
234
+
235
+ @each $name in github, issues, twitter, example-project
236
+ &.-#{$name}:before
237
+ @include graphics-sprite-position($name)
238
+
239
+
240
+
241
+
242
+ //// FOOTER ////
243
+
244
+ .footer
245
+ margin: (16 * $grid) 0
246
+
247
+
248
+ .footer--made-in-berlin
249
+ display: inline-block
250
+ margin: 0 45px
251
+ opacity: 0.7
252
+ vertical-align: bottom
253
+ @include graphics-sprite(made-in-berlin, $dimensions: true)
254
+ @include transition(opacity, 0.2s)
255
+ @include hide-text
256
+ @include for-hires
257
+ background-image: $graphics-2x-sprites
258
+
259
+ &:hover
260
+ opacity: 1
261
+
262
+
263
+ .footer--made-by-hagenburger
264
+ @extend .footer--made-in-berlin
265
+ @include graphics-sprite(hagenburger, $dimensions: true)
266
+
267
+
268
+ .footer--contact
269
+ color: $gray
270
+ display: block
271
+ font-weight: normal
272
+ font-size: 1rem
273
+ letter-spacing: 1px
274
+ margin: (5 * $grid) auto 0
275
+ text-transform: uppercase
276
+ width: 10em
277
+ @include transition(color, 0.2s)
278
+
279
+ &:hover
280
+ color: $turquoise
281
+
282
+
283
+ //// COMPONENTS ////
284
+
285
+ @import "components/markdown"
286
+
@@ -0,0 +1,11 @@
1
+ source: style/styles.sass
2
+ title: "The LivingStyleGuide’s Front-end Style Guide"
3
+ style:
4
+ layout-selector: '".layout"'
5
+ color: $pink
6
+ base-font: 'Courier, "Courier New", monospace'
7
+ headline-font: 'Gubia, "Helvetica Neue", Helvetica, Arial'
8
+ styleguide-sass: |
9
+ .livingstyleguide--example
10
+ @extend .layout
11
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: livingstyleguide
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nico Hagenburger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-12 00:00:00.000000000 Z
11
+ date: 2014-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minisyntax
@@ -258,6 +258,7 @@ files:
258
258
  - test/fixtures/stylesheets/variables/_more-other-colors.sass
259
259
  - test/fixtures/stylesheets/variables/colors.scss
260
260
  - test/fixtures/stylesheets/variables/other-colors.sass
261
+ - test/integration/command_line_test.rb
261
262
  - test/integration/markdown_test.rb
262
263
  - test/integration/sprockets_test.rb
263
264
  - test/integration/standalone_test.rb
@@ -275,6 +276,35 @@ files:
275
276
  - test/unit/filters/highlights_test.rb
276
277
  - test/unit/filters/javascript_test.rb
277
278
  - test/unit/sass_extensions_test.rb
279
+ - website/.gitignore
280
+ - website/Gemfile
281
+ - website/Gemfile.lock
282
+ - website/README.md
283
+ - website/config.rb
284
+ - website/source/.htaccess
285
+ - website/source/changelog.html.md
286
+ - website/source/images/graphics-2x/example-project.png
287
+ - website/source/images/graphics-2x/github.png
288
+ - website/source/images/graphics-2x/hagenburger.png
289
+ - website/source/images/graphics-2x/issues.png
290
+ - website/source/images/graphics-2x/livingstyleguide.png
291
+ - website/source/images/graphics-2x/made-in-berlin.png
292
+ - website/source/images/graphics-2x/rubygems.png
293
+ - website/source/images/graphics-2x/twitter.png
294
+ - website/source/images/graphics/example-project.png
295
+ - website/source/images/graphics/github.png
296
+ - website/source/images/graphics/hagenburger.png
297
+ - website/source/images/graphics/issues.png
298
+ - website/source/images/graphics/livingstyleguide.png
299
+ - website/source/images/graphics/made-in-berlin.png
300
+ - website/source/images/graphics/rubygems.png
301
+ - website/source/images/graphics/twitter.png
302
+ - website/source/index.html.haml
303
+ - website/source/layouts/markdown.html.haml
304
+ - website/source/style/components/_markdown.md
305
+ - website/source/style/components/_markdown.sass
306
+ - website/source/style/styles.sass
307
+ - website/source/styleguide.html.lsg
278
308
  homepage: ''
279
309
  licenses: []
280
310
  metadata: {}
@@ -327,6 +357,7 @@ test_files:
327
357
  - test/fixtures/stylesheets/variables/_more-other-colors.sass
328
358
  - test/fixtures/stylesheets/variables/colors.scss
329
359
  - test/fixtures/stylesheets/variables/other-colors.sass
360
+ - test/integration/command_line_test.rb
330
361
  - test/integration/markdown_test.rb
331
362
  - test/integration/sprockets_test.rb
332
363
  - test/integration/standalone_test.rb