livingstyleguide 2.0.0.alpha.10 → 2.0.0.alpha.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/livingstyleguide +5 -6
- data/lib/livingstyleguide.rb +18 -12
- data/lib/livingstyleguide/command_line_interface.rb +5 -6
- data/lib/livingstyleguide/commands.rb +39 -0
- data/lib/livingstyleguide/commands/add_wrapper_class.rb +4 -0
- data/lib/livingstyleguide/commands/coffee_script.rb +5 -0
- data/lib/livingstyleguide/{filters → commands}/colors.rb +1 -1
- data/lib/livingstyleguide/{filters → commands}/css.rb +1 -1
- data/lib/livingstyleguide/{filters → commands}/data.rb +1 -1
- data/lib/livingstyleguide/{filters → commands}/default.rb +1 -1
- data/lib/livingstyleguide/{filters → commands}/font_example.rb +2 -2
- data/lib/livingstyleguide/commands/full_width.rb +4 -0
- data/lib/livingstyleguide/commands/haml.rb +4 -0
- data/lib/livingstyleguide/{filters → commands}/import_and_use.rb +5 -5
- data/lib/livingstyleguide/{filters → commands}/javascript.rb +1 -1
- data/lib/livingstyleguide/{filters → commands}/layout.rb +4 -4
- data/lib/livingstyleguide/commands/markdown.rb +4 -0
- data/lib/livingstyleguide/{filters → commands}/options.rb +3 -3
- data/lib/livingstyleguide/commands/require.rb +4 -0
- data/lib/livingstyleguide/{filters → commands}/sass.rb +4 -2
- data/lib/livingstyleguide/commands/search_box.rb +10 -0
- data/lib/livingstyleguide/{filters → commands}/style.rb +1 -1
- data/lib/livingstyleguide/commands/syntax.rb +4 -0
- data/lib/livingstyleguide/commands/toggle_code.rb +4 -0
- data/lib/livingstyleguide/commands/type.rb +4 -0
- data/lib/livingstyleguide/document.rb +29 -26
- data/lib/livingstyleguide/integration.rb +4 -4
- data/lib/livingstyleguide/integration/compass.rb +2 -3
- data/lib/livingstyleguide/integration/rails.rb +3 -6
- data/lib/livingstyleguide/integration/sass.rb +1 -1
- data/lib/livingstyleguide/integration/sprockets.rb +2 -3
- data/lib/livingstyleguide/markdown_extensions.rb +9 -9
- data/lib/livingstyleguide/templates/code.html.erb +1 -1
- data/lib/livingstyleguide/templates/example.html.erb +1 -1
- data/lib/livingstyleguide/templates/javascript.html.erb +1 -1
- data/lib/livingstyleguide/templates/layout.html.erb +13 -1
- data/lib/livingstyleguide/templates/scripts/copy.js.erb +24 -0
- data/lib/livingstyleguide/templates/scripts/copy_code.js.erb +19 -0
- data/lib/livingstyleguide/templates/scripts/copy_colors.js.erb +36 -0
- data/lib/livingstyleguide/templates/scripts/search.js.erb +66 -0
- data/lib/livingstyleguide/templates/scripts/toggle_code.js.erb +53 -0
- data/lib/livingstyleguide/templates/search-box.html.erb +1 -68
- data/lib/livingstyleguide/templates/toggle-code.html.erb +1 -0
- data/lib/livingstyleguide/version.rb +1 -1
- data/stylesheets/_livingstyleguide.scss +6 -3
- data/stylesheets/livingstyleguide/_before.scss +10 -0
- data/stylesheets/livingstyleguide/_code.scss +4 -7
- data/stylesheets/livingstyleguide/_color-swatches.scss +15 -16
- data/stylesheets/livingstyleguide/_content.scss +5 -5
- data/stylesheets/livingstyleguide/_layout.scss +4 -3
- data/stylesheets/livingstyleguide/_reset.scss +2 -1
- data/stylesheets/livingstyleguide/_toggle-code.scss +21 -0
- data/stylesheets/livingstyleguide/_variables.scss +5 -1
- metadata +46 -29
- data/assets/javascripts/livingstyleguide.js +0 -75
- data/lib/livingstyleguide/engine.rb +0 -194
- data/lib/livingstyleguide/filters.rb +0 -38
- data/lib/livingstyleguide/filters/add_wrapper_class.rb +0 -4
- data/lib/livingstyleguide/filters/coffee_script.rb +0 -5
- data/lib/livingstyleguide/filters/full_width.rb +0 -4
- data/lib/livingstyleguide/filters/haml.rb +0 -4
- data/lib/livingstyleguide/filters/markdown.rb +0 -4
- data/lib/livingstyleguide/filters/require.rb +0 -4
- data/lib/livingstyleguide/filters/search_box.rb +0 -9
- data/lib/livingstyleguide/filters/syntax.rb +0 -4
- data/lib/livingstyleguide/filters/type.rb +0 -4
- data/lib/livingstyleguide/templates/code-example.html.erb +0 -21
- data/lib/livingstyleguide/templates/colors-example.html.erb +0 -38
- data/lib/livingstyleguide/templates/javascript-copy.html.erb +0 -26
- data/stylesheets/livingstyleguide/_search.scss +0 -8
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
1
|
+
require "livingstyleguide/integration/compass"
|
2
|
+
require "livingstyleguide/integration/rails"
|
3
|
+
require "livingstyleguide/integration/sprockets"
|
4
|
+
require "livingstyleguide/integration/sass"
|
@@ -1,5 +1,4 @@
|
|
1
1
|
if defined?(Compass)
|
2
|
-
base_directory = File.join(File.dirname(__FILE__),
|
3
|
-
Compass::Frameworks.register
|
2
|
+
base_directory = File.join(File.dirname(__FILE__), "..", "..", "..")
|
3
|
+
Compass::Frameworks.register "livingstyleguide", path: base_directory
|
4
4
|
end
|
5
|
-
|
@@ -1,12 +1,9 @@
|
|
1
1
|
if defined?(Rails) and defined?(Rails::Railtie)
|
2
|
-
|
3
|
-
require 'rails'
|
2
|
+
require "rails"
|
4
3
|
class LivingStyleGuideRailtie < Rails::Railtie
|
5
|
-
initializer
|
6
|
-
Rails.application.assets.register_engine(
|
4
|
+
initializer "living_style_guide.assets" do
|
5
|
+
Rails.application.assets.register_engine(".lsg", ::LivingStyleGuide::Document)
|
7
6
|
LivingStyleGuide.default_options[:scss_template] = ::Sass::Rails::ScssTemplate
|
8
7
|
end
|
9
8
|
end
|
10
|
-
|
11
9
|
end
|
12
|
-
|
@@ -1,4 +1,4 @@
|
|
1
|
-
sass_directory = File.join(File.dirname(__FILE__),
|
1
|
+
sass_directory = File.join(File.dirname(__FILE__), "..", "..", "..", "stylesheets")
|
2
2
|
if ENV.has_key?("SASS_PATH")
|
3
3
|
ENV["SASS_PATH"] = ENV["SASS_PATH"] + File::PATH_SEPARATOR + sass_directory
|
4
4
|
else
|
@@ -1,7 +1,7 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
1
|
+
require "redcarpet"
|
2
|
+
require "tilt"
|
3
|
+
require "minisyntax"
|
4
|
+
require "erb"
|
5
5
|
|
6
6
|
module LivingStyleGuide
|
7
7
|
REDCARPET_RENDER_OPTIONS = {
|
@@ -16,7 +16,7 @@ module LivingStyleGuide
|
|
16
16
|
class RedcarpetHTML < ::Redcarpet::Render::HTML
|
17
17
|
def initialize(options = {}, document)
|
18
18
|
@options = options
|
19
|
-
@options[:prefix] ||=
|
19
|
+
@options[:prefix] ||= "lsg--"
|
20
20
|
@document = document
|
21
21
|
@header = nil
|
22
22
|
@ids = {}
|
@@ -45,7 +45,7 @@ module LivingStyleGuide
|
|
45
45
|
|
46
46
|
def block_code(code, language)
|
47
47
|
language = language.to_s.strip.to_sym
|
48
|
-
language = @options[:default_language] if language == :
|
48
|
+
language = @options[:default_language] if language == :""
|
49
49
|
document = Document.new(livingstyleguide: @document) { code }
|
50
50
|
document.id = document_id
|
51
51
|
document.type = language == :example ? @document.defaults[:global][:type] : language
|
@@ -60,10 +60,10 @@ module LivingStyleGuide
|
|
60
60
|
|
61
61
|
private
|
62
62
|
def slug(text)
|
63
|
-
require
|
64
|
-
::ActiveSupport::Inflector.parameterize(text,
|
63
|
+
require "active_support/core_ext/string/inflections"
|
64
|
+
::ActiveSupport::Inflector.parameterize(text, "-")
|
65
65
|
rescue LoadError
|
66
|
-
text.downcase.gsub(/[ _\.\-!\?\(\)\[\]]+/,
|
66
|
+
text.downcase.gsub(/[ _\.\-!\?\(\)\[\]]+/, "-").gsub(/^-|-$/, "")
|
67
67
|
end
|
68
68
|
|
69
69
|
private
|
@@ -9,7 +9,8 @@
|
|
9
9
|
<title><%= ERB::Util.h(title) %></title>
|
10
10
|
<script>
|
11
11
|
// see: http://www.hagenburger.net/BLOG/Simple-HTML5-Fix-for-IE.html
|
12
|
-
for(var e,l=
|
12
|
+
for(var e,l="article aside footer header nav section time picture".split(" ");e=l.pop();document.createElement(e));
|
13
|
+
<%= javascript %>
|
13
14
|
</script>
|
14
15
|
<style>
|
15
16
|
<%= css %>
|
@@ -19,9 +20,20 @@ for(var e,l='article aside footer header nav section time picture'.split(' ');e=
|
|
19
20
|
|
20
21
|
<body class="livingstyleguide">
|
21
22
|
<%= header %>
|
23
|
+
<% unless before.empty? %>
|
24
|
+
<section class="lsg--before">
|
25
|
+
<%= before %>
|
26
|
+
</section>
|
27
|
+
<% end %>
|
22
28
|
<div class="lsg--container">
|
23
29
|
<%= html %>
|
24
30
|
</div>
|
31
|
+
<% unless after.empty? %>
|
32
|
+
<section class="lsg--after">
|
33
|
+
<%= after %>
|
34
|
+
</section>
|
35
|
+
<% end %>
|
36
|
+
|
25
37
|
<%= footer %>
|
26
38
|
</body>
|
27
39
|
|
@@ -0,0 +1,24 @@
|
|
1
|
+
function selectElementRange(copyElementSelect) {
|
2
|
+
var range = document.createRange();
|
3
|
+
range.selectNode(copyElementSelect);
|
4
|
+
window.getSelection().removeAllRanges();
|
5
|
+
window.getSelection().addRange(range);
|
6
|
+
|
7
|
+
document.execCommand("copy");
|
8
|
+
|
9
|
+
if (copyElementSelect.classList.contains("-lsg-remove")) {
|
10
|
+
document.body.removeChild(copyElementSelect);
|
11
|
+
}
|
12
|
+
|
13
|
+
window.getSelection().removeAllRanges();
|
14
|
+
}
|
15
|
+
|
16
|
+
function testCopy() {
|
17
|
+
try {
|
18
|
+
document.execCommand("copy");
|
19
|
+
return true;
|
20
|
+
}
|
21
|
+
catch(err) {
|
22
|
+
return false;
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
document.addEventListener("DOMContentLoaded", function() {
|
2
|
+
if (testCopy()) {
|
3
|
+
var code = document.getElementsByClassName("lsg--code");
|
4
|
+
|
5
|
+
for (var i = 0; i < code.length; i++) {
|
6
|
+
var newButton = createButton()
|
7
|
+
code[i].appendChild(newButton)
|
8
|
+
newButton.addEventListener("click", function(event) {
|
9
|
+
selectElementRange(this.parentNode);
|
10
|
+
});
|
11
|
+
}
|
12
|
+
}
|
13
|
+
});
|
14
|
+
|
15
|
+
function createButton(copyCodeSelect) {
|
16
|
+
var buttonCopy = document.createElement("button");
|
17
|
+
buttonCopy.className = "lsg--button";
|
18
|
+
return buttonCopy;
|
19
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
document.addEventListener("DOMContentLoaded", function() {
|
2
|
+
if (testCopy()) {
|
3
|
+
var colorSwatches = document.getElementsByClassName("lsg--color-swatch");
|
4
|
+
for (var i = 0; i < colorSwatches.length; i++) {
|
5
|
+
if (!colorSwatches[i].classList.contains("-lsg-empty")) {
|
6
|
+
colorSwatches[i].appendChild(createSpan());
|
7
|
+
colorSwatches[i].addEventListener("click", function(event) {
|
8
|
+
if (event.altKey) {
|
9
|
+
var copyHexColors = window.getComputedStyle(this, ":after").getPropertyValue("content");
|
10
|
+
copyHexColors = copyHexColors.replace(/'/g, "");
|
11
|
+
selectElementRange(createDiv(copyHexColors));
|
12
|
+
}
|
13
|
+
else {
|
14
|
+
selectElementRange(this.children[0]);
|
15
|
+
}
|
16
|
+
});
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
});
|
21
|
+
|
22
|
+
function createDiv(copyHexColors) {
|
23
|
+
var divCopy = document.createElement("div");
|
24
|
+
divCopy.className = "-lsg-remove";
|
25
|
+
divCopy.setAttribute("style", "opacity: 0; position: absolute; top: -10000px");
|
26
|
+
divCopy.appendChild(document.createTextNode(copyHexColors));
|
27
|
+
document.body.appendChild(divCopy);
|
28
|
+
return divCopy;
|
29
|
+
}
|
30
|
+
|
31
|
+
function createSpan() {
|
32
|
+
var spanHover = document.createElement("span");
|
33
|
+
spanHover.className = "lsg--copy-color";
|
34
|
+
spanHover.appendChild(document.createTextNode("Click to copy variable\nAlt + click to copy HEX code"));
|
35
|
+
return spanHover;
|
36
|
+
}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
function hasClass(element, cls) {
|
2
|
+
return element.classList.contains(cls);
|
3
|
+
}
|
4
|
+
|
5
|
+
function addMatch(matched, node) {
|
6
|
+
if (node.nodeType !== Node.TEXT_NODE) {
|
7
|
+
if (node.className.match(/lsg--/)) {
|
8
|
+
matched.push(node);
|
9
|
+
}
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
function addNextElement(selection, matched, i) {
|
14
|
+
var j = i + 1;
|
15
|
+
while (j < selection.length) {
|
16
|
+
if (hasClass(selection[j], "lsg--headline")) {
|
17
|
+
break;
|
18
|
+
}
|
19
|
+
addMatch(matched, selection[j]);
|
20
|
+
j++;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
function addPreviousElement(selection, matched, i) {
|
25
|
+
var j = i;
|
26
|
+
while (j >= 0) {
|
27
|
+
addMatch(matched, selection[j]);
|
28
|
+
if (hasClass(selection[j], "lsg--headline")) {
|
29
|
+
break;
|
30
|
+
}
|
31
|
+
j--;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
document.addEventListener("DOMContentLoaded", function() {
|
36
|
+
|
37
|
+
document.querySelector(".lsg--search-box").addEventListener("input", function(event) {
|
38
|
+
var searchTerm = this.value;
|
39
|
+
|
40
|
+
var selection = document.querySelectorAll(".lsg--example, .lsg--color-swatches, .lsg--font-example, .lsg--paragraph, .lsg--unordered-list, .lsg--ordered-list, .lsg--headline, .lsg--sub-headline, .lsg--sub-sub-headline");
|
41
|
+
var regexp = new RegExp(searchTerm, "i");
|
42
|
+
selection = Array.prototype.slice.call(selection);
|
43
|
+
var matched = [];
|
44
|
+
var unmatched = [];
|
45
|
+
|
46
|
+
for (var i = 0; i < selection.length; i++) {
|
47
|
+
if (selection[i].textContent.match(regexp)) {
|
48
|
+
addMatch(matched, selection[i]);
|
49
|
+
addNextElement(selection, matched, i);
|
50
|
+
addPreviousElement(selection, matched, i);
|
51
|
+
};
|
52
|
+
};
|
53
|
+
|
54
|
+
unmatched = selection.filter(function(element) {
|
55
|
+
return matched.indexOf(element) === -1;
|
56
|
+
});
|
57
|
+
|
58
|
+
unmatched.map(function(item) {
|
59
|
+
item.style.display = "none";
|
60
|
+
});
|
61
|
+
|
62
|
+
matched.map(function(item) {
|
63
|
+
item.style.display = "block";
|
64
|
+
});
|
65
|
+
});
|
66
|
+
});
|
@@ -0,0 +1,53 @@
|
|
1
|
+
(function(win) {
|
2
|
+
var getClasses = function(el) {
|
3
|
+
return el.className.split(/\s+/g);
|
4
|
+
};
|
5
|
+
|
6
|
+
var addClass = function(el, name) {
|
7
|
+
var classList = getClasses(el);
|
8
|
+
if (classList.indexOf(name) == -1) {
|
9
|
+
classList.push(name);
|
10
|
+
el.className = classList.join(" ");
|
11
|
+
}
|
12
|
+
};
|
13
|
+
|
14
|
+
var removeClass = function(el, name) {
|
15
|
+
var classList = getClasses(el);
|
16
|
+
classList[classList.indexOf(name)] = null;
|
17
|
+
el.className = classList.join(" ");
|
18
|
+
};
|
19
|
+
|
20
|
+
var toggleClass = function(el, name) {
|
21
|
+
var classList = getClasses(el);
|
22
|
+
if (classList.indexOf(name) == -1) {
|
23
|
+
addClass(el, name);
|
24
|
+
return true;
|
25
|
+
}
|
26
|
+
else {
|
27
|
+
removeClass(el, name);
|
28
|
+
return false;
|
29
|
+
}
|
30
|
+
};
|
31
|
+
|
32
|
+
var html = document.getElementsByTagName("HTML")[0];
|
33
|
+
|
34
|
+
var hideCode = localStorage.getItem("lsg--hide-code");
|
35
|
+
|
36
|
+
if (hideCode == "true") {
|
37
|
+
addClass(html, "lsg--hide-code");
|
38
|
+
}
|
39
|
+
|
40
|
+
function toggleCode(event) {
|
41
|
+
event.preventDefault();
|
42
|
+
var hideCode = toggleClass(html, "lsg--hide-code");
|
43
|
+
localStorage.setItem("lsg--hide-code", hideCode);
|
44
|
+
}
|
45
|
+
|
46
|
+
document.addEventListener("DOMContentLoaded", function() {
|
47
|
+
var switches = document.getElementsByClassName("lsg--code-switch");
|
48
|
+
for (var i = 0; i < switches.length; i++) {
|
49
|
+
switches[i].addEventListener("click", toggleCode);
|
50
|
+
}
|
51
|
+
});
|
52
|
+
|
53
|
+
})(window);
|
@@ -1,68 +1 @@
|
|
1
|
-
<
|
2
|
-
<input type="search" class="lsg--search-box" placeholder="<%= placeholder %>" autofocus>
|
3
|
-
</div>
|
4
|
-
<script>
|
5
|
-
function hasClass(ele, cls) {
|
6
|
-
return ele.classList.contains(cls);
|
7
|
-
}
|
8
|
-
|
9
|
-
function addMatch(matched, node) {
|
10
|
-
if (node.nodeType !== Node.TEXT_NODE) {
|
11
|
-
if (node.className.match(/lsg--/)) {
|
12
|
-
matched.push(node);
|
13
|
-
}
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
var addNextElement = function(selection, matched, i) {
|
18
|
-
var j = i + 1;
|
19
|
-
while (j < selection.length) {
|
20
|
-
if (hasClass(selection[j], "lsg--headline")) {
|
21
|
-
break;
|
22
|
-
}
|
23
|
-
addMatch(matched, selection[j]);
|
24
|
-
j++;
|
25
|
-
}
|
26
|
-
}
|
27
|
-
|
28
|
-
var addPreviousElement = function(selection, matched, i) {
|
29
|
-
var j = i;
|
30
|
-
while (j >= 0) {
|
31
|
-
addMatch(matched, selection[j]);
|
32
|
-
if (hasClass(selection[j], "lsg--headline")) {
|
33
|
-
break;
|
34
|
-
}
|
35
|
-
j--;
|
36
|
-
}
|
37
|
-
}
|
38
|
-
|
39
|
-
document.querySelector(".lsg--search-box").addEventListener("input", function(event) {
|
40
|
-
var searchTerm = this.value;
|
41
|
-
|
42
|
-
var selection = document.querySelectorAll(".lsg--example, .lsg--color-swatches, .lsg--font-example, .lsg--paragraph, .lsg--unordered-list, .lsg--ordered-list, .lsg--headline, .lsg--sub-headline, .lsg--sub-sub-headline");
|
43
|
-
var regexp = new RegExp(searchTerm, "i");
|
44
|
-
selection = Array.prototype.slice.call(selection);
|
45
|
-
var matched = [];
|
46
|
-
var unmatched = [];
|
47
|
-
|
48
|
-
for (var i = 0; i < selection.length; i++) {
|
49
|
-
if (selection[i].textContent.match(regexp)) {
|
50
|
-
addMatch(matched, selection[i]);
|
51
|
-
addNextElement(selection, matched, i);
|
52
|
-
addPreviousElement(selection, matched, i);
|
53
|
-
};
|
54
|
-
};
|
55
|
-
|
56
|
-
unmatched = selection.filter(function(elem) {
|
57
|
-
return matched.indexOf(elem) === -1;
|
58
|
-
});
|
59
|
-
|
60
|
-
unmatched.map(function(item) {
|
61
|
-
item.style.display = "none";
|
62
|
-
});
|
63
|
-
|
64
|
-
matched.map(function(item) {
|
65
|
-
item.style.display = "block";
|
66
|
-
});
|
67
|
-
});
|
68
|
-
</script>
|
1
|
+
<input type="search" class="lsg--search-box" placeholder="<%= placeholder %>" autofocus>
|
@@ -0,0 +1 @@
|
|
1
|
+
<input type="button" class="lsg--code-switch">
|
@@ -4,7 +4,7 @@ $lsg--layout-selector: body !default;
|
|
4
4
|
|
5
5
|
//// TYPOGRAPHY ////
|
6
6
|
|
7
|
-
$lsg--base-font:
|
7
|
+
$lsg--base-font: georgia, times new roman, serif !default;
|
8
8
|
$lsg--base-font-size: 14px !default;
|
9
9
|
$lsg--base-font-weight: normal !default;
|
10
10
|
$lsg--base-line-height: 1.4 !default;
|
@@ -17,7 +17,7 @@ $lsg--sub-headline-font-size: 16px !default;
|
|
17
17
|
$lsg--sub-sub-headline-font-size: $lsg--base-font-size !default;
|
18
18
|
$lsg--headline-font-weight: bold !default;
|
19
19
|
$lsg--headline-line-height: 1.1 !default;
|
20
|
-
$lsg--code-font:
|
20
|
+
$lsg--code-font: courier, courier new, monospace !default;
|
21
21
|
$lsg--code-font-size: 12px !default;
|
22
22
|
$lsg--code-font-weight: normal !default;
|
23
23
|
$lsg--code-line-height: 1.5 !default;
|
@@ -51,6 +51,8 @@ $lsg--highlight-border-radius: 2px;
|
|
51
51
|
//// IMAGES - SVG ////
|
52
52
|
|
53
53
|
$lsg--copy-background-image: url("data:image/svg+xml;utf8,<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='100%' height='100%' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'> <path id='copy-6-icon' d='M360.277,151.999V50.001H50v310.137h102v101.861h310v-310H360.277z M90,320.138V90.001h230.277v61.998 H152v168.139H90z M421.5,421.499h-230V191.832h20.569c10.639,0,20.745,4.656,27.657,12.744l19.023,22.256H358l19.366-22.408 c6.911-7.996,16.958-12.592,27.528-12.592H421.5V421.499z M379.479,338.581h-145.99v-29h145.99V338.581z M379.479,286.249h-145.99 v-29h145.99V286.249z M233.488,361.999h146.023v29H233.488V361.999z'/></svg>");
|
54
|
+
$lsg--code-switch-hide: url("data:image/svg+xml;utf8,<svg version='1.1' xmlns='http://www.w3.org/2000/svg' height='1000' width='1000'><path d='M0 523.831q5.859 -48.825 64.449 -109.368 78.12 -80.073 175.77 -128.898 128.898 -60.543 259.749 -60.543 29.295 0 58.59 1.953l74.214 -128.898q9.765 -15.624 23.436 -17.577 3.906 0 7.812 1.953l50.778 31.248q17.577 7.812 1.953 33.201l-56.637 101.556 -46.872 78.12 -41.013 72.261 -144.522 249.984 -41.013 72.261 -46.872 80.073 -56.637 99.603q-15.624 25.389 -31.248 15.624l-52.731 -31.248q-15.624 -7.812 0 -33.201l48.825 -85.932 -7.812 -3.906q-103.509 -52.731 -175.77 -128.898 -64.449 -72.261 -64.449 -109.368zm263.655 0q0 74.214 46.872 132.804l48.825 -83.979q-9.765 -23.436 -9.765 -48.825 0 -50.778 34.178 -90.815t84.956 -49.802l48.825 -83.979l-17.577 0q-97.65 0 -166.982 65.425t-69.332 159.169zm177.723 294.903l41.013 -70.308l17.577 0q97.65 0 166.982 -65.425t69.332 -159.169q0 -74.214 -46.872 -132.804l62.496 -109.368q1.953 1.953 3.906 2.929t3.906 .977q103.509 52.731 175.77 128.898 64.449 72.261 64.449 109.368 -5.859 48.825 -64.449 109.368 -78.12 80.073 -175.77 128.898 -128.898 60.543 -259.749 60.543 -25.389 0 -58.59 -3.906zm89.838 -154.287l109.368 -189.441q9.765 25.389 9.765 48.825 0 50.778 -34.178 89.838t-84.956 50.778z' fill='#000000'/></svg>");
|
55
|
+
$lsg--code-switch-show: url("data:image/svg+xml;utf8,<svg version='1.1' xmlns='http://www.w3.org/2000/svg' height='1000' width='1000'><path d='M0 499.809q5.859 -48.825 64.449 -109.368 78.12 -80.073 175.77 -128.898 128.898 -60.543 259.749 -60.543 136.71 1.953 259.749 60.543 103.509 52.731 175.77 128.898 64.449 72.261 64.449 109.368 -5.859 48.825 -64.449 109.368 -78.12 80.073 -175.77 128.898 -128.898 60.543 -259.749 60.543 -136.71 -1.953 -259.749 -60.543 -103.509 -52.731 -175.77 -128.898 -64.449 -72.261 -64.449 -109.368zm263.655 0q0 93.744 69.332 159.169t166.982 65.425 166.982 -65.425 69.332 -159.169 -69.332 -159.169 -166.982 -65.425 -166.982 65.425 -69.332 159.169zm85.932 -.977q0 -59.567 43.943 -101.556t106.439 -41.989 106.439 41.989 43.943 101.556 -43.943 102.532 -106.439 42.966 -106.439 -42.966 -43.943 -102.532z' fill='#000000'/></svg>");
|
54
56
|
|
55
57
|
//// BUTTONS ////
|
56
58
|
|
@@ -64,5 +66,6 @@ $lsg--button-width: $lsg--button-height !default;
|
|
64
66
|
@import "livingstyleguide/content";
|
65
67
|
@import "livingstyleguide/code";
|
66
68
|
@import "livingstyleguide/color-swatches";
|
67
|
-
@import "livingstyleguide/
|
69
|
+
@import "livingstyleguide/toggle-code";
|
70
|
+
@import "livingstyleguide/before";
|
68
71
|
@import "livingstyleguide/variables";
|