livingstyleguide 2.0.0.alpha.8 → 2.0.0.alpha.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/javascripts/livingstyleguide.js +1 -1
- data/lib/livingstyleguide/document.rb +7 -5
- data/lib/livingstyleguide/engine.rb +1 -1
- data/lib/livingstyleguide/filters/colors.rb +10 -7
- data/lib/livingstyleguide/filters/css.rb +8 -5
- data/lib/livingstyleguide/filters/data.rb +1 -9
- data/lib/livingstyleguide/filters/import_and_use.rb +1 -4
- data/lib/livingstyleguide/filters/sass.rb +28 -0
- data/lib/livingstyleguide/filters/style.rb +1 -1
- data/lib/livingstyleguide/filters.rb +1 -0
- data/lib/livingstyleguide/markdown_extensions.rb +17 -4
- data/lib/livingstyleguide/templates/code.html.erb +1 -1
- data/lib/livingstyleguide/templates/colors-example.html.erb +64 -0
- data/lib/livingstyleguide/templates/example.html.erb +2 -2
- data/lib/livingstyleguide/templates/font-example.html.erb +1 -1
- data/lib/livingstyleguide/templates/javascript.html.erb +1 -1
- data/lib/livingstyleguide/templates/layout.html.erb +1 -1
- data/lib/livingstyleguide/version.rb +1 -1
- data/lib/livingstyleguide.rb +14 -2
- data/stylesheets/_livingstyleguide.scss +41 -41
- data/stylesheets/livingstyleguide/_code.scss +41 -41
- data/stylesheets/livingstyleguide/_color-swatches.scss +46 -20
- data/stylesheets/livingstyleguide/_content.scss +54 -54
- data/stylesheets/livingstyleguide/_layout.scss +10 -10
- data/stylesheets/livingstyleguide/_reset.scss +1 -1
- data/stylesheets/livingstyleguide/_variables.scss +9 -5
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e03cd21e33364ddfbf67d1a6d9f9c76e07d44ba2
|
4
|
+
data.tar.gz: 7f1ebb09b674d7846a915b3fb8547c9e191e62eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 532de7e59bd8e913945e6983bf635533f662c9cc702ce1b086dccc2a33dbd64aa4e0359520272cbc5afde6e64e304aaa698ac2ebb3dc0aa742377653cd19c9a3
|
7
|
+
data.tar.gz: 68cad8cb19c4cc277794f312fac26d010bd3018a239f8610c06cf18a363859574fe31014b05f8e00ba9a549285daec12453a78e342542372ae53726871758f35
|
@@ -65,7 +65,7 @@
|
|
65
65
|
}
|
66
66
|
|
67
67
|
document.addEventListener('DOMContentLoaded', function() {
|
68
|
-
var switches = document.getElementsByClassName('
|
68
|
+
var switches = document.getElementsByClassName('lsg--code-switch');
|
69
69
|
for (var i = 0; i < switches.length; i++) {
|
70
70
|
switches[i].addEventListener('click', toggleCode);
|
71
71
|
}
|
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'tilt'
|
4
4
|
require 'erb'
|
5
5
|
require 'digest'
|
6
|
+
require 'pathname'
|
6
7
|
|
7
8
|
class LivingStyleGuide::Document < ::Tilt::Template
|
8
9
|
attr_accessor :source, :type, :filters, :template, :classes, :html
|
@@ -63,7 +64,7 @@ class LivingStyleGuide::Document < ::Tilt::Template
|
|
63
64
|
|
64
65
|
def path
|
65
66
|
if file
|
66
|
-
File.dirname(file)
|
67
|
+
Pathname.new(File.dirname(file)).cleanpath.to_s
|
67
68
|
elsif options.has_key?(:livingstyleguide)
|
68
69
|
options[:livingstyleguide].path
|
69
70
|
else
|
@@ -86,8 +87,8 @@ class LivingStyleGuide::Document < ::Tilt::Template
|
|
86
87
|
result = ERB.new(erb).result(@filters.get_binding)
|
87
88
|
@source = result
|
88
89
|
@html = render_html(result, locals)
|
89
|
-
@classes.unshift "
|
90
|
-
@classes.unshift "
|
90
|
+
@classes.unshift "lsg--#{@type}-example"
|
91
|
+
@classes.unshift "lsg--example"
|
91
92
|
ERB.new(template_erb).result(binding).gsub(/\n\n+/, "\n")
|
92
93
|
end
|
93
94
|
|
@@ -154,7 +155,7 @@ class LivingStyleGuide::Document < ::Tilt::Template
|
|
154
155
|
code_with_highlights << %Q(</strong>)
|
155
156
|
inside_highlight = false
|
156
157
|
else
|
157
|
-
code_with_highlights << %Q(<strong class="
|
158
|
+
code_with_highlights << %Q(<strong class="lsg--code-highlight">)
|
158
159
|
inside_highlight = true
|
159
160
|
end
|
160
161
|
next_position = positions.shift
|
@@ -243,7 +244,8 @@ class LivingStyleGuide::Document < ::Tilt::Template
|
|
243
244
|
private
|
244
245
|
def generate_id
|
245
246
|
if @file
|
246
|
-
@file
|
247
|
+
id = Pathname.new(@file).cleanpath.to_s
|
248
|
+
id.sub('/_', '/').gsub(/\.\w+/, '')
|
247
249
|
else
|
248
250
|
"section-#{Digest::SHA256.hexdigest(data)[0...6]}"
|
249
251
|
end
|
@@ -2,10 +2,13 @@ LivingStyleGuide.add_filter :colors do |arguments, options, content|
|
|
2
2
|
colors = content.split(/\n+/).map{ |l| l.strip.split(/\s+/) }
|
3
3
|
columns = colors.map{ |l| l.size }.max
|
4
4
|
colors = colors.flatten
|
5
|
+
|
6
|
+
document.head << ERB.new(File.read("#{File.dirname(__FILE__)}/../templates/colors-example.html.erb")).result
|
7
|
+
|
5
8
|
document.scss << <<-SCSS
|
6
|
-
$
|
7
|
-
$
|
8
|
-
$
|
9
|
+
$lsg--variables: () !default;
|
10
|
+
$lsg--variables: join(
|
11
|
+
$lsg--variables, (#{
|
9
12
|
colors.reject{ |c| c == '-' }.map do |variable|
|
10
13
|
%Q("#{variable}": #{variable})
|
11
14
|
end.join(', ')
|
@@ -16,7 +19,7 @@ LivingStyleGuide.add_filter :colors do |arguments, options, content|
|
|
16
19
|
if variable == '-'
|
17
20
|
css_class = '-lsg-empty'
|
18
21
|
end
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
end
|
22
|
+
%Q(<li class="lsg--color-swatch #{css_class || variable}"><span>#{variable}</span></li>\n)
|
23
|
+
end.join("\n")
|
24
|
+
%(<ul class="lsg--color-swatches -lsg-#{columns}-columns">\n#{colors_html}\n</ul>\n)
|
25
|
+
end
|
@@ -1,16 +1,19 @@
|
|
1
|
-
LivingStyleGuide.add_filter :css
|
1
|
+
LivingStyleGuide.add_filter :css do |arguments, options, css|
|
2
2
|
file = arguments.first
|
3
|
-
if file =~ /\.
|
3
|
+
if file =~ /\.css$/
|
4
4
|
if document.file
|
5
5
|
file = File.join(File.dirname(document.file), file)
|
6
6
|
end
|
7
7
|
document.depend_on file
|
8
8
|
document.scss << %Q(@import "#{file}";\n)
|
9
9
|
else
|
10
|
-
|
11
|
-
|
10
|
+
scope = "#" + document.id.gsub(/[\/\.]/, '\\\0')
|
11
|
+
scoped_css = css.gsub(/(?<=\}|\A|;)[^@\};]+?(?=\{)/) do |selector|
|
12
|
+
selector.split(",").map do |single_selector|
|
13
|
+
"#{scope} #{single_selector}"
|
14
|
+
end.join(",")
|
12
15
|
end
|
13
|
-
document.scss <<
|
16
|
+
document.scss << scoped_css
|
14
17
|
end
|
15
18
|
nil
|
16
19
|
end
|
@@ -1,13 +1,5 @@
|
|
1
|
-
require 'json'
|
2
|
-
require 'yaml'
|
3
|
-
|
4
1
|
LivingStyleGuide.add_filter :data do |arguments, options, data|
|
5
|
-
|
6
|
-
data = Psych.load(data)
|
7
|
-
else
|
8
|
-
data = "{#{data}}" unless data.strip =~ /^[\[\{]/
|
9
|
-
data = JSON.parse(data)
|
10
|
-
end
|
2
|
+
data = LivingStyleGuide.parse_data(data)
|
11
3
|
if data.is_a?(Array)
|
12
4
|
document.locals = [] unless document.locals.is_a?(Array)
|
13
5
|
document.locals.push(*data)
|
@@ -17,10 +17,7 @@ LivingStyleGuide.add_filter :import do |arguments, options, data|
|
|
17
17
|
raise "Error: Please use `@css #{glob}` instead of `@import #{glob}` for importing Sass."
|
18
18
|
end
|
19
19
|
|
20
|
-
|
21
|
-
Kernel.require 'json'
|
22
|
-
data = JSON.parse("{#{data}}")
|
23
|
-
end
|
20
|
+
data = LivingStyleGuide.parse_data(data)
|
24
21
|
|
25
22
|
map_files glob do |file|
|
26
23
|
html = ::Tilt.new(file, livingstyleguide: document).render(document.scope, data)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
LivingStyleGuide.add_filter :scss do |arguments, options, scss|
|
2
|
+
file = arguments.first
|
3
|
+
if file
|
4
|
+
if document.file
|
5
|
+
file = File.join(File.dirname(document.file), file)
|
6
|
+
end
|
7
|
+
document.depend_on file
|
8
|
+
document.scss << %Q(@import "#{file}";\n)
|
9
|
+
else
|
10
|
+
document.scss << "##{document.id.gsub(/[\/\.]/, '\\\0')} {\n#{scss}\n}\n"
|
11
|
+
end
|
12
|
+
nil
|
13
|
+
end
|
14
|
+
|
15
|
+
LivingStyleGuide.add_filter :sass do |arguments, options, sass|
|
16
|
+
file = arguments.first
|
17
|
+
if file
|
18
|
+
if document.file
|
19
|
+
file = File.join(File.dirname(document.file), file)
|
20
|
+
end
|
21
|
+
document.depend_on file
|
22
|
+
document.scss << %Q(@import "#{file}";\n)
|
23
|
+
else
|
24
|
+
scss = Sass::Engine.new(sass).to_tree.to_scss
|
25
|
+
document.scss << "##{document.id.gsub(/[\/\.]/, '\\\0')} {\n#{scss}\n}\n"
|
26
|
+
end
|
27
|
+
nil
|
28
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
LivingStyleGuide.add_filter :style do |arguments, options, block|
|
2
2
|
options.delete :block_type
|
3
3
|
options.each do |key, value|
|
4
|
-
document.scss << %Q($
|
4
|
+
document.scss << %Q($lsg--#{key.to_s.gsub("_", "-")}: #{value};\n)
|
5
5
|
end
|
6
6
|
nil
|
7
7
|
end
|
@@ -30,6 +30,7 @@ require 'livingstyleguide/filters/add_wrapper_class'
|
|
30
30
|
require 'livingstyleguide/filters/font_example'
|
31
31
|
require 'livingstyleguide/filters/colors'
|
32
32
|
require 'livingstyleguide/filters/css'
|
33
|
+
require 'livingstyleguide/filters/sass'
|
33
34
|
require 'livingstyleguide/filters/style'
|
34
35
|
require 'livingstyleguide/filters/data'
|
35
36
|
require 'livingstyleguide/filters/layout'
|
@@ -14,19 +14,20 @@ module LivingStyleGuide
|
|
14
14
|
}
|
15
15
|
|
16
16
|
class RedcarpetHTML < ::Redcarpet::Render::HTML
|
17
|
-
|
18
17
|
def initialize(options = {}, document)
|
19
18
|
@options = options
|
20
|
-
@options[:prefix] ||= '
|
19
|
+
@options[:prefix] ||= 'lsg--'
|
21
20
|
@document = document
|
21
|
+
@header = nil
|
22
|
+
@ids = {}
|
22
23
|
super @options
|
23
24
|
end
|
24
25
|
|
25
26
|
def header(text, header_level)
|
26
|
-
id = slug(text)
|
27
|
+
@header = id = slug(text)
|
27
28
|
klass = %w(page-title headline sub-headline sub-sub-headline)[header_level]
|
28
29
|
header_level += 1
|
29
|
-
%Q(<h#{header_level} class="#{@options[:prefix]}#{klass}" id="#{id}"><a class="
|
30
|
+
%Q(<h#{header_level} class="#{@options[:prefix]}#{klass}" id="#{id}"><a class="lsg--anchor" href="##{id}"></a>#{text}</h#{header_level}>\n)
|
30
31
|
end
|
31
32
|
|
32
33
|
def paragraph(text)
|
@@ -46,6 +47,7 @@ module LivingStyleGuide
|
|
46
47
|
language = language.to_s.strip.to_sym
|
47
48
|
language = @options[:default_language] if language == :''
|
48
49
|
document = Document.new(livingstyleguide: @document) { code }
|
50
|
+
document.id = document_id
|
49
51
|
document.type = language == :example ? :html : language
|
50
52
|
document.template = template_for(language)
|
51
53
|
document.render(@document.scope)
|
@@ -64,6 +66,17 @@ module LivingStyleGuide
|
|
64
66
|
text.downcase.gsub(/[ _\.\-!\?\(\)\[\]]+/, '-').gsub(/^-|-$/, '')
|
65
67
|
end
|
66
68
|
|
69
|
+
private
|
70
|
+
def document_id
|
71
|
+
file = File.basename(@document.file, ".lsg").sub(/^_/, "") if @document.file
|
72
|
+
id = [file, @header].compact.uniq.join("-")
|
73
|
+
if id != ""
|
74
|
+
@ids[id] ||= 0
|
75
|
+
@ids[id] += 1
|
76
|
+
[id, @ids[id]].join("-")
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
67
80
|
private
|
68
81
|
def template_for(language)
|
69
82
|
language == :example ? :example : :code
|
@@ -1,3 +1,3 @@
|
|
1
1
|
<section class="<%= classes.join(' ') %>" id="<%= id %>">
|
2
|
-
<pre class="
|
2
|
+
<pre class="lsg--code-block"><code class="lsg--code"><%= highlighted_source %></code></pre>
|
3
3
|
</section>
|
@@ -0,0 +1,64 @@
|
|
1
|
+
<script>
|
2
|
+
document.addEventListener('DOMContentLoaded', function() {
|
3
|
+
if (testCopy()) {
|
4
|
+
var colorSwatches = document.getElementsByClassName('lsg--color-swatch');
|
5
|
+
for (var i = 0; i < colorSwatches.length; i++) {
|
6
|
+
|
7
|
+
if (!colorSwatches[i].classList.contains('-lsg-empty')) {
|
8
|
+
colorSwatches[i].appendChild(createSpan());
|
9
|
+
colorSwatches[i].addEventListener('click', function(event) {
|
10
|
+
if (event.altKey) {
|
11
|
+
var copyHexColors = window.getComputedStyle(this, ':after').getPropertyValue('content');
|
12
|
+
copyHexColors = copyHexColors.replace(/'/g, "");
|
13
|
+
selectElementRange(createDiv(copyHexColors));
|
14
|
+
}
|
15
|
+
else {
|
16
|
+
selectElementRange(this.children[0]);
|
17
|
+
}
|
18
|
+
});
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
});
|
23
|
+
|
24
|
+
function createDiv(copyHexColors) {
|
25
|
+
var divCopy = document.createElement('div');
|
26
|
+
divCopy.className = '-lsg-remove';
|
27
|
+
divCopy.setAttribute('style', 'opacity:0; position: absolute; top: -10000px');
|
28
|
+
divCopy.appendChild(document.createTextNode(copyHexColors));
|
29
|
+
document.body.appendChild(divCopy);
|
30
|
+
return divCopy
|
31
|
+
}
|
32
|
+
|
33
|
+
function createSpan() {
|
34
|
+
var spanHover = document.createElement('span');
|
35
|
+
spanHover.className = 'lsg--copy-color';
|
36
|
+
spanHover.appendChild(document.createTextNode("Click to copy variable\nAlt + click to copy HEX code"));
|
37
|
+
return spanHover
|
38
|
+
}
|
39
|
+
|
40
|
+
function selectElementRange(copyElementSelect) {
|
41
|
+
var range = document.createRange();
|
42
|
+
range.selectNode(copyElementSelect);
|
43
|
+
window.getSelection().removeAllRanges();
|
44
|
+
window.getSelection().addRange(range);
|
45
|
+
|
46
|
+
document.execCommand('copy');
|
47
|
+
|
48
|
+
if (copyElementSelect.classList.contains('-lsg-remove')) {
|
49
|
+
document.body.removeChild(copyElementSelect);
|
50
|
+
}
|
51
|
+
|
52
|
+
window.getSelection().removeAllRanges();
|
53
|
+
}
|
54
|
+
|
55
|
+
function testCopy() {
|
56
|
+
try {
|
57
|
+
document.execCommand('copy');
|
58
|
+
return true;
|
59
|
+
}
|
60
|
+
catch(err) {
|
61
|
+
return false;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
</script>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<section class="<%= classes.join(' ') %>" id="<%= id %>">
|
2
|
-
<div class="
|
2
|
+
<div class="lsg--html">
|
3
3
|
<%= html %>
|
4
4
|
</div>
|
5
|
-
<pre class="
|
5
|
+
<pre class="lsg--code-block"><code class="lsg--code"><%= highlighted_source %></code></pre>
|
6
6
|
</section>
|
@@ -1,4 +1,4 @@
|
|
1
1
|
<section class="<%= classes.join(' ') %>" id="<%= id %>">
|
2
2
|
<script><%= html %></script>
|
3
|
-
<pre class="
|
3
|
+
<pre class="lsg--code-block"><code class="lsg--code"><%= highlighted_source %></code></pre>
|
4
4
|
</section>
|
data/lib/livingstyleguide.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
Encoding.default_external = Encoding::UTF_8
|
2
2
|
Encoding.default_internal = Encoding::UTF_8
|
3
3
|
|
4
|
+
require "yaml"
|
5
|
+
|
4
6
|
begin
|
5
7
|
require 'compass'
|
6
8
|
rescue LoadError
|
@@ -10,8 +12,8 @@ module LivingStyleGuide
|
|
10
12
|
@@default_options = {
|
11
13
|
default_language: :example,
|
12
14
|
title: 'Living Style Guide',
|
13
|
-
header: '<h1 class="
|
14
|
-
footer: '<div class="
|
15
|
+
header: '<h1 class="lsg--page-title">Living Style Guide</h1>',
|
16
|
+
footer: '<div class="lsg--footer"><a class="lsg--logo" href="http://livingstyleguide.org">Made with the LivingStyleGuide gem.</a></div>',
|
15
17
|
root: '/'
|
16
18
|
}
|
17
19
|
|
@@ -22,6 +24,16 @@ module LivingStyleGuide
|
|
22
24
|
def self.add_filter(*keys, &block)
|
23
25
|
Filters.add_filter(*keys, &block)
|
24
26
|
end
|
27
|
+
|
28
|
+
def self.parse_data(data)
|
29
|
+
if data
|
30
|
+
if Psych.respond_to?(:safe_load)
|
31
|
+
Psych.safe_load(data)
|
32
|
+
else
|
33
|
+
Psych.load(data)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
25
37
|
end
|
26
38
|
|
27
39
|
require 'livingstyleguide/version'
|
@@ -1,52 +1,52 @@
|
|
1
1
|
//// INTEGRATION ////
|
2
2
|
|
3
|
-
$
|
3
|
+
$lsg--layout-selector: body !default;
|
4
4
|
|
5
5
|
//// TYPOGRAPHY ////
|
6
6
|
|
7
|
-
$
|
8
|
-
$
|
9
|
-
$
|
10
|
-
$
|
11
|
-
$
|
12
|
-
$
|
13
|
-
$
|
14
|
-
$
|
15
|
-
$
|
16
|
-
$
|
17
|
-
$
|
18
|
-
$
|
19
|
-
$
|
20
|
-
$
|
21
|
-
$
|
22
|
-
$
|
23
|
-
$
|
7
|
+
$lsg--base-font: 'Georgia', 'Times New Roman', serif !default;
|
8
|
+
$lsg--base-font-size: 14px !default;
|
9
|
+
$lsg--base-font-weight: normal !default;
|
10
|
+
$lsg--base-line-height: 1.4 !default;
|
11
|
+
$lsg--base-text-align: left !default;
|
12
|
+
$lsg--page-title-font-size: 30px !default;
|
13
|
+
$lsg--headline-font: $lsg--base-font !default;
|
14
|
+
$lsg--headline-font-size: 22px !default;
|
15
|
+
$lsg--headline-text-align: left !default;
|
16
|
+
$lsg--sub-headline-font-size: 16px !default;
|
17
|
+
$lsg--sub-sub-headline-font-size: $lsg--base-font-size !default;
|
18
|
+
$lsg--headline-font-weight: bold !default;
|
19
|
+
$lsg--headline-line-height: 1.1 !default;
|
20
|
+
$lsg--code-font: Courier, "Courier New", monospace !default;
|
21
|
+
$lsg--code-font-size: 12px !default;
|
22
|
+
$lsg--code-font-weight: normal !default;
|
23
|
+
$lsg--code-line-height: 1.5 !default;
|
24
24
|
|
25
25
|
//// STYLING ////
|
26
26
|
|
27
|
-
$
|
28
|
-
$
|
29
|
-
$
|
30
|
-
$
|
31
|
-
$
|
32
|
-
$
|
33
|
-
$
|
34
|
-
$
|
35
|
-
|
36
|
-
$
|
37
|
-
$
|
38
|
-
$
|
39
|
-
$
|
40
|
-
$
|
41
|
-
|
42
|
-
$
|
43
|
-
$
|
44
|
-
$
|
45
|
-
$
|
46
|
-
$
|
47
|
-
|
48
|
-
$
|
49
|
-
$
|
27
|
+
$lsg--background-color: #f7f7f7 !default;
|
28
|
+
$lsg--border-width: 1px !default;
|
29
|
+
$lsg--border-color: silver !default;
|
30
|
+
$lsg--border-radius: 0 !default;
|
31
|
+
$lsg--color: #505050 !default;
|
32
|
+
$lsg--width: 640px !default;
|
33
|
+
$lsg--gap-width: 10px !default;
|
34
|
+
$lsg--full-width-padding: $lsg--gap-width !default;
|
35
|
+
|
36
|
+
$lsg--code-background-color: #dddddd !default;
|
37
|
+
$lsg--code-color: #505050 !default;
|
38
|
+
$lsg--code-border-width: $lsg--border-width !default;
|
39
|
+
$lsg--code-border-color: $lsg--border-color !default;
|
40
|
+
$lsg--code-border-radius: $lsg--border-radius !default;
|
41
|
+
|
42
|
+
$lsg--color-swatch-color: black !default;
|
43
|
+
$lsg--color-swatch-border-width: 4px !default;
|
44
|
+
$lsg--color-swatch-border-color: rgba(black, 0.05) !default;
|
45
|
+
$lsg--color-swatch-border-radius: 50% !default;
|
46
|
+
$lsg--color-swatches-per-line: 2 !default;
|
47
|
+
|
48
|
+
$lsg--highlight-color: #f6ffa3 !default;
|
49
|
+
$lsg--highlight-border-radius: 2px;
|
50
50
|
|
51
51
|
//// IMPORTS ////
|
52
52
|
|
@@ -1,23 +1,23 @@
|
|
1
|
-
.
|
2
|
-
@extend %
|
1
|
+
.lsg--code {
|
2
|
+
@extend %lsg--reset;
|
3
3
|
}
|
4
4
|
|
5
|
-
.
|
6
|
-
.
|
7
|
-
@extend %
|
8
|
-
background: $
|
9
|
-
border-radius: $
|
10
|
-
color: $
|
5
|
+
.lsg--code-span,
|
6
|
+
.lsg--code-block {
|
7
|
+
@extend %lsg--reset;
|
8
|
+
background: $lsg--code-background-color;
|
9
|
+
border-radius: $lsg--code-border-radius;
|
10
|
+
color: $lsg--code-color;
|
11
11
|
display: inline;
|
12
|
-
font-family: $
|
13
|
-
font-size: $
|
14
|
-
font-weight: $
|
12
|
+
font-family: $lsg--code-font;
|
13
|
+
font-size: $lsg--code-font-size;
|
14
|
+
font-weight: $lsg--code-font-weight;
|
15
15
|
overflow: scroll;
|
16
16
|
padding: 0 3px;
|
17
17
|
-webkit-font-smoothing: subpixel-antialiased;
|
18
18
|
|
19
19
|
kbd {
|
20
|
-
@extend %
|
20
|
+
@extend %lsg--reset;
|
21
21
|
display: block;
|
22
22
|
font-weight: bold;
|
23
23
|
|
@@ -27,8 +27,8 @@
|
|
27
27
|
}
|
28
28
|
|
29
29
|
em {
|
30
|
-
@extend %
|
31
|
-
color: lighten($
|
30
|
+
@extend %lsg--reset;
|
31
|
+
color: lighten($lsg--code-color, 10%);
|
32
32
|
display: inline;
|
33
33
|
font-style: normal;
|
34
34
|
font-weight: bold;
|
@@ -37,23 +37,23 @@
|
|
37
37
|
}
|
38
38
|
|
39
39
|
b {
|
40
|
-
@extend %
|
41
|
-
color: lighten($
|
40
|
+
@extend %lsg--reset;
|
41
|
+
color: lighten($lsg--code-color, 20%);
|
42
42
|
display: inline;
|
43
43
|
font-weight: bold;
|
44
44
|
vertical-align: baseline;
|
45
45
|
}
|
46
46
|
|
47
47
|
i {
|
48
|
-
@extend %
|
49
|
-
color: lighten($
|
48
|
+
@extend %lsg--reset;
|
49
|
+
color: lighten($lsg--code-color, 30%);
|
50
50
|
display: inline;
|
51
51
|
vertical-align: baseline;
|
52
52
|
}
|
53
53
|
|
54
54
|
q {
|
55
|
-
@extend %
|
56
|
-
color: lighten($
|
55
|
+
@extend %lsg--reset;
|
56
|
+
color: lighten($lsg--code-color, 30%);
|
57
57
|
display: inline;
|
58
58
|
vertical-align: baseline;
|
59
59
|
|
@@ -64,61 +64,61 @@
|
|
64
64
|
}
|
65
65
|
|
66
66
|
var {
|
67
|
-
@extend %
|
67
|
+
@extend %lsg--reset;
|
68
68
|
display: inline;
|
69
69
|
text-decoration: underline;
|
70
70
|
vertical-align: baseline;
|
71
71
|
}
|
72
72
|
}
|
73
73
|
|
74
|
-
.
|
74
|
+
.lsg--code-block {
|
75
75
|
display: block;//none;
|
76
|
-
line-height: $
|
77
|
-
padding: 3px $
|
78
|
-
width: $
|
76
|
+
line-height: $lsg--code-line-height;
|
77
|
+
padding: 3px $lsg--gap-width;
|
78
|
+
width: $lsg--width;
|
79
79
|
|
80
80
|
.show-code & {
|
81
81
|
display: block;
|
82
82
|
}
|
83
83
|
}
|
84
84
|
|
85
|
-
.
|
85
|
+
.lsg--example + .lsg--code-block {
|
86
86
|
border-top-left-radius: 0;
|
87
87
|
border-top-right-radius: 0;
|
88
88
|
margin-top: 0;
|
89
89
|
}
|
90
90
|
|
91
|
-
.
|
92
|
-
background: $
|
91
|
+
.lsg--layout-example + .lsg--code-block {
|
92
|
+
background: $lsg--code-background-color;
|
93
93
|
border-radius: 0;
|
94
|
-
margin: 0 0 $
|
95
|
-
padding: $
|
94
|
+
margin: 0 0 $lsg--gap-width;
|
95
|
+
padding: $lsg--gap-width 0;
|
96
96
|
width: 100%;
|
97
97
|
|
98
|
-
.
|
98
|
+
.lsg--code {
|
99
99
|
display: block;
|
100
100
|
margin: auto;
|
101
|
-
width: $
|
101
|
+
width: $lsg--width;
|
102
102
|
}
|
103
103
|
}
|
104
104
|
|
105
|
-
.
|
106
|
-
@extend .
|
105
|
+
.lsg--font-example {
|
106
|
+
@extend .lsg--example;
|
107
107
|
}
|
108
108
|
|
109
|
-
.
|
110
|
-
@extend %
|
111
|
-
background-color: $
|
112
|
-
border-radius: $
|
109
|
+
.lsg--code-highlight {
|
110
|
+
@extend %lsg--reset;
|
111
|
+
background-color: $lsg--highlight-color;
|
112
|
+
border-radius: $lsg--highlight-border-radius;
|
113
113
|
display: inline;
|
114
114
|
font-style: inherit;
|
115
115
|
font-weight: inherit;
|
116
116
|
vertical-align: baseline;
|
117
117
|
}
|
118
118
|
|
119
|
-
.
|
120
|
-
@extend %
|
121
|
-
@extend .
|
119
|
+
.lsg--code-highlight-block {
|
120
|
+
@extend %lsg--reset;
|
121
|
+
@extend .lsg--code-highlight;
|
122
122
|
display: block;
|
123
123
|
}
|
124
124
|
|
@@ -1,22 +1,22 @@
|
|
1
|
-
.
|
2
|
-
@extend %
|
3
|
-
color: $
|
1
|
+
.lsg--color-swatch {
|
2
|
+
@extend %lsg--reset;
|
3
|
+
color: $lsg--color-swatch-color;
|
4
4
|
float: left;
|
5
|
-
font-family: $
|
6
|
-
font-size: $
|
5
|
+
font-family: $lsg--code-font;
|
6
|
+
font-size: $lsg--code-font-size;
|
7
7
|
font-weight: bold;
|
8
|
-
height: 4em * $
|
9
|
-
line-height: 1em * $
|
8
|
+
height: 4em * $lsg--base-line-height;
|
9
|
+
line-height: 1em * $lsg--base-line-height;
|
10
10
|
list-style: none;
|
11
|
-
margin: 0 $
|
11
|
+
margin: 0 $lsg--gap-width $lsg--gap-width 0;
|
12
12
|
position: relative;
|
13
13
|
text-align: center;
|
14
14
|
z-index: 1;
|
15
15
|
|
16
16
|
&:before {
|
17
|
-
@extend %
|
18
|
-
border: $
|
19
|
-
border-radius: $
|
17
|
+
@extend %lsg--reset;
|
18
|
+
border: $lsg--color-swatch-border-width $lsg--color-swatch-border-color solid;
|
19
|
+
border-radius: $lsg--color-swatch-border-radius;
|
20
20
|
content: "";
|
21
21
|
height: 100%;
|
22
22
|
left: 0;
|
@@ -26,31 +26,58 @@
|
|
26
26
|
z-index: -1;
|
27
27
|
}
|
28
28
|
|
29
|
+
&:hover:before {
|
30
|
+
color: black;
|
31
|
+
cursor: pointer;
|
32
|
+
}
|
33
|
+
|
29
34
|
&:after {
|
35
|
+
cursor: pointer;
|
30
36
|
display: block;
|
31
37
|
font-weight: normal;
|
32
38
|
text-align: center;
|
33
39
|
}
|
34
40
|
}
|
35
41
|
|
36
|
-
.
|
37
|
-
|
38
|
-
|
42
|
+
.lsg--copy-color {
|
43
|
+
background: $lsg--background-color;
|
44
|
+
border-radius: $lsg--border-radius;
|
45
|
+
color: $lsg--color;
|
46
|
+
cursor: pointer;
|
47
|
+
font-family: $lsg--base-font;
|
48
|
+
font-size: 0.8em;
|
49
|
+
left: 0;
|
50
|
+
line-height: 1.2em;
|
51
|
+
padding: 3px 0 3px 0;
|
52
|
+
position: absolute;
|
53
|
+
visibility: hidden;
|
54
|
+
white-space: pre-wrap;
|
55
|
+
width: 100%;
|
56
|
+
z-index: 1;
|
57
|
+
|
58
|
+
.lsg--color-swatch:hover & {
|
59
|
+
visibility: visible;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
.lsg--color-swatches {
|
64
|
+
@extend %lsg--reset;
|
65
|
+
margin: $lsg--gap-width auto (-$lsg--gap-width) auto;
|
39
66
|
overflow: hidden;
|
40
|
-
padding-left: $
|
41
|
-
width: $
|
67
|
+
padding-left: $lsg--gap-width;
|
68
|
+
width: $lsg--width + 2 * $lsg--gap-width;
|
42
69
|
}
|
43
70
|
|
44
71
|
@for $i from 1 through 12 {
|
45
|
-
.
|
46
|
-
$size: floor(($
|
72
|
+
.lsg--color-swatches.-lsg-#{$i}-columns .lsg--color-swatch {
|
73
|
+
$size: floor(($lsg--width - ($i - 1) * $lsg--gap-width) / $i);
|
47
74
|
height: $size;
|
48
75
|
padding-top: $size / 2 + ($size / 5 - 20px);
|
49
76
|
width: $size;
|
50
77
|
}
|
51
78
|
}
|
52
79
|
|
53
|
-
.
|
80
|
+
.lsg--color-swatch.-lsg-empty {
|
54
81
|
overflow: hidden;
|
55
82
|
text-align: left;
|
56
83
|
text-indent: -119988px;
|
@@ -60,4 +87,3 @@
|
|
60
87
|
display: none;
|
61
88
|
}
|
62
89
|
}
|
63
|
-
|
@@ -1,46 +1,46 @@
|
|
1
|
-
.
|
2
|
-
.
|
3
|
-
.
|
4
|
-
.
|
5
|
-
@extend %
|
6
|
-
color: $
|
7
|
-
font-family: $
|
8
|
-
font-size: $
|
9
|
-
font-weight: $
|
10
|
-
line-height: $
|
11
|
-
margin: $
|
12
|
-
text-align: $
|
13
|
-
width: $
|
1
|
+
.lsg--paragraph,
|
2
|
+
.lsg--code-block,
|
3
|
+
.lsg--unordered-list,
|
4
|
+
.lsg--ordered-list {
|
5
|
+
@extend %lsg--reset;
|
6
|
+
color: $lsg--color;
|
7
|
+
font-family: $lsg--base-font;
|
8
|
+
font-size: $lsg--base-font-size;
|
9
|
+
font-weight: $lsg--base-font-weight;
|
10
|
+
line-height: $lsg--base-line-height;
|
11
|
+
margin: $lsg--gap-width auto;
|
12
|
+
text-align: $lsg--base-text-align;
|
13
|
+
width: $lsg--width;
|
14
14
|
-webkit-font-smoothing: antialiased;
|
15
15
|
}
|
16
16
|
|
17
|
-
.
|
18
|
-
.
|
19
|
-
@extend %
|
17
|
+
.lsg--unordered-list-item,
|
18
|
+
.lsg--ordered-list-item {
|
19
|
+
@extend %lsg--reset;
|
20
20
|
display: list-item;
|
21
21
|
list-style: disc;
|
22
|
-
margin: ceil($
|
22
|
+
margin: ceil($lsg--gap-width / 2) 0 ceil($lsg--gap-width / 2) (2 * $lsg--gap-width);
|
23
23
|
}
|
24
24
|
|
25
|
-
.
|
26
|
-
.
|
27
|
-
.
|
28
|
-
.
|
29
|
-
@extend %
|
30
|
-
color: $
|
25
|
+
.lsg--page-title,
|
26
|
+
.lsg--headline,
|
27
|
+
.lsg--sub-headline,
|
28
|
+
.lsg--sub-sub-headline {
|
29
|
+
@extend %lsg--reset;
|
30
|
+
color: $lsg--color;
|
31
31
|
display: block;
|
32
|
-
font-family: $
|
33
|
-
font-size: $
|
34
|
-
font-weight: $
|
35
|
-
line-height: $
|
36
|
-
margin: (3 * $
|
37
|
-
text-align: $
|
38
|
-
width: $
|
32
|
+
font-family: $lsg--headline-font;
|
33
|
+
font-size: $lsg--headline-font-size;
|
34
|
+
font-weight: $lsg--headline-font-weight;
|
35
|
+
line-height: $lsg--headline-line-height;
|
36
|
+
margin: (3 * $lsg--gap-width) auto $lsg--gap-width;
|
37
|
+
text-align: $lsg--headline-text-align;
|
38
|
+
width: $lsg--width;
|
39
39
|
-webkit-font-smoothing: antialiased;
|
40
40
|
}
|
41
41
|
|
42
|
-
.
|
43
|
-
@extend %
|
42
|
+
.lsg--anchor {
|
43
|
+
@extend %lsg--reset;
|
44
44
|
color: inherit;
|
45
45
|
display: inline;
|
46
46
|
margin-left: -1em;
|
@@ -49,9 +49,9 @@
|
|
49
49
|
text-decoration: none;
|
50
50
|
width: 1em;
|
51
51
|
|
52
|
-
.
|
53
|
-
.
|
54
|
-
.
|
52
|
+
.lsg--headline:hover &,
|
53
|
+
.lsg--sub-headline:hover &,
|
54
|
+
.lsg--sub-sub-headline:hover & {
|
55
55
|
opacity: 0.5;
|
56
56
|
|
57
57
|
&:hover {
|
@@ -64,41 +64,41 @@
|
|
64
64
|
}
|
65
65
|
}
|
66
66
|
|
67
|
-
.
|
67
|
+
.lsg--page-title {
|
68
68
|
display: block;
|
69
|
-
font-size: $
|
69
|
+
font-size: $lsg--page-title-font-size;
|
70
70
|
}
|
71
71
|
|
72
|
-
.
|
72
|
+
.lsg--sub-headline {
|
73
73
|
display: block;
|
74
|
-
font-size: $
|
74
|
+
font-size: $lsg--sub-headline-font-size;
|
75
75
|
}
|
76
76
|
|
77
|
-
.
|
77
|
+
.lsg--sub-sub-headline {
|
78
78
|
display: block;
|
79
|
-
font-size: $
|
79
|
+
font-size: $lsg--sub-sub-headline-font-size;
|
80
80
|
}
|
81
81
|
|
82
|
-
.
|
83
|
-
@extend %
|
82
|
+
.lsg--example {
|
83
|
+
@extend %lsg--reset;
|
84
84
|
background: white;
|
85
|
-
border-top-left-radius: $
|
86
|
-
border-top-right-radius: $
|
85
|
+
border-top-left-radius: $lsg--border-radius;
|
86
|
+
border-top-right-radius: $lsg--border-radius;
|
87
87
|
display: block;
|
88
|
-
margin: $
|
88
|
+
margin: $lsg--gap-width auto 0;
|
89
89
|
overflow: hidden;
|
90
|
-
padding: $
|
90
|
+
padding: $lsg--gap-width;
|
91
91
|
position: relative;
|
92
|
-
width: $
|
92
|
+
width: $lsg--width;
|
93
93
|
|
94
94
|
&.-lsg-has-full-width {
|
95
|
-
@extend #{$
|
95
|
+
@extend #{$lsg--layout-selector} !optional;
|
96
96
|
border-radius: 0;
|
97
97
|
display: block;
|
98
98
|
height: auto;
|
99
99
|
margin: 0 auto;
|
100
100
|
min-height: auto;
|
101
|
-
padding: $
|
101
|
+
padding: $lsg--full-width-padding;
|
102
102
|
width: 100%;
|
103
103
|
}
|
104
104
|
|
@@ -106,9 +106,9 @@
|
|
106
106
|
display: none;
|
107
107
|
}
|
108
108
|
|
109
|
-
.
|
110
|
-
margin-bottom: -$
|
111
|
-
margin-left: -$
|
112
|
-
margin-right: -$
|
109
|
+
.lsg--code-block {
|
110
|
+
margin-bottom: -$lsg--gap-width;
|
111
|
+
margin-left: -$lsg--gap-width;
|
112
|
+
margin-right: -$lsg--gap-width;
|
113
113
|
}
|
114
114
|
}
|
@@ -1,24 +1,24 @@
|
|
1
1
|
.livingstyleguide {
|
2
|
-
@extend %
|
3
|
-
background: $
|
2
|
+
@extend %lsg--reset;
|
3
|
+
background: $lsg--background-color;
|
4
4
|
display: block;
|
5
5
|
}
|
6
6
|
|
7
|
-
.
|
8
|
-
@extend %
|
7
|
+
.lsg--container {
|
8
|
+
@extend %lsg--reset;
|
9
9
|
display: block;
|
10
10
|
min-height: 50vh;
|
11
11
|
}
|
12
12
|
|
13
|
-
.
|
14
|
-
@extend %
|
13
|
+
.lsg--footer {
|
14
|
+
@extend %lsg--reset;
|
15
15
|
display: block;
|
16
|
-
margin: (4 * $
|
17
|
-
width: $
|
16
|
+
margin: (4 * $lsg--gap-width) auto;
|
17
|
+
width: $lsg--width;
|
18
18
|
}
|
19
19
|
|
20
|
-
.
|
21
|
-
@extend %
|
20
|
+
.lsg--logo {
|
21
|
+
@extend %lsg--reset;
|
22
22
|
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZUAAADICAYAAAAgPHymAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAFX9JREFUeNrsnTF62zgaQJlsiu1Ge4LRnCBKldLyCWx320Uut5g4PoGtE8SePYClE9gptzLd7UwT5QSjdLvVKt12u0DyMwPDBAmKIAmS732fPlsSRRIg8D8AJMFnCQDk8vbtzzP151a9Tn755e8bcgSgnGdkAYBTKPfqNVGvnXodIhYApAJQVygZiAUAqQAEEQpiAUAqAEGFglgAkApAUKEgFgCkAhBUKIgFAKkABBUKYgFAKgBBhYJYAJAKQFChIBYApAIIJahQEAsAUgGEElQoiAUAqQBCaQTEAkgFAKEgFgCkAhCfUBALjJrnZAEglEJWe/5Ob+9etg+AVAAQSnKqehqn+i9iAfCD4S9AKG6hrIz1LdSfmz3XxVAYIBUAhPJkvYgFAKkAQqkvFMQCgFQAoQQVCmIBQCqAUIIKBbEAIBVAKEGFglgAkAoglKBCQSwASAUQSlChIBYApAIIJahQEAsAUgGEElQoiAUAqQBCaWr/EAsgFQCEglgAkAoglMiEglgAqQAgFMQCgFQAocQrFMQCSAUAoSAWAKQCCCVeoSAWQCoACAWxACAVQCjxCgWxAFIBQCiIBQCpAELpRXoRCwyS52QBDEAoY0Pn073kGwA9FYCGhDKG4S96LIBUAFrsoQz5RD1iAaQC0KJQohZLA0JBLIBUAFo6hzKkmx8RCyAVgA6FEpVYWhAKYgGkAgilJfo8oSRiAaQCEJFQOhVLB0JBLIBUAKH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m9LWoX77KOumB8qBIpL6bFcSCtqmlOBrpvohhuzEGdDJvPk6eWiqWx/n96geax2gcvetma58e0V5wW0zmb7zcTSxDGzyuJxgPXuU9dKhVJRJFXW7XP8AfpHx4/uBcoM9Jj/CzAAHk2STj6TiEcAAAAASUVORK5CYII=');
|
23
23
|
background-size: 100%;
|
24
24
|
display: block;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
$
|
1
|
+
$lsg--variables: () !default;
|
2
2
|
|
3
|
-
@each $variable, $value in $
|
3
|
+
@each $variable, $value in $lsg--variables {
|
4
4
|
$value: null !default;
|
5
5
|
@if $value != null {
|
6
6
|
$selector: $variable;
|
@@ -12,17 +12,21 @@ $livingstyleguide--variables: () !default;
|
|
12
12
|
}
|
13
13
|
.#{$selector} {
|
14
14
|
@if type-of($value) == color {
|
15
|
-
@if (lightness($value) < lightness($
|
16
|
-
color: $
|
15
|
+
@if (lightness($value) < lightness($lsg--color)) {
|
16
|
+
color: $lsg--background-color;
|
17
17
|
}
|
18
18
|
|
19
19
|
&:before {
|
20
20
|
background: $value;
|
21
21
|
}
|
22
|
+
&:hover:before {
|
23
|
+
background: transparentize($value, 0.6);
|
24
|
+
}
|
25
|
+
|
22
26
|
}
|
23
27
|
|
24
28
|
&:after {
|
25
|
-
@extend %
|
29
|
+
@extend %lsg--code !optional;
|
26
30
|
content: "#{inspect($value)}";
|
27
31
|
}
|
28
32
|
}
|
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: 2.0.0.alpha.
|
4
|
+
version: 2.0.0.alpha.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nico Hagenburger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minisyntax
|
@@ -223,6 +223,7 @@ files:
|
|
223
223
|
- lib/livingstyleguide/filters/markdown.rb
|
224
224
|
- lib/livingstyleguide/filters/options.rb
|
225
225
|
- lib/livingstyleguide/filters/require.rb
|
226
|
+
- lib/livingstyleguide/filters/sass.rb
|
226
227
|
- lib/livingstyleguide/filters/style.rb
|
227
228
|
- lib/livingstyleguide/filters/syntax.rb
|
228
229
|
- lib/livingstyleguide/filters/type.rb
|
@@ -233,6 +234,7 @@ files:
|
|
233
234
|
- lib/livingstyleguide/integration/sprockets.rb
|
234
235
|
- lib/livingstyleguide/markdown_extensions.rb
|
235
236
|
- lib/livingstyleguide/templates/code.html.erb
|
237
|
+
- lib/livingstyleguide/templates/colors-example.html.erb
|
236
238
|
- lib/livingstyleguide/templates/default.html.erb
|
237
239
|
- lib/livingstyleguide/templates/example.html.erb
|
238
240
|
- lib/livingstyleguide/templates/font-example.html.erb
|
@@ -266,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
266
268
|
version: 1.3.1
|
267
269
|
requirements: []
|
268
270
|
rubyforge_project:
|
269
|
-
rubygems_version: 2.
|
271
|
+
rubygems_version: 2.4.5
|
270
272
|
signing_key:
|
271
273
|
specification_version: 4
|
272
274
|
summary: Generate beautiful front-end style guides
|