1
0
mirror of https://github.com/danbee/danbarber.me synced 2025-03-04 08:59:10 +00:00

Refactor and simplify CSS and dates

This commit is contained in:
Daniel Barber 2016-07-05 21:35:04 -04:00
parent 632a2a670a
commit 12d73d5b63
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
8 changed files with 64 additions and 70 deletions

View File

@ -2,7 +2,7 @@ $max-width: 800px !default;
$pad-min: 8.5% !default;
header[role=banner] {
padding: 0.52em 0 0.42em;
padding: 1em 0 0.5em;
h1 {
font-size: 3.43em;
margin: 0;
@ -10,7 +10,6 @@ header[role=banner] {
color: white;
line-height: 0;
text-decoration: none;
text-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
span {
width: 0;
font-size: 0;

View File

@ -9,13 +9,8 @@ body > div > div {
}
body > header {
border-color: $header-color;
@include background(linear-gradient(top, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0.15) 100%));
background-color: $header-color;
border-width: 0 0 1px;
border-style: solid;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), inset 0 -1px 0px rgba(255, 255, 255, 0.4);
padding-top: 0.8em;
padding-top: 0.9em;
padding-bottom: 0.9em;
h1 a {
//display: inline-block
@ -51,7 +46,6 @@ header nav {
}
a {
@include transition(text-shadow 0.25s 0s ease);
text-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
color: white;
text-decoration: none;
&:hover, &:focus {

View File

@ -13,9 +13,7 @@
<h1 class="entry-title">{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}</h1>
{% endif %}
{% endif %}
<p class="meta">
{% include post/date.html %}
</p>
{% if post.date %}<p class="meta">{% include post/date.html date=post.date %}{{ time }}</p>{% endif %}
</header>
{% endunless %}
{% if index %}
@ -29,8 +27,8 @@
<div class="entry-content">{{ content }}</div>
<footer>
<p class="meta">
{% include post/author.html %}
{% include post/date.html %}{% if updated %}{{ updated }}{% else %}{{ time }}{% endif %}
{% if page.date %}{% include post/date.html date=page.date %}{% if updated %}{{ updated }}{% else %}{{ time }}{% endif %}{% endif %}
|
{% include post/categories.html %}
</p>
</footer>

47
_includes/head.html Normal file
View File

@ -0,0 +1,47 @@
<meta charset="utf-8">
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}</title>
<!-- Meta tags -->
<meta name="author" content="{{ site.author }}">
{% capture description %}{% if page.description %}{{ page.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %}
<meta name="description" content="{{ site.description | strip_html | strip_newlines | truncate:150 }}">
{% if page.keywords %}<meta name="keywords" content="{{ page.keywords }}">{% endif %}
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- Links -->
<link href="{{ site.subscribe_rss }}" rel="alternate" title="{{site.title}}" type="application/atom+xml">
<link rel="canonical" href="{{ canonical }}">
<!-- Large favicon for Opera Speed Dial -->
<link rel="icon" type="image/png" href="{{ 'speeddial-icon.png' | asset_path }}">
<!-- iOS favicons -->
<link href="{{ 'favicon.ico' | asset_path }}" rel="shortcut icon">
{{ 'styles' | stylesheet }}
{{ 'main' | javascript }}
<!-- 144x144 for iPad 3rd and 4th generation -->
<link rel="apple-touch-icon" sizes="144x144" href="{{ 'apple-touch-icon-144x144.png' | asset_path }}">
<!-- 114x114 for iPhone 4, 4S, 5 and 2012 iPod Touch -->
<link rel="apple-touch-icon" sizes="114x114" href="{{ 'apple-touch-icon-114x114.png' | asset_path }}">
<!-- 72x72 for 1st generation iPad, iPad 2 and iPad mini -->
<link rel="apple-touch-icon" sizes="72x72" href="{{ 'apple-touch-icon-72x72.png' | asset_path }}">
<!-- 57x57 for iPhone 3GS, 2011 iPod Touch and older Android devices -->
<link rel="apple-touch-icon" href="{{ 'apple-touch-icon.png' | asset_path }}">
<!-- Windows 8 Pinned Site -->
<meta name="msapplication-TileImage" content="{{ 'win8-pinsite.png' | asset_path }}">
<meta name="msapplication-TileColor" content="#4B8400">
<meta name="application-name" content="DanBarber.me">
<!-- Safari pinned tab -->
<link rel="mask-icon" href="{{ 'favicon.svg' | asset_path }}" color="#4B8400">
<script type="text/javascript" src="//use.typekit.com/ori1zzm.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<meta property="og:title" content="{{ page.title }}">
<meta property="og:url" content="{{ site.url }}{{ page.url }}">
<meta property="og:description" content="{% if page.excerpt != nil %}{{ page.excerpt | strip_html | truncatewords:50 }}{% else %}{{ site.description }}{% endif %}">
<meta property="og:locale" content="en_UK">
<meta property="og:type" content="article">

View File

@ -1 +1 @@
{% if post.date %}<time datetime="{{ post.date | datetime | date_to_xmlschema }}" pubdate>{{ post.date | pretty }}</time>{% endif %}
<time datetime="{{ include.date | datetime | date_to_xmlschema }}" pubdate>{{ include.date | pretty }}</time>

View File

@ -1,54 +1,8 @@
<!DOCTYPE HTML>
<!doctype html>
{% capture root_url %}{{ site.root | strip_slash }}{% endcapture %}
<html>
<head>
<meta charset="utf-8">
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}</title>
<!-- Meta tags -->
<meta name="author" content="{{ site.author }}">
{% capture description %}{% if page.description %}{{ page.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %}
<meta name="description" content="{{ site.description | strip_html | strip_newlines | truncate:150 }}">
{% if page.keywords %}<meta name="keywords" content="{{ page.keywords }}">{% endif %}
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- Links -->
<link href="{{ site.subscribe_rss }}" rel="alternate" title="{{site.title}}" type="application/atom+xml">
<link rel="canonical" href="{{ canonical }}">
<!-- Large favicon for Opera Speed Dial -->
<link rel="icon" type="image/png" href="{{ 'speeddial-icon.png' | asset_path }}">
<!-- iOS favicons -->
<link href="{{ 'favicon.ico' | asset_path }}" rel="shortcut icon">
{{ 'styles' | stylesheet }}
{{ 'main' | javascript }}
<!-- 144x144 for iPad 3rd and 4th generation -->
<link rel="apple-touch-icon" sizes="144x144" href="{{ 'apple-touch-icon-144x144.png' | asset_path }}">
<!-- 114x114 for iPhone 4, 4S, 5 and 2012 iPod Touch -->
<link rel="apple-touch-icon" sizes="114x114" href="{{ 'apple-touch-icon-114x114.png' | asset_path }}">
<!-- 72x72 for 1st generation iPad, iPad 2 and iPad mini -->
<link rel="apple-touch-icon" sizes="72x72" href="{{ 'apple-touch-icon-72x72.png' | asset_path }}">
<!-- 57x57 for iPhone 3GS, 2011 iPod Touch and older Android devices -->
<link rel="apple-touch-icon" href="{{ 'apple-touch-icon.png' | asset_path }}">
<!-- Windows 8 Pinned Site -->
<meta name="msapplication-TileImage" content="{{ 'win8-pinsite.png' | asset_path }}">
<meta name="msapplication-TileColor" content="#4B8400">
<meta name="application-name" content="DanBarber.me">
<!-- Safari pinned tab -->
<link rel="mask-icon" href="{{ 'favicon.svg' | asset_path }}" color="#4B8400">
<script type="text/javascript" src="//use.typekit.com/ori1zzm.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<meta property="og:title" content="{{ page.title }}">
<meta property="og:url" content="{{ site.url }}{{ page.url }}">
<meta property="og:description" content="{% if page.excerpt != nil %}{{ page.excerpt | strip_html | truncatewords:50 }}{% else %}{{ site.description }}{% endif %}">
<meta property="og:locale" content="en_UK">
<meta property="og:type" content="article">
{% include head.html %}
</head>
<body>
{{ content | expand_urls: root_url }}

View File

@ -7,17 +7,17 @@ layout: default
<div id="content">
<article role="article">
{% if page.title %}
<header>
<h1 class="entry-title">{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}</h1>
{% if page.date %}<p class="meta">{% include post/date.html %}{{ time }}</p>{% endif %}
</header>
<header>
<h1 class="entry-title">{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}</h1>
</header>
{% endif %}
<div class="entry-content">{{ content }}</div>
{% unless page.footer == false %}
<footer>
{% if page.date or page.author %}<p class="meta">
{% if page.author %}{% include post/author.html %}{% endif %}
{% include post/date.html %}{% if updated %}{{ updated }}{% else %}{{ time }}{% endif %}
{% if page.categories %}{% include post/categories.html %}{% endif %}
</p>{% endif %}
</footer>

View File

@ -7,19 +7,21 @@ layout: default
{% include header.html %}
<div id="content">
{% assign index = true %}
{% for post in paginator.posts %}
{% assign content = post.content %}
<article>
{% include article.html %}
</article>
{% endfor %}
<div class="pagination">
{% if paginator.next_page %}
<a class="prev" href="{{ paginator.next_page_path }}">&larr; Older</a>
{% endif %}
{% if paginator.previous_page %}
<a class="next" href="{{ paginator.previous_page_path }}">Newer &rarr;</a>
<a class="next" href="{{ paginator.previous_page_path }}">Newer &rarr;</a>
{% endif %}
</div>
</div>