diff options
| author | Chris Rebert <[email protected]> | 2014-04-29 15:54:05 -0700 |
|---|---|---|
| committer | Chris Rebert <[email protected]> | 2014-05-07 16:12:42 -0700 |
| commit | 7d0f7e84412ab8018e6e9211f9e6a0f47d1100ce (patch) | |
| tree | 34fe20954e30163aed6a37360fc45da8cc374ca5 /docs/assets | |
| parent | f0daa64a29a66a663f6fedb9d8687524af754436 (diff) | |
| download | bootstrap-7d0f7e84412ab8018e6e9211f9e6a0f47d1100ce.tar.xz bootstrap-7d0f7e84412ab8018e6e9211f9e6a0f47d1100ce.zip | |
add button to toggle the optional theme when viewing the docs; fixes #9764
Diffstat (limited to 'docs/assets')
| -rw-r--r-- | docs/assets/css/_src/docs.css | 6 | ||||
| -rw-r--r-- | docs/assets/js/_src/application.js | 16 |
2 files changed, 22 insertions, 0 deletions
diff --git a/docs/assets/css/_src/docs.css b/docs/assets/css/_src/docs.css index bbc3ff669..7f1f65a4d 100644 --- a/docs/assets/css/_src/docs.css +++ b/docs/assets/css/_src/docs.css @@ -1452,3 +1452,9 @@ h1[id] { -webkit-box-shadow: 0 0 8px rgba(82,168,236,.6); box-shadow: 0 0 8px rgba(82,168,236,.6); } + +#bs-theme-btn { + position: fixed; + bottom: 0; + left: 0; +} diff --git a/docs/assets/js/_src/application.js b/docs/assets/js/_src/application.js index 08ca5f907..655f14612 100644 --- a/docs/assets/js/_src/application.js +++ b/docs/assets/js/_src/application.js @@ -53,6 +53,22 @@ $('.bs-top').affix() }, 100) + // theme toggler + ;(function () { + var stylesheetLink = $('#bs-theme-stylesheet') + var themeBtn = $('#bs-theme-btn') + themeBtn.click(function () { + if (stylesheetLink.attr('href')) { + stylesheetLink.attr('href', '') + themeBtn.text('Activate Theme') + } + else { + stylesheetLink.attr('href', stylesheetLink.attr('data-href')) + themeBtn.text('Deactivate Theme') + } + }) + })(); + // tooltip demo $('.tooltip-demo').tooltip({ selector: '[data-toggle="tooltip"]', |
