mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
Structure examples with appropriate <main>
, <header>
, <footer>
Structure examples with appropriate `<main>`, `<header>`, `<footer>`
This commit is contained in:
parent
3e546cacb4
commit
d1b3c0c98d
@ -18,6 +18,7 @@
|
||||
|
||||
<body>
|
||||
|
||||
<header>
|
||||
<div class="collapse bg-dark" id="navbarHeader">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@ -44,6 +45,9 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main role="main">
|
||||
|
||||
<section class="jumbotron text-center">
|
||||
<div class="container">
|
||||
@ -103,6 +107,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
<footer class="text-muted">
|
||||
<div class="container">
|
||||
<p class="float-right">
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
<body>
|
||||
|
||||
<header>
|
||||
<div class="blog-masthead">
|
||||
<div class="container">
|
||||
<nav class="nav">
|
||||
@ -36,8 +37,9 @@
|
||||
<p class="lead blog-description">An example blog template built with Bootstrap.</p>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="container">
|
||||
<main role="main" class="container">
|
||||
|
||||
<div class="row">
|
||||
|
||||
@ -109,7 +111,7 @@
|
||||
|
||||
</div><!-- /.blog-main -->
|
||||
|
||||
<div class="col-sm-3 ml-sm-auto blog-sidebar">
|
||||
<aside class="col-sm-3 ml-sm-auto blog-sidebar">
|
||||
<div class="sidebar-module sidebar-module-inset">
|
||||
<h4>About</h4>
|
||||
<p>Etiam porta <em>sem malesuada magna</em> mollis euismod. Cras mattis consectetur purus sit amet fermentum. Aenean lacinia bibendum nulla sed consectetur.</p>
|
||||
@ -139,11 +141,11 @@
|
||||
<li><a href="#">Facebook</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div><!-- /.blog-sidebar -->
|
||||
</aside><!-- /.blog-sidebar -->
|
||||
|
||||
</div><!-- /.row -->
|
||||
|
||||
</div><!-- /.container -->
|
||||
</main><!-- /.container -->
|
||||
|
||||
<footer class="blog-footer">
|
||||
<p>Blog template built for <a href="https://getbootstrap.com">Bootstrap</a> by <a href="https://twitter.com/mdo">@mdo</a>.</p>
|
||||
|
@ -17,6 +17,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
|
||||
<a class="navbar-brand" href="#">Carousel</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@ -40,6 +41,9 @@
|
||||
</form>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main role="main">
|
||||
|
||||
<div id="myCarousel" class="carousel slide" data-ride="carousel">
|
||||
<ol class="carousel-indicators">
|
||||
@ -161,14 +165,16 @@
|
||||
|
||||
<!-- /END THE FEATURETTES -->
|
||||
|
||||
</div><!-- /.container -->
|
||||
|
||||
|
||||
<!-- FOOTER -->
|
||||
<footer>
|
||||
<footer class="container">
|
||||
<p class="float-right"><a href="#">Back to top</a></p>
|
||||
<p>© 2017 Company, Inc. · <a href="#">Privacy</a> · <a href="#">Terms</a></p>
|
||||
</footer>
|
||||
|
||||
</div><!-- /.container -->
|
||||
</main>
|
||||
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
<div class="cover-container">
|
||||
|
||||
<div class="masthead clearfix">
|
||||
<header class="masthead clearfix">
|
||||
<div class="inner">
|
||||
<h3 class="masthead-brand">Cover</h3>
|
||||
<nav class="nav nav-masthead">
|
||||
@ -33,21 +33,21 @@
|
||||
<a class="nav-link" href="#">Contact</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="inner cover">
|
||||
<main role="main" class="inner cover">
|
||||
<h1 class="cover-heading">Cover your page.</h1>
|
||||
<p class="lead">Cover is a one-page template for building simple and beautiful home pages. Download, edit the text, and add your own fullscreen background photo to make it your own.</p>
|
||||
<p class="lead">
|
||||
<a href="#" class="btn btn-lg btn-secondary">Learn more</a>
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="mastfoot">
|
||||
<footer class="mastfoot">
|
||||
<div class="inner">
|
||||
<p>Cover template for <a href="https://getbootstrap.com">Bootstrap</a>, by <a href="https://twitter.com/mdo">@mdo</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
|
||||
<a class="navbar-brand" href="#">Dashboard</a>
|
||||
<button class="navbar-toggler d-lg-none" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@ -44,6 +45,7 @@
|
||||
</form>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
@ -91,7 +93,7 @@
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<main class="col-sm-9 ml-sm-auto col-md-10 pt-3" role="main">
|
||||
<main role="main" class="col-sm-9 ml-sm-auto col-md-10 pt-3">
|
||||
<h1>Dashboard</h1>
|
||||
|
||||
<section class="row text-center placeholders">
|
||||
|
@ -51,6 +51,8 @@
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main role="main">
|
||||
|
||||
<!-- Main jumbotron for a primary marketing message or call to action -->
|
||||
<div class="jumbotron">
|
||||
<div class="container">
|
||||
@ -82,11 +84,13 @@
|
||||
|
||||
<hr>
|
||||
|
||||
<footer>
|
||||
<p>© Company 2017</p>
|
||||
</footer>
|
||||
</div> <!-- /container -->
|
||||
|
||||
</main>
|
||||
|
||||
<footer class="container">
|
||||
<p>© Company 2017</p>
|
||||
</footer>
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
================================================== -->
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="masthead">
|
||||
<header class="masthead">
|
||||
<h3 class="text-muted">Project name</h3>
|
||||
|
||||
<nav class="navbar navbar-expand-md navbar-light bg-light rounded mb-3">
|
||||
@ -55,7 +55,9 @@
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main role="main">
|
||||
|
||||
<!-- Jumbotron -->
|
||||
<div class="jumbotron">
|
||||
@ -83,6 +85,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
<!-- Site footer -->
|
||||
<footer class="footer">
|
||||
<p>© Company 2017</p>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<div class="header clearfix">
|
||||
<header class="header clearfix">
|
||||
<nav>
|
||||
<ul class="nav nav-pills float-right">
|
||||
<li class="nav-item">
|
||||
@ -34,7 +34,9 @@
|
||||
</ul>
|
||||
</nav>
|
||||
<h3 class="text-muted">Project name</h3>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main role="main">
|
||||
|
||||
<div class="jumbotron">
|
||||
<h1 class="display-3">Jumbotron heading</h1>
|
||||
@ -66,6 +68,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
<footer class="footer">
|
||||
<p>© Company 2017</p>
|
||||
</footer>
|
||||
|
@ -42,13 +42,13 @@
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<main role="main" class="container">
|
||||
<div class="jumbotron">
|
||||
<h1>Navbar example</h1>
|
||||
<p class="lead">This example is a quick exercise to illustrate how fixed to top navbar works. As you scroll, it will remain fixed to the top of your browser's viewport.</p>
|
||||
<a class="btn btn-lg btn-primary" href="../../components/navbar/" role="button">View navbar docs »</a>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
|
@ -42,13 +42,13 @@
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<main role="main" class="container">
|
||||
<div class="jumbotron">
|
||||
<h1>Navbar example</h1>
|
||||
<p class="lead">This example is a quick exercise to illustrate how the top-aligned navbar works. As you scroll, this navbar remains in its original position and moves with the rest of the page.</p>
|
||||
<a class="btn btn-lg btn-primary" href="../../components/navbar/" role="button">View navbar docs »</a>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
|
@ -322,6 +322,7 @@
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main role="main">
|
||||
<div class="jumbotron">
|
||||
<div class="col-sm-8 mx-auto">
|
||||
<h1>Navbar examples</h1>
|
||||
@ -332,6 +333,7 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<main role="main" class="container">
|
||||
|
||||
<div class="row row-offcanvas row-offcanvas-right">
|
||||
|
||||
@ -115,12 +115,12 @@
|
||||
|
||||
<hr>
|
||||
|
||||
</main><!--/.container-->
|
||||
|
||||
<footer>
|
||||
<p>© Company 2017</p>
|
||||
</footer>
|
||||
|
||||
</div><!--/.container-->
|
||||
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
================================================== -->
|
||||
|
@ -51,14 +51,14 @@
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<main role="main" class="container">
|
||||
|
||||
<div class="starter-template">
|
||||
<h1>Bootstrap starter template</h1>
|
||||
<p class="lead">Use this document as a way to quickly start any new project.<br> All you get is this text and a mostly barebones HTML document.</p>
|
||||
</div>
|
||||
|
||||
</div><!-- /.container -->
|
||||
</main><!-- /.container -->
|
||||
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
<body>
|
||||
|
||||
<header>
|
||||
<!-- Fixed navbar -->
|
||||
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
|
||||
<a class="navbar-brand" href="#">Fixed navbar</a>
|
||||
@ -42,15 +43,16 @@
|
||||
</form>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<!-- Begin page content -->
|
||||
<div class="container">
|
||||
<main role="main" class="container">
|
||||
<div class="mt-3">
|
||||
<h1>Sticky footer with fixed navbar</h1>
|
||||
</div>
|
||||
<p class="lead">Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar has been added with <code>padding-top: 60px;</code> on the <code>body > .container</code>.</p>
|
||||
<p>Back to <a href="../sticky-footer">the default sticky footer</a> minus the navbar.</p>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
|
@ -19,13 +19,13 @@
|
||||
<body>
|
||||
|
||||
<!-- Begin page content -->
|
||||
<div class="container">
|
||||
<main role="main" class="container">
|
||||
<div class="mt-1">
|
||||
<h1>Sticky footer</h1>
|
||||
</div>
|
||||
<p class="lead">Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS.</p>
|
||||
<p>Use <a href="../sticky-footer-navbar">the sticky footer with a fixed navbar</a> if need be, too.</p>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
|
Loading…
Reference in New Issue
Block a user