DRY up layouts by creating a default
This commit is contained in:
parent
97b4571370
commit
7c1792312f
5 changed files with 118 additions and 241 deletions
47
_layouts/default.html
Normal file
47
_layouts/default.html
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
{% capture absurl %}{{ site.url }}{{ site.baseurl }}{% endcapture %}
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ site.locale | slice: 0,2 }}">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
{% include head.html %}
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="{{ layout.class }}">
|
||||||
|
|
||||||
|
{% include browser-upgrade.html %}
|
||||||
|
|
||||||
|
{% include navigation.html %}
|
||||||
|
|
||||||
|
{% if page.image.feature %}
|
||||||
|
<div class="image-wrap">
|
||||||
|
<img src=
|
||||||
|
{% if page.image.feature contains 'http' %}
|
||||||
|
"{{ page.image.feature }}"
|
||||||
|
{% else %}
|
||||||
|
"{{ page.image.feature | prepend: "/images/" | prepend: absurl }}"
|
||||||
|
{% endif %}
|
||||||
|
alt="{{ page.title }} feature image">
|
||||||
|
{% if page.image.credit %}
|
||||||
|
<span class="image-credit">Photo Credit: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></span>
|
||||||
|
{% endif %}
|
||||||
|
</div><!-- /.image-wrap -->
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div id="main" role="main">
|
||||||
|
<div class="article-author-side">
|
||||||
|
{% include author-bio.html %}
|
||||||
|
</div>
|
||||||
|
{{ content }}
|
||||||
|
</div><!-- /#main -->
|
||||||
|
|
||||||
|
<div class="footer-wrap">
|
||||||
|
<footer>
|
||||||
|
{% include footer.html %}
|
||||||
|
</footer>
|
||||||
|
</div><!-- /.footer-wrap -->
|
||||||
|
|
||||||
|
{% include scripts.html %}
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1,40 +1,8 @@
|
||||||
{% capture absurl %}{{ site.url }}{{ site.baseurl }}{% endcapture %}
|
---
|
||||||
|
layout: default
|
||||||
|
---
|
||||||
|
|
||||||
<!doctype html>
|
<div id="index">
|
||||||
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
|
|
||||||
<!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
|
|
||||||
<!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie9" lang="en"><![endif]-->
|
|
||||||
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"><!--<![endif]-->
|
|
||||||
<head>
|
|
||||||
{% include head.html %}
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="home">
|
|
||||||
|
|
||||||
{% include browser-upgrade.html %}
|
|
||||||
|
|
||||||
{% include navigation.html %}
|
|
||||||
|
|
||||||
{% if page.image.feature %}
|
|
||||||
<div class="image-wrap">
|
|
||||||
<img src=
|
|
||||||
{% if page.image.feature contains 'http' %}
|
|
||||||
"{{ page.image.feature }}"
|
|
||||||
{% else %}
|
|
||||||
"{{ page.image.feature | prepend: "/images/" | prepend: absurl }}"
|
|
||||||
{% endif %}
|
|
||||||
alt="{{ page.title }} feature image">
|
|
||||||
{% if page.image.credit %}
|
|
||||||
<span class="image-credit">Photo Credit: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></span>
|
|
||||||
{% endif %}
|
|
||||||
</div><!-- /.image-wrap -->
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div id="main" role="main">
|
|
||||||
<div class="article-author-side">
|
|
||||||
{% include author-bio.html %}
|
|
||||||
</div>
|
|
||||||
<div id="index">
|
|
||||||
<h3><a href="{{ absurl }}/posts/">Recent Posts</a></h3>
|
<h3><a href="{{ absurl }}/posts/">Recent Posts</a></h3>
|
||||||
{% for post in site.posts limit:5 %}
|
{% for post in site.posts limit:5 %}
|
||||||
<article>
|
<article>
|
||||||
|
@ -46,16 +14,4 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</article>
|
</article>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div><!-- /#index -->
|
</div><!-- /#index -->
|
||||||
</div><!-- /#main -->
|
|
||||||
|
|
||||||
<div class="footer-wrap">
|
|
||||||
<footer>
|
|
||||||
{% include footer.html %}
|
|
||||||
</footer>
|
|
||||||
</div><!-- /.footer-wrap -->
|
|
||||||
|
|
||||||
{% include scripts.html %}
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,40 +1,8 @@
|
||||||
{% capture absurl %}{{ site.url }}{{ site.baseurl }}{% endcapture %}
|
---
|
||||||
|
layout: default
|
||||||
|
---
|
||||||
|
|
||||||
<!doctype html>
|
<article class="page">
|
||||||
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
|
|
||||||
<!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
|
|
||||||
<!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie9" lang="en"><![endif]-->
|
|
||||||
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"><!--<![endif]-->
|
|
||||||
<head>
|
|
||||||
{% include head.html %}
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="page">
|
|
||||||
|
|
||||||
{% include browser-upgrade.html %}
|
|
||||||
|
|
||||||
{% include navigation.html %}
|
|
||||||
|
|
||||||
{% if page.image.feature %}
|
|
||||||
<div class="image-wrap">
|
|
||||||
<img src=
|
|
||||||
{% if page.image.feature contains 'http' %}
|
|
||||||
"{{ page.image.feature }}"
|
|
||||||
{% else %}
|
|
||||||
"{{ page.image.feature | prepend: "/images/" | prepend: absurl }}"
|
|
||||||
{% endif %}
|
|
||||||
alt="{{ page.title }} feature image">
|
|
||||||
{% if page.image.credit %}
|
|
||||||
<span class="image-credit">Photo Credit: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></span>
|
|
||||||
{% endif %}
|
|
||||||
</div><!-- /.image-wrap -->
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div id="main" role="main">
|
|
||||||
<div class="article-author-side">
|
|
||||||
{% include author-bio.html %}
|
|
||||||
</div>
|
|
||||||
<article class="page">
|
|
||||||
<h1>{{ page.title }}</h1>
|
<h1>{{ page.title }}</h1>
|
||||||
<div class="article-wrap">
|
<div class="article-wrap">
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
@ -46,16 +14,8 @@
|
||||||
{% if site.owner.disqus-shortname and page.comments == true %}
|
{% if site.owner.disqus-shortname and page.comments == true %}
|
||||||
<section id="disqus_thread"></section><!-- /#disqus_thread -->
|
<section id="disqus_thread"></section><!-- /#disqus_thread -->
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</article>
|
</article>
|
||||||
</div><!-- /#index -->
|
|
||||||
|
|
||||||
<div class="footer-wrap">
|
{% if site.owner.disqus-shortname and page.comments == true %}
|
||||||
<footer>
|
<section id="disqus_thread"></section><!-- /#disqus_thread -->
|
||||||
{% include footer.html %}
|
{% endif %}
|
||||||
</footer>
|
|
||||||
</div><!-- /.footer-wrap -->
|
|
||||||
|
|
||||||
{% include scripts.html %}
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,40 +1,8 @@
|
||||||
{% capture absurl %}{{ site.url }}{{ site.baseurl }}{% endcapture %}
|
---
|
||||||
|
layout: default
|
||||||
|
---
|
||||||
|
|
||||||
<!doctype html>
|
<div id="index">
|
||||||
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
|
|
||||||
<!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
|
|
||||||
<!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie9" lang="en"><![endif]-->
|
|
||||||
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"><!--<![endif]-->
|
|
||||||
<head>
|
|
||||||
{% include head.html %}
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="post-index">
|
|
||||||
|
|
||||||
{% include browser-upgrade.html %}
|
|
||||||
|
|
||||||
{% include navigation.html %}
|
|
||||||
|
|
||||||
{% if page.image.feature %}
|
|
||||||
<div class="image-wrap">
|
|
||||||
<img src=
|
|
||||||
{% if page.image.feature contains 'http' %}
|
|
||||||
"{{ page.image.feature }}"
|
|
||||||
{% else %}
|
|
||||||
"{{ page.image.feature | prepend: "/images/" | prepend: absurl }}"
|
|
||||||
{% endif %}
|
|
||||||
alt="{{ page.title }} feature image">
|
|
||||||
{% if page.image.credit %}
|
|
||||||
<span class="image-credit">Photo Credit: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></span>
|
|
||||||
{% endif %}
|
|
||||||
</div><!-- /.image-wrap -->
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div id="main" role="main">
|
|
||||||
<div class="article-author-side">
|
|
||||||
{% include author-bio.html %}
|
|
||||||
</div>
|
|
||||||
<div id="index">
|
|
||||||
<h1>{{ page.title }}</h1>
|
<h1>{{ page.title }}</h1>
|
||||||
{% capture written_year %}'None'{% endcapture %}
|
{% capture written_year %}'None'{% endcapture %}
|
||||||
{% for post in site.posts %}
|
{% for post in site.posts %}
|
||||||
|
@ -52,16 +20,4 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</article>
|
</article>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div><!-- /#index -->
|
</div><!-- /#index -->
|
||||||
</div><!-- /#main -->
|
|
||||||
|
|
||||||
<div class="footer-wrap">
|
|
||||||
<footer>
|
|
||||||
{% include footer.html %}
|
|
||||||
</footer>
|
|
||||||
</div><!-- /.footer-wrap -->
|
|
||||||
|
|
||||||
{% include scripts.html %}
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,40 +1,8 @@
|
||||||
{% capture absurl %}{{ site.url }}{{ site.baseurl }}{% endcapture %}
|
---
|
||||||
|
layout: default
|
||||||
|
---
|
||||||
|
|
||||||
<!doctype html>
|
<article class="post">
|
||||||
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
|
|
||||||
<!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
|
|
||||||
<!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie9" lang="en"><![endif]-->
|
|
||||||
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"><!--<![endif]-->
|
|
||||||
<head>
|
|
||||||
{% include head.html %}
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="post">
|
|
||||||
|
|
||||||
{% include browser-upgrade.html %}
|
|
||||||
|
|
||||||
{% include navigation.html %}
|
|
||||||
|
|
||||||
{% if page.image.feature %}
|
|
||||||
<div class="image-wrap">
|
|
||||||
<img src=
|
|
||||||
{% if page.image.feature contains 'http' %}
|
|
||||||
"{{ page.image.feature }}"
|
|
||||||
{% else %}
|
|
||||||
"{{ page.image.feature | prepend: "/images/" | prepend: absurl }}"
|
|
||||||
{% endif %}
|
|
||||||
alt="{{ page.title }} feature image">
|
|
||||||
{% if page.image.credit %}
|
|
||||||
<span class="image-credit">Photo Credit: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></span>
|
|
||||||
{% endif %}
|
|
||||||
</div><!-- /.image-wrap -->
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div id="main" role="main">
|
|
||||||
<div class="article-author-side">
|
|
||||||
{% include author-bio.html %}
|
|
||||||
</div>
|
|
||||||
<article class="post">
|
|
||||||
<div class="headline-wrap">
|
<div class="headline-wrap">
|
||||||
{% if page.link %}
|
{% if page.link %}
|
||||||
<h1><a href="{{ page.link }}">{{ page.title }}</a></h1>
|
<h1><a href="{{ page.link }}">{{ page.title }}</a></h1>
|
||||||
|
@ -50,14 +18,13 @@
|
||||||
<p class="byline"><strong>{{ page.title }}</strong> was published on <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %d, %Y" }}</time>{% if page.modified %} and last modified on <time datetime="{{ page.modified | date: "%Y-%m-%d" }}">{{ page.modified | date: "%B %d, %Y" }}</time>{% endif %}.</p>
|
<p class="byline"><strong>{{ page.title }}</strong> was published on <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %d, %Y" }}</time>{% if page.modified %} and last modified on <time datetime="{{ page.modified | date: "%Y-%m-%d" }}">{{ page.modified | date: "%B %d, %Y" }}</time>{% endif %}.</p>
|
||||||
</footer>
|
</footer>
|
||||||
</div><!-- /.article-wrap -->
|
</div><!-- /.article-wrap -->
|
||||||
|
|
||||||
{% if site.owner.disqus-shortname and page.comments == true %}
|
{% if site.owner.disqus-shortname and page.comments == true %}
|
||||||
<section id="disqus_thread"></section><!-- /#disqus_thread -->
|
<section id="disqus_thread"></section><!-- /#disqus_thread -->
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</article>
|
</article>
|
||||||
</div><!-- /#main -->
|
|
||||||
|
|
||||||
<div class="footer-wrap">
|
{% if site.related_posts.size > 0 %}
|
||||||
{% if site.related_posts.size > 0 %}
|
|
||||||
<div class="related-articles">
|
<div class="related-articles">
|
||||||
<h4>You might also enjoy <small class="pull-right">(<a href="{{ absurl }}/posts/">View all posts</a>)</small></h4>
|
<h4>You might also enjoy <small class="pull-right">(<a href="{{ absurl }}/posts/">View all posts</a>)</small></h4>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -67,13 +34,4 @@
|
||||||
</ul>
|
</ul>
|
||||||
<hr />
|
<hr />
|
||||||
</div><!-- /.related-articles -->
|
</div><!-- /.related-articles -->
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<footer>
|
|
||||||
{% include footer.html %}
|
|
||||||
</footer>
|
|
||||||
</div><!-- /.footer-wrap -->
|
|
||||||
|
|
||||||
{% include scripts.html %}
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Reference in a new issue