Skip to content

Commit

Permalink
use post layout by default for blog posts; use same layouts as my web…
Browse files Browse the repository at this point in the history
…site
  • Loading branch information
daattali committed Mar 28, 2016
1 parent a0ec106 commit 0f997ee
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 48 deletions.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ defaults:
path: ""
type: "posts"
values:
layout: "post"
comments: true # add comments to all blog posts
-
scope:
Expand Down
32 changes: 32 additions & 0 deletions _layouts/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
common-css:
- "/css/bootstrap.min.css"
- "/css/main.css"
common-ext-css:
- "//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"
common-googlefonts:
- "Lora:400,700,400italic,700italic"
- "Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800"
common-js:
- "/js/jquery-1.11.2.min.js"
- "/js/bootstrap.min.js"
- "/js/main.js"
---

<!DOCTYPE html>
<html lang="en">

{% include head.html %}

<body>

{% include nav.html %}

{{ content }}

{% include footer.html %}

{% include footer-scripts.html %}

</body>
</html>
33 changes: 5 additions & 28 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,9 @@
---
common-css:
- "/css/bootstrap.min.css"
- "/css/main.css"
common-ext-css:
- "//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"
common-googlefonts:
- "Lora:400,700,400italic,700italic"
- "Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800"
common-js:
- "/js/jquery-1.11.2.min.js"
- "/js/bootstrap.min.js"
- "/js/main.js"
layout: base
---

<!DOCTYPE html>
<html lang="en">
<div class="intro-header"></div>

{% include head.html %}

<body>

{% include nav.html %}

{{ content }}

{% include footer.html %}

{% include footer-scripts.html %}

</body>
</html>
<div role="main" class="container">
{{ content }}
</div>
2 changes: 1 addition & 1 deletion _layouts/minimal.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<body>

<div role="main" class="container main-content">
<div role="main" class="container">
{{ content }}
</div>

Expand Down
10 changes: 5 additions & 5 deletions _layouts/page.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: default
layout: base
---

{% include header.html type="page" %}
Expand All @@ -8,11 +8,11 @@
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{{ content }}
{% if page.comments %}
{% if page.comments %}
<div class="disqus-comments">
{% include disqus.html %}
{% include disqus.html %}
</div>
{% endif %}
{% endif %}
</div>
</div>
</div>
</div>
28 changes: 14 additions & 14 deletions _layouts/post.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: default
layout: base
---

{% include header.html type="post" %}
Expand All @@ -8,27 +8,27 @@
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<article role="main" class="blog-post">
{{ content }}
</article>
{{ content }}
</article>
<ul class="pager blog-pager">
{% if page.previous.url %}
<li class="previous">
<a href="{{ page.previous.url | prepend: site.baseurl | replace: '//', '/' }}" data-toggle="tooltip" data-placement="top" title="{{page.previous.title}}">&larr; Previous Post</a>
</li>
<li class="previous">
<a href="{{ page.previous.url | prepend: site.baseurl | replace: '//', '/' }}" data-toggle="tooltip" data-placement="top" title="{{page.previous.title}}">&larr; Previous Post</a>
</li>
{% endif %}
{% if page.next.url %}
<li class="next">
<a href="{{ page.next.url | prepend: site.baseurl | replace: '//', '/' }}" data-toggle="tooltip" data-placement="top" title="{{page.next.title}}">Next Post &rarr;</a>
</li>
<li class="next">
<a href="{{ page.next.url | prepend: site.baseurl | replace: '//', '/' }}" data-toggle="tooltip" data-placement="top" title="{{page.next.title}}">Next Post &rarr;</a>
</li>
{% endif %}
</ul>

{% if page.comments %}
{% if page.comments %}
<div class="disqus-comments">
{% include disqus.html %}
{% include disqus.html %}
</div>
{% endif %}
{% endif %}
</div>
</div>
</div>
</div>

0 comments on commit 0f997ee

Please sign in to comment.