Skip to content

Commit

Permalink
Major style change on home page
Browse files Browse the repository at this point in the history
Added Palatino font
  • Loading branch information
chesterhow committed Mar 21, 2017
1 parent c1230cc commit 4850bf9
Show file tree
Hide file tree
Showing 9 changed files with 86 additions and 18 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
permalink: pretty

# Setup
title: Tale
title: tale
subtitle: by Chester
paginate: 5
baseurl: ""
Expand Down
15 changes: 13 additions & 2 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,20 @@
<div class="container">
<header>
<a href="{{ site.baseurl }}/" title="Home">
<h2>{{ site.title }}</h2>
<h2>{{ site.title }}</h2>
</a>
<h4>[ {{ site.subtitle }} ]</h4>

<div class="line"></div>

<h4>{{ site.subtitle | upcase }}</h4>

<div class="nav-container">
<nav>
<a href="#">about</a>
<a href="#">posts</a>
<a href="#">updates</a>
</nav>
</div>
</header>

<main>
Expand Down
5 changes: 3 additions & 2 deletions _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ body {
}

html {
font-family: $serif-font;
font-family: $baskerville;
font-size: $default-font-size;

}

body {
Expand All @@ -25,7 +26,7 @@ h3,
h4,
h5,
h6 {
font-family: $sans-font;
font-family: $palatino;
line-height: normal;
}

Expand Down
30 changes: 30 additions & 0 deletions _sass/_catalogue.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.catalogue {
text-align: center;

&-item {
padding: 1.5rem 0;

&:first-child {
padding-top: 2.5rem;
}

&:last-child {
padding-bottom: 2.5rem;
}
}

&-title {
@include transition(all .3s ease-out);
border-bottom: 1px solid $white;
border-top: 1px solid $white;
color: $default-shade;
font-family: $palatino;
font-size: 1.5rem;
font-weight: 700;
padding: .5rem 1rem;

&:hover {
border-color: $default-tint;
}
}
}
35 changes: 31 additions & 4 deletions _sass/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}

header {
margin: 1.5rem 0 0;
padding: 2rem 0 0;
text-align: center;

* {
Expand All @@ -17,6 +17,7 @@ header {
color: $default-color;
display: inline-block;
font-size: 2.8rem;
font-weight: 400;

&:hover,
&:focus {
Expand All @@ -26,14 +27,40 @@ header {

h4 {
color: $default-tint;
font-family: $serif-font;
font-size: .8rem;
font-weight: 400;
letter-spacing: .1rem;
}

.line {
border-top: 1px solid $default-color;
display: block;
margin: 0 auto .8rem;
width: 1rem;
}

.nav-container {
border-bottom: .5px solid $grey-2;
border-top: .5px solid $grey-2;
margin-top: 1.5rem;
}

nav {
display: flex;
justify-content: space-around;
margin: .5rem auto;
max-width: 350px;

a {
color: $default-color;
font-family: $palatino;
}
}
}

footer {
font-family: $sans-font;
margin: 1.5rem 0 3rem;
font-family: $palatino;
padding: 2rem 0;
text-align: center;

span {
Expand Down
2 changes: 1 addition & 1 deletion _sass/pagination.scss → _sass/_pagination.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.pagination {
border-bottom: .5px solid $grey-2;
border-top: .5px solid $grey-2;
font-family: $serif-font;
font-family: $baskerville;
padding: 1rem 0;
position: relative;
text-align: center;
Expand Down
4 changes: 3 additions & 1 deletion _sass/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ $default-tint: #aaa;
$grey-1: #979797;
$grey-2: #e5e5e5;
$grey-3: #f9f9f9;
$white: #fff;
$blue: #4a9ae1;

$serif-font: 'Libre Baskerville', 'Times New Roman', Times, serif;
$baskerville: 'Libre Baskerville', 'Times New Roman', Times, serif;
$palatino: Palatino, 'Palatino LT STD', 'Palatino Linotype', 'Book Antiqua', 'Georgia', serif;
$sans-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
$default-font-size: 16px;

Expand Down
10 changes: 3 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@
title: Home
---

<div>
<div class="catalogue">
{% for post in paginator.posts %}
<div class="post">
<time class="post-time" datetime="{{ post.date }}">{{ post.date | date_to_string | upcase }}</time>
<h1 class="post-title"><a href="{{ post.url | prepend: site.url }}">{{ post.title }}</a></h1>

{{ post.content | truncatewords: 50 }}

<div class="catalogue-item">
<a href="{{ post.url | prepend: site.url }}" class="catalogue-title">{{ post.title }}</a>
</div>
{% endfor %}
</div>
Expand Down
1 change: 1 addition & 0 deletions styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
@import 'syntax';
@import 'layout';
@import 'pagination';
@import 'catalogue';

0 comments on commit 4850bf9

Please sign in to comment.