1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-24 03:40:10 +00:00

rem-ify blog example and clean a few visuals up

This commit is contained in:
Mark Otto 2014-12-04 14:32:13 -08:00
parent b811553147
commit aab9218c7f
2 changed files with 61 additions and 56 deletions

View File

@ -2,6 +2,12 @@
* Globals * Globals
*/ */
@media (min-width: 48em) {
html {
font-size: 18px;
}
}
body { body {
font-family: Georgia, "Times New Roman", Times, serif; font-family: Georgia, "Times New Roman", Times, serif;
color: #555; color: #555;
@ -13,7 +19,6 @@ h3, .h3,
h4, .h4, h4, .h4,
h5, .h5, h5, .h5,
h6, .h6 { h6, .h6 {
margin-top: 0;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: normal; font-weight: normal;
color: #333; color: #333;
@ -24,10 +29,8 @@ h6, .h6 {
* Override Bootstrap's default container. * Override Bootstrap's default container.
*/ */
@media (min-width: 1200px) { .container {
.container { max-width: 60rem;
width: 970px;
}
} }
@ -36,41 +39,40 @@ h6, .h6 {
*/ */
.blog-masthead { .blog-masthead {
margin-bottom: 3rem;
background-color: #428bca; background-color: #428bca;
-webkit-box-shadow: inset 0 -2px 5px rgba(0,0,0,.1); box-shadow: inset 0 -.1rem .25rem rgba(0,0,0,.1);
box-shadow: inset 0 -2px 5px rgba(0,0,0,.1);
} }
/* Nav links */ /* Nav links */
.blog-nav-item { .nav-link {
position: relative; position: relative;
display: inline-block; padding: 1rem;
padding: 10px;
font-weight: 500; font-weight: 500;
color: #cdddeb; color: #cdddeb;
} }
.blog-nav-item:hover, .nav-link:hover,
.blog-nav-item:focus { .nav-link:focus {
color: #fff; color: #fff;
text-decoration: none; background-color: transparent;
} }
/* Active state gets a caret at the bottom */ /* Active state gets a caret at the bottom */
.blog-nav .active { .nav-link.active {
color: #fff; color: #fff;
} }
.blog-nav .active:after { .nav-link.active:after {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 50%; left: 50%;
width: 0; width: 0;
height: 0; height: 0;
margin-left: -5px; margin-left: -.3rem;
vertical-align: middle; vertical-align: middle;
content: " "; content: "";
border-right: 5px solid transparent; border-right: .3rem solid transparent;
border-bottom: 5px solid; border-bottom: .3rem solid;
border-left: 5px solid transparent; border-left: .3rem solid transparent;
} }
@ -79,39 +81,40 @@ h6, .h6 {
*/ */
.blog-header { .blog-header {
padding-top: 20px; margin-bottom: 2rem;
padding-bottom: 20px; padding-bottom: 1.25rem;
border-bottom: .05rem solid #eee;
} }
.blog-title { .blog-title {
margin-top: 30px;
margin-bottom: 0; margin-bottom: 0;
font-size: 60px; font-size: 2rem;
font-weight: normal; font-weight: normal;
} }
.blog-description { .blog-description {
font-size: 20px; font-size: 1.1rem;
color: #999; color: #999;
} }
@media (min-width: 40em) {
.blog-title {
font-size: 3.5rem;
}
}
/* /*
* Main column and sidebar layout * Main column and sidebar layout
*/ */
.blog-main {
font-size: 18px;
line-height: 1.5;
}
/* Sidebar modules for boxing content */ /* Sidebar modules for boxing content */
.sidebar-module { .sidebar-module {
padding: 15px; padding: 1rem;
margin: 0 -15px 15px; /*margin: 0 -1rem 1rem;*/
} }
.sidebar-module-inset { .sidebar-module-inset {
padding: 15px; padding: 1rem;
background-color: #f5f5f5; background-color: #f5f5f5;
border-radius: 4px; border-radius: .25rem;
} }
.sidebar-module-inset p:last-child, .sidebar-module-inset p:last-child,
.sidebar-module-inset ul:last-child, .sidebar-module-inset ul:last-child,
@ -122,14 +125,14 @@ h6, .h6 {
/* Pagination */ /* Pagination */
.pager { .pager {
margin-bottom: 60px; margin-bottom: 4rem;
text-align: left; text-align: left;
} }
.pager > li > a { .pager > li > a {
width: 140px; width: 8rem;
padding: 10px 20px; padding: .75rem 1.25rem;
text-align: center; text-align: center;
border-radius: 30px; border-radius: 2rem;
} }
@ -138,14 +141,14 @@ h6, .h6 {
*/ */
.blog-post { .blog-post {
margin-bottom: 60px; margin-bottom: 4rem;
} }
.blog-post-title { .blog-post-title {
margin-bottom: 5px; margin-bottom: .25rem;
font-size: 40px; font-size: 2.5rem;
} }
.blog-post-meta { .blog-post-meta {
margin-bottom: 20px; margin-bottom: 1.25rem;
color: #999; color: #999;
} }
@ -155,11 +158,11 @@ h6, .h6 {
*/ */
.blog-footer { .blog-footer {
padding: 40px 0; padding: 2.5rem 0;
color: #999; color: #999;
text-align: center; text-align: center;
background-color: #f9f9f9; background-color: #f9f9f9;
border-top: 1px solid #e5e5e5; border-top: .05rem solid #e5e5e5;
} }
.blog-footer p:last-child { .blog-footer p:last-child {
margin-bottom: 0; margin-bottom: 0;

View File

@ -24,22 +24,24 @@
<div class="blog-masthead"> <div class="blog-masthead">
<div class="container"> <div class="container">
<nav class="blog-nav"> <nav class="nav blog-nav">
<a class="blog-nav-item active" href="#">Home</a> <a class="nav-link active" href="#">Home</a>
<a class="blog-nav-item" href="#">New features</a> <a class="nav-link" href="#">New features</a>
<a class="blog-nav-item" href="#">Press</a> <a class="nav-link" href="#">Press</a>
<a class="blog-nav-item" href="#">New hires</a> <a class="nav-link" href="#">New hires</a>
<a class="blog-nav-item" href="#">About</a> <a class="nav-link" href="#">About</a>
</nav> </nav>
</div> </div>
</div> </div>
<div class="container">
<div class="blog-header"> <div class="blog-header">
<div class="container">
<h1 class="blog-title">The Bootstrap Blog</h1> <h1 class="blog-title">The Bootstrap Blog</h1>
<p class="lead blog-description">The official example template of creating a blog with Bootstrap.</p> <p class="lead blog-description">An example blog template built with Bootstrap.</p>
</div> </div>
</div>
<div class="container">
<div class="row"> <div class="row">
@ -106,8 +108,8 @@
<nav> <nav>
<ul class="pager"> <ul class="pager">
<li><a href="#">Previous</a></li> <li><a href="#">Older</a></li>
<li><a href="#">Next</a></li> <li class="disabled"><a href="#">Newer</a></li>
</ul> </ul>
</nav> </nav>