style-guide 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.env +1 -0
- data/.travis.yml +1 -0
- data/Guardfile +2 -0
- data/Procfile +1 -0
- data/app/assets/stylesheets/style_guide/example.css +39 -11
- data/app/assets/stylesheets/style_guide/header.css +8 -2
- data/app/assets/stylesheets/style_guide/layout.css +34 -9
- data/app/assets/stylesheets/style_guide/navbar.css +2 -1
- data/app/assets/stylesheets/style_guide/sidebar.css +6 -1
- data/app/views/style_guide/buttons/_disabled_anchor.erb +2 -0
- data/app/views/style_guide/buttons/_disabled_element.erb +2 -0
- data/app/views/style_guide/buttons/_sizes.erb +4 -0
- data/app/views/style_guide/buttons/_types.erb +8 -0
- data/app/views/style_guide/{bootstrap_base/_form_controls:_checkbox_and_radio.erb → forms/_controls:_checkbox_and_radio.erb} +0 -0
- data/app/views/style_guide/{bootstrap_base/_form_controls:_input.erb → forms/_controls:_input.erb} +0 -0
- data/app/views/style_guide/{bootstrap_base/_form_controls:_select.erb → forms/_controls:_select.erb} +0 -0
- data/app/views/style_guide/{bootstrap_base/_form_controls:_textarea.erb → forms/_controls:_textarea.erb} +0 -0
- data/app/views/style_guide/{bootstrap_base/_forms:_default_styles.erb → forms/_default_styles.erb} +0 -0
- data/app/views/style_guide/{bootstrap_base/_forms:_horizontal.erb → forms/_horizontal.erb} +0 -0
- data/app/views/style_guide/{bootstrap_base/_forms:_inline.erb → forms/_inline.erb} +0 -0
- data/app/views/style_guide/{bootstrap_base/_forms:_search.erb → forms/_search.erb} +0 -0
- data/app/views/style_guide/images/_dropdown_icons.erb +9 -0
- data/app/views/style_guide/images/_form_fields.erb +10 -0
- data/app/views/style_guide/images/_icon_buttons.erb +4 -0
- data/app/views/style_guide/images/_navigation.erb +8 -0
- data/app/views/style_guide/images/_placeholders.erb +3 -0
- data/app/views/style_guide/images/_small_button.erb +1 -0
- data/app/views/style_guide/style/_example.erb +12 -5
- data/app/views/style_guide/style/_sidebar.erb +7 -5
- data/app/views/style_guide/style/show.html.erb +1 -3
- data/app/views/style_guide/tables/_bordered.erb +34 -0
- data/app/views/style_guide/tables/_condensed.erb +29 -0
- data/app/views/style_guide/tables/_default_style.erb +24 -0
- data/app/views/style_guide/tables/_hover.erb +29 -0
- data/app/views/style_guide/tables/_row_classes.erb +36 -0
- data/app/views/style_guide/tables/_striped.erb +30 -0
- data/app/views/style_guide/typography/_abbreviation.erb +4 -0
- data/app/views/style_guide/typography/_address.erb +10 -0
- data/app/views/style_guide/typography/_blockquote.erb +14 -0
- data/app/views/style_guide/typography/_body_copy.erb +12 -0
- data/app/views/style_guide/{bootstrap_base/_code:_blocks.erb → typography/_code.erb} +3 -0
- data/app/views/style_guide/typography/_description_list.erb +17 -0
- data/app/views/style_guide/typography/_emphasis.erb +5 -0
- data/app/views/style_guide/typography/_emphasis_classes.erb +5 -0
- data/app/views/style_guide/typography/_headings.erb +6 -0
- data/app/views/style_guide/typography/_ordered_list.erb +4 -0
- data/app/views/style_guide/typography/_unordered_list.erb +15 -0
- data/config/locales/en.yml +88 -36
- data/lib/style_guide/config.rb +18 -2
- data/lib/style_guide/partial.rb +40 -3
- data/lib/style_guide/section.rb +1 -1
- data/lib/style_guide/version.rb +1 -1
- data/spec/dummy/app/assets/stylesheets/swatches.css +0 -1
- data/spec/dummy/config/application.rb +1 -1
- data/spec/dummy/config/environments/development.rb +2 -0
- data/spec/lib/style_guide/config_spec.rb +18 -3
- data/spec/lib/style_guide/partial_spec.rb +49 -1
- data/style-guide.gemspec +5 -7
- metadata +58 -56
- data/Gemfile.lock +0 -159
- data/app/views/style_guide/bootstrap_base/_button:_disabled_anchor.erb +0 -2
- data/app/views/style_guide/bootstrap_base/_button:_disabled_element.erb +0 -2
- data/app/views/style_guide/bootstrap_base/_button_sizes.erb +0 -16
- data/app/views/style_guide/bootstrap_base/_button_types.erb +0 -51
- data/app/views/style_guide/bootstrap_base/_code:_inline.erb +0 -1
- data/app/views/style_guide/bootstrap_base/_images.erb +0 -136
- data/app/views/style_guide/bootstrap_base/_tables.erb +0 -409
- data/app/views/style_guide/bootstrap_base/_typography.erb +0 -331
data/.travis.yml
CHANGED
@@ -5,6 +5,7 @@ env:
|
|
5
5
|
global:
|
6
6
|
secure: "bQg1DmRx33r7EQTMcZlgc0F9o7q0puzF2ErTOQoZgZQCq5FHhKRwR+lHXmmb\ncolCx2CPrgGa9LT1pLNxApdZVhxLHMUa8Cd7vieem1Spr83km5VRx1CAIFLz\nOztkyIOpQ48ofbr5sJzP8tdV3pNRnFolCi68sbNKbFxIeXp2Zk0="
|
7
7
|
after_script:
|
8
|
+
- bundle install
|
8
9
|
- gem install heroku
|
9
10
|
- git remote add heroku git@heroku.com:swivel.git
|
10
11
|
- echo "Host heroku.com" >> ~/.ssh/config
|
data/Guardfile
CHANGED
data/Procfile
CHANGED
@@ -20,50 +20,78 @@
|
|
20
20
|
color: #5D5C5C;
|
21
21
|
}
|
22
22
|
|
23
|
+
.style-guide-identifiers code,
|
23
24
|
.style-guide-example-description code {
|
24
|
-
white-space: nowrap;
|
25
25
|
color: #d14;
|
26
26
|
background-color: #f5f5f5;
|
27
|
-
padding:
|
27
|
+
padding: 0 4px;
|
28
28
|
border: 1px solid #ddd;
|
29
29
|
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
|
30
|
+
white-space: nowrap;
|
30
31
|
-webkit-border-radius: 0;
|
31
32
|
-moz-border-radius: 0;
|
32
33
|
border-radius: 0;
|
33
34
|
}
|
34
35
|
|
35
|
-
.style-guide-example
|
36
|
+
.style-guide-example,
|
37
|
+
.style-guide-identifiers {
|
36
38
|
position: relative;
|
37
|
-
padding: 10px
|
38
|
-
|
39
|
+
padding: 27px 15px 10px 15px;
|
40
|
+
overflow: hidden;
|
41
|
+
|
39
42
|
background-color: #fff;
|
40
43
|
border: 1px solid #f5f5f5;
|
41
|
-
overflow: hidden;
|
42
44
|
}
|
43
45
|
|
44
|
-
.style-guide-example
|
45
|
-
|
46
|
+
.style-guide-example + .style-guide-identifiers {
|
47
|
+
border-top-width: 0;
|
48
|
+
}
|
49
|
+
|
50
|
+
.style-guide-example:after,
|
51
|
+
.style-guide-identifiers:after {
|
46
52
|
position: absolute;
|
47
53
|
top: -1px;
|
48
54
|
left: -1px;
|
49
55
|
padding: 0 5px;
|
56
|
+
|
57
|
+
border: 1px solid #ddd;
|
58
|
+
|
50
59
|
font-size: 11px;
|
51
60
|
line-height: 18px;
|
52
61
|
height: 18px;
|
53
62
|
font-weight: 100;
|
54
63
|
background-color: #f5f5f5;
|
55
|
-
border: 1px solid #ddd;
|
56
64
|
color: #888;
|
57
65
|
opacity: 0.75;
|
58
66
|
}
|
59
67
|
|
68
|
+
.style-guide-example:after {
|
69
|
+
content: "Example";
|
70
|
+
}
|
71
|
+
|
72
|
+
.style-guide-identifiers:after {
|
73
|
+
content: "Identifiers";
|
74
|
+
}
|
75
|
+
|
60
76
|
.style-guide-partial .style-guide-example-source {
|
77
|
+
white-space: pre;
|
78
|
+
word-wrap: normal;
|
61
79
|
margin-top: 0;
|
62
|
-
padding: 10px
|
80
|
+
padding: 10px 10px 10px 14px;
|
63
81
|
background: #f5f5f5;
|
64
82
|
border-color: #ddd;
|
65
|
-
overflow-x:
|
83
|
+
overflow-x: auto;
|
66
84
|
-webkit-border-radius: 0;
|
67
85
|
-moz-border-radius: 0;
|
68
86
|
border-radius: 0;
|
69
87
|
}
|
88
|
+
|
89
|
+
.style-guide-example-source {
|
90
|
+
display: none;
|
91
|
+
}
|
92
|
+
|
93
|
+
@media (min-width: 720px) {
|
94
|
+
.style-guide-example-source {
|
95
|
+
display: block;
|
96
|
+
}
|
97
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
.style-guide-header {
|
2
|
-
padding:
|
2
|
+
padding: 40px 0 25px 0;
|
3
3
|
color: white;
|
4
4
|
text-align: center;
|
5
5
|
text-shadow: 0 1px 3px rgba(0,0,0,.3), 0 0 20px rgba(0,0,0,.075);
|
@@ -11,7 +11,7 @@
|
|
11
11
|
}
|
12
12
|
|
13
13
|
.style-guide-header h1 {
|
14
|
-
font-size:
|
14
|
+
font-size: 50px;
|
15
15
|
font-weight: bold;
|
16
16
|
letter-spacing: -1px;
|
17
17
|
line-height: 1;
|
@@ -19,8 +19,14 @@
|
|
19
19
|
}
|
20
20
|
|
21
21
|
@media (min-width: 480px) {
|
22
|
+
.style-guide-header {
|
23
|
+
padding: 60px 0 40px 0;
|
24
|
+
}
|
25
|
+
|
22
26
|
.style-guide-header h1 {
|
27
|
+
font-size: 60px;
|
23
28
|
text-align: left;
|
29
|
+
text-indent: 10px;
|
24
30
|
}
|
25
31
|
}
|
26
32
|
|
@@ -10,16 +10,13 @@ body {
|
|
10
10
|
margin: 0 auto;
|
11
11
|
}
|
12
12
|
|
13
|
-
@media (min-width:
|
14
|
-
.style-guide-content .style-guide-sidebar {
|
15
|
-
width: 288px;
|
16
|
-
}
|
17
|
-
}
|
18
|
-
|
19
|
-
@media (min-width: 960px) {
|
13
|
+
@media (min-width: 720px) {
|
20
14
|
.style-guide-content {
|
21
|
-
|
22
|
-
|
15
|
+
position: relative;
|
16
|
+
}
|
17
|
+
|
18
|
+
.style-guide-content .style-guide-sidebar {
|
19
|
+
width: 190px;
|
23
20
|
}
|
24
21
|
|
25
22
|
.style-guide-content .style-guide-sidebar {
|
@@ -31,6 +28,34 @@ body {
|
|
31
28
|
top: 0;
|
32
29
|
}
|
33
30
|
|
31
|
+
.style-guide-content .style-guide-sections {
|
32
|
+
width: 522px;
|
33
|
+
margin-left: 190px;
|
34
|
+
float: left;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
@media (min-width: 840px) {
|
39
|
+
.style-guide-content .style-guide-sidebar {
|
40
|
+
width: 239px;
|
41
|
+
}
|
42
|
+
|
43
|
+
.style-guide-content .style-guide-sections {
|
44
|
+
width: 601px;
|
45
|
+
margin-left: 239px;
|
46
|
+
float: left;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
@media (min-width: 960px) {
|
51
|
+
.style-guide-content {
|
52
|
+
width: 960px;
|
53
|
+
}
|
54
|
+
|
55
|
+
.style-guide-content .style-guide-sidebar {
|
56
|
+
width: 288px;
|
57
|
+
}
|
58
|
+
|
34
59
|
.style-guide-content .style-guide-sections {
|
35
60
|
width: 672px;
|
36
61
|
margin-left: 288px;
|
@@ -88,7 +88,7 @@
|
|
88
88
|
color: #f5f5f5;
|
89
89
|
}
|
90
90
|
|
91
|
-
@media (min-width:
|
91
|
+
@media (min-width: 720px) {
|
92
92
|
.style-guide-bar label {
|
93
93
|
display: none;
|
94
94
|
}
|
@@ -128,6 +128,7 @@
|
|
128
128
|
.style-guide-bar .active a,
|
129
129
|
.style-guide-bar li a:hover {
|
130
130
|
background-color: #ddd;
|
131
|
+
color: #888;
|
131
132
|
}
|
132
133
|
|
133
134
|
.style-guide-bar .active a:hover,
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<p><button class="btn">Standard gray button</button>
|
2
|
+
<p><button class="btn btn-primary">Primary action in a group</button>
|
3
|
+
<p><button class="btn btn-info">Alternative to the default</button>
|
4
|
+
<p><button class="btn btn-success">Successful action</button>
|
5
|
+
<p><button class="btn btn-warning">Caution should be taken</button>
|
6
|
+
<p><button class="btn btn-danger">Dangerous or negative action</button>
|
7
|
+
<p><button class="btn btn-inverse">Alternate dark button</button>
|
8
|
+
<p><button class="btn btn-link">Make a button look like a link</button>
|
File without changes
|
data/app/views/style_guide/{bootstrap_base/_form_controls:_input.erb → forms/_controls:_input.erb}
RENAMED
File without changes
|
data/app/views/style_guide/{bootstrap_base/_form_controls:_select.erb → forms/_controls:_select.erb}
RENAMED
File without changes
|
File without changes
|
data/app/views/style_guide/{bootstrap_base/_forms:_default_styles.erb → forms/_default_styles.erb}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<a class="btn btn-primary" href="#"><i class="icon-user icon-white"></i> User</a>
|
2
|
+
<a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
|
3
|
+
<ul class="dropdown-menu">
|
4
|
+
<li><a href="#"><i class="icon-pencil"></i> Edit</a></li>
|
5
|
+
<li><a href="#"><i class="icon-trash"></i> Delete</a></li>
|
6
|
+
<li><a href="#"><i class="icon-ban-circle"></i> Ban</a></li>
|
7
|
+
<li class="divider"></li>
|
8
|
+
<li><a href="#"><i class="i"></i> Make admin</a></li>
|
9
|
+
</ul>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<form class="form-horizontal">
|
2
|
+
<div class="control-group">
|
3
|
+
<label class="control-label" for="inputIcon">Email address</label>
|
4
|
+
<div class="controls">
|
5
|
+
<div class="input-prepend">
|
6
|
+
<span class="add-on"><i class="icon-envelope"></i></span><input class="span2" id="inputIcon" type="text">
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
</form>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<div class="well" style="padding: 8px 0; margin-bottom: 0;">
|
2
|
+
<ul class="nav nav-list">
|
3
|
+
<li class="active"><a href="#"><i class="icon-home icon-white"></i> Home</a></li>
|
4
|
+
<li><a href="#"><i class="icon-book"></i> Library</a></li>
|
5
|
+
<li><a href="#"><i class="icon-pencil"></i> Applications</a></li>
|
6
|
+
<li><a href="#"><i class="i"></i> Misc</a></li>
|
7
|
+
</ul>
|
8
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<a class="btn btn-small" href="#"><i class="icon-star"></i></a>
|
@@ -1,10 +1,17 @@
|
|
1
1
|
<div class="style-guide-partial" id="<%= partial.id %>">
|
2
2
|
<div class="style-guide-example-header"><%= partial.title %></div>
|
3
|
+
<% if partial.description %>
|
3
4
|
<div class="style-guide-example-description">
|
4
|
-
|
5
|
+
<%= partial.description.html_safe %>
|
5
6
|
</div>
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
<% end %>
|
8
|
+
<div class="style-guide-example"><%= render :file => partial.path %></div>
|
9
|
+
<% if partial.identifiers.any? %>
|
10
|
+
<div class="style-guide-identifiers">
|
11
|
+
<% partial.identifiers.each do |identifier_name| %>
|
12
|
+
<code><%= identifier_name %></code>
|
13
|
+
<% end %>
|
14
|
+
</div>
|
15
|
+
<% end %>
|
16
|
+
<pre class="style-guide-example-source prettyprint linenums"><%= partial.content %></pre>
|
10
17
|
</div>
|
@@ -1,5 +1,7 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<div class="style-guide-sidebar">
|
2
|
+
<ul>
|
3
|
+
<% @active.partials.each do |partial| %>
|
4
|
+
<li><a href="#<%= partial.id %>"><i>›</i> <%= partial.title %></a></li>
|
5
|
+
<% end %>
|
6
|
+
</ul>
|
7
|
+
</div>
|
@@ -1,9 +1,7 @@
|
|
1
1
|
<%= render :partial => "header" %>
|
2
2
|
|
3
3
|
<div class="style-guide-content">
|
4
|
-
|
5
|
-
<%= render :partial => "sidebar" %>
|
6
|
-
</div>
|
4
|
+
<%= render :partial => "sidebar" %>
|
7
5
|
|
8
6
|
<div class="style-guide-sections">
|
9
7
|
<% @active.partials.each do |partial| %>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<table class="table table-bordered">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th>#</th>
|
5
|
+
<th>First Name</th>
|
6
|
+
<th>Last Name</th>
|
7
|
+
<th>Username</th>
|
8
|
+
</tr>
|
9
|
+
</thead>
|
10
|
+
<tbody>
|
11
|
+
<tr>
|
12
|
+
<td rowspan="2">1</td>
|
13
|
+
<td>Mark</td>
|
14
|
+
<td>Otto</td>
|
15
|
+
<td>@mdo</td>
|
16
|
+
</tr>
|
17
|
+
<tr>
|
18
|
+
<td>Mark</td>
|
19
|
+
<td>Otto</td>
|
20
|
+
<td>@TwBootstrap</td>
|
21
|
+
</tr>
|
22
|
+
<tr>
|
23
|
+
<td>2</td>
|
24
|
+
<td>Jacob</td>
|
25
|
+
<td>Thornton</td>
|
26
|
+
<td>@fat</td>
|
27
|
+
</tr>
|
28
|
+
<tr>
|
29
|
+
<td>3</td>
|
30
|
+
<td colspan="2">Larry the Bird</td>
|
31
|
+
<td>@twitter</td>
|
32
|
+
</tr>
|
33
|
+
</tbody>
|
34
|
+
</table>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<table class="table table-condensed">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th>#</th>
|
5
|
+
<th>First Name</th>
|
6
|
+
<th>Last Name</th>
|
7
|
+
<th>Username</th>
|
8
|
+
</tr>
|
9
|
+
</thead>
|
10
|
+
<tbody>
|
11
|
+
<tr>
|
12
|
+
<td>1</td>
|
13
|
+
<td>Mark</td>
|
14
|
+
<td>Otto</td>
|
15
|
+
<td>@mdo</td>
|
16
|
+
</tr>
|
17
|
+
<tr>
|
18
|
+
<td>2</td>
|
19
|
+
<td>Jacob</td>
|
20
|
+
<td>Thornton</td>
|
21
|
+
<td>@fat</td>
|
22
|
+
</tr>
|
23
|
+
<tr>
|
24
|
+
<td>3</td>
|
25
|
+
<td colspan="2">Larry the Bird</td>
|
26
|
+
<td>@twitter</td>
|
27
|
+
</tr>
|
28
|
+
</tbody>
|
29
|
+
</table>
|