mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-31 00:59:51 +02:00
Add newer version 5 alert on top of v4 and v5 pages (#38410)
* Change newer version label of v3.3 * Change newer version label of v3.4 * Change newer version label of v4.0/v4.1/v4.2 * Add newer version alert for v4.3 * Add newer version alert for v4.4 * Add newer version alert for v4.5/v4.6 (using `.skippy` bg color) * Add newer version alert for v5.0 (using `.skippy` bg color) * Add newer version alert for v5.1 (using `.skippy` bg color) * Add newer version alert for v5.2 (using `.skippy` bg color) * Change some copy - v4 gets 'Bootstrap 5 is here' - v5 gets 'Theres a newer version of Bootstrap 5' * Unique message: 'There\'s a newer version of Bootstrap!' * Change HTML structure for focus visible --------- Co-authored-by: Mark Otto <markdotto@gmail.com>
This commit is contained in:
@@ -141,6 +141,10 @@
|
||||
</svg>
|
||||
|
||||
|
||||
<div class="d-block px-3 py-2 text-center text-bold skippy">
|
||||
<a href="https://getbootstrap.com/" class="text-white text-decoration-none">There's a newer version of Bootstrap!</a>
|
||||
</div>
|
||||
|
||||
<header class="navbar navbar-expand-lg navbar-dark bd-navbar sticky-top">
|
||||
<nav class="container-xxl bd-gutter flex-wrap flex-lg-nowrap" aria-label="Main navigation">
|
||||
<div class="bd-navbar-toggle">
|
||||
@@ -158,9 +162,9 @@
|
||||
</a>
|
||||
|
||||
<div class="d-flex">
|
||||
|
||||
|
||||
<div class="bd-search" id="docsearch" data-bd-docs-version="5.2"></div>
|
||||
|
||||
|
||||
|
||||
<button class="navbar-toggler d-flex d-lg-none order-3 p-2" type="button" data-bs-toggle="offcanvas" data-bs-target="#bdNavbar" aria-controls="bdNavbar" aria-label="Toggle navigation">
|
||||
<svg class="bi" aria-hidden="true"><use xlink:href="#three-dots"></use></svg>
|
||||
@@ -218,7 +222,7 @@
|
||||
<div class="vr d-none d-lg-flex h-100 mx-lg-2 text-white"></div>
|
||||
<hr class="d-lg-none text-white-50">
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<button type="button" class="btn btn-link nav-link py-2 px-0 px-lg-2 dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" data-bs-display="static">
|
||||
@@ -254,7 +258,7 @@
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container-xxl bd-gutter mt-3 my-md-4 bd-layout">
|
||||
<aside class="bd-sidebar">
|
||||
<div class="offcanvas-lg offcanvas-start" tabindex="-1" id="bdSidebar" aria-labelledby="bdSidebarOffcanvasLabel">
|
||||
@@ -480,56 +484,56 @@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="bd-content ps-lg-2">
|
||||
|
||||
|
||||
<div class="row g-3">
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<a class="d-block text-decoration-none" href="../sass/">
|
||||
<strong class="d-block h5 mb-0">Sass</strong>
|
||||
<span class="text-secondary">Utilize our source Sass files to take advantage of variables, maps, mixins, and functions.</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<a class="d-block text-decoration-none" href="../options/">
|
||||
<strong class="d-block h5 mb-0">Options</strong>
|
||||
<span class="text-secondary">Customize Bootstrap with built-in variables to easily toggle global CSS preferences.</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<a class="d-block text-decoration-none" href="../color/">
|
||||
<strong class="d-block h5 mb-0">Color</strong>
|
||||
<span class="text-secondary">Learn about and customize the color systems that support the entire toolkit.</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<a class="d-block text-decoration-none" href="../components/">
|
||||
<strong class="d-block h5 mb-0">Components</strong>
|
||||
<span class="text-secondary">Learn how we build nearly all our components responsively and with base and modifier classes.</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<a class="d-block text-decoration-none" href="../css-variables/">
|
||||
<strong class="d-block h5 mb-0">CSS variables</strong>
|
||||
<span class="text-secondary">Use Bootstrap's CSS custom properties for fast and forward-looking design and development.</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<a class="d-block text-decoration-none" href="../optimize/">
|
||||
<strong class="d-block h5 mb-0">Optimize</strong>
|
||||
<span class="text-secondary">Keep your projects lean, responsive, and maintainable so you can deliver the best experience.</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<h2 id="overview">Overview <a class="anchor-link" href="#overview" aria-label="Link to this section: Overview"></a></h2>
|
||||
<p>There are multiple ways to customize Bootstrap. Your best path can depend on your project, the complexity of your build tools, the version of Bootstrap you’re using, browser support, and more.</p>
|
||||
@@ -629,12 +633,12 @@
|
||||
<script src="/docs/5.2/assets/js/docs.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
document.querySelectorAll('.btn-edit').forEach(btn => {
|
||||
btn.addEventListener('click', event => {
|
||||
const htmlSnippet = event.target.closest('.bd-code-snippet').querySelector('.bd-example').innerHTML
|
||||
|
||||
|
||||
|
||||
const classes = Array.from(event.target.closest('.bd-code-snippet').querySelector('.bd-example').classList).join(' ')
|
||||
|
||||
const jsSnippet = event.target.closest('.bd-code-snippet').querySelector('.btn-edit').getAttribute('data-sb-js-snippet')
|
||||
@@ -678,7 +682,7 @@ ${htmlSnippet.replace(/^/gm, ' ')}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="position-fixed"><input type="text" tabindex="-1"></div>
|
||||
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user