Skip to content

Commit 77d56d7

Browse files
committed
Fixed customizer
Documentation fixes, oa. removed twbs stuff from components page
1 parent 74dbf6c commit 77d56d7

27 files changed

+95
-1444
lines changed

Gruntfile.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ module.exports = function (grunt) {
3535

3636
// Task configuration.
3737
clean: {
38-
dist: ['dist', 'docs/dist']
38+
dist: ['dist', 'docs/dist'],
39+
jekyll: ['_gh_pages'],
40+
assets: ['assets/css/*.min.css', 'assets/js/*.min.js'],
41+
jade: ['jade/*.jade']
3942
},
4043

4144
jshint: {
@@ -251,7 +254,7 @@ module.exports = function (grunt) {
251254
options: {
252255
pretty: true,
253256
data: function () {
254-
var filePath = path.join(__dirname, 'less/build/default-variables.less');
257+
var filePath = path.join(__dirname, 'less/build/variables.less');
255258
var fileContent = fs.readFileSync(filePath, {encoding: 'utf8'});
256259
var parser = new BsLessdocParser(fileContent);
257260
return {sections: parser.parseFile()};
@@ -363,10 +366,10 @@ module.exports = function (grunt) {
363366
grunt.registerTask('dist-docs', 'copy:docs');
364367

365368
// Full distribution task.
366-
grunt.registerTask('dist', ['clean', 'dist-css', 'dist-js', 'dist-docs']);
369+
grunt.registerTask('dist', ['clean:dist', 'dist-css', 'dist-js', 'dist-docs']);
367370

368371
// Default task.
369-
grunt.registerTask('default', ['test', 'dist', 'build-customizer']);
372+
grunt.registerTask('default', ['dist', 'build-customizer']);
370373

371374
// Version numbering task.
372375
// grunt change-version-number --oldver=A.B.C --newver=X.Y.Z

dist/css/jasny-bootstrap.css

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/jasny-bootstrap.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/jasny-bootstrap.min.css

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/_includes/customizer-variables.html

Lines changed: 4 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,5 @@
11

22
<!-- NOTE: DO NOT EDIT THE FOLLOWING SECTION DIRECTLY! It is autogenerated via the `build-customizer-html` Grunt task using the customizer-variables.jade template.-->
3-
<h2 id="colors">Colors</h2>
4-
<p>Gray colors for use across Bootstrap.</p>
5-
<div class="row">
6-
<div class="bs-customizer-input">
7-
<label for="input-@gray-darker">@gray-darker</label>
8-
<input id="input-@gray-darker" type="text" value="lighten(#000, 13.5%)" data-var="@gray-darker" class="form-control"/>
9-
</div>
10-
<div class="bs-customizer-input">
11-
<label for="input-@gray-dark">@gray-dark</label>
12-
<input id="input-@gray-dark" type="text" value="lighten(#000, 20%)" data-var="@gray-dark" class="form-control"/>
13-
</div>
14-
<div class="bs-customizer-input">
15-
<label for="input-@gray">@gray</label>
16-
<input id="input-@gray" type="text" value="lighten(#000, 33.5%)" data-var="@gray" class="form-control"/>
17-
</div>
18-
<div class="bs-customizer-input">
19-
<label for="input-@gray-light">@gray-light</label>
20-
<input id="input-@gray-light" type="text" value="lighten(#000, 60%)" data-var="@gray-light" class="form-control"/>
21-
</div>
22-
<div class="bs-customizer-input">
23-
<label for="input-@gray-lighter">@gray-lighter</label>
24-
<input id="input-@gray-lighter" type="text" value="lighten(#000, 93.5%)" data-var="@gray-lighter" class="form-control"/>
25-
</div>
26-
</div>
27-
<h2 id="typography">Typography</h2>
28-
<p>Font size and line-height.</p>
29-
<div class="row">
30-
<div class="bs-customizer-input">
31-
<label for="input-@font-size-base">@font-size-base</label>
32-
<input id="input-@font-size-base" type="text" value="14px" data-var="@font-size-base" class="form-control"/>
33-
</div>
34-
<div class="bs-customizer-input">
35-
<label for="input-@font-size-large">@font-size-large</label>
36-
<input id="input-@font-size-large" type="text" value="ceil((@font-size-base * 1.25))" data-var="@font-size-large" class="form-control"/>
37-
</div>
38-
<div class="bs-customizer-input">
39-
<label for="input-@font-size-small">@font-size-small</label>
40-
<input id="input-@font-size-small" type="text" value="ceil((@font-size-base * 0.85))" data-var="@font-size-small" class="form-control"/>
41-
</div>
42-
<div class="bs-customizer-input">
43-
<label for="input-@line-height-base">@line-height-base</label>
44-
<input id="input-@line-height-base" type="text" value="1.428571429" data-var="@line-height-base" class="form-control"/>
45-
<p class="help-block">Unit-less <code>line-height</code> for use in components like buttons.</p>
46-
</div>
47-
<div class="bs-customizer-input">
48-
<label for="input-@line-height-computed">@line-height-computed</label>
49-
<input id="input-@line-height-computed" type="text" value="floor((@font-size-base * @line-height-base))" data-var="@line-height-computed" class="form-control"/>
50-
<p class="help-block">Computed &quot;line-height&quot; (<code>font-size</code> * <code>line-height</code>) for use with <code>margin</code>, <code>padding</code>, etc.</p>
51-
</div>
52-
</div>
533
<h2 id="components">Components</h2>
544
<p>Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).</p>
555
<div class="row">
@@ -148,13 +98,10 @@ <h2 id="grid-system">Grid system</h2>
14898
<input id="input-@grid-float-breakpoint" type="text" value="768px" data-var="@grid-float-breakpoint" class="form-control"/>
14999
<p class="help-block">Point at which the navbar becomes uncollapsed.</p>
150100
</div>
151-
</div>
152-
<h2 id="container-sizes">Container sizes</h2>
153-
<p>Define the maximum width of <code>.container</code> for different screen sizes.</p>
154-
<div class="row">
155101
<div class="bs-customizer-input">
156-
<label for="input-@container-lg">@container-lg</label>
157-
<input id="input-@container-lg" type="text" value="((1140px + @grid-gutter-width))" data-var="@container-lg" class="form-control"/>
102+
<label for="input-@container-smooth">@container-smooth</label>
103+
<input id="input-@container-smooth" type="text" value="@container-lg" data-var="@container-smooth" class="form-control"/>
104+
<p class="help-block">Maximum with of a smooth container.</p>
158105
</div>
159106
</div>
160107
<h2 id="navbar">Navbar</h2>
@@ -382,7 +329,7 @@ <h2 id="alerts">Alerts</h2>
382329
</div>
383330
<div class="bs-customizer-input">
384331
<label for="input-@alert-fixed-width">@alert-fixed-width</label>
385-
<input id="input-@alert-fixed-width" type="text" value="@screen-md-min" data-var="@alert-fixed-width" class="form-control"/>
332+
<input id="input-@alert-fixed-width" type="text" value="@screen-md" data-var="@alert-fixed-width" class="form-control"/>
386333
</div>
387334
</div>
388335
<!-- NOTE: DO NOT EDIT THE PRECEDING SECTION DIRECTLY! It is autogenerated via the `build-customizer-html` Grunt task using the customizer-variables.jade template.-->

docs/_includes/nav-customize.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@
44
<li><a href="#plugins">jQuery plugins</a></li>
55
<li><a href="#less-variables">Less variables</a>
66
<ul class="nav">
7-
<li><a href="#colors">Colors</a></li>
8-
<li><a href="#typography">Typography</a></li>
97
<li><a href="#components">Components</a></li>
108
<li><a href="#tables">Tables</a></li>
119
<li><a href="#media-queries-breakpoints">Media queries breakpoints</a></li>
1210
<li><a href="#grid-system">Grid system</a></li>
13-
<li><a href="#container-sizes">Container sizes</a></li>
1411
<li><a href="#navbar">Navbar</a></li>
1512
<li><a href="#navmenu">Navmenu</a></li>
1613
<li><a href="#navs">Navs</a></li>

docs/assets/css/docs.css

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,22 @@ span.hidden-sm {
6565

6666
/* Outline button for use within the docs */
6767
.btn-outline {
68-
color: #563d7c;
68+
color: #962A28;
6969
background-color: #fff;
7070
border-color: #e5e5e5;
7171
}
7272
.btn-outline:hover,
7373
.btn-outline:focus,
7474
.btn-outline:active {
7575
color: #fff;
76-
background-color: #563d7c;
77-
border-color: #563d7c;
76+
background-color: #962A28;
77+
background-image: -webkit-gradient(linear, left top, right top, color-stop(0, #450915), color-stop(1, #962A28));
78+
background-image: -o-linear-gradient(right, #450915 0%, #962A28 100%);
79+
background-image: -moz-linear-gradient(right, #450915 0%, #962A28 100%);
80+
background-image: -webkit-linear-gradient(right, #450915 0%, #962A28 100%);
81+
background-image: -ms-linear-gradient(right, #450915 0%, #962A28 100%);
82+
background-image: linear-gradient(to right, #450915 0%, #962A28 100%);
83+
border-color: #962A28;
7884
}
7985

8086
/* Inverted outline button (white on dark) */
@@ -570,7 +576,7 @@ span.hidden-sm {
570576
/* Janky fix for preventing navbar from overlapping */
571577
h1[id] {
572578
padding-top: 80px;
573-
margin-top: -45px;
579+
margin-top: -80px;
574580
}
575581
h2[id], h3[id] {
576582
padding-top: 65px;
@@ -1124,7 +1130,7 @@ h2[id], h3[id] {
11241130

11251131
.bs-customizer .toggle {
11261132
float: right;
1127-
margin-top: 25px;
1133+
margin-top: 80px;
11281134
}
11291135

11301136
/* Headings and form contrls */

docs/assets/css/docs.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/js/customize.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/js/customizer.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ window.onload = function () { // wait for load in a dumb way because B-0
260260
.join('\n')
261261

262262
return {
263-
'bootstrap.js': js,
264-
'bootstrap.min.js': cw + uglify(js)
263+
'jasny-bootstrap.js': js,
264+
'jasny-bootstrap.min.js': cw + uglify(js)
265265
}
266266
}
267267

@@ -279,11 +279,6 @@ window.onload = function () { // wait for load in a dumb way because B-0
279279
inputsPlugin.prop('checked', !inputsPlugin.is(':checked'))
280280
})
281281

282-
$('#less-variables-section .toggle').on('click', function (e) {
283-
e.preventDefault()
284-
inputsVariables.val('')
285-
})
286-
287282
$('[data-dependencies]').on('click', function () {
288283
if (!$(this).is(':checked')) return
289284
var dependencies = this.getAttribute('data-dependencies')
@@ -319,7 +314,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
319314

320315
generateZip(generateCSS(), generateJavascript(), generateFonts(), configJson, function (blob) {
321316
$compileBtn.removeAttr('disabled')
322-
saveAs(blob, 'bootstrap.zip')
317+
saveAs(blob, 'jasny-bootstrap.zip')
323318
createGist(configJson)
324319
})
325320
})
@@ -329,7 +324,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
329324
showCallout('Looks like you\'re using safari, which sadly doesn\'t have the best support' +
330325
'for HTML5 blobs. Because of this your file will be downloaded with the name <code>"untitled"</code>.' +
331326
'However, if you check your downloads folder, just rename this <code>"untitled"</code> file' +
332-
'to <code>"bootstrap.zip"</code> and you should be good to go!')
327+
'to <code>"jasny-bootstrap.zip"</code> and you should be good to go!')
333328
} else if (!window.URL && !window.webkitURL) {
334329
$('.bs-docs-section, .bs-docs-sidebar').css('display', 'none')
335330

0 commit comments

Comments
 (0)