narwhal-jekyll-theme 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +230 -0
- data/_includes/disqus_comments.html +20 -0
- data/_includes/footer.html +10 -0
- data/_includes/google-analytics.html +12 -0
- data/_includes/head.html +11 -0
- data/_includes/header.html +14 -0
- data/_includes/icon-github.html +1 -0
- data/_includes/icon-github.svg +1 -0
- data/_includes/icon-twitter.html +1 -0
- data/_includes/icon-twitter.svg +1 -0
- data/_includes/post-list.html +25 -0
- data/_includes/social.html +17 -0
- data/_layouts/default.html +20 -0
- data/_layouts/home.html +17 -0
- data/_layouts/page.html +14 -0
- data/_layouts/portfolio-page.html +16 -0
- data/_layouts/portfolio.html +17 -0
- data/_layouts/post-list.html +7 -0
- data/_layouts/post.html +27 -0
- data/_sass/narwhal.scss +58 -0
- data/_sass/narwhal/_base.scss +308 -0
- data/_sass/narwhal/_layout.scss +321 -0
- data/_sass/narwhal/_syntax-highlighting.scss +71 -0
- data/assets/main.scss +5 -0
- data/assets/narwhal-social-icons.svg +33 -0
- metadata +127 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b1d770cf935fbb9473b3e8a6b295d42033586fed
|
4
|
+
data.tar.gz: 2476a84541ed55a3cbdbbc37076eef1c4dae2498
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0d71991fd877182fe0b008c2c58d2ae80638018275df41483b3207bd56f12cfdec0e011f729a3f05101c18079b048742b47d28a9683c0bae20bbe2f0b59e77b2
|
7
|
+
data.tar.gz: 70aef8ca413a4de6e5cd0b47e278fd341ce65b78ad7af6549bd5ea61c18f185d1cd652edb27bfa2615c9e81f05d511117302fecf3e9a64080e071ec16a23510b
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016-present Parker Moore and the minima contributors
|
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,230 @@
|
|
1
|
+
# narwhal-jekyll-theme
|
2
|
+
|
3
|
+
Narwhal is a simple Jekyll theme for a portfolio website. This theme is a fork of [Minima](https://github.com/jekyll/minima), the default Jekyll theme. Much of this Readme is still identical to Minima's, but all sections have been updated to support Narwhal.
|
4
|
+
|
5
|
+
[Preview this theme](http://nahrwl.me/narwhal-jekyll-theme/)
|
6
|
+
|
7
|
+
![narwhal theme preview](/screenshot.png)
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your Jekyll site's Gemfile:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem "narwhal-jekyll-theme"
|
15
|
+
```
|
16
|
+
|
17
|
+
And add this line to your Jekyll site:
|
18
|
+
|
19
|
+
```yaml
|
20
|
+
theme: narwhal-jekyll-theme
|
21
|
+
```
|
22
|
+
|
23
|
+
And then execute:
|
24
|
+
|
25
|
+
$ bundle
|
26
|
+
|
27
|
+
|
28
|
+
## Contents At-A-Glance
|
29
|
+
|
30
|
+
Narwhal has been scaffolded by the `jekyll new-theme` command and therefore has all the necessary files and directories to have a new Jekyll site up and running with zero-configuration.
|
31
|
+
|
32
|
+
### Layouts
|
33
|
+
|
34
|
+
Refers to files within the `_layouts` directory, that define the markup for your theme.
|
35
|
+
|
36
|
+
- `default.html` — The base layout that lays the foundation for subsequent layouts. The derived layouts inject their contents into this file at the line that says ` {{ content }} ` and are linked to this file via [FrontMatter](https://jekyllrb.com/docs/frontmatter/) declaration `layout: default`.
|
37
|
+
- `home.html` — The layout for the landing page. Use `portfolio.html` or `post-list.html` for the portfolio landing page and the posts landing page, respectively.
|
38
|
+
- `page.html` — The layout for your documents that contain FrontMatter, but are not posts.
|
39
|
+
- `portfolio.html` — The layout for the portfolio. Renders the list of portfolio items from the `_portfolio` folder. *Add new portfolio items by adding files to the `_portfolio` folder!*
|
40
|
+
- `portfolio-page.html` — The layout for an individual portfolio item.
|
41
|
+
- `post.html` — The layout for your posts.
|
42
|
+
- `post-list.html` — The layout for the blog posts page.
|
43
|
+
|
44
|
+
### Includes
|
45
|
+
|
46
|
+
Refers to snippets of code within the `_includes` directory that can be inserted in multiple layouts (and another include-file as well) within the same theme-gem.
|
47
|
+
|
48
|
+
- `disqus_comments.html` — Code to markup disqus comment box.
|
49
|
+
- `footer.html` — Defines the site's footer section.
|
50
|
+
- `google-analytics.html` — Inserts Google Analytics module (active only in production environment).
|
51
|
+
- `head.html` — Code-block that defines the `<head></head>` in *default* layout.
|
52
|
+
- `header.html` — Defines the site's main header section. By default, pages with a defined `title` attribute will have links displayed here.
|
53
|
+
- `post-list.html` — List of all posts.
|
54
|
+
|
55
|
+
### Sass
|
56
|
+
|
57
|
+
Refers to `.scss` files within the `_sass` directory that define the theme's styles.
|
58
|
+
|
59
|
+
- `narwhal.scss` — The core file imported by preprocessed `main.scss`, it defines the variable defaults for the theme and also further imports sass partials to supplement itself.
|
60
|
+
- `narwhal/_base.scss` — Resets and defines base styles for various HTML elements.
|
61
|
+
- `narwhal/_layout.scss` — Defines the visual style for various layouts.
|
62
|
+
- `narwhal/_syntax-highlighting.scss` — Defines the styles for syntax-highlighting.
|
63
|
+
|
64
|
+
### Assets
|
65
|
+
|
66
|
+
Refers to various asset files within the `assets` directory.
|
67
|
+
Contains the `main.scss` that imports sass files from within the `_sass` directory. This `main.scss` is what gets processed into the theme's main stylesheet `main.css` called by `_layouts/default.html` via `_includes/head.html`.
|
68
|
+
|
69
|
+
This directory can include sub-directories to manage assets of similar type, and will be copied over as is, to the final transformed site directory.
|
70
|
+
|
71
|
+
### Plugins
|
72
|
+
|
73
|
+
Narwhal comes with [`jekyll-seo-tag`](https://github.com/jekyll/jekyll-seo-tag) plugin preinstalled to make sure your website gets the most useful meta tags. See [usage](https://github.com/jekyll/jekyll-seo-tag#usage) to know how to set it up.
|
74
|
+
|
75
|
+
## Usage
|
76
|
+
|
77
|
+
### Home Layout
|
78
|
+
|
79
|
+
`home.html` is a flexible and abstract HTML layout for the site's landing-page. Use `portfolio.html` for the Portfolio landing page and `post-list.html` for the blog / posts page.
|
80
|
+
|
81
|
+
#### Biography on a Home Page
|
82
|
+
|
83
|
+
To edit the biography paragraph at the top of the landing page(s), refer to the `biography` property in `_config.yml`.
|
84
|
+
|
85
|
+
#### Post Listing
|
86
|
+
|
87
|
+
The title for the posts list is `Posts` by default and rendered with an `<h2>` tag. You can customize this heading by defining a `list_title` variable in the document's front matter.
|
88
|
+
|
89
|
+
--
|
90
|
+
|
91
|
+
### Adding Portfolio Items
|
92
|
+
|
93
|
+
Add new portfolio items by adding files to the `_portfolio` folder. This is the folder for the portfolio collection, as defined in `_config.yml`.
|
94
|
+
|
95
|
+
#### Portfolio Item Front Matter
|
96
|
+
|
97
|
+
The front matter for a portfolio item is as follows:
|
98
|
+
|
99
|
+
- `layout` defines the Jekyll layout template. Use `portfolio-page`.
|
100
|
+
- `title` Title of the project, which appears on the portfolio home page.
|
101
|
+
- `image` URL for the splash image for the project, which appears on the portfolio home page.
|
102
|
+
- `importance` An integer. Portfolio items with a higher `importance` number will appear earlier on the portfolio home page. Use this to bump portfolio items to the top of the list.
|
103
|
+
|
104
|
+
--
|
105
|
+
|
106
|
+
### Customization
|
107
|
+
|
108
|
+
To override the default structure and style of Narwhal, simply create the concerned directory at the root of your site, copy the file you wish to customize to that directory, and then edit the file.
|
109
|
+
e.g., to override the [`_includes/head.html `](_includes/head.html) file to specify a custom style path, create an `_includes` directory, copy `_includes/head.html` from narwhal gem folder to `<yoursite>/_includes` and start editing that file.
|
110
|
+
|
111
|
+
The site's default CSS has now moved to a new place within the gem itself, [`assets/main.scss`](assets/main.scss). To **override the default CSS**, the file has to exist at your site source. Do either of the following:
|
112
|
+
- Create a new instance of `main.scss` at site source.
|
113
|
+
- Create a new file `main.scss` at `<your-site>/assets/`
|
114
|
+
- Add the frontmatter dashes, and
|
115
|
+
- Add `@import "narwhal";`, to `<your-site>/assets/main.scss`
|
116
|
+
- Add your custom CSS.
|
117
|
+
- Download the file from this repo
|
118
|
+
- Create a new file `main.scss` at `<your-site>/assets/`
|
119
|
+
- Copy the contents at [assets/main.scss](assets/main.scss) onto the `main.scss` you just created, and edit away!
|
120
|
+
- Copy directly from Narwhal 2.0 gem
|
121
|
+
- Go to your local Narwhal gem installation directory ( run `bundle show narwhal-jekyll-theme` to get the path to it ).
|
122
|
+
- Copy the `assets/` folder from there into the root of `<your-site>`
|
123
|
+
- Change whatever values you want, inside `<your-site>/assets/main.scss`
|
124
|
+
|
125
|
+
--
|
126
|
+
|
127
|
+
### Customize navigation links
|
128
|
+
|
129
|
+
Right now, customizing the navigation links in the navigation bar is not supported.
|
130
|
+
|
131
|
+
--
|
132
|
+
|
133
|
+
### Change default date format
|
134
|
+
|
135
|
+
You can change the default date format by specifying `site.narwhal.date_format`
|
136
|
+
in `_config.yml`.
|
137
|
+
|
138
|
+
```
|
139
|
+
# Narwhal date format
|
140
|
+
# refer to http://shopify.github.io/liquid/filters/date/ if you want to customize this
|
141
|
+
narwhal:
|
142
|
+
date_format: "%b %-d, %Y"
|
143
|
+
```
|
144
|
+
|
145
|
+
--
|
146
|
+
|
147
|
+
### Enabling comments (via Disqus)
|
148
|
+
|
149
|
+
Optionally, if you have a Disqus account, you can tell Jekyll to use it to show a comments section below each post.
|
150
|
+
|
151
|
+
To enable it, add the following lines to your Jekyll site:
|
152
|
+
|
153
|
+
```yaml
|
154
|
+
disqus:
|
155
|
+
shortname: my_disqus_shortname
|
156
|
+
```
|
157
|
+
|
158
|
+
You can find out more about Disqus' shortnames [here](https://help.disqus.com/customer/portal/articles/466208).
|
159
|
+
|
160
|
+
Comments are enabled by default and will only appear in production, i.e., `JEKYLL_ENV=production`
|
161
|
+
|
162
|
+
If you don't want to display comments for a particular post you can disable them by adding `comments: false` to that post's YAML Front Matter.
|
163
|
+
|
164
|
+
--
|
165
|
+
|
166
|
+
### Social networks
|
167
|
+
|
168
|
+
You can add links to the accounts you have on other sites, with respective icon, by adding one or more of the following options in your config:
|
169
|
+
|
170
|
+
```yaml
|
171
|
+
twitter_username: jekyllrb
|
172
|
+
github_username: jekyll
|
173
|
+
dribbble_username: jekyll
|
174
|
+
facebook_username: jekyll
|
175
|
+
flickr_username: jekyll
|
176
|
+
instagram_username: jekyll
|
177
|
+
linkedin_username: jekyll
|
178
|
+
pinterest_username: jekyll
|
179
|
+
youtube_username: jekyll
|
180
|
+
googleplus_username: +jekyll
|
181
|
+
rss: rss
|
182
|
+
|
183
|
+
mastodon:
|
184
|
+
- username: jekyll
|
185
|
+
instance: example.com
|
186
|
+
- username: jekyll2
|
187
|
+
instance: example.com
|
188
|
+
```
|
189
|
+
|
190
|
+
--
|
191
|
+
|
192
|
+
### Enabling Google Analytics
|
193
|
+
|
194
|
+
To enable Google Analytics, add the following lines to your Jekyll site:
|
195
|
+
|
196
|
+
```yaml
|
197
|
+
google_analytics: UA-NNNNNNNN-N
|
198
|
+
```
|
199
|
+
|
200
|
+
Google Analytics will only appear in production, i.e., `JEKYLL_ENV=production`
|
201
|
+
|
202
|
+
--
|
203
|
+
|
204
|
+
### Enabling Excerpts in the Posts List
|
205
|
+
|
206
|
+
To display post-excerpts on posts.html and wherever else posts-list.html is included, simply add the following to your `_config.yml`:
|
207
|
+
|
208
|
+
```yaml
|
209
|
+
show_excerpts: true
|
210
|
+
```
|
211
|
+
|
212
|
+
## Contributing
|
213
|
+
|
214
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/nahrwl/narwhal-jekyll-theme. 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.
|
215
|
+
|
216
|
+
## Development
|
217
|
+
|
218
|
+
To set up your environment to develop this theme, run `script/bootstrap`.
|
219
|
+
|
220
|
+
To test your theme, run `script/server` (or `bundle exec jekyll serve`) and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme and the contents. As you make modifications, your site will regenerate and you should see the changes in the browser after a refresh.
|
221
|
+
|
222
|
+
## Credits
|
223
|
+
|
224
|
+
Images used in the demo site are by [JESHOOTS.COM](https://unsplash.com/photos/pUAM5hPaCRI?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText), [Markus Spiske](https://unsplash.com/photos/HDMqSQxjNBE?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText),
|
225
|
+
[William Iven](https://unsplash.com/photos/gcsNOsPEXfs?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText),
|
226
|
+
[Hal Gatewood](https://unsplash.com/photos/tZc3vjPCk-Q?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) from [Unsplash](https://unsplash.com/collections/1967508/ux-design?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText).
|
227
|
+
|
228
|
+
## License
|
229
|
+
|
230
|
+
The theme is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{%- if page.comments != false and jekyll.environment == "production" -%}
|
2
|
+
|
3
|
+
<div id="disqus_thread"></div>
|
4
|
+
<script>
|
5
|
+
var disqus_config = function () {
|
6
|
+
this.page.url = '{{ page.url | absolute_url }}';
|
7
|
+
this.page.identifier = '{{ page.url | absolute_url }}';
|
8
|
+
};
|
9
|
+
|
10
|
+
(function() {
|
11
|
+
var d = document, s = d.createElement('script');
|
12
|
+
|
13
|
+
s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';
|
14
|
+
|
15
|
+
s.setAttribute('data-timestamp', +new Date());
|
16
|
+
(d.head || d.body).appendChild(s);
|
17
|
+
})();
|
18
|
+
</script>
|
19
|
+
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
|
20
|
+
{%- endif -%}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<script>
|
2
|
+
if(!(window.doNotTrack === "1" || navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1")) {
|
3
|
+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
4
|
+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
5
|
+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
6
|
+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
7
|
+
|
8
|
+
ga('create', '{{ site.google_analytics }}', 'auto');
|
9
|
+
ga('send', 'pageview');
|
10
|
+
}
|
11
|
+
</script>
|
12
|
+
|
data/_includes/head.html
ADDED
@@ -0,0 +1,11 @@
|
|
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
|
+
{%- seo -%}
|
6
|
+
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
|
7
|
+
{%- feed_meta -%}
|
8
|
+
{%- if jekyll.environment == 'production' and site.google_analytics -%}
|
9
|
+
{%- include google-analytics.html -%}
|
10
|
+
{%- endif -%}
|
11
|
+
</head>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<header class="site-header" role="banner">
|
2
|
+
|
3
|
+
<div class="wrapper">
|
4
|
+
{%- assign default_paths = site.pages | map: "path" -%}
|
5
|
+
{%- assign page_paths = site.header_pages | default: default_paths -%}
|
6
|
+
|
7
|
+
{%- if page_paths -%}
|
8
|
+
<nav class="site-nav">
|
9
|
+
<a class="page-link" href="{{ site.baseurl }}{% link index.md %}">Portfolio</a>
|
10
|
+
<a class="page-link" href="{{ site.baseurl }}{% link posts.md %}">Posts</a>
|
11
|
+
</nav>
|
12
|
+
{%- endif -%}
|
13
|
+
</div>
|
14
|
+
</header>
|
@@ -0,0 +1 @@
|
|
1
|
+
<a href="https://github.com/{{ include.username }}"><span class="icon icon--github">{% include icon-github.svg %}</span><span class="username">{{ include.username }}</span></a>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg viewBox="0 0 16 16" width="16px" height="16px"><path fill="#828282" d="M7.999,0.431c-4.285,0-7.76,3.474-7.76,7.761 c0,3.428,2.223,6.337,5.307,7.363c0.388,0.071,0.53-0.168,0.53-0.374c0-0.184-0.007-0.672-0.01-1.32 c-2.159,0.469-2.614-1.04-2.614-1.04c-0.353-0.896-0.862-1.135-0.862-1.135c-0.705-0.481,0.053-0.472,0.053-0.472 c0.779,0.055,1.189,0.8,1.189,0.8c0.692,1.186,1.816,0.843,2.258,0.645c0.071-0.502,0.271-0.843,0.493-1.037 C4.86,11.425,3.049,10.76,3.049,7.786c0-0.847,0.302-1.54,0.799-2.082C3.768,5.507,3.501,4.718,3.924,3.65 c0,0,0.652-0.209,2.134,0.796C6.677,4.273,7.34,4.187,8,4.184c0.659,0.003,1.323,0.089,1.943,0.261 c1.482-1.004,2.132-0.796,2.132-0.796c0.423,1.068,0.157,1.857,0.077,2.054c0.497,0.542,0.798,1.235,0.798,2.082 c0,2.981-1.814,3.637-3.543,3.829c0.279,0.24,0.527,0.713,0.527,1.437c0,1.037-0.01,1.874-0.01,2.129 c0,0.208,0.14,0.449,0.534,0.373c3.081-1.028,5.302-3.935,5.302-7.362C15.76,3.906,12.285,0.431,7.999,0.431z"/></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<a href="https://twitter.com/{{ include.username }}"><span class="icon icon--twitter">{% include icon-twitter.svg %}</span><span class="username">{{ include.username }}</span></a>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg viewBox="0 0 16 16" width="16px" height="16px"><path fill="#828282" d="M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27 c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767 c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206 C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271 c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469 c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"/></svg>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<div class="text-wrapper">
|
2
|
+
<h2 class="post-list-heading">{{ page.list_title | default: "Posts" }}</h2>
|
3
|
+
{%- if site.posts.size > 0 -%}
|
4
|
+
<ul class="post-list">
|
5
|
+
{%- for post in site.posts -%}
|
6
|
+
<li>
|
7
|
+
{%- assign date_format = site.narwhal.date_format | default: "%b %-d, %Y" -%}
|
8
|
+
<span class="post-meta">{{ post.date | date: date_format }}</span>
|
9
|
+
<h3>
|
10
|
+
<a class="post-link" href="{{ post.url | relative_url }}">
|
11
|
+
{{ post.title | escape }}
|
12
|
+
</a>
|
13
|
+
</h3>
|
14
|
+
{%- if site.show_excerpts -%}
|
15
|
+
{{ post.excerpt }}
|
16
|
+
{%- endif -%}
|
17
|
+
</li>
|
18
|
+
{%- endfor -%}
|
19
|
+
</ul>
|
20
|
+
|
21
|
+
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></p>
|
22
|
+
{% else %}
|
23
|
+
<p>No posts yet!</p>
|
24
|
+
{%- endif -%}
|
25
|
+
</div>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<p class="social-media-sentence">
|
2
|
+
Find me on
|
3
|
+
{%- if site.dribbble_username -%} <span><a href="https://dribbble.com/{{ site.dribbble_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/narwhal-social-icons.svg#dribbble' | relative_url }}"></use></svg><span class="username">Dribbble</span></a></span>{%- endif -%}
|
4
|
+
{%- if site.facebook_username -%} <span><a href="https://www.facebook.com/{{ site.facebook_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/narwhal-social-icons.svg#facebook' | relative_url }}"></use></svg><span class="username">Facebook</span></a></span>{%- endif -%}
|
5
|
+
{%- if site.flickr_username -%} <span><a href="https://www.flickr.com/photos/{{ site.flickr_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/narwhal-social-icons.svg#flickr' | relative_url }}"></use></svg><span class="username">Flickr</span></a></span>{%- endif -%}
|
6
|
+
{%- if site.github_username -%} <span><a href="https://github.com/{{ site.github_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/narwhal-social-icons.svg#github' | relative_url }}"></use></svg><span class="username">Github</span></a></span>{%- endif -%}
|
7
|
+
{%- if site.instagram_username -%} <span><a href="https://instagram.com/{{ site.instagram_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/narwhal-social-icons.svg#instagram' | relative_url }}"></use></svg><span class="username">Instagram</span></a></span>{%- endif -%}
|
8
|
+
{%- if site.linkedin_username -%} <span><a href="https://www.linkedin.com/in/{{ site.linkedin_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/narwhal-social-icons.svg#linkedin' | relative_url }}"></use></svg><span class="username">LinkedIn</span></a></span>{%- endif -%}
|
9
|
+
{%- if site.pinterest_username -%} <span><a href="https://www.pinterest.com/{{ site.pinterest_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/narwhal-social-icons.svg#pinterest' | relative_url }}"></use></svg><span class="username">Pinterest</span></a></span>{%- endif -%}
|
10
|
+
{%- for mst in site.mastodon -%}{%- if mst.username and mst.instance -%} <span><a href="https://{{ mst.instance| cgi_escape | escape}}/@{{mst.username}}"><svg class="svg-icon"><use xlink:href="{{ '/assets/narwhal-social-icons.svg#mastodon' | relative_url }}"></use></svg><span class="username">Mastodon</span></a></span>{%- endif -%}{%- endfor -%}
|
11
|
+
{%- if site.twitter_username -%} <span><a href="https://www.twitter.com/{{ site.twitter_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/narwhal-social-icons.svg#twitter' | relative_url }}"></use></svg><span class="username">Twitter</span></a></span>{%- endif -%}
|
12
|
+
{%- if site.youtube_username -%} <span><a href="https://youtube.com/{{ site.youtube_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/narwhal-social-icons.svg#youtube' | relative_url }}"></use></svg><span class="username">YouTube</span></a></span>{%- endif -%}
|
13
|
+
{%- if site.googleplus_username -%} <span><a href="https://plus.google.com/{{ site.googleplus_username| escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/narwhal-social-icons.svg#googleplus' | relative_url }}"></use></svg><span class="username">Google Plus</span></a></span>{%- endif -%}
|
14
|
+
{%- if site.rss -%} <span>subscribe with <a href="{{ 'feed.xml' | relative_url }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/narwhal-social-icons.svg#rss' | relative_url }}"></use></svg><span>RSS</span></a></span>{%- endif -%}
|
15
|
+
{%- if site.email -%} <span>email me at <a class="u-email" href="mailto:{{ site.email }}">{{ site.email }}</a></span>{%- endif -%}
|
16
|
+
.
|
17
|
+
</p>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
|
3
|
+
|
4
|
+
{%- include head.html -%}
|
5
|
+
|
6
|
+
<body {% if page.path == "index.md" or page.path == "posts.md" %} id="homepage" {% endif %}>
|
7
|
+
|
8
|
+
{%- include header.html -%}
|
9
|
+
|
10
|
+
<main class="page-content" aria-label="Content">
|
11
|
+
<div class="wrapper">
|
12
|
+
{{ content }}
|
13
|
+
</div>
|
14
|
+
</main>
|
15
|
+
|
16
|
+
{%- include footer.html -%}
|
17
|
+
|
18
|
+
</body>
|
19
|
+
|
20
|
+
</html>
|
data/_layouts/home.html
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
5
|
+
<div class="home">
|
6
|
+
{%- if page.title -%}
|
7
|
+
<h1 class="page-heading">{{ page.title }}</h1>
|
8
|
+
{%- endif -%}
|
9
|
+
|
10
|
+
<div class="home-content">
|
11
|
+
<p>{{- site.biography | escape -}}</p>
|
12
|
+
{%- include social.html -%}
|
13
|
+
</div>
|
14
|
+
|
15
|
+
{{ content }}
|
16
|
+
|
17
|
+
</div>
|
data/_layouts/page.html
ADDED