blocks 3.0.0.rc4 → 3.0.0.rc5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -2
- data/.ruby-version +1 -0
- data/.travis.yml +3 -0
- data/CHANGELOG.rdoc +7 -0
- data/Gemfile +10 -3
- data/README.md +25 -9
- data/_config.yml +20 -0
- data/bin/deploy_docs +2 -0
- data/docs/.gitignore +4 -0
- data/docs/404.html +23 -0
- data/docs/_includes/acknowledgements.md +13 -0
- data/docs/_includes/caller-id.md +3 -0
- data/docs/_includes/configuration.md +3 -0
- data/docs/_includes/custom-builders.md +3 -0
- data/docs/_includes/defining.md +615 -0
- data/docs/_includes/demos/hooks-and-wrappers-output.html +109 -0
- data/docs/_includes/hooks.md +1156 -0
- data/docs/_includes/installation.md +25 -0
- data/docs/_includes/introduction.md +18 -0
- data/docs/_includes/option-merging.md +5 -0
- data/docs/_includes/rendering.md +622 -0
- data/docs/_includes/reserved-keywords.md +59 -0
- data/docs/_includes/skipping.md +403 -0
- data/docs/_includes/slate/assets.html +34 -0
- data/docs/_includes/slate/language-tabs.html +11 -0
- data/docs/_includes/templating.md +48 -0
- data/docs/_includes/templating/bootstrap_4_cards.md +753 -0
- data/docs/_includes/use-cases.md +23 -0
- data/docs/_includes/wip.md +34 -0
- data/docs/_includes/wrappers.md +629 -0
- data/docs/_layouts/slate.html +75 -0
- data/docs/_plugins/gem_version.rb +11 -0
- data/docs/_plugins/highlight_with_div.rb +25 -0
- data/docs/_sass/_default_styling.scss +627 -0
- data/docs/_sass/_icon-font.scss +26 -0
- data/docs/_sass/_normalize.scss +427 -0
- data/docs/_sass/_styling_overrides.scss +31 -0
- data/docs/_sass/_syntax.scss +78 -0
- data/docs/_sass/_variable_overrides.scss +10 -0
- data/docs/_sass/_variables.scss +105 -0
- data/docs/assets/javascripts/script.js +18 -0
- data/docs/assets/stylesheets/formChanges.less +106 -0
- data/docs/assets/stylesheets/style.css +46 -0
- data/docs/fonts/slate.eot +0 -0
- data/docs/fonts/slate.svg +14 -0
- data/docs/fonts/slate.ttf +0 -0
- data/docs/fonts/slate.woff +0 -0
- data/docs/fonts/slate.woff2 +0 -0
- data/docs/hooks.html +149 -0
- data/docs/hooks_and_wrappers_demo.html +313 -0
- data/docs/images/favicon.ico +0 -0
- data/docs/images/logo.png +0 -0
- data/docs/images/navbar.png +0 -0
- data/docs/images/placeholder.jpg +0 -0
- data/docs/images/render_strategies.png +0 -0
- data/docs/images/templating.png +0 -0
- data/docs/index.md +32 -0
- data/docs/javascripts/all.js +4 -0
- data/docs/javascripts/all_nosearch.js +3 -0
- data/docs/javascripts/app/lang.js +166 -0
- data/docs/javascripts/app/search.js +75 -0
- data/docs/javascripts/app/toc.js +57 -0
- data/docs/javascripts/demos/hooks_and_wrappers.js +9 -0
- data/docs/javascripts/lib/energize.js +169 -0
- data/docs/javascripts/lib/imagesloaded.min.js +7 -0
- data/docs/javascripts/lib/jquery.highlight.js +108 -0
- data/docs/javascripts/lib/jquery.js +9831 -0
- data/docs/javascripts/lib/jquery.tocify.js +1042 -0
- data/docs/javascripts/lib/jquery_ui.js +566 -0
- data/docs/javascripts/lib/lunr.js +1910 -0
- data/docs/stylesheets/demos/hooks_and_wrappers.scss +32 -0
- data/docs/stylesheets/print.scss +150 -0
- data/docs/stylesheets/screen.scss +10 -0
- data/lib/blocks/action_view_extensions/view_extensions.rb +1 -0
- data/lib/blocks/renderers/renderer.rb +1 -0
- data/lib/blocks/renderers/runtime_context.rb +30 -17
- data/lib/blocks/utilities/hash_with_render_strategy.rb +3 -0
- data/lib/blocks/version.rb +1 -1
- metadata +70 -2
@@ -0,0 +1,75 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
{% comment %}
|
3
|
+
Copyright 2008-2013 Concur Technologies, Inc.
|
4
|
+
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
not use this file except in compliance with the License. You may obtain
|
7
|
+
a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
13
|
+
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
14
|
+
License for the specific language governing permissions and limitations
|
15
|
+
under the License.
|
16
|
+
{% endcomment %}
|
17
|
+
{% if site.github %}
|
18
|
+
{% assign site_url = site.github.url | default: site.url %}
|
19
|
+
{% else %}
|
20
|
+
{% assign site_url = site.url %}
|
21
|
+
{% endif %}
|
22
|
+
{% assign language_tabs = page.language_tabs %}
|
23
|
+
{% assign images_url = '/' | prepend: site.images_dir | prepend: '/' | prepend: site_url %}
|
24
|
+
<html>
|
25
|
+
<head>
|
26
|
+
<meta charset="utf-8">
|
27
|
+
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
28
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
29
|
+
<title>{{ page.title | default: "API Documentation" | prepend: ' - ' | prepend: site.title }}</title>
|
30
|
+
|
31
|
+
{% include slate/assets.html site_url=site_url %}
|
32
|
+
</head>
|
33
|
+
|
34
|
+
<body class="{{ page_classes }}" data-languages='{{ language_tabs | jsonify }}'>
|
35
|
+
<a href="#" id="nav-button">
|
36
|
+
<span>
|
37
|
+
NAV
|
38
|
+
<img src="{{ 'navbar.png' | prepend: images_url }}">
|
39
|
+
</span>
|
40
|
+
</a>
|
41
|
+
<div class="tocify-wrapper">
|
42
|
+
<img src="{{ 'logo.png' | prepend: images_url }}">
|
43
|
+
{% include slate/language-tabs.html languages=language_tabs %}
|
44
|
+
{% if page.search %}
|
45
|
+
<div class="search">
|
46
|
+
<input type="text" class="search" id="input-search" placeholder="Search">
|
47
|
+
</div>
|
48
|
+
<ul class="search-results"></ul>
|
49
|
+
{% endif %}
|
50
|
+
<div id="toc">
|
51
|
+
</div>
|
52
|
+
{% if page.toc_footers %}
|
53
|
+
<ul class="toc-footer">
|
54
|
+
{% for footer in page.toc_footers %}
|
55
|
+
<li>{{ footer }}</li>
|
56
|
+
{% endfor %}
|
57
|
+
</ul>
|
58
|
+
{% endif %}
|
59
|
+
</div>
|
60
|
+
<div class="page-wrapper">
|
61
|
+
<div class="dark-box"></div>
|
62
|
+
<div class="content">
|
63
|
+
{{ content }}
|
64
|
+
{% if page.includes %}
|
65
|
+
{% for inc in page.includes %}
|
66
|
+
{% capture md %}{% include {{ inc }}.md %}{% endcapture %}{{ md | markdownify }}
|
67
|
+
{% endfor %}
|
68
|
+
{% endif %}
|
69
|
+
</div>
|
70
|
+
<div class="dark-box">
|
71
|
+
{% include slate/language-tabs.html languages=language_tabs %}
|
72
|
+
</div>
|
73
|
+
</div>
|
74
|
+
</body>
|
75
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# jekyll_inline_highlight
|
2
|
+
#
|
3
|
+
# A Liquid tag for inline syntax highlighting in Jekyll
|
4
|
+
#
|
5
|
+
# https://github.com/bdesham/inline_highlight
|
6
|
+
#
|
7
|
+
# Copyright (c) 2014-2015, Tom Preston-Werner and Benjamin Esham
|
8
|
+
# See README.md for full copyright information.
|
9
|
+
|
10
|
+
module Jekyll
|
11
|
+
class HighlightWithDivBlock < Tags::HighlightBlock
|
12
|
+
|
13
|
+
def add_code_tag(code)
|
14
|
+
# code_attributes = [
|
15
|
+
# "class=\"language-#{@lang.to_s.tr("+", "-")}\"",
|
16
|
+
# "data-lang=\"#{@lang}\"",
|
17
|
+
# ].join(" ")
|
18
|
+
code_attributes = "class=\"highlighter-rouge\""
|
19
|
+
"<div #{code_attributes}><pre class=\"highlight\"><code>"\
|
20
|
+
"#{code.chomp}</code></pre></div>"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
Liquid::Template.register_tag('highlight', Jekyll::HighlightWithDivBlock)
|
@@ -0,0 +1,627 @@
|
|
1
|
+
/*
|
2
|
+
Copyright 2008-2013 Concur Technologies, Inc.
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may
|
5
|
+
not use this file except in compliance with the License. You may obtain
|
6
|
+
a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
License for the specific language governing permissions and limitations
|
14
|
+
under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
////////////////////////////////////////////////////////////////////////////////
|
18
|
+
// GENERAL STUFF
|
19
|
+
////////////////////////////////////////////////////////////////////////////////
|
20
|
+
|
21
|
+
html, body {
|
22
|
+
color: $main-text;
|
23
|
+
padding: 0;
|
24
|
+
margin: 0;
|
25
|
+
-webkit-font-smoothing: antialiased;
|
26
|
+
-moz-osx-font-smoothing: grayscale;
|
27
|
+
@extend %default-font;
|
28
|
+
background-color: $main-bg;
|
29
|
+
height: 100%;
|
30
|
+
-webkit-text-size-adjust: none; /* Never autoresize text */
|
31
|
+
}
|
32
|
+
|
33
|
+
////////////////////////////////////////////////////////////////////////////////
|
34
|
+
// TABLE OF CONTENTS
|
35
|
+
////////////////////////////////////////////////////////////////////////////////
|
36
|
+
|
37
|
+
#toc > ul > li > a > span {
|
38
|
+
float: right;
|
39
|
+
background-color: #2484FF;
|
40
|
+
border-radius: 40px;
|
41
|
+
width: 20px;
|
42
|
+
}
|
43
|
+
|
44
|
+
@mixin embossed-bg {
|
45
|
+
background:
|
46
|
+
linear-gradient(to bottom, rgba(#000, 0.2), rgba(#000, 0) 8px),
|
47
|
+
linear-gradient(to top, rgba(#000, 0.2), rgba(#000, 0) 8px),
|
48
|
+
linear-gradient(to bottom, rgba($nav-embossed-border-top, 1), rgba($nav-embossed-border-top, 0) 1.5px),
|
49
|
+
linear-gradient(to top, rgba($nav-embossed-border-bottom, 1), rgba($nav-embossed-border-bottom, 0) 1.5px),
|
50
|
+
$nav-subitem-bg;
|
51
|
+
}
|
52
|
+
|
53
|
+
.tocify-wrapper {
|
54
|
+
transition: left 0.3s ease-in-out;
|
55
|
+
|
56
|
+
overflow-y: auto;
|
57
|
+
overflow-x: hidden;
|
58
|
+
position: fixed;
|
59
|
+
z-index: 30;
|
60
|
+
top: 0;
|
61
|
+
left: 0;
|
62
|
+
bottom: 0;
|
63
|
+
width: $nav-width;
|
64
|
+
background-color: $nav-bg;
|
65
|
+
font-size: 13px;
|
66
|
+
font-weight: bold;
|
67
|
+
|
68
|
+
// language selector for mobile devices
|
69
|
+
.lang-selector {
|
70
|
+
display: none;
|
71
|
+
a {
|
72
|
+
padding-top: 0.5em;
|
73
|
+
padding-bottom: 0.5em;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
// This is the logo at the top of the ToC
|
78
|
+
&>img {
|
79
|
+
display: block;
|
80
|
+
max-width: 100%;
|
81
|
+
}
|
82
|
+
|
83
|
+
&>.search {
|
84
|
+
position: relative;
|
85
|
+
|
86
|
+
input {
|
87
|
+
background: $nav-bg;
|
88
|
+
border-width: 0 0 1px 0;
|
89
|
+
border-color: $search-box-border-color;
|
90
|
+
padding: 6px 0 6px 20px;
|
91
|
+
box-sizing: border-box;
|
92
|
+
margin: $nav-v-padding $nav-padding;
|
93
|
+
width: $nav-width - 30;
|
94
|
+
outline: none;
|
95
|
+
color: $nav-text;
|
96
|
+
border-radius: 0; /* ios has a default border radius */
|
97
|
+
}
|
98
|
+
|
99
|
+
&:before {
|
100
|
+
position: absolute;
|
101
|
+
top: 17px;
|
102
|
+
left: $nav-padding;
|
103
|
+
color: $nav-text;
|
104
|
+
@extend %icon-search;
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
img+.tocify {
|
109
|
+
margin-top: $logo-margin;
|
110
|
+
}
|
111
|
+
|
112
|
+
.search-results {
|
113
|
+
margin-top: 0;
|
114
|
+
box-sizing: border-box;
|
115
|
+
height: 0;
|
116
|
+
overflow-y: auto;
|
117
|
+
overflow-x: hidden;
|
118
|
+
transition-property: height, margin;
|
119
|
+
transition-duration: 180ms;
|
120
|
+
transition-timing-function: ease-in-out;
|
121
|
+
&.visible {
|
122
|
+
height: 30%;
|
123
|
+
margin-bottom: 1em;
|
124
|
+
}
|
125
|
+
|
126
|
+
@include embossed-bg;
|
127
|
+
|
128
|
+
li {
|
129
|
+
margin: 1em $nav-padding;
|
130
|
+
line-height: 1;
|
131
|
+
}
|
132
|
+
|
133
|
+
a {
|
134
|
+
color: $nav-text;
|
135
|
+
text-decoration: none;
|
136
|
+
|
137
|
+
&:hover {
|
138
|
+
text-decoration: underline;
|
139
|
+
}
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
|
144
|
+
.tocify-item>a, .toc-footer li {
|
145
|
+
padding: 0 $nav-padding 0 $nav-padding;
|
146
|
+
display: block;
|
147
|
+
overflow-x: hidden;
|
148
|
+
white-space: nowrap;
|
149
|
+
text-overflow: ellipsis;
|
150
|
+
}
|
151
|
+
|
152
|
+
// The Table of Contents is composed of multiple nested
|
153
|
+
// unordered lists. These styles remove the default
|
154
|
+
// styling of an unordered list because it is ugly.
|
155
|
+
ul, li {
|
156
|
+
list-style: none;
|
157
|
+
margin: 0;
|
158
|
+
padding: 0;
|
159
|
+
line-height: 28px;
|
160
|
+
}
|
161
|
+
|
162
|
+
li {
|
163
|
+
color: $nav-text;
|
164
|
+
transition-property: background;
|
165
|
+
transition-timing-function: linear;
|
166
|
+
transition-duration: 230ms;
|
167
|
+
}
|
168
|
+
|
169
|
+
// This is the currently selected ToC entry
|
170
|
+
.tocify-focus {
|
171
|
+
// box-shadow: 0px 1px 0px $nav-active-shadow;
|
172
|
+
background-color: $nav-active-bg;
|
173
|
+
color: $nav-active-text;
|
174
|
+
}
|
175
|
+
|
176
|
+
// Subheaders are the submenus that slide open
|
177
|
+
// in the table of contents.
|
178
|
+
.tocify-subheader {
|
179
|
+
display: none; // tocify will override this when needed
|
180
|
+
background-color: $nav-subitem-bg;
|
181
|
+
font-weight: 500;
|
182
|
+
.tocify-item>a {
|
183
|
+
padding-left: $nav-padding + $nav-indent;
|
184
|
+
font-size: 12px;
|
185
|
+
}
|
186
|
+
|
187
|
+
// for embossed look:
|
188
|
+
@include embossed-bg;
|
189
|
+
&>li:last-child {
|
190
|
+
box-shadow: none; // otherwise it'll overflow out of the subheader
|
191
|
+
}
|
192
|
+
}
|
193
|
+
|
194
|
+
.toc-footer {
|
195
|
+
padding: 1em 0;
|
196
|
+
margin-top: 1em;
|
197
|
+
border-top: 1px dashed $nav-footer-border-color;
|
198
|
+
|
199
|
+
li,a {
|
200
|
+
color: $nav-text;
|
201
|
+
text-decoration: none;
|
202
|
+
}
|
203
|
+
|
204
|
+
a:hover {
|
205
|
+
text-decoration: underline;
|
206
|
+
}
|
207
|
+
|
208
|
+
li {
|
209
|
+
font-size: 0.8em;
|
210
|
+
line-height: 1.7;
|
211
|
+
text-decoration: none;
|
212
|
+
}
|
213
|
+
}
|
214
|
+
|
215
|
+
}
|
216
|
+
|
217
|
+
// button to show navigation on mobile devices
|
218
|
+
#nav-button {
|
219
|
+
span {
|
220
|
+
display: block;
|
221
|
+
$side-pad: $main-padding / 2 - 8px;
|
222
|
+
padding: $side-pad $side-pad $side-pad;
|
223
|
+
background-color: rgba($main-bg, 0.7);
|
224
|
+
transform-origin: 0 0;
|
225
|
+
transform: rotate(-90deg) translate(-100%, 0);
|
226
|
+
border-radius: 0 0 0 5px;
|
227
|
+
}
|
228
|
+
padding: 0 1.5em 5em 0; // increase touch size area
|
229
|
+
display: none;
|
230
|
+
position: fixed;
|
231
|
+
top: 0;
|
232
|
+
left: 0;
|
233
|
+
z-index: 100;
|
234
|
+
color: #000;
|
235
|
+
text-decoration: none;
|
236
|
+
font-weight: bold;
|
237
|
+
opacity: 0.7;
|
238
|
+
line-height: 16px;
|
239
|
+
img {
|
240
|
+
height: 16px;
|
241
|
+
vertical-align: bottom;
|
242
|
+
}
|
243
|
+
|
244
|
+
transition: left 0.3s ease-in-out;
|
245
|
+
|
246
|
+
&:hover { opacity: 1; }
|
247
|
+
&.open {left: $nav-width}
|
248
|
+
}
|
249
|
+
|
250
|
+
|
251
|
+
////////////////////////////////////////////////////////////////////////////////
|
252
|
+
// PAGE LAYOUT AND CODE SAMPLE BACKGROUND
|
253
|
+
////////////////////////////////////////////////////////////////////////////////
|
254
|
+
|
255
|
+
.page-wrapper {
|
256
|
+
margin-left: $nav-width;
|
257
|
+
position: relative;
|
258
|
+
z-index: 10;
|
259
|
+
background-color: $main-bg;
|
260
|
+
min-height: 100%;
|
261
|
+
|
262
|
+
padding-bottom: 1px; // prevent margin overflow
|
263
|
+
|
264
|
+
// The dark box is what gives the code samples their dark background.
|
265
|
+
// It sits essentially under the actual content block, which has a
|
266
|
+
// transparent background.
|
267
|
+
// I know, it's hackish, but it's the simplist way to make the left
|
268
|
+
// half of the content always this background color.
|
269
|
+
.dark-box {
|
270
|
+
width: $examples-width;
|
271
|
+
background-color: $examples-bg;
|
272
|
+
position: absolute;
|
273
|
+
right: 0;
|
274
|
+
top: 0;
|
275
|
+
bottom: 0;
|
276
|
+
}
|
277
|
+
|
278
|
+
.lang-selector {
|
279
|
+
position: fixed;
|
280
|
+
z-index: 50;
|
281
|
+
border-bottom: 5px solid $lang-select-active-bg;
|
282
|
+
}
|
283
|
+
}
|
284
|
+
|
285
|
+
.lang-selector {
|
286
|
+
background-color: $lang-select-bg;
|
287
|
+
width: 100%;
|
288
|
+
font-weight: bold;
|
289
|
+
a {
|
290
|
+
display: block;
|
291
|
+
float:left;
|
292
|
+
color: $lang-select-text;
|
293
|
+
text-decoration: none;
|
294
|
+
padding: 0 10px;
|
295
|
+
line-height: 30px;
|
296
|
+
outline: 0;
|
297
|
+
|
298
|
+
&:active, &:focus {
|
299
|
+
background-color: $lang-select-pressed-bg;
|
300
|
+
color: $lang-select-pressed-text;
|
301
|
+
}
|
302
|
+
|
303
|
+
&.active {
|
304
|
+
background-color: $lang-select-active-bg;
|
305
|
+
color: $lang-select-active-text;
|
306
|
+
}
|
307
|
+
}
|
308
|
+
|
309
|
+
&:after {
|
310
|
+
content: '';
|
311
|
+
clear: both;
|
312
|
+
display: block;
|
313
|
+
}
|
314
|
+
}
|
315
|
+
|
316
|
+
////////////////////////////////////////////////////////////////////////////////
|
317
|
+
// CONTENT STYLES
|
318
|
+
////////////////////////////////////////////////////////////////////////////////
|
319
|
+
// This is all the stuff with the light background in the left half of the page
|
320
|
+
|
321
|
+
.content {
|
322
|
+
// to place content above the dark box
|
323
|
+
position: relative;
|
324
|
+
z-index: 30;
|
325
|
+
|
326
|
+
&:after {
|
327
|
+
content: '';
|
328
|
+
display: block;
|
329
|
+
clear: both;
|
330
|
+
}
|
331
|
+
|
332
|
+
&>h1, &>h2, &>h3, &>h4, &>h5, &>h6, &>p, &>table, &>ul, &>ol, &>aside, &>dl {
|
333
|
+
margin-right: $examples-width;
|
334
|
+
padding: 0 $main-padding;
|
335
|
+
box-sizing: border-box;
|
336
|
+
display: block;
|
337
|
+
text-shadow: $main-embossed-text-shadow;
|
338
|
+
|
339
|
+
@extend %left-col;
|
340
|
+
}
|
341
|
+
|
342
|
+
&>ul, &>ol {
|
343
|
+
padding-left: $main-padding + 15px;
|
344
|
+
}
|
345
|
+
|
346
|
+
// the div is the tocify hidden div for placeholding stuff
|
347
|
+
&>h1, &>h2, &>div {
|
348
|
+
clear:both;
|
349
|
+
}
|
350
|
+
|
351
|
+
h1 {
|
352
|
+
@extend %header-font;
|
353
|
+
font-size: 30px;
|
354
|
+
padding-top: 0.5em;
|
355
|
+
padding-bottom: 0.5em;
|
356
|
+
border-bottom: 1px solid #ccc;
|
357
|
+
margin-bottom: $h1-margin-bottom;
|
358
|
+
margin-top: 2em;
|
359
|
+
border-top: 1px solid #ddd;
|
360
|
+
background-image: linear-gradient(to bottom, #fff, #f9f9f9);
|
361
|
+
}
|
362
|
+
|
363
|
+
h1:first-child, div:first-child + h1 {
|
364
|
+
border-top-width: 0;
|
365
|
+
margin-top: 0;
|
366
|
+
}
|
367
|
+
|
368
|
+
h2 {
|
369
|
+
@extend %header-font;
|
370
|
+
font-size: 20px;
|
371
|
+
margin-top: 4em;
|
372
|
+
margin-bottom: 0;
|
373
|
+
border-top: 1px solid #ccc;
|
374
|
+
padding-top: 1.2em;
|
375
|
+
padding-bottom: 1.2em;
|
376
|
+
background-image: linear-gradient(to bottom, rgba(#fff, 0.4), rgba(#fff, 0));
|
377
|
+
}
|
378
|
+
|
379
|
+
// h2s right after h1s should bump right up
|
380
|
+
// against the h1s.
|
381
|
+
h1 + h2, h1 + div + h2 {
|
382
|
+
margin-top: $h1-margin-bottom * -1;
|
383
|
+
border-top: none;
|
384
|
+
}
|
385
|
+
|
386
|
+
h3, h4, h5, h6 {
|
387
|
+
@extend %header-font;
|
388
|
+
font-size: 15px;
|
389
|
+
margin-top: 2.5em;
|
390
|
+
margin-bottom: 0.8em;
|
391
|
+
clear: both;
|
392
|
+
}
|
393
|
+
|
394
|
+
h4, h5, h6 {
|
395
|
+
font-size: 10px;
|
396
|
+
}
|
397
|
+
|
398
|
+
hr {
|
399
|
+
margin: 2em 0;
|
400
|
+
border-top: 2px solid $examples-bg;
|
401
|
+
border-bottom: 2px solid $main-bg;
|
402
|
+
}
|
403
|
+
|
404
|
+
table {
|
405
|
+
margin-bottom: 1em;
|
406
|
+
overflow: auto;
|
407
|
+
th,td {
|
408
|
+
text-align: left;
|
409
|
+
vertical-align: top;
|
410
|
+
line-height: 1.6;
|
411
|
+
}
|
412
|
+
|
413
|
+
th {
|
414
|
+
padding: 5px 10px;
|
415
|
+
border-bottom: 1px solid #ccc;
|
416
|
+
vertical-align: bottom;
|
417
|
+
}
|
418
|
+
|
419
|
+
td {
|
420
|
+
padding: 10px;
|
421
|
+
}
|
422
|
+
|
423
|
+
tr:last-child {
|
424
|
+
border-bottom: 1px solid #ccc;
|
425
|
+
}
|
426
|
+
|
427
|
+
tr:nth-child(odd)>td {
|
428
|
+
background-color: lighten($main-bg,4.2%);
|
429
|
+
}
|
430
|
+
|
431
|
+
tr:nth-child(even)>td {
|
432
|
+
background-color: lighten($main-bg,2.4%);
|
433
|
+
}
|
434
|
+
}
|
435
|
+
|
436
|
+
dt {
|
437
|
+
font-weight: bold;
|
438
|
+
}
|
439
|
+
|
440
|
+
dd {
|
441
|
+
margin-left: 15px;
|
442
|
+
}
|
443
|
+
|
444
|
+
p, li, dt, dd {
|
445
|
+
line-height: 1.6;
|
446
|
+
margin-top: 0;
|
447
|
+
}
|
448
|
+
|
449
|
+
img {
|
450
|
+
max-width: 100%;
|
451
|
+
}
|
452
|
+
|
453
|
+
code {
|
454
|
+
background-color: rgba(0,0,0,0.05);
|
455
|
+
padding: 3px;
|
456
|
+
border-radius: 3px;
|
457
|
+
@extend %break-words;
|
458
|
+
@extend %code-font;
|
459
|
+
}
|
460
|
+
|
461
|
+
pre>code {
|
462
|
+
background-color: transparent;
|
463
|
+
padding: 0;
|
464
|
+
}
|
465
|
+
|
466
|
+
aside {
|
467
|
+
padding-top: 1em;
|
468
|
+
padding-bottom: 1em;
|
469
|
+
text-shadow: 0 1px 0 lighten($aside-notice-bg, 15%);
|
470
|
+
margin-top: 1.5em;
|
471
|
+
margin-bottom: 1.5em;
|
472
|
+
background: $aside-notice-bg;
|
473
|
+
line-height: 1.6;
|
474
|
+
|
475
|
+
&.warning {
|
476
|
+
background-color: $aside-warning-bg;
|
477
|
+
text-shadow: 0 1px 0 lighten($aside-warning-bg, 15%);
|
478
|
+
}
|
479
|
+
|
480
|
+
&.success {
|
481
|
+
background-color: $aside-success-bg;
|
482
|
+
text-shadow: 0 1px 0 lighten($aside-success-bg, 15%);
|
483
|
+
}
|
484
|
+
}
|
485
|
+
|
486
|
+
aside:before {
|
487
|
+
vertical-align: middle;
|
488
|
+
padding-right: 0.5em;
|
489
|
+
font-size: 14px;
|
490
|
+
}
|
491
|
+
|
492
|
+
aside.notice:before {
|
493
|
+
@extend %icon-info-sign;
|
494
|
+
}
|
495
|
+
|
496
|
+
aside.warning:before {
|
497
|
+
@extend %icon-exclamation-sign;
|
498
|
+
}
|
499
|
+
|
500
|
+
aside.success:before {
|
501
|
+
@extend %icon-ok-sign;
|
502
|
+
}
|
503
|
+
|
504
|
+
.search-highlight {
|
505
|
+
padding: 2px;
|
506
|
+
margin: -2px;
|
507
|
+
border-radius: 4px;
|
508
|
+
border: 1px solid #F7E633;
|
509
|
+
text-shadow: 1px 1px 0 #666;
|
510
|
+
background: linear-gradient(to top left, #F7E633 0%, #F1D32F 100%);
|
511
|
+
}
|
512
|
+
}
|
513
|
+
|
514
|
+
////////////////////////////////////////////////////////////////////////////////
|
515
|
+
// CODE SAMPLE STYLES
|
516
|
+
////////////////////////////////////////////////////////////////////////////////
|
517
|
+
// This is all the stuff that appears in the right half of the page
|
518
|
+
|
519
|
+
.content {
|
520
|
+
pre, blockquote {
|
521
|
+
background-color: $code-bg;
|
522
|
+
color: #fff;
|
523
|
+
|
524
|
+
padding: 2em $main-padding;
|
525
|
+
margin: 0;
|
526
|
+
width: $examples-width;
|
527
|
+
|
528
|
+
float:right;
|
529
|
+
clear:right;
|
530
|
+
|
531
|
+
box-sizing: border-box;
|
532
|
+
text-shadow: 0px 1px 2px rgba(0,0,0,0.4);
|
533
|
+
|
534
|
+
@extend %right-col;
|
535
|
+
|
536
|
+
&>p { margin: 0; }
|
537
|
+
|
538
|
+
a {
|
539
|
+
color: #fff;
|
540
|
+
text-decoration: none;
|
541
|
+
border-bottom: dashed 1px #ccc;
|
542
|
+
}
|
543
|
+
}
|
544
|
+
|
545
|
+
pre {
|
546
|
+
@extend %code-font;
|
547
|
+
}
|
548
|
+
|
549
|
+
blockquote {
|
550
|
+
&>p {
|
551
|
+
background-color: $code-annotation-bg;
|
552
|
+
border-radius: 5px;
|
553
|
+
padding: $code-annotation-padding;
|
554
|
+
color: #ccc;
|
555
|
+
border-top: 1px solid #000;
|
556
|
+
border-bottom: 1px solid #404040;
|
557
|
+
}
|
558
|
+
}
|
559
|
+
}
|
560
|
+
|
561
|
+
////////////////////////////////////////////////////////////////////////////////
|
562
|
+
// RESPONSIVE DESIGN
|
563
|
+
////////////////////////////////////////////////////////////////////////////////
|
564
|
+
// These are the styles for phones and tablets
|
565
|
+
// There are also a couple styles disperesed
|
566
|
+
|
567
|
+
@media (max-width: $tablet-width) {
|
568
|
+
.tocify-wrapper {
|
569
|
+
left: -$nav-width;
|
570
|
+
|
571
|
+
&.open {
|
572
|
+
left: 0;
|
573
|
+
}
|
574
|
+
}
|
575
|
+
|
576
|
+
.page-wrapper {
|
577
|
+
margin-left: 0;
|
578
|
+
}
|
579
|
+
|
580
|
+
#nav-button {
|
581
|
+
display: block;
|
582
|
+
}
|
583
|
+
|
584
|
+
.tocify-wrapper .tocify-item > a {
|
585
|
+
padding-top: 0.3em;
|
586
|
+
padding-bottom: 0.3em;
|
587
|
+
}
|
588
|
+
}
|
589
|
+
|
590
|
+
@media (max-width: $phone-width) {
|
591
|
+
.dark-box {
|
592
|
+
display: none;
|
593
|
+
}
|
594
|
+
|
595
|
+
%left-col {
|
596
|
+
margin-right: 0;
|
597
|
+
}
|
598
|
+
|
599
|
+
.tocify-wrapper .lang-selector {
|
600
|
+
display: block;
|
601
|
+
}
|
602
|
+
|
603
|
+
.page-wrapper .lang-selector {
|
604
|
+
display: none;
|
605
|
+
}
|
606
|
+
|
607
|
+
%right-col {
|
608
|
+
width: auto;
|
609
|
+
float: none;
|
610
|
+
}
|
611
|
+
|
612
|
+
%right-col + %left-col {
|
613
|
+
margin-top: $main-padding;
|
614
|
+
}
|
615
|
+
}
|
616
|
+
|
617
|
+
.content > .highlighter-rouge {
|
618
|
+
clear: none;
|
619
|
+
}
|
620
|
+
|
621
|
+
.highlight .c, .highlight .cm, .highlight .c1, .highlight .cs {
|
622
|
+
color: #909090;
|
623
|
+
}
|
624
|
+
|
625
|
+
.highlight, .highlight .w {
|
626
|
+
background-color: $code-bg;
|
627
|
+
}
|