updated index.html
This commit is contained in:
parent
2d9e9837da
commit
3c3385a90d
2 changed files with 141 additions and 18 deletions
77
css/offcanvas.css
Normal file
77
css/offcanvas.css
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
overflow-x: hidden; /* Prevent scroll on narrow devices */
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
padding-top: 56px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 991.98px) {
|
||||||
|
.offcanvas-collapse {
|
||||||
|
position: fixed;
|
||||||
|
top: 56px; /* Height of navbar */
|
||||||
|
bottom: 0;
|
||||||
|
left: 100%;
|
||||||
|
width: 100%;
|
||||||
|
padding-right: 1rem;
|
||||||
|
padding-left: 1rem;
|
||||||
|
overflow-y: auto;
|
||||||
|
visibility: hidden;
|
||||||
|
background-color: #343a40;
|
||||||
|
transition: visibility .3s ease-in-out, -webkit-transform .3s ease-in-out;
|
||||||
|
transition: transform .3s ease-in-out, visibility .3s ease-in-out;
|
||||||
|
transition: transform .3s ease-in-out, visibility .3s ease-in-out, -webkit-transform .3s ease-in-out;
|
||||||
|
}
|
||||||
|
.offcanvas-collapse.open {
|
||||||
|
visibility: visible;
|
||||||
|
-webkit-transform: translateX(-100%);
|
||||||
|
transform: translateX(-100%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-scroller {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
height: 2.75rem;
|
||||||
|
overflow-y: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-scroller .nav {
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-ms-flex-wrap: nowrap;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
padding-bottom: 1rem;
|
||||||
|
margin-top: -1px;
|
||||||
|
overflow-x: auto;
|
||||||
|
color: rgba(255, 255, 255, .75);
|
||||||
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-underline .nav-link {
|
||||||
|
padding-top: .75rem;
|
||||||
|
padding-bottom: .75rem;
|
||||||
|
font-size: .875rem;
|
||||||
|
color: #6c757d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-underline .nav-link:hover {
|
||||||
|
color: #007bff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-underline .active {
|
||||||
|
font-weight: 500;
|
||||||
|
color: #343a40;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-white-50 { color: rgba(255, 255, 255, .5); }
|
||||||
|
|
||||||
|
.bg-purple { background-color: #6f42c1; }
|
||||||
|
|
||||||
|
.lh-100 { line-height: 1; }
|
||||||
|
.lh-125 { line-height: 1.25; }
|
||||||
|
.lh-150 { line-height: 1.5; }
|
||||||
|
|
78
index.html
78
index.html
|
@ -9,30 +9,76 @@
|
||||||
<!-- Bootstrap CSS -->
|
<!-- Bootstrap CSS -->
|
||||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
|
||||||
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
||||||
|
<link rel="canonical" href="https://getbootstrap.com/docs/4.3/examples/offcanvas/">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.bd-placeholder-img {
|
||||||
|
font-size: 1.125rem;
|
||||||
|
text-anchor: middle;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.bd-placeholder-img-lg {
|
||||||
|
font-size: 3.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<!-- Custom styles for this template -->
|
||||||
|
<link href="css/offcanvas.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<title>BlueWeather</title>
|
||||||
|
|
||||||
|
|
||||||
<title>Hello, world!</title>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
||||||
<body>
|
<body class="bg-light">
|
||||||
<h1>Hello, world!</h1>
|
|
||||||
|
|
||||||
<!-- Optional JavaScript -->
|
|
||||||
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
|
||||||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
|
|
||||||
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
|
|
||||||
crossorigin="anonymous"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
|
|
||||||
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
|
|
||||||
crossorigin="anonymous"></script>
|
|
||||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
|
|
||||||
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
|
|
||||||
crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
<div class="alert alert-primary" role="alert">
|
<main role="main" class="container">
|
||||||
A simple primary alert—check it out!
|
<div class="d-flex align-items-center p-3 my-3 text-white-50 bg-purple rounded shadow-sm">
|
||||||
|
<img class="mr-3" src="/docs/4.3/assets/brand/bootstrap-outline.svg" alt="" width="48" height="48">
|
||||||
|
<div class="lh-100">
|
||||||
|
<h6 class="mb-0 text-white lh-100">Bootstrap</h6>
|
||||||
|
<small>Since 2011</small>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="my-3 p-3 bg-white rounded shadow-sm">
|
||||||
|
<h6 class="border-bottom border-gray pb-2 mb-0">Recent updates</h6>
|
||||||
|
<div class="media text-muted pt-3">
|
||||||
|
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 32x32"><title>Placeholder</title><rect width="100%" height="100%" fill="#007bff"/><text x="50%" y="50%" fill="#007bff" dy=".3em">32x32</text></svg>
|
||||||
|
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
|
||||||
|
<strong class="d-block text-gray-dark">@username</strong>
|
||||||
|
Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="media text-muted pt-3">
|
||||||
|
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 32x32"><title>Placeholder</title><rect width="100%" height="100%" fill="#e83e8c"/><text x="50%" y="50%" fill="#e83e8c" dy=".3em">32x32</text></svg>
|
||||||
|
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
|
||||||
|
<strong class="d-block text-gray-dark">@username</strong>
|
||||||
|
Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="media text-muted pt-3">
|
||||||
|
<svg class="bd-placeholder-img mr-2 rounded" width="32" height="32" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 32x32"><title>Placeholder</title><rect width="100%" height="100%" fill="#6f42c1"/><text x="50%" y="50%" fill="#6f42c1" dy=".3em">32x32</text></svg>
|
||||||
|
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
|
||||||
|
<strong class="d-block text-gray-dark">@username</strong>
|
||||||
|
Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<small class="d-block text-right mt-3">
|
||||||
|
<a href="#">All updates</a>
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
||||||
|
<script>window.jQuery || document.write('<script src="/docs/4.3/assets/js/vendor/jquery-slim.min.js"><\/script>')</script><script src="/docs/4.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-xrRywqdh3PHs8keKZN+8zzc5TX0GRTLCcmivcbNJWm2rs5C8PRhcEn3czEjhAO9o" crossorigin="anonymous"></script>
|
||||||
|
<script src="offcanvas.js"></script></body>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in a new issue