diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css index 0c47f86e..bf2aba52 100644 --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@ -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 { diff --git a/docs/assets/js/application.js b/docs/assets/js/application.js index 32a34adc..20c0e457 100644 --- a/docs/assets/js/application.js +++ b/docs/assets/js/application.js @@ -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 } }) }) diff --git a/docs/templates/pages/customize.mustache b/docs/templates/pages/customize.mustache index 6788750c..e891fba5 100644 --- a/docs/templates/pages/customize.mustache +++ b/docs/templates/pages/customize.mustache @@ -31,9 +31,11 @@
@@ -42,25 +44,33 @@ +

{{_i}}Base CSS{{/i}}

+ + + - + + +

{{_i}}Components{{/i}}

+ +

{{_i}}JS Components{{/i}}

@@ -70,6 +80,8 @@ + +

{{_i}}Miscellaneous{{/i}}

@@ -79,10 +91,12 @@

{{_i}}Responsive{{/i}}

- - - + + + + + * Please select these if you're using the Jasny extensions in a responsive design
@@ -90,9 +104,11 @@
@@ -124,6 +140,10 @@ {{_i}}Popovers (requires Tooltips){{/i}} +
+ +

{{_i}}Heads up!{{/i}}