Skip to content

Commit

Permalink
More styling
Browse files Browse the repository at this point in the history
  • Loading branch information
chesterhow committed Mar 12, 2017
1 parent e899f33 commit d20e7a5
Show file tree
Hide file tree
Showing 12 changed files with 220 additions and 76 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ permalink: pretty
# Setup
title: Tale
subtitle: by Chester
paginate: 1
paginate: 2
baseurl: ""
url: "https://chesterhow.github.io/tale/"

Expand Down
6 changes: 6 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ <h4>[ {{ site.subtitle }} ]</h4>
<main>
{{ content }}
</main>

<footer>
<span>
&copy; <time datetime="{{ site.time }}">{{ site.time | date: '%Y' }}</time>. All rights reserved.
</span>
</footer>
</div>

</body>
Expand Down
8 changes: 8 additions & 0 deletions _layouts/post.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
layout: default
---

<div class="post">
<time class="post-time" datetime="{{ page.date }}">{{ page.date | date_to_string }}</time>
<h1 class="post-title">{{ page.title }}</h1>

{{ content }}

</div>
16 changes: 0 additions & 16 deletions _posts/2017-03-08-welcome-to-jekyll.markdown

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
layout: post
title: "Introducing Tale 2"
date: 2017-03-09 12:32:48 +0800
categories: jekyll update
synopsys: "Tale is a minimal Jekyll theme for writers. Find out more here."
---

You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.

To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.
Expand Down
114 changes: 114 additions & 0 deletions _posts/2017-03-09-example-content.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
layout: post
title: "Example content"
categories: jekyll update
---

Cum sociis natoque penatibus et magnis <a href="#">dis parturient montes</a>, nascetur ridiculus mus. *Aenean eu leo quam.* Pellentesque ornare sem lacinia quam venenatis vestibulum. Sed posuere consectetur est at lobortis. Cras mattis consectetur purus sit amet fermentum.

> Curabitur blandit tempus porttitor. Nullam quis risus eget urna mollis ornare vel eu leo. Nullam id dolor id nibh ultricies vehicula ut id elit.
Etiam porta **sem malesuada magna** mollis euismod. Cras mattis consectetur purus sit amet fermentum. Aenean lacinia bibendum nulla sed consectetur.

## Inline HTML elements

HTML defines a long list of available inline tags, a complete list of which can be found on the [Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web/HTML/Element).

- **To bold text**, use `<strong>`.
- *To italicize text*, use `<em>`.
- Abbreviations, like <abbr title="HyperText Markup Langage">HTML</abbr> should use `<abbr>`, with an optional `title` attribute for the full phrase.
- Citations, like <cite>&mdash; Mark otto</cite>, should use `<cite>`.
- <del>Deleted</del> text should use `<del>` and <ins>inserted</ins> text should use `<ins>`.
- Superscript <sup>text</sup> uses `<sup>` and subscript <sub>text</sub> uses `<sub>`.

Most of these elements are styled by browsers with few modifications on our part.

## Heading

Vivamus sagittis lacus vel augue rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.

### Code

Cum sociis natoque penatibus et magnis dis `code element` montes, nascetur ridiculus mus.

{% highlight js %}
// Example can be run directly in your JavaScript console

// Create a function that takes two arguments and returns the sum of those arguments
var adder = new Function("a", "b", "return a + b");

// Call the function
adder(2, 6);
// > 8
{% endhighlight %}

Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa.

### Lists

Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

* Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
* Donec id elit non mi porta gravida at eget metus.
* Nulla vitae elit libero, a pharetra augue.

Donec ullamcorper nulla non metus auctor fringilla. Nulla vitae elit libero, a pharetra augue.

1. Vestibulum id ligula porta felis euismod semper.
2. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
3. Maecenas sed diam eget risus varius blandit sit amet non magna.

Cras mattis consectetur purus sit amet fermentum. Sed posuere consectetur est at lobortis.

<dl>
<dt>HyperText Markup Language (HTML)</dt>
<dd>The language used to describe and define the content of a Web page</dd>

<dt>Cascading Style Sheets (CSS)</dt>
<dd>Used to describe the appearance of Web content</dd>

<dt>JavaScript (JS)</dt>
<dd>The programming language used to build advanced Web sites and applications</dd>
</dl>

Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Nullam quis risus eget urna mollis ornare vel eu leo.

### Tables

Aenean lacinia bibendum nulla sed consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

<table>
<thead>
<tr>
<th>Name</th>
<th>Upvotes</th>
<th>Downvotes</th>
</tr>
</thead>
<tfoot>
<tr>
<td>Totals</td>
<td>21</td>
<td>23</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>Alice</td>
<td>10</td>
<td>11</td>
</tr>
<tr>
<td>Bob</td>
<td>4</td>
<td>3</td>
</tr>
<tr>
<td>Charlie</td>
<td>7</td>
<td>9</td>
</tr>
</tbody>
</table>

Nullam id dolor id nibh ultricies vehicula ut id elit. Sed posuere consectetur est at lobortis. Nullam quis risus eget urna mollis ornare vel eu leo.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
layout: post
title: "Introducing Tale"
date: 2017-03-10 12:32:48 +0800
categories: jekyll update
synopsys: "Tale is a minimal Jekyll theme for writers. Find out more here."
---

You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.

To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.
Expand Down
48 changes: 6 additions & 42 deletions _sass/_home.scss
Original file line number Diff line number Diff line change
@@ -1,62 +1,26 @@
.post-preview {
margin-bottom: 30px;
.preview {
margin-bottom: 3rem;
position: relative;

time {
color: $default-tint;
font-size: 1.3em;
font-weight: 500;
letter-spacing: .3px;
}

h1 {
color: $default-shade;
font-size: 3.5em;
margin: 5px 0 10px;
}

p {
color: $default-color;
font-family: $serif-font;
font-size: 1em;
line-height: 1.5em;
margin: 0 0 5px;
text-align: justify;
}

.post-link {
text-align: right;
}

a {
color: $default-tint;
display: inline-block;
font-size: 1.3em;
font-weight: 500;
letter-spacing: .3px;
text-decoration: none;
}
}

.pagination {
font-family: $serif-font;
margin-bottom: 20px;
position: relative;
text-align: center;

span {
color: $default-shade;
font-size: 1.3em;
font-size: 1.1rem;
}

a {
@include transition(all .3s ease-out);
color: $default-color;
font-size: 1.3em;
font-size: 1.3rem;
position: absolute;
text-decoration: none;

&:hover {
&:hover,
&:focus {
color: $default-tint;
}
}
Expand Down
40 changes: 32 additions & 8 deletions _sass/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,50 @@ body {
}

html {
font-family: $sans-font;
font-family: $serif-font;
font-size: $default-font-size;
}

h1,
h2,
h3,
h4,
h5,
h6 {
font-family: $sans-font;
}

pre,
code {
font-family: menlo;
}

a {
text-decoration: none;
}

.container {
margin: 0 auto;
max-width: 1200px;
width: 80%;
}

header {
margin: 20px 0;
margin: 1.5rem 0;
text-align: center;

* {
margin: 0;
}

a {
text-decoration: none;
}

h2 {
@include transition(all .3s ease-out);
color: $default-color;
display: inline-block;
font-size: 3em;
font-size: 3rem;

&:hover {
&:hover,
&:focus {
opacity: .6;
}
}
Expand All @@ -48,3 +63,12 @@ header {
font-weight: 400;
}
}

footer {
font-family: $sans-font;
margin: 3rem 0;

span {
color: $default-color;
}
}
45 changes: 45 additions & 0 deletions _sass/_post.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
.post {
&-time {
color: $default-tint;
font-family: $sans-font;
font-size: 1.3rem;
font-weight: 500;
letter-spacing: .3px;
}

&-title {
color: $default-shade;
font-size: 2.5rem;
margin: 0 0 .8rem;

@media (min-width: 600px) {
font-size: 3.5rem;
}
}

p {
color: $default-color;
line-height: 1.5rem;
margin: 0 0 1rem;
text-align: justify;
}

.post-link {
text-align: right;

a {
@include transition (all .3s ease-out);
color: $default-tint;
display: inline-block;
font-family: $sans-font;
font-size: 1.3rem;
font-weight: 500;
letter-spacing: .3px;

&:hover,
&:focus {
color: $default-color;
}
}
}
}
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
---

{% for post in paginator.posts %}
<div class="post-preview">
<time datetime="{{ post.date }}">{{ post.date | date_to_string }}</time>
<h1>{{ post.title }}</h1>
<div class="post preview">
<time class="post-time" datetime="{{ post.date }}">{{ post.date | date_to_string }}</time>
<h1 class="post-title">{{ post.title }}</h1>

<p>{{ post.content | truncatewords: 70 | strip_html }}</p>
{{ post.content | truncatewords: 70 }}

<div class="post-link">
<a href="{{ post.url }}">continue reading</a>
<a href="{{ post.url | prepend: site.url }}">continue reading</a>
</div>
</div>
{% endfor %}
Expand Down
Loading

0 comments on commit d20e7a5

Please sign in to comment.