mirror of
https://github.com/jasny/bootstrap.git
synced 2026-01-22 20:57:58 -05:00
Modified customization to work with Jasny extensions
This commit is contained in:
@@ -143,6 +143,7 @@ hr.soften {
|
||||
font-size: 24px;
|
||||
line-height: 20px;
|
||||
font-weight: 200;
|
||||
white-space: pre;
|
||||
color: #fff; /* redeclare to override the `.jumbotron a` */
|
||||
border: 0;
|
||||
-webkit-border-radius: 6px;
|
||||
@@ -435,8 +436,9 @@ hr.soften {
|
||||
.download .page-header {
|
||||
margin-top: 36px;
|
||||
}
|
||||
.page-header .toggle-all {
|
||||
.page-header .toggle-all, .page-header .toggle-jasny {
|
||||
margin-top: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
/* Space out h3s when following a section */
|
||||
@@ -543,6 +545,14 @@ h2 + .row {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.note {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.note i {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
|
||||
/* Fake the :focus state to demo it */
|
||||
.focused {
|
||||
|
||||
@@ -83,11 +83,31 @@
|
||||
inputsPlugin.attr('checked', !inputsPlugin.is(':checked'))
|
||||
})
|
||||
|
||||
$('#components.download .toggle-jasny').on('click', function (e) {
|
||||
e.preventDefault()
|
||||
inputsComponent.attr('checked', false)
|
||||
$('#components.download input.jasny').attr('checked', true)
|
||||
})
|
||||
|
||||
$('#plugins.download .toggle-jasny').on('click', function (e) {
|
||||
e.preventDefault()
|
||||
inputsPlugin.attr('checked', false)
|
||||
$('#plugins.download input.jasny').attr('checked', true)
|
||||
})
|
||||
|
||||
$('#variables.download .toggle-all').on('click', function (e) {
|
||||
e.preventDefault()
|
||||
inputsVariables.val('')
|
||||
})
|
||||
|
||||
$('#plugins.download input[value="bootstrap-popover.js"]').on('click', function (e) {
|
||||
if ($(this).is(':checked')) $('#plugins.download input[value="bootstrap-tooltip.js"]').attr('checked', true)
|
||||
})
|
||||
|
||||
$('#plugins.download input[value="bootstrap-tooltip.js"]').on('click', function (e) {
|
||||
if ($(this).is(':not(:checked)')) $('#plugins.download input[value="bootstrap-popover.js"]').attr('checked', false)
|
||||
})
|
||||
|
||||
// request built javascript
|
||||
$('.download-btn').on('click', function () {
|
||||
|
||||
@@ -99,7 +119,25 @@
|
||||
.toArray()
|
||||
, vars = {}
|
||||
, img = ['glyphicons-halflings.png', 'glyphicons-halflings-white.png']
|
||||
, fonts = []
|
||||
, autoselect = {
|
||||
'jasny/modals.less': ['modals.less']
|
||||
, 'jasny/layouts-semifluid.responsive-1200px-min.less': ['jasny/layouts-semifluid.less', 'responsive-1200px-min.less']
|
||||
, 'jasny/forms.responsive-767px-max.less': ['jasny/forms.less', 'responsive-767px-max.less']
|
||||
, 'jasny/forms.responsive-768px-979px.less': ['jasny/forms.less', 'responsive-768px-979px.less']
|
||||
, 'jasny/forms.responsive-1200px-min.less': ['jasny/forms.less', 'responsive-1200px-min.less']
|
||||
, 'jasny/page-alert.responsive-767px-max.less': ['jasny/page-alert.less', 'responsive-767px-max.less']
|
||||
, 'jasny/page-alert.responsive-1200px-min.less': ['jasny/page-alert.less', 'responsive-1200px-min.less']
|
||||
}
|
||||
|
||||
if ($('#components.download input[value="jasny/iconic.less"]').is(':checked'))
|
||||
fonts = ['iconic_fill.eot', 'iconic_fill.otf', 'iconic_fill.svg', 'iconic_fill.ttf', 'iconic_fill.woff', 'iconic_stroke.eot', 'iconic_stroke.otf', 'iconic_stroke.svg', 'iconic_stroke.ttf', 'iconic_stroke.woff']
|
||||
|
||||
$.map(autoselect, function(deps, file) {
|
||||
if ($.map(deps, function (value) { return $('#components.download input[value="'+value+'"]').is(':checked') ? 1 : null }).length == deps.length)
|
||||
css.push(file)
|
||||
})
|
||||
|
||||
$("#variables.download input")
|
||||
.each(function () {
|
||||
$(this).val() && (vars[ $(this).prev().text() ] = $(this).val())
|
||||
@@ -107,13 +145,14 @@
|
||||
|
||||
$.ajax({
|
||||
type: 'POST'
|
||||
, url: /\?dev/.test(window.location) ? 'http://localhost:3000' : 'http://bootstrap-server.jasny.net'
|
||||
, url: /\?dev|^http:\/\/localhost\//.test(window.location) ? 'http://localhost:3000' : 'http://bootstrap-server.jasny.net'
|
||||
, dataType: 'jsonpi'
|
||||
, params: {
|
||||
js: js
|
||||
, css: css
|
||||
, vars: vars
|
||||
, img: img
|
||||
, fonts: fonts
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
36
docs/templates/pages/customize.mustache
vendored
36
docs/templates/pages/customize.mustache
vendored
@@ -31,9 +31,11 @@
|
||||
<section class="download" id="components">
|
||||
<div class="page-header">
|
||||
<a class="btn btn-small pull-right toggle-all" href="#">{{_i}}Toggle all{{/i}}</a>
|
||||
<a class="btn btn-small pull-right toggle-jasny" href="#"><i class="iconic-award-stroke"></i> {{_i}}Jasny extensions{{/i}}</a>
|
||||
<h1>
|
||||
{{_i}}1. Choose components{{/i}}
|
||||
</h1>
|
||||
<div class="note">Jasny extensions are marked with a <i class="iconic-award-stroke"></i></div>
|
||||
</div>
|
||||
<div class="row download-builder">
|
||||
<div class="span3">
|
||||
@@ -42,25 +44,33 @@
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="scaffolding.less"> {{_i}}Body type and links{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="grid.less"> {{_i}}Grid system{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="layouts.less"> {{_i}}Layouts{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" class="jasny" value="jasny/layouts-semifluid.less"> {{_i}}Semi-fluid layout{{/i}} <i class="iconic-award-stroke"></i></label>
|
||||
<h3>{{_i}}Base CSS{{/i}}</h3>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="type.less"> {{_i}}Headings, body, etc{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="code.less"> {{_i}}Code and pre{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="labels-badges.less"> {{_i}}Labels and badges{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" class="jasny" value="jasny/actions-areas.less"> {{_i}}Action areas{{/i}} <i class="iconic-award-stroke"></i></label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="tables.less"> {{_i}}Tables{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="forms.less"> {{_i}}Forms{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" class="jasny" value="jasny/forms.less"> {{_i}}Additional form styles{{/i}} <i class="iconic-award-stroke"></i></label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" class="jasny" value="jasny/forms-uneditable.less"> {{_i}}Uneditable forms{{/i}} <i class="iconic-award-stroke"></i></label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="buttons.less"> {{_i}}Buttons{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="sprites.less"> {{_i}}Icons{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" class="jasny" value="jasny/action-links.less"> {{_i}}Action links{{/i}} <i class="iconic-award-stroke"></i></label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="sprites.less"> {{_i}}Icons by Glyphicons{{/i}} <small>{{_i}}(sprites){{/i}}</small></label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" class="jasny" value="jasny/iconic.less"> {{_i}}Iconic icons{{/i}} <small>{{_i}}(font){{/i}}</small> <i class="iconic-award-stroke"></i></label>
|
||||
</div><!-- /span -->
|
||||
<div class="span3">
|
||||
<h3>{{_i}}Components{{/i}}</h3>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="button-groups.less"> {{_i}}Button groups and dropdowns{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="navs.less"> {{_i}}Navs, tabs, and pills{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" class="jasny" value="jasny/navs-tabbable.less"> {{_i}}Tabbable improvements{{/i}} <i class="iconic-award-stroke"></i></label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="navbar.less"> {{_i}}Navbar{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="breadcrumbs.less"> {{_i}}Breadcrumbs{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="pagination.less"> {{_i}}Pagination{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="pager.less"> {{_i}}Pager{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="thumbnails.less"> {{_i}}Thumbnails{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="alerts.less"> {{_i}}Alerts{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" class="jasny" value="jasny/page-alert.less"> {{_i}}Page alerts{{/i}} <i class="iconic-award-stroke"></i></label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="progress-bars.less"> {{_i}}Progress bars{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="hero-unit.less"> {{_i}}Hero unit{{/i}}</label>
|
||||
<h3>{{_i}}JS Components{{/i}}</h3>
|
||||
@@ -70,6 +80,8 @@
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="dropdowns.less"> {{_i}}Dropdowns{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="accordion.less"> {{_i}}Collapse{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="carousel.less"> {{_i}}Carousel{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" class="jasny" value="jasny/rowlink.less"> {{_i}}Row link{{/i}} <i class="iconic-award-stroke"></i></label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" class="jasny" value="jasny/fileupload.less"> {{_i}}File upload{{/i}} <i class="iconic-award-stroke"></i></label>
|
||||
</div><!-- /span -->
|
||||
<div class="span3">
|
||||
<h3>{{_i}}Miscellaneous{{/i}}</h3>
|
||||
@@ -79,10 +91,12 @@
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="component-animations.less"> {{_i}}Component animations{{/i}}</label>
|
||||
<h3>{{_i}}Responsive{{/i}}</h3>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="responsive-utilities.less"> {{_i}}Visible/hidden classes{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="responsive-767px-max.less"> {{_i}}Narrow tablets and below (<767px){{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="responsive-768px-979px.less"> {{_i}}Tablets to desktops (767-979px){{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="responsive-1200px-min.less"> {{_i}}Large desktops (>1200px){{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" class="jasny" value="responsive-767px-max.less"> {{_i}}Narrow tablets and below (<767px){{/i}} *</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" class="jasny" value="responsive-768px-979px.less"> {{_i}}Tablets to desktops (767-979px){{/i}} *</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" class="jasny" value="responsive-1200px-min.less"> {{_i}}Large desktops (>1200px){{/i}} *</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="responsive-navbar.less"> {{_i}}Responsive navbar{{/i}}</label>
|
||||
<label class="checkbox"><input checked="checked" type="checkbox" class="jasny" value="jasny/responsive-row-desktop.less"> {{_i}}Desktop rows{{/i}} <i class="iconic-award-stroke"></i></label>
|
||||
<small class="note">* Please select these if you're using the Jasny extensions in a responsive design</small>
|
||||
</div><!-- /span -->
|
||||
</div><!-- /row -->
|
||||
</section>
|
||||
@@ -90,9 +104,11 @@
|
||||
<section class="download" id="plugins">
|
||||
<div class="page-header">
|
||||
<a class="btn btn-small pull-right toggle-all" href="#">{{_i}}Toggle all{{/i}}</a>
|
||||
<a class="btn btn-small pull-right toggle-jasny" href="#"><i class="iconic-award-stroke"></i> {{_i}}Jasny extensions{{/i}}</a>
|
||||
<h1>
|
||||
{{_i}}2. Select jQuery plugins{{/i}}
|
||||
</h1>
|
||||
<div class="note">Jasny extensions are marked with a <i class="iconic-award-stroke"></i></div>
|
||||
</div>
|
||||
<div class="row download-builder">
|
||||
<div class="span3">
|
||||
@@ -124,6 +140,10 @@
|
||||
<input type="checkbox" checked="true" value="bootstrap-popover.js">
|
||||
{{_i}}Popovers <small>(requires Tooltips)</small>{{/i}}
|
||||
</label>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" checked="true" class="jasny" value="bootstrap-rowlink.js">
|
||||
{{_i}}Rowlink{{/i}} <i class="iconic-award-stroke"></i>
|
||||
</label>
|
||||
</div><!-- /span -->
|
||||
<div class="span3">
|
||||
<label class="checkbox">
|
||||
@@ -150,6 +170,14 @@
|
||||
<input type="checkbox" checked="true" value="bootstrap-typeahead.js">
|
||||
{{_i}}Typeahead{{/i}}
|
||||
</label>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" checked="true" class="jasny" value="bootstrap-inputmask.js">
|
||||
{{_i}}Input mask{{/i}} <i class="iconic-award-stroke"></i>
|
||||
</label>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" checked="true" class="jasny" value="bootstrap-fileupload.js">
|
||||
{{_i}}File upload{{/i}} <i class="iconic-award-stroke"></i>
|
||||
</label>
|
||||
</div><!-- /span -->
|
||||
<div class="span3">
|
||||
<h4 class="muted">{{_i}}Heads up!{{/i}}</h4>
|
||||
|
||||
Reference in New Issue
Block a user