kickstart_rails 0.2.410552013118 → 0.2.410965837961
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/kickstart_rails/docs.js +30 -5
- data/app/assets/stylesheets/kickstart_rails/components/_buttons.sass +1 -0
- data/app/assets/stylesheets/kickstart_rails/components/_images.sass +4 -0
- data/app/assets/stylesheets/kickstart_rails/components/_typography.sass +6 -1
- data/app/assets/stylesheets/kickstart_rails/core/_grid.sass +0 -11
- data/app/assets/stylesheets/kickstart_rails/docs.sass +25 -0
- data/lib/kickstart_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdea85f397753ba2369ae7d5c4316e4c6fe46611
|
4
|
+
data.tar.gz: 0f8223c09153b113b09baf59b906ce5683b161f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4b8c14fa92146b22262ffc069174a9da40986f5f1b68a098f891c4124684109d2de2fce65308a205a4b59322fc5d0fc58f309d6b072c7db1e49077f06147e7c
|
7
|
+
data.tar.gz: f8004ee58e4fe8c7d19b8cf2e90753c6d65d887f88317dca0e7136499989e19ab709a81a22e59e7240d3c863aacd4e67d7896a05a0ed44fe08eb0d2ac65aff40
|
@@ -1,6 +1,6 @@
|
|
1
1
|
(function() {
|
2
2
|
document.addEventListener('DOMContentLoaded', function() {
|
3
|
-
var booleanViewOptions, defaults, els, extend, option, options, setSettings, settings, _fn, _i, _j, _len, _len1;
|
3
|
+
var $headingLevel, $link, $menuItem, $newSubmenu, $targetNode, $toc, booleanViewOptions, defaults, els, extend, heading, option, options, setSettings, settings, _fn, _i, _j, _k, _len, _len1, _len2, _ref;
|
4
4
|
window.$$ = function(el) {
|
5
5
|
return document.querySelectorAll(el);
|
6
6
|
};
|
@@ -33,7 +33,7 @@
|
|
33
33
|
};
|
34
34
|
settings = options ? extend(defaults, options) : defaults;
|
35
35
|
setSettings = function(settings) {
|
36
|
-
var $container, option, _i, _j, _len, _len1, _ref, _results;
|
36
|
+
var $container, $visibleStyle, option, _i, _j, _len, _len1, _ref, _results;
|
37
37
|
localStorage.setItem('kickstartDocs', JSON.stringify(settings));
|
38
38
|
_results = [];
|
39
39
|
for (_i = 0, _len = booleanViewOptions.length; _i < _len; _i++) {
|
@@ -41,7 +41,8 @@
|
|
41
41
|
_ref = $$(".if-" + option);
|
42
42
|
for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
|
43
43
|
$container = _ref[_j];
|
44
|
-
$
|
44
|
+
$visibleStyle = $container.nodeName === 'SPAN' ? 'inline-block' : 'block';
|
45
|
+
$container.style.display = (settings.viewOptions["" + option] ? $visibleStyle : 'none');
|
45
46
|
}
|
46
47
|
_results.push((function() {
|
47
48
|
var _k, _len2, _ref1, _results1;
|
@@ -49,7 +50,8 @@
|
|
49
50
|
_results1 = [];
|
50
51
|
for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
|
51
52
|
$container = _ref1[_k];
|
52
|
-
|
53
|
+
$visibleStyle = $container.nodeName === 'SPAN' ? 'inline-block' : 'block';
|
54
|
+
_results1.push($container.style.display = (settings.viewOptions["" + option] ? 'none' : $visibleStyle));
|
53
55
|
}
|
54
56
|
return _results1;
|
55
57
|
})());
|
@@ -79,7 +81,7 @@
|
|
79
81
|
}
|
80
82
|
}
|
81
83
|
if (k$.$('#example-showStatus')) {
|
82
|
-
|
84
|
+
k$.$('#example-showStatus').addEventListener('click', function() {
|
83
85
|
var statuses;
|
84
86
|
statuses = [
|
85
87
|
{
|
@@ -103,6 +105,29 @@
|
|
103
105
|
return k$.status(statuses[k$.exampleCounter]);
|
104
106
|
});
|
105
107
|
}
|
108
|
+
k$.slugify = function(str) {
|
109
|
+
return str.toLowerCase().replace(/ /g,'-').replace(/[^\w-]+/g,'');
|
110
|
+
};
|
111
|
+
$toc = document.createElement('ul');
|
112
|
+
$link = document.createElement('li');
|
113
|
+
$link.innerHTML = '<a></a>';
|
114
|
+
$headingLevel = 1;
|
115
|
+
$targetNode = $toc;
|
116
|
+
_ref = k$.$$('.mainpane h1, .mainpane h2, .mainpane h3, .mainpane h4, .mainpane h5, .mainpane h6');
|
117
|
+
for (_k = 0, _len2 = _ref.length; _k < _len2; _k++) {
|
118
|
+
heading = _ref[_k];
|
119
|
+
heading.id = k$.slugify(heading.innerHTML);
|
120
|
+
if (parseInt(heading.nodeName.substr(1, 1) > $headingLevel)) {
|
121
|
+
$newSubmenu = $toc.cloneNode(true);
|
122
|
+
$targetNode.appendChild($newSubmenu);
|
123
|
+
$targetNode = $newSubmenu;
|
124
|
+
}
|
125
|
+
$menuItem = $link.cloneNode(true);
|
126
|
+
$menuItem.querySelector('a').href = "#" + heading.id;
|
127
|
+
$menuItem.querySelector('a').innerHTML = heading.innerHTML;
|
128
|
+
$targetNode.appendChild($menuItem);
|
129
|
+
}
|
130
|
+
return console.log($toc);
|
106
131
|
});
|
107
132
|
|
108
133
|
}).call(this);
|
@@ -55,10 +55,15 @@ a
|
|
55
55
|
top: 10vw
|
56
56
|
bottom: $space * 3
|
57
57
|
bottom: 10vw
|
58
|
-
text-align: center
|
59
58
|
background: $primary-color
|
60
59
|
margin-bottom: $space
|
61
60
|
box-shadow: inset 0px -30px 100px -20px hsla(0, 0%, 0%, 0.15), inset 0px 40px 90px -20px rgba(255, 255, 255, 0.15)
|
61
|
+
display: flex
|
62
|
+
flex-direction: column
|
63
|
+
align-items: center
|
64
|
+
|
65
|
+
> h1, > h2, > h3, > h4, > h5, > h6, > p
|
66
|
+
text-align: center
|
62
67
|
|
63
68
|
img
|
64
69
|
margin: 0px auto
|
@@ -26,21 +26,10 @@ $grid-gutter: 15px
|
|
26
26
|
max-width: $large-monitor
|
27
27
|
|
28
28
|
=row
|
29
|
-
display: -webkit-box
|
30
|
-
display: -o-flex
|
31
|
-
display: -moz-flex
|
32
|
-
display: -webkit-flex
|
33
29
|
display: flex
|
34
30
|
width: 100%
|
35
|
-
-o-justify-content: space-between
|
36
|
-
-ms-justify-content: space-between
|
37
|
-
-moz-justify-content: space-between
|
38
|
-
-webkit-justify-content: space-between
|
39
31
|
justify-content: space-between
|
40
32
|
align-items: stretch
|
41
|
-
-ms-flex-wrap: wrap
|
42
|
-
-moz-flex-wrap: wrap
|
43
|
-
-webkit-flex-wrap: wrap
|
44
33
|
flex-wrap: wrap
|
45
34
|
|
46
35
|
=set-column($columns, $offset, $ignore-auto-breakpoints: false)
|
@@ -68,6 +68,15 @@
|
|
68
68
|
&yellow
|
69
69
|
background-color: $yellow
|
70
70
|
|
71
|
+
.col-example
|
72
|
+
padding: $space/2
|
73
|
+
background: white
|
74
|
+
margin: $space/2 0
|
75
|
+
text-align: center
|
76
|
+
|
77
|
+
.gray
|
78
|
+
background: $dark-white
|
79
|
+
|
71
80
|
.example
|
72
81
|
padding: $space
|
73
82
|
margin-bottom: $space
|
@@ -134,3 +143,19 @@ iframe
|
|
134
143
|
.example-column
|
135
144
|
background-color: $darkest-white
|
136
145
|
color: white
|
146
|
+
|
147
|
+
// Modal
|
148
|
+
|
149
|
+
.modal.example
|
150
|
+
display: block
|
151
|
+
position: static
|
152
|
+
box-shadow: none
|
153
|
+
margin: 0px auto
|
154
|
+
left: auto
|
155
|
+
top: auto
|
156
|
+
box-shadow: 0px 0px 5px #AAA
|
157
|
+
|
158
|
+
// Root Element
|
159
|
+
.root-element
|
160
|
+
+root-element
|
161
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kickstart_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.410965837961
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Kochanowicz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|