Skip to content

Commit

Permalink
auto add title and date for posts
Browse files Browse the repository at this point in the history
  • Loading branch information
ynshung committed Nov 29, 2017
1 parent 6398a4b commit c48ace0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _includes/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="mdc-layout-grid__inner">
{% assign about = site.data.about %}
<div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-{% if about and page.about != false %}8{% else %}12{% endif %}" id="main-card">
{% if page.card == false %}
{% if page.card == false or page.layout == "post" %}
{{ content }}
{% else %}
<div class="page-card">
Expand Down
11 changes: 10 additions & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
---
layout: default
---
{{ content }}
<div class="mdc-card">
{% if page.img %}<section class="mdc-card__media" style="background-image:url({{ page.img }});height:{{page.imgheight}}"></section>{% endif %}
<section class="mdc-card__primary" style="padding-bottom: 2px">
<h1 class="mdc-card__title mdc-card__title--large">{{ page.title }}</h1>
<h2 class="mdc-card__subtitle">{{ page.date | date: "%d %b %Y" }}</h2>
</section>
<section class="mdc-card__supporting-text">
{{ content }}
</section>
</div>

0 comments on commit c48ace0

Please sign in to comment.