2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-27 14:46:01 +03:00
Commit Graph

28 Commits

Author SHA1 Message Date
Mark Otto 015d729445 Add dark mode support
Heavily WIP still, but this begins the process of implementing dark mode for our docs and across the project itself.

- Color modes are toggled in the docs navbar with a custom toggler, which stores the select color mode in local storage.
- Color modes can also be set via data attribute thanks to `data-theme` (with light or dark options available currently).
- Docs are heavily WIP for demonstrating the dark mode.
- In order to best implement color modes, I've spiked out a number of new Sass and CSS variables (e.g., `--bs-secondary-bg` and `--bs-tertiary-bg`). In addition, I've added new global CSS variables like `--bs-border-color` and more. So, in addition to general color modes and theming support, we get greater real-time customization, too.

Todos and open questions:

- [ ] Do we refer to these as themes or color modes?
- [ ] Do we provide a color mode toggler JS plugin?
- [ ] Update all components to better utilize global CSS variables so they can be more easily themed (e.g., see `$dropdown-*` Sass variable changes in the diff).
2022-04-18 18:45:51 -07:00
Mark Otto 195440f2fb v5.2.0 design refresh, plus responsive offcanvas classes (#35736)
* Add responsive offcanvas classes

- Updates navbar-expand classes to de-dupe some styles—these shouldn't interfere now.
- Adds some JS to the offcanvas component to help with responsiveness

Co-Authored-By: GeoSot <geo.sotis@gmail.com>

* Redesign homepage, docs, and examples

Homepage:

- New Bootstrap purple navbar
- Redesigned masthead
- Rewrote and redesigned homepage content
- Replace Copy text with icons like Bootstrap Icons site across all ClipboardJS instances
- Fixed padding issues in site footer
- Match homepage button styles to examples page, use gap instead of tons of responsive margin utils

Docs:

- New navbar, no more subnav. Migrated search and version picker into the main navbar and refreshed the design of it all, including the responsive toggles.
- New sidebar navigation is always expanded, and now features Bootstrap Icons alongside section headings
- Sidebar navigation autoscrolls to active link for better usability
- Subnav and navbar padding issues ironed out
- Enhanced the version picker in anticipation of v5.2: we can now link right to the same page in the previous version.
- Redesign callouts to add more color to our pages
- Collapse table of contents on mobile
- Cleanup and redesign button styles with CSS variables
- Update design for subnav version dropdown
- Update highlight and example to be full-width until md
- Improve the Added In badges
- Turn the ToC into a well on mobile
- Redesign code snippets to better house two action buttons

Examples:

- Redesign Examples page layout
- Add new example for responsive offcanvases in navbars

* Convert offcanvas to CSS vars

* Feat: add resize handler to Offcanvas.js.

If we could use as default the `.offcanvas` class without modifiers, we then, could add a simplified selector
The selector itself, ignores the .offcanvas class as it doesn't have any responsive behavior
The `aria-modal` addon is to protect us, selection backdrop elements

* Separate examples code, Add some selectors, fix stackblitz btn

Co-authored-by: GeoSot <geo.sotis@gmail.com>
2022-04-17 22:17:50 -07:00
Tiger Oakes fe257823ec Use Babel and ES6 in docs JS files (#31607)
* Pass docs js through Babel

* Use ES6 in docs js

* Only run babel on src files

* Allow babel in Hugo

* Update scripts.html

* Inherit from the root .eslintrc.json

* Use `Array.from`

* Drop Babel from docs

* Prefer template

* replace IIFE with arrow functions

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: GeoSot <geo.sotis@gmail.com>
2022-04-12 18:07:25 +03:00
louismaxime.piton 273ebad151 Changing to btnTitle and btnEdit 2022-04-01 11:26:32 +03:00
Julien Déramond 6b4bdcc657 Fix typo for StackBlitz edit button's tooltip (#36073) 2022-03-29 18:16:11 +03:00
GeoSot 05c6e7dd66 Fix docs error after #35644 (#36002) 2022-03-11 17:56:57 +02:00
Puru Vijay 645f955845 docs: add a StackBlitz "Try It" button in code examples (#35644)
Co-authored-by: GeoSot <geo.sotis@gmail.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2022-03-09 17:32:58 +02:00
XhmikosR ae12d645ef Replace AnchorJS with a Hugo render hook (#32953)
* Replace AnchorJS with a Hugo render hook

* docs(anchors): improve aria-label on anchor links

* docs(anchors): show anchor link when ed

* docs(anchors): add hash in pseudo-element

Co-authored-by: Gaël Poupard <ffoodd@users.noreply.github.com>
2022-02-19 15:16:23 +02:00
GeoSot 96c67a7ff7 Fix empty content of tooltip after 'copy' action in docs (#35773)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2022-02-07 10:05:43 +02:00
XhmikosR 9680e17456 Bump copyright year to 2022 (#35639) 2022-01-03 15:03:42 +02:00
GeoSot 94a596fbcb Add a template factory helper to handle all template cases (#34519)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-11-25 19:14:02 +02:00
XhmikosR c5d03d93fc Rename e to event (#34979) 2021-09-15 14:27:46 +03:00
XhmikosR 9e1d81a851 Progress page: remove toggle animation button (#34787)
We don't use the same approach with a button on the Placeholders page.
2021-08-21 06:54:53 +03:00
Mark Otto 696996dd4f Add dynamic, live alerts example to docs (#33866) 2021-06-29 18:46:25 +03:00
Mark Otto 4167c107f8 Add a live toast example to the docs (#32760) 2021-01-18 15:10:01 +02:00
XhmikosR f2c504397e Bump copyright year to 2021 (#32713) 2021-01-07 12:12:53 +02:00
Martijn Cuppens 6c069b6976 Add interactive positioning widget 2020-12-04 16:15:51 +02:00
Rohit Sharma 418f17ee2b Add bs in data attributes
- Add `bs` in data APIs everywhere
- Update unit tests
2020-11-14 07:09:15 +02:00
XhmikosR 483b6413e9 application.js: remove non-existent selector (#32131) 2020-11-13 18:56:04 +02:00
Martijn Cuppens f236667483 Drop custom file upload plugin in favor of CSS 2020-10-28 18:29:28 +01:00
XhmikosR e271d01606 Streamline application.js exampleModal code (#30819)
* use `textContent` since we only need to add text
* move comments
2020-05-19 08:33:12 +03:00
XhmikosR 9496cb60f3 docs: remove makeArray (#30470) 2020-03-28 18:05:11 +02:00
Gaël Poupard 72230091b6 docs(sidenav): get rid of custom JS for active state 2020-03-28 17:57:22 +02:00
XhmikosR c0efceb6d5 docs: remove duplicate code for indeterminate (#30471) 2020-03-28 11:41:03 +02:00
Martijn Cuppens 61b86c1e86 Use scroll-margin-top instead of pseudo hack 2020-03-12 17:56:16 +02:00
XhmikosR 5d1da6377d Fix the new lint errors. 2020-01-07 22:25:50 +02:00
XhmikosR 7b990eb2f4 Bump copyright year to 2020. (#29944) 2020-01-02 11:34:48 +02:00
XhmikosR a28adc7666 Move docs JS one folder up. (#29632) 2019-11-04 14:44:07 +02:00