Massive overhaul / update.

Introducing
* New helpers
* New header image
* Responsive / mobile styles
* Mobile device metatags and optimisations
* Initial blog icon support
* Restyled homepage feed
This commit is contained in:
John O'Nolan 2013-08-25 00:57:39 +02:00 committed by Hannah Wolfe
parent 75c3ad7f1b
commit 2b847c0530
4 changed files with 107 additions and 21 deletions

View File

@ -19,16 +19,18 @@
========================================================================== */ ========================================================================== */
html { html {
height: 100%;
max-height: 100%;
font-size: 62.5%; font-size: 62.5%;
} }
body { body {
height: 100%;
max-height: 100%;
font-family: 'Open Sans', sans-serif; font-family: 'Open Sans', sans-serif;
font-size: 2.0rem; font-size: 2.0rem;
line-height: 1.6em; line-height: 1.6em;
color: #50585D; color: #50585D;
word-break: break-word;
hyphens: auto;
} }
::-moz-selection { ::-moz-selection {
@ -265,21 +267,33 @@ table.plain {
========================================================================== */ ========================================================================== */
#sitehead { #sitehead {
position: relative;
width: 100%;
height: 60%;
text-align: center; text-align: center;
color: #fff; color: #fff;
background: #222; background: #909396 url(http://f.cl.ly/items/1N2205280l2u1l0h190o/bg.jpg) no-repeat center center;
position: relative; background-size: cover;
} }
#sitehead img { .blog-icon {
position: absolute;
top: 40px;
left: 40px;
border: #fff 3px solid;
-webkit-border-radius: 100%;
-moz-border-radius: 100%;
border-radius: 100%;
overflow: hidden;
box-shadow: rgba(0,0,0,0.1) 0 1px 2px;
}
.blog-icon img {
height: 80px;
width: auto;
min-width: 80px;
display: block; display: block;
width: 100%; line-height: 0;
height: auto;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
} }
#sitehead .wrap { #sitehead .wrap {
@ -307,13 +321,35 @@ table.plain {
margin: 0 auto; margin: 0 auto;
} }
.content { .post-template .content {
padding-top: 120px; padding-top: 120px;
} }
.post { .post {
position: relative;
width:80%;
max-width: 700px; max-width: 700px;
margin: 0 auto; border-bottom: #DDE6EB 1px solid;
margin: 1.6em auto;
word-break: break-word;
hyphens: auto;
}
.post:after {
display: block;
content: "";
width: 7px;
height: 7px;
border: #DDE6EB 1px solid;
position: absolute;
bottom: -5px;
left: 50%;
margin-left: -5px;
background: #fff;
-webkit-border-radius: 100%;
-moz-border-radius: 100%;
border-radius: 100%;
box-shadow: #fff 0 0 0 5px;
} }
.post-title { .post-title {
@ -444,4 +480,48 @@ table.plain {
.related-content p { .related-content p {
margin: 0; margin: 0;
} }
@media only screen and (max-width: 900px) {
#sitehead {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
height: auto;
min-height: 240px;
padding-top: 50%;
}
.post {
font-size: 0.9em;
line-height: 1.6em;
}
h1 {
font-size: 4.8rem;
line-height: 1.2em;
}
}/* max 900 */
@media only screen and (max-width: 500px) {
.post {
width:auto;
margin-left: 1.6rem;
margin-right: 1.6rem;
font-size: 0.8em;
line-height: 1.6em;
}
h1 {
font-size: 3rem;
line-height: 1.1em;
letter-spacing: 0;
}
}/* max 500 */

View File

@ -8,12 +8,16 @@
{{! Page Meta }} {{! Page Meta }}
<title>{{settings.title}}</title> <title>{{settings.title}}</title>
<meta name="description" content="{{settings.description}}" /> <meta name="description" content="{{settings.description}}" />
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{! Styles'n'Scripts }} {{! Styles'n'Scripts }}
<link rel="stylesheet" type="text/css" href="assets/css/screen.css"> <link rel="stylesheet" type="text/css" href="assets/css/screen.css">
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Lato:100|Open+Sans:400italic,700,400"> <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,700,400">
</head> </head>
<body> <body class="{{bodyclass}}">
{{! This is where shit gets real }} {{! This is where shit gets real }}
{{{body}}} {{{body}}}

View File

@ -1,7 +1,9 @@
{{!< default}} {{!< default}}
<header id="sitehead"> <header id="sitehead">
<img src="http://f.cl.ly/items/1N2205280l2u1l0h190o/bg.jpg" alt="" /> <figure class="blog-icon">
<img src="http://f.cl.ly/items/1O1o3n05373h222G101k/gravatar-j7-100.jpg" alt="John" />
</figure>
<div class="wrap"> <div class="wrap">
<h1>John O'Nolan</h1> <h1>John O'Nolan</h1>
<h2>A designer, developer and entrepreneur. Spends his time travelling the world with a bag of kites. Likes to write.</h2> <h2>A designer, developer and entrepreneur. Spends his time travelling the world with a bag of kites. Likes to write.</h2>
@ -16,10 +18,10 @@
<article class="post"> <article class="post">
<header class="post-header"> <header class="post-header">
<h2 class="post-title"><a href="/{{slug}}">{{title}}</a></h2> <h2 class="post-title"><a href="/{{slug}}">{{title}}</a></h2>
<span class="post-meta"><time datetime="2012-05-03">23 Aug 2013</time> in <a href="#">What I Learned Building...</a></span> <span class="post-meta"><time datetime="{{date published_at format='YYYY-MM-DD'}}">{{date published_at format='DD MMM YYYY'}}</time> in <a href="#">What I Learned Building...</a></span>
</header> </header>
<section class="post-excerpt"> <section class="post-excerpt">
{{content words="50"}} <p>{{excerpt}}&hellip;</p>
</section> </section>
</article> </article>

View File

@ -23,7 +23,7 @@
</section> </section>
<section class="publish-meta"> <section class="publish-meta">
<span class="publish-heading">Published</span> <span class="publish-heading">Published</span>
<time class="publish-date" datetime="{{dateFormat published_at format='YYYY-MM-DD'}}">{{dateFormat published_at format='DD MMMM YYYY'}}</time> <time class="publish-date" datetime="{{date published_at format='YYYY-MM-DD'}}">{{date published_at format='DD MMM YYYY'}}</time>
</section> </section>
</footer> </footer>