chungking 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +101 -0
- data/_includes/carousel.html +40 -0
- data/_includes/footer.html +30 -0
- data/_includes/head.html +22 -0
- data/_includes/header.html +19 -0
- data/_includes/post-navigation.html +22 -0
- data/_includes/toc.html +11 -0
- data/_layouts/default.html +11 -0
- data/_layouts/home.html +58 -0
- data/_layouts/page.html +22 -0
- data/_layouts/post.html +29 -0
- data/_sass/_base.scss +25 -0
- data/_sass/_components.scss +220 -0
- data/_sass/_prose.scss +147 -0
- data/_sass/_syntax.scss +82 -0
- data/_sass/_utilities.scss +206 -0
- data/_sass/_variables.scss +55 -0
- data/_sass/main.scss +5 -0
- data/assets/images/city-dawn-sunset-skyline-3337210.jpg +0 -0
- data/assets/images/flower-in-glass-jar-large.jpg +0 -0
- data/assets/images/flower-in-glass-jar.jpg +0 -0
- data/assets/images/greed-cover.jpg +0 -0
- data/assets/images/green-trees-by-the-lake-2949717.jpg +0 -0
- data/assets/images/portrait-photo-of-man-s-face-2599039.jpg +0 -0
- data/assets/js/carousel.js +18 -0
- data/assets/js/header.js +26 -0
- data/assets/js/toc.js +9 -0
- data/assets/styles.scss +4 -0
- metadata +114 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 9f641f828314b6aad332546fec8f53cbbabad79dfa4175dd58a2211724e8e85e
|
|
4
|
+
data.tar.gz: 57db0f99233c927937243e98e3711ffd4e8e8903bf13001d9b6a1108a35653f8
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 84da3c082d3dfcc40a1ed8de9e00a67bce4003f4a5e4b9969fc627a023b2604a416069428061be7430ced9fbef357ec7b63e385cde7af09105c17950db33ff46
|
|
7
|
+
data.tar.gz: 235bcb69848277496da7e58699317aea19e92055fe642eabfd77283264a0d6b168c555668a9b569e070c88fd24172e6f5412c226c04df664acc04e743f5cb804
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 mmdlow
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# chungking
|
|
2
|
+
|
|
3
|
+
Chungking is a modern, elegant Jekyll theme with a focus on clear yet stylish content delivery. If you're looking to do some heavy blogging or article writing, Chungking is for you.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
#### Featured post carousel
|
|
8
|
+
|
|
9
|
+
Show off the best posts on your site via an image carousel on the main page. Any post with the `featured: true` property set in the front matter will automatically be added to the carousel.
|
|
10
|
+
|
|
11
|
+
#### Table of contents
|
|
12
|
+
|
|
13
|
+
For long posts with multiple sections, generate a table of contents corresponding to the markdown headers in your text. It's as simple as setting `toc: true` in your front matter.
|
|
14
|
+
|
|
15
|
+
#### Mobile-ready
|
|
16
|
+
|
|
17
|
+
Chungking's responsive design ensures smooth scaling across devices with different screen sizes.
|
|
18
|
+
|
|
19
|
+
## Configuration
|
|
20
|
+
|
|
21
|
+
#### Posts
|
|
22
|
+
|
|
23
|
+
Possible front matter configuration for posts:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
---
|
|
27
|
+
layout: post
|
|
28
|
+
title: My Post
|
|
29
|
+
blurb: A short description of the post. Truncates at 25 words.
|
|
30
|
+
image: /path/to/post/cover/image.jpg
|
|
31
|
+
# images typically go in the assets/images folder
|
|
32
|
+
|
|
33
|
+
featured: true
|
|
34
|
+
# Adds this post to the featured carousel on the home page
|
|
35
|
+
|
|
36
|
+
toc: true
|
|
37
|
+
# Generates a table of contents for the current post, based on the markdown header # tags in the text
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
My text...
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
#### Pages
|
|
44
|
+
|
|
45
|
+
New pages added in the `_pages` directory are automatically added to the header nav menu.
|
|
46
|
+
|
|
47
|
+
Page front matter configuration is similar to Post front matter, excluding the `blurb` and `featured` properties.
|
|
48
|
+
|
|
49
|
+
## Installation
|
|
50
|
+
|
|
51
|
+
#### Via Fork
|
|
52
|
+
|
|
53
|
+
Fork this repository, then add your own content.
|
|
54
|
+
|
|
55
|
+
#### Via Ruby Gems
|
|
56
|
+
|
|
57
|
+
Add these lines to your Jekyll site's `Gemfile`:
|
|
58
|
+
|
|
59
|
+
```ruby
|
|
60
|
+
group :jekyll_plugins do
|
|
61
|
+
gem "jekyll-paginate"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
gem "chungking"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Note that Chungking requires the **jekyll-paginate** gem to display posts properly.
|
|
68
|
+
|
|
69
|
+
And add these lines to your Jekyll site's `_config.yml`:
|
|
70
|
+
|
|
71
|
+
```yaml
|
|
72
|
+
theme: chungking
|
|
73
|
+
|
|
74
|
+
plugins:
|
|
75
|
+
- jekyll-paginate
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
And then execute:
|
|
79
|
+
|
|
80
|
+
$ bundle
|
|
81
|
+
|
|
82
|
+
Or install it yourself as:
|
|
83
|
+
|
|
84
|
+
$ gem install chungking
|
|
85
|
+
|
|
86
|
+
## Contributing
|
|
87
|
+
|
|
88
|
+
Bug reports and pull requests are welcome on [GitHub](https://github.com/mmdlow/chungking). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
89
|
+
|
|
90
|
+
## Development
|
|
91
|
+
|
|
92
|
+
To set up your environment to develop this theme, run `bundle install`.
|
|
93
|
+
|
|
94
|
+
Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
|
|
95
|
+
|
|
96
|
+
When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
|
|
97
|
+
To add a custom directory to your theme-gem, please edit the regexp in `chungking.gemspec` accordingly.
|
|
98
|
+
|
|
99
|
+
## License
|
|
100
|
+
|
|
101
|
+
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<div class="content mx-auto p-3 carousel">
|
|
2
|
+
{% assign featured_posts = site.posts | where: "featured", true %}
|
|
3
|
+
|
|
4
|
+
{% for post in featured_posts %}
|
|
5
|
+
{% if forloop.first %}
|
|
6
|
+
<div class="carousel-slide active" style="background-image: url('{{ post.image | prepend: site.baseurl }}');">
|
|
7
|
+
<div class="col-4 p-4 carousel-card">
|
|
8
|
+
<h2 class="pb-4">
|
|
9
|
+
<a href="{{ post.url | prepend: site.baseurl }}">{{ post.title | truncate: 35 }}</a>
|
|
10
|
+
</h2>
|
|
11
|
+
<div class="col-4 border-top-thick"></div>
|
|
12
|
+
<h6 class="py-4 mb-4">{{ post.date | date: '%d %b %Y' }}</h6>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
{% else %}
|
|
16
|
+
<div class="carousel-slide" style="background-image: url('{{ post.image | prepend: site.baseurl }}');">
|
|
17
|
+
<div class="col-4 p-4 carousel-card">
|
|
18
|
+
<h2 class="pb-4">
|
|
19
|
+
<a href="{{ post.url | prepend: site.baseurl }}">{{ post.title | truncate: 35 }}</a>
|
|
20
|
+
</h2>
|
|
21
|
+
<div class="col-4 border-top-thick"></div>
|
|
22
|
+
<h6 class="py-4 mb-4">{{ post.date | date: '%d %b %Y' }}</h6>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
{% endif %}
|
|
26
|
+
{% endfor %}
|
|
27
|
+
|
|
28
|
+
{% if featured_posts.size > 1 %}
|
|
29
|
+
<div class="col-4 px-4 flex space-between carousel-navigation">
|
|
30
|
+
<div class="col-3 carousel-btn btn-prev border-left-thick">
|
|
31
|
+
<h5 class="ml-3">Previous</h5>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="col-3 carousel-btn btn-next border-right-thick text-right">
|
|
34
|
+
<h5 class="mr-3">Next</h5>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
{% endif %}
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<script src="{{ site.baseurl }}/assets/js/carousel.js"></script>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<div class="p-3 footer-nav">
|
|
2
|
+
<div class="width-lg-stretch pt-3 content mx-auto flex space-between border-top">
|
|
3
|
+
<div class="my-2 align-items-center">
|
|
4
|
+
<a class="header-brand" href="{{ site.baseurl }}/">{{ site.title }}</a>
|
|
5
|
+
<span class="small ml-2">copyright © 2020. created by {{ site.author }}</span>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="my-2">
|
|
8
|
+
{% if site.instagram %}
|
|
9
|
+
<a class="mr-3 ml-lg-3 mr-lg-0" href="{{ site.instagram }}">
|
|
10
|
+
<div data-icon="ei-sc-instagram" data-size="s"></div>
|
|
11
|
+
</a>
|
|
12
|
+
{% endif %}
|
|
13
|
+
{% if site.twitter %}
|
|
14
|
+
<a class="mr-3 ml-lg-3 mr-lg-0" href="{{ site.twitter }}">
|
|
15
|
+
<div data-icon="ei-sc-twitter" data-size="s"></div>
|
|
16
|
+
</a>
|
|
17
|
+
{% endif %}
|
|
18
|
+
{% if site.facebook %}
|
|
19
|
+
<a class="mr-3 ml-lg-3 mr-lg-0" href="{{ site.facebook }}">
|
|
20
|
+
<div data-icon="ei-sc-facebook" data-size="s"></div>
|
|
21
|
+
</a>
|
|
22
|
+
{% endif %}
|
|
23
|
+
{% if site.github %}
|
|
24
|
+
<a class="mr-3 ml-lg-3 mr-lg-0" href="{{ site.github }}">
|
|
25
|
+
<div data-icon="ei-sc-github" data-size="s"></div>
|
|
26
|
+
</a>
|
|
27
|
+
{% endif %}
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
data/_includes/head.html
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<head>
|
|
2
|
+
<meta charset="utf-8">
|
|
3
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
|
+
<meta name=:author" content="{{ site.author }}">
|
|
6
|
+
<meta name="description"
|
|
7
|
+
content="{{ page.excerpt | default: site.description | strip_html | strip_newlines | normalize_whitespace | truncate: 160 | escape }}">
|
|
8
|
+
|
|
9
|
+
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
|
|
10
|
+
|
|
11
|
+
{% assign user_url = site.url | append: site.baseurl %}
|
|
12
|
+
{% assign full_base_url = user_url | default: site.github.url %}
|
|
13
|
+
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
|
|
14
|
+
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}"
|
|
15
|
+
href="{{ '/feed.xml' | prepend: site.baseurl | prepend: site.url }}">
|
|
16
|
+
<link href="https://fonts.googleapis.com/css?family=Archivo:400,400i,700&display=swap" rel="stylesheet">
|
|
17
|
+
<link href="https://fonts.googleapis.com/css?family=Anonymous+Pro:400,700&display=swap" rel="stylesheet">
|
|
18
|
+
<link rel="stylesheet" href="{{ '/assets/styles.css' | prepend: full_base_url }}">
|
|
19
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/evil-icons@1.9.0/assets/evil-icons.min.css">
|
|
20
|
+
<script src="https://cdn.jsdelivr.net/npm/evil-icons@1.9.0/assets/evil-icons.min.js"></script>
|
|
21
|
+
|
|
22
|
+
</head>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<header class="py-2 header-nav">
|
|
2
|
+
<div class="width-lg-stretch px-3 content mx-auto flex space-between">
|
|
3
|
+
<div class="my-2 flex space-between">
|
|
4
|
+
<a class="header-brand" href="{{ site.baseurl }}/">{{ site.title }}</a>
|
|
5
|
+
<a class="header-menu-btn">
|
|
6
|
+
<div data-icon="ei-navicon" data-size="s"></div>
|
|
7
|
+
</a>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="my-2 header-menu-lg-stretch">
|
|
10
|
+
{% for page in site.html_pages %}
|
|
11
|
+
{% unless page.title == 'Home' %}
|
|
12
|
+
<a class="header-link mr-2 ml-lg-2 mr-lg-0" href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>
|
|
13
|
+
{% endunless %}
|
|
14
|
+
{% endfor %}
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</header>
|
|
18
|
+
|
|
19
|
+
<script src="{{ site.baseurl }}/assets/js/header.js"></script>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<div class="flex space-between">
|
|
2
|
+
{% if page.previous.url %}
|
|
3
|
+
<div class="col-3 border-left-thick">
|
|
4
|
+
<a href="{{ page.previous.url | prepend: site.baseurl }}">
|
|
5
|
+
<h5 class="ml-3 mb-1">Previous</h5>
|
|
6
|
+
<span class="ml-3">{{ page.previous.title }}</span>
|
|
7
|
+
</a>
|
|
8
|
+
</div>
|
|
9
|
+
{% else %}
|
|
10
|
+
<div class="col-3"></div>
|
|
11
|
+
{% endif %}
|
|
12
|
+
{% if page.next.url %}
|
|
13
|
+
<div class="col-3 border-right-thick text-right">
|
|
14
|
+
<a href="{{ page.next.url | prepend: site.baseurl }}">
|
|
15
|
+
<h5 class="mb-1 mr-3">Next</h5>
|
|
16
|
+
<span class="mr-3">{{ page.next.title }}</span>
|
|
17
|
+
</a c>
|
|
18
|
+
</div>
|
|
19
|
+
{% else %}
|
|
20
|
+
<div class="col-3"></div>
|
|
21
|
+
{% endif %}
|
|
22
|
+
</div>
|
data/_includes/toc.html
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<div class="col-2">
|
|
2
|
+
{% if page.toc %}
|
|
3
|
+
<div class="toc pr-2">
|
|
4
|
+
<h4 class="pb-3 toc-title">Contents</h4>
|
|
5
|
+
<div class="contents"></div>
|
|
6
|
+
</div>
|
|
7
|
+
{% endif %}
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<script src="https://unpkg.com/scrollnav@3.0.1/dist/scrollnav.min.umd.js"></script>
|
|
11
|
+
<script src="{{ site.baseurl }}/assets/js/toc.js"></script>
|
data/_layouts/home.html
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: default
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<div class="content-wrapper">
|
|
6
|
+
{% include carousel.html %}
|
|
7
|
+
<div class="content mx-auto p-3">
|
|
8
|
+
{% for post in paginator.posts %}
|
|
9
|
+
<div class="width-lg-stretch py-4 flex space-between postcard">
|
|
10
|
+
<div class="full-width">
|
|
11
|
+
<h3 class="mb-3">
|
|
12
|
+
<a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
|
|
13
|
+
</h3>
|
|
14
|
+
<div class="my-2 col-1 border-bottom-thick"></div>
|
|
15
|
+
|
|
16
|
+
{% if post.blurb %}
|
|
17
|
+
<p class="my-3">{{ post.blurb | truncatewords:25 }}</p>
|
|
18
|
+
{% else %}
|
|
19
|
+
<p class="my-3">{{ post.content | strip_html | truncatewords:40 }}</p>
|
|
20
|
+
{% endif %}
|
|
21
|
+
|
|
22
|
+
<span class="mb-3 bold secondary">{{ post.date | date: '%d %b %Y' }}</span>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="mr-2 ml-lg-2 mr-lg-0 flex align-center">
|
|
25
|
+
{% if post.image %}
|
|
26
|
+
<a href="{{ post.url | prepend: site.baseurl }}">
|
|
27
|
+
<img class="image-thumbnail image-lg-stretch" src="{{ post.image | prepend: site.baseurl }}"></a>
|
|
28
|
+
{% endif %}</div>
|
|
29
|
+
</div>
|
|
30
|
+
{% endfor %}
|
|
31
|
+
|
|
32
|
+
{% if paginator.total_pages > 1 %}
|
|
33
|
+
<div class="mt-4 flex space-between">
|
|
34
|
+
{% if paginator.previous_page %}
|
|
35
|
+
<div class="border-left-thick">
|
|
36
|
+
<a href="{{ paginator.previous_page_path | prepend: site.baseurl }}">
|
|
37
|
+
<h5 class="ml-3">newer posts</h5>
|
|
38
|
+
</a>
|
|
39
|
+
</div>
|
|
40
|
+
{% else %}
|
|
41
|
+
<div class="col-1"></div>
|
|
42
|
+
{% endif %}
|
|
43
|
+
|
|
44
|
+
<h5>page {{ paginator.page }} of {{ paginator.total_pages }}</h5>
|
|
45
|
+
|
|
46
|
+
{% if paginator.next_page %}
|
|
47
|
+
<div class="border-right-thick text-right">
|
|
48
|
+
<a href="{{ paginator.next_page_path | prepend: site.baseurl }}">
|
|
49
|
+
<h5 class="mr-3">older posts</h5>
|
|
50
|
+
</a>
|
|
51
|
+
</div>
|
|
52
|
+
{% else %}
|
|
53
|
+
<div class="col-1"></div>
|
|
54
|
+
{% endif %}
|
|
55
|
+
</div>
|
|
56
|
+
{% endif %}
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
data/_layouts/page.html
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: default
|
|
3
|
+
---
|
|
4
|
+
<div class="content-wrapper">
|
|
5
|
+
<div class="content mx-auto p-3">
|
|
6
|
+
<div class="py-4">
|
|
7
|
+
<h1 class="col-4 mb-4">{{ page.title }}</h1>
|
|
8
|
+
<div class="col-2 mb-4 pb-4 border-top-thick"></div>
|
|
9
|
+
|
|
10
|
+
{% if page.image %}
|
|
11
|
+
<img class="image-post" src="{{ page.image | prepend: site.baseurl }}"></a>
|
|
12
|
+
{% endif %}
|
|
13
|
+
|
|
14
|
+
<div class="flex py-4 my-4">
|
|
15
|
+
{% include toc.html %}
|
|
16
|
+
<div class="col-6 px-3 width-lg-stretch border-left">
|
|
17
|
+
<div class="prose">{{ content }}</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
data/_layouts/post.html
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: default
|
|
3
|
+
---
|
|
4
|
+
<div class="content-wrapper">
|
|
5
|
+
<div class="content mx-auto p-3">
|
|
6
|
+
<div class="py-4">
|
|
7
|
+
<h1 class="col-4 mb-4">{{ page.title }}</h1>
|
|
8
|
+
<div class="col-2 border-top-thick"></div>
|
|
9
|
+
<div class="my-4 pb-4">
|
|
10
|
+
{% if page.blurb %}
|
|
11
|
+
<p class="mb-3">{{ page.blurb }}</p>
|
|
12
|
+
{% endif %}
|
|
13
|
+
<h5 class="secondary">{{ page.date | date: '%d %b %Y' }}</h5>
|
|
14
|
+
</div>
|
|
15
|
+
{% if page.image %}
|
|
16
|
+
<img class="image-post" src="{{ page.image | prepend: site.baseurl }}"></a>
|
|
17
|
+
{% endif %}
|
|
18
|
+
<div class="flex py-4 my-4">
|
|
19
|
+
{% include toc.html %}
|
|
20
|
+
<div class="col-6 px-3 width-lg-stretch border-left">
|
|
21
|
+
<div class="prose">{{ content }}</div>
|
|
22
|
+
<div class="mt-4 pt-4">
|
|
23
|
+
{% include post-navigation.html %}
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
data/_sass/_base.scss
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
* {
|
|
2
|
+
box-sizing: border-box !important;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
body, h1, h2, h3, h4, h5, h6, p, ol, ul, figure, hr, blockquote, dl, dd, dt, pre, figure {
|
|
6
|
+
padding: 0;
|
|
7
|
+
margin: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
a {
|
|
11
|
+
text-decoration: none;
|
|
12
|
+
color: $color-black;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
body {
|
|
16
|
+
font-family: $font-family-sans-serif;
|
|
17
|
+
font-size: $font-size;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
h1 { font-size: $h1-size; }
|
|
21
|
+
h2 { font-size: $h2-size; }
|
|
22
|
+
h3 { font-size: $h3-size; }
|
|
23
|
+
h4 { font-size: $h4-size; }
|
|
24
|
+
h5 { font-size: $h5-size; }
|
|
25
|
+
h6 { font-size: $h6-size; }
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
@import "variables";
|
|
2
|
+
|
|
3
|
+
/* Header */
|
|
4
|
+
.header {
|
|
5
|
+
&-brand {
|
|
6
|
+
font-weight: bold !important;
|
|
7
|
+
color: $color-dark-gray;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&-link {
|
|
11
|
+
font-weight: bold !important;
|
|
12
|
+
color: $color-black;
|
|
13
|
+
text-decoration: none !important;
|
|
14
|
+
display: inline-block;
|
|
15
|
+
|
|
16
|
+
&:after {
|
|
17
|
+
content: "";
|
|
18
|
+
display: flex;
|
|
19
|
+
margin: 0 auto;
|
|
20
|
+
height: $border-weight;
|
|
21
|
+
background: $color-black;
|
|
22
|
+
transition: width $transition-time ease 0s;
|
|
23
|
+
width: 0;
|
|
24
|
+
position: relative;
|
|
25
|
+
top: $space-1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:hover:after {
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&-nav {
|
|
34
|
+
position: fixed;
|
|
35
|
+
width: 100%;
|
|
36
|
+
transition: transform $transition-time ease 0s;
|
|
37
|
+
z-index: 100;
|
|
38
|
+
background-color: $header-color;
|
|
39
|
+
|
|
40
|
+
&.hide {
|
|
41
|
+
transform: translateY(-100%);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.reveal {
|
|
45
|
+
transform: none;
|
|
46
|
+
border-bottom: $border-weight solid $color-black;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.header-menu-btn {
|
|
50
|
+
display: none;
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@media(max-width: $breakpoint-lg) {
|
|
55
|
+
.header-menu-lg-stretch {
|
|
56
|
+
display: none;
|
|
57
|
+
|
|
58
|
+
&.reveal {
|
|
59
|
+
display: block;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.header-menu-btn {
|
|
64
|
+
display: block;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Footer */
|
|
71
|
+
.footer {
|
|
72
|
+
|
|
73
|
+
&-nav {
|
|
74
|
+
top: $header-height;
|
|
75
|
+
position: relative;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Carousel */
|
|
80
|
+
.carousel {
|
|
81
|
+
position: relative;
|
|
82
|
+
color: $color-white;
|
|
83
|
+
|
|
84
|
+
a {
|
|
85
|
+
color: $color-white;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&-card {
|
|
89
|
+
height: inherit;
|
|
90
|
+
border-radius: $border-radius;
|
|
91
|
+
background-color: rgba($color: $color-black, $alpha: 0.6);
|
|
92
|
+
transition: width $transition-time;
|
|
93
|
+
|
|
94
|
+
@media (max-width: $breakpoint-lg) {
|
|
95
|
+
width: 100% !important;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@media (max-width: $breakpoint-sm) {
|
|
99
|
+
h2 {
|
|
100
|
+
font-size: $h3-size;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&-slide {
|
|
106
|
+
height: $carousel-height;
|
|
107
|
+
border-radius: $border-radius;
|
|
108
|
+
background-color: $color-light-gray;
|
|
109
|
+
background-size: cover;
|
|
110
|
+
opacity: 0;
|
|
111
|
+
z-index: 1;
|
|
112
|
+
position: absolute;
|
|
113
|
+
top: $space-3;
|
|
114
|
+
left: $space-3;
|
|
115
|
+
right: $space-3;
|
|
116
|
+
transition: opacity $transition-time;
|
|
117
|
+
|
|
118
|
+
&.active {
|
|
119
|
+
opacity: 1;
|
|
120
|
+
z-index: 2;
|
|
121
|
+
position: relative;
|
|
122
|
+
top: 0;
|
|
123
|
+
left: 0;
|
|
124
|
+
right: 0;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&-navigation {
|
|
129
|
+
z-index: 3;
|
|
130
|
+
position: relative;
|
|
131
|
+
width: 100%;
|
|
132
|
+
top: -$space-4 * 1.5;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&-btn {
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* Evil Icons */
|
|
141
|
+
.icon {
|
|
142
|
+
fill: $color-black !important;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Images */
|
|
146
|
+
img.image {
|
|
147
|
+
&-thumbnail {
|
|
148
|
+
width: $img-width-sm;
|
|
149
|
+
height: $img-height-sm;
|
|
150
|
+
object-fit: cover;
|
|
151
|
+
border-radius: $border-radius;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&-post {
|
|
155
|
+
width: 100%;
|
|
156
|
+
border-radius: $border-radius;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Home page postcard */
|
|
161
|
+
.postcard {
|
|
162
|
+
|
|
163
|
+
@media(max-width: $breakpoint-lg) {
|
|
164
|
+
img.image-lg-stretch {
|
|
165
|
+
display: block !important;
|
|
166
|
+
width: 100%;
|
|
167
|
+
height: 100%;
|
|
168
|
+
margin-top: 1em;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* Post and page table of contents */
|
|
174
|
+
.toc {
|
|
175
|
+
position: sticky;
|
|
176
|
+
top: $space-4 * 2;
|
|
177
|
+
overflow-y: auto;
|
|
178
|
+
max-height: calc(100vh - #{$content-height-offset});
|
|
179
|
+
|
|
180
|
+
@media(max-width: $breakpoint-lg) {
|
|
181
|
+
display: none;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.scroll-nav {
|
|
185
|
+
|
|
186
|
+
.scroll-nav__item {
|
|
187
|
+
padding-left: $space-3;
|
|
188
|
+
font-size: $post-font-size;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.scroll-nav__sub-item {
|
|
192
|
+
font-size: $font-size;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.scroll-nav__item, .scroll-nav__sub-item {
|
|
196
|
+
|
|
197
|
+
&--active::before {
|
|
198
|
+
left: 0;
|
|
199
|
+
border-left: $border-weight * 2 solid $color-black;
|
|
200
|
+
content: "";
|
|
201
|
+
display: block;
|
|
202
|
+
position: absolute;
|
|
203
|
+
height: 1em;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
li {
|
|
208
|
+
margin-bottom: 1em;
|
|
209
|
+
list-style-type: none;
|
|
210
|
+
|
|
211
|
+
ol {
|
|
212
|
+
margin-top: 1em;
|
|
213
|
+
|
|
214
|
+
li {
|
|
215
|
+
margin-bottom: 0.5em;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|