livingstyleguide 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,5 +10,5 @@ end
10
10
  Compass.configuration.add_import_path LivingStyleGuide::VariablesImporter.new
11
11
 
12
12
  base_directory = File.join(File.dirname(__FILE__), '..')
13
- Compass::Frameworks.register 'livingstyleguide', path: base_directory
13
+ Compass::Frameworks.register 'livingstyleguide', :path => base_directory
14
14
 
@@ -6,12 +6,12 @@ require "erb"
6
6
  module LivingStyleGuide
7
7
  class RedcarpetTemplate < ::Tilt::RedcarpetTemplate::Redcarpet2
8
8
  RENDER_OPTIONS = {
9
- autolink: true,
10
- fenced_code_blocks: true,
11
- tables: true,
12
- strikethrough: true,
13
- space_after_headers: true,
14
- superscript: true
9
+ :autolink => true,
10
+ :fenced_code_blocks => true,
11
+ :tables => true,
12
+ :strikethrough => true,
13
+ :space_after_headers => true,
14
+ :superscript => true
15
15
  }
16
16
 
17
17
  def generate_renderer
@@ -45,7 +45,7 @@ module LivingStyleGuide
45
45
  end
46
46
 
47
47
  def header(text, header_level)
48
- klass = %w(page-title headline sub-headline)[header_level]
48
+ klass = %w(page-title headline sub-headline sub-sub-headline)[header_level]
49
49
  header_level += 1
50
50
  %Q(<h#{header_level} class="livingstyleguide--#{klass}">#{text}</h#{header_level}>\n)
51
51
  end
@@ -74,7 +74,7 @@ module LivingStyleGuide
74
74
  end
75
75
 
76
76
  def list(contents, list_type)
77
- tag_name = "#{list_type[0]}l"
77
+ tag_name = "#{list_type.to_s[0, 1]}l"
78
78
  %Q(<#{tag_name} class="livingstyleguide--#{list_type}-list">\n#{contents}</#{tag_name}>\n)
79
79
  end
80
80
 
@@ -89,7 +89,7 @@ module LivingStyleGuide
89
89
  else
90
90
  code = ERB::Util.html_escape(code).gsub(/&quot;/, '"')
91
91
  code = ::MiniSyntax.highlight(code.strip, language.to_s.strip.to_sym)
92
- code.gsub! /^\s*\*\*\*\n(.+?)\n\s*\*\*\*\n/m, %Q(<strong class="livingstyleguide--code-highlight-block">\\1</strong>)
92
+ code.gsub! /^\s*\*\*\*\n(.+?)\n\s*\*\*\*(\n|$)/m, %Q(<strong class="livingstyleguide--code-highlight-block">\\1</strong>)
93
93
  code.gsub! /\*\*\*(.+?)\*\*\*/, %Q(<strong class="livingstyleguide--code-highlight">\\1</strong>)
94
94
  %Q(<pre class="livingstyleguide--code-block"><code class="livingstyleguide--code">#{code}</code></pre>)
95
95
  end
@@ -59,7 +59,7 @@ module LivingStyleGuide
59
59
  end
60
60
 
61
61
  def self.sass_options(uri, importer, options)
62
- options.merge! filename: uri.gsub(%r{\*/},"*\\/"), syntax: :scss, importer: importer
62
+ options.merge! :filename => uri.gsub(%r{\*/},"*\\/"), :syntax => :scss, :importer => importer
63
63
  end
64
64
 
65
65
  def self.sass_engine(uri, name, importer, options)
@@ -68,7 +68,7 @@ module LivingStyleGuide
68
68
  end
69
69
 
70
70
  def self.content_for_images(uri, variables, skip_overrides = false)
71
- binder = LivingStyleGuide::Binding.new(variables: variables)
71
+ binder = LivingStyleGuide::Binding.new(:variables => variables)
72
72
  CONTENT_TEMPLATE.result(binder.get_binding)
73
73
  end
74
74
  end
@@ -1,3 +1,3 @@
1
1
  module LivingStyleGuide
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -22,4 +22,6 @@ Gem::Specification.new do |gem|
22
22
  gem.add_dependency 'compass'
23
23
  gem.add_dependency 'sass'
24
24
  gem.add_dependency 'redcarpet'
25
+
26
+ gem.add_development_dependency 'rake'
25
27
  end
@@ -12,6 +12,7 @@ $livingstyleguide--headline-font: $livingstyleguide--base-font !default;
12
12
  $livingstyleguide--page-title-font-size: 30px !default;
13
13
  $livingstyleguide--headline-font-size: 22px !default;
14
14
  $livingstyleguide--sub-headline-font-size: 16px !default;
15
+ $livingstyleguide--sub-sub-headline-font-size: $livingstyleguide--base-font-size !default;
15
16
  $livingstyleguide--headline-font-weight: bold !default;
16
17
  $livingstyleguide--headline-line-height: 1.1 !default;
17
18
  $livingstyleguide--code-font: Courier, "Courier New", monospace !default;
@@ -28,6 +29,7 @@ $livingstyleguide--border-radius: 0 !default;
28
29
  $livingstyleguide--color: #505050 !default;
29
30
  $livingstyleguide--width: 640px !default;
30
31
  $livingstyleguide--gap-width: 10px !default;
32
+ $livingstyleguide--layout-example-padding: $livingstyleguide--gap-width !default;
31
33
 
32
34
  $livingstyleguide--code-background-color: #505050 !default;
33
35
  $livingstyleguide--code-color: white !default;
@@ -19,7 +19,8 @@
19
19
 
20
20
  .livingstyleguide--page-title,
21
21
  .livingstyleguide--headline,
22
- .livingstyleguide--sub-headline {
22
+ .livingstyleguide--sub-headline,
23
+ .livingstyleguide--sub-sub-headline {
23
24
  font-family: $livingstyleguide--headline-font;
24
25
  font-size: $livingstyleguide--headline-font-size;
25
26
  font-weight: $livingstyleguide--headline-font-weight;
@@ -37,10 +38,16 @@
37
38
  font-size: $livingstyleguide--sub-headline-font-size;
38
39
  }
39
40
 
41
+ .livingstyleguide--sub-sub-headline {
42
+ font-size: $livingstyleguide--sub-sub-headline-font-size;
43
+ }
44
+
40
45
  .livingstyleguide--example {
41
46
  background: white;
42
47
  margin: $livingstyleguide--gap-width auto 0;
48
+ overflow: hidden;
43
49
  padding: $livingstyleguide--gap-width;
50
+ position: relative;
44
51
  width: $livingstyleguide--width;
45
52
  @include box-sizing(border-box);
46
53
  @include border-top-radius($livingstyleguide--border-radius);
@@ -54,5 +61,7 @@
54
61
 
55
62
  .livingstyleguide--layout-example {
56
63
  @extend #{$livingstyleguide--layout-selector} !optional;
57
- padding: $livingstyleguide--gap-width;
64
+ height: auto;
65
+ min-height: auto;
66
+ padding: $livingstyleguide--layout-example-padding;
58
67
  }
@@ -11,3 +11,5 @@ Lorem ipsum **dolor** sit amet, `<consectetur> adipiscing` elit. Sed a pulvinar
11
11
  1. Lorem
12
12
  2. Ipsum
13
13
  3. Dolor
14
+
15
+ ### Even More Lorem
@@ -50,6 +50,7 @@ class MarkdownTest < Test::Unit::TestCase
50
50
  <li class="livingstyleguide--ordered-list-item">Ipsum</li>
51
51
  <li class="livingstyleguide--ordered-list-item">Dolor</li>
52
52
  </ol>
53
+ <h4 class="livingstyleguide--sub-sub-headline">Even More Lorem</h4>
53
54
  HTML
54
55
  end
55
56
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: livingstyleguide
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-03 00:00:00.000000000 Z
12
+ date: 2013-02-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minisyntax
@@ -91,6 +91,22 @@ dependencies:
91
91
  - - ! '>='
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: rake
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
94
110
  description: Living Style Guide
95
111
  email:
96
112
  - nico@hagenburger.net
@@ -144,12 +160,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
160
  - - ! '>='
145
161
  - !ruby/object:Gem::Version
146
162
  version: '0'
163
+ segments:
164
+ - 0
165
+ hash: 2497067780070501476
147
166
  required_rubygems_version: !ruby/object:Gem::Requirement
148
167
  none: false
149
168
  requirements:
150
169
  - - ! '>='
151
170
  - !ruby/object:Gem::Version
152
171
  version: '0'
172
+ segments:
173
+ - 0
174
+ hash: 2497067780070501476
153
175
  requirements: []
154
176
  rubyforge_project:
155
177
  rubygems_version: 1.8.23
@@ -173,4 +195,3 @@ test_files:
173
195
  - test/integration/variables_test.rb
174
196
  - test/test_helper.rb
175
197
  - test/unit/sass_extensions_test.rb
176
- has_rdoc: