More styling
This commit is contained in:
parent
e899f33611
commit
d20e7a5ef8
12 changed files with 220 additions and 76 deletions
|
@ -4,7 +4,7 @@ permalink: pretty
|
|||
# Setup
|
||||
title: Tale
|
||||
subtitle: by Chester
|
||||
paginate: 1
|
||||
paginate: 2
|
||||
baseurl: ""
|
||||
url: "https://chesterhow.github.io/tale/"
|
||||
|
||||
|
|
|
@ -16,6 +16,12 @@
|
|||
<main>
|
||||
{{ content }}
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<span>
|
||||
© <time datetime="{{ site.time }}">{{ site.time | date: '%Y' }}</time>. All rights reserved.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
---
|
||||
layout: post
|
||||
title: "Introducing Tale 3"
|
||||
date: 2017-03-08 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.
|
||||
|
||||
Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk].
|
||||
|
||||
[jekyll-docs]: https://jekyllrb.com/docs/home
|
||||
[jekyll-gh]: https://github.com/jekyll/jekyll
|
||||
[jekyll-talk]: https://talk.jekyllrb.com/
|
|
@ -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.
|
114
_posts/2017-03-09-example-content.md
Normal file
114
_posts/2017-03-09-example-content.md
Normal file
|
@ -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>— 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.
|
|
@ -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.
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,10 +9,28 @@ 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;
|
||||
|
@ -20,24 +38,21 @@ html {
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -48,3 +63,12 @@ header {
|
|||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
footer {
|
||||
font-family: $sans-font;
|
||||
margin: 3rem 0;
|
||||
|
||||
span {
|
||||
color: $default-color;
|
||||
}
|
||||
}
|
||||
|
|
45
_sass/_post.scss
Normal file
45
_sass/_post.scss
Normal file
|
@ -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
index.html
10
index.html
|
@ -4,14 +4,14 @@ title: Home
|
|||
---
|
||||
|
||||
{% 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 %}
|
||||
|
|
|
@ -5,4 +5,5 @@
|
|||
|
||||
@import 'variables';
|
||||
@import 'layout';
|
||||
@import 'post';
|
||||
@import 'home';
|
||||
|
|
Loading…
Reference in a new issue