Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklas Buschmann committed Jan 25, 2020
1 parent 01beb4e commit 0a5fd8d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
.bundle
.jekyll-cache
.sass-cache
Gemfile.lock
_site
Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ author: "Blog Author"
description: "Really cool blog about ... something"
permalink: /:title/
lang: "en"
date_format: "%B %d, %Y"

sidebar: true # show a sidebar instead of the usual header
show_excerpts: false # show article excerpts on the home page
Expand Down
6 changes: 3 additions & 3 deletions _layouts/home.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
layout: default
---
{%- assign posts = paginator.posts | default: site.posts -%}
{%- assign date_format = site.date_format | default: "%B %d, %Y" -%}

{% if site.show_excerpts %}
{%- assign posts = paginator.posts | default: site.posts -%}
{%- assign date_format = site.date_format | default: "%B %d, %Y" -%}
{% for post in posts %}
<article>
<header>
<h1><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h1>
<time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: date_format }}</time>
</header>
{{ post.excerpt }}
<p><a href="{{ post.url | relative_url }}">read more</a></p>
<div><a href="{{ post.url | relative_url }}">read more</a></div>
</article>
{% endfor %}
{% else %}
Expand Down
9 changes: 7 additions & 2 deletions assets/css/index.sass
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ body > header

{% endif %}

{% unless site.sidebar %}
{% if site.sidebar %}

header h1
font-size: 2em

{% else %}

@media (min-width: 100em)
body > header, body > article, body > footer
Expand All @@ -39,7 +44,7 @@ body > header
h1, h2, h3, h4, h5, h6
font-weight: inherit

{% endunless %}
{% endif %}

{% if site.show_excerpts %}

Expand Down
3 changes: 0 additions & 3 deletions assets/css/sidebar.sass
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ body > article, body > footer
padding: 2em 4em
max-width: 55em

header h1
font-size: 2em

nav
margin: 0 -2em

Expand Down

0 comments on commit 0a5fd8d

Please sign in to comment.