forked from mmistakes/minimal-mistakes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
3,042 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<a class="button" href="{{ include.link | default: '#' }}"{% if include.color %} style="background: {{ include.color }}"{% endif %}>{{ include.text | default: "Button" }}{% if include.icon %} {% include icon.html id=include.icon title=include.icon %}{% endif %}</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<figure class="figure figure--{{ include.position | default: 'center' }}"> | ||
<img class="image" src="{{ include.image }}" alt="{{ include.alt | default: include.caption }}" {{ include.width ? include.width | prepend: 'width="' | append: '"' }} {{ include.height ? include.height | prepend: 'height="' | append: '"' }}> | ||
{% if include.caption %}<figcaption class="caption">{{ include.caption }}</figcaption>{% endif %} | ||
</figure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<svg width="{{ include.width | default: "16" }}" height="{{ include.height | default: "16" }}" class="icon icon--{{ include.id | default: "link" }}" role="img" alt="{{ include.title | default: include.id }}"><title>{{ include.title | default: include.id }}</title><use xlink:href="#{{ include.id | default: "link" }}" fill="{{ include.color | default: 'CurrentColor' }}"></use></svg> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div class="map"><iframe src="https://www.google.com/maps/d/u/0/embed?mid={{ include.id }}" title="{{ include.title | default: 'Map' }}"></iframe></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<nav class="nav nav--categories"> | ||
<ul class="list list--categories"> | ||
{% for item in site.categories %} | ||
<li class="item item--category"> | ||
<a href="#{{ item | first | slugify }}">{{ item | first }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<nav class="nav"> | ||
<ul class="list list--nav"> | ||
{% for item in site.html_pages %} | ||
{% unless item.title == false or item.url contains "/page" or item.url contains "/404.html" %} | ||
<li class="item item--nav{% if item.url == page.url %} item--current{% endif %}"> | ||
|
||
{% if item.url contains '://' %} | ||
{% assign url = item.url %} | ||
{% else %} | ||
{% assign url = item.url | relative_url %} | ||
{% endif %} | ||
|
||
{% if item.collectionpage %} | ||
{% assign collectiondata = site.collections | where: "label", item.collectionpage | first %} | ||
<a href="{{ url }}">{{ collectiondata.title }}</a> | ||
{% else %} | ||
<a href="{{ url }}">{{ item.title }}</a> | ||
{% endif %} | ||
</li> | ||
{% endunless %} | ||
{% endfor %} | ||
</ul> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% if site.navigation_footer %} | ||
<nav class="nav nav--footer"> | ||
<ul class="list list--nav"> | ||
{% for item in site.navigation_footer %} | ||
|
||
{% if item.url contains '://' %} | ||
{% assign url = item.url %} | ||
{% else %} | ||
{% assign url = item.url | relative_url %} | ||
{% endif %} | ||
|
||
<li class="item item--nav{% if item.url == page.url %} item--current{% endif %}"> | ||
<a href="{{ url }}">{{ item.title }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</nav> | ||
{% else %} | ||
{% include nav-default.html %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{% if site.navigation_header %} | ||
<nav class="nav nav--header"> | ||
<ul class="list list--nav"> | ||
{% for item in site.navigation_header %} | ||
|
||
{% if item.url contains '://' %} | ||
{% assign url = item.url %} | ||
{% else %} | ||
{% assign url = item.url | relative_url %} | ||
{% endif %} | ||
|
||
<li class="item item--nav{% if item.url == page.url %} item--current{% endif %}"> | ||
<a href="{{ url }}">{{ item.title }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
<button class="button button--nav" aria-label="Menu toggle"> | ||
{% include icon.html id="nav" title="Menu" %} | ||
</button> | ||
</nav> | ||
{% else %} | ||
{% include nav-default.html %} | ||
{% endif %} | ||
|
||
<script type="text/javascript"> | ||
// Get list and button | ||
const navList = document.querySelector('.header .list--nav') | ||
const button = document.querySelector('.header .button--nav') | ||
|
||
// Hide nav and apply toggle | ||
const collapseNav = () => { | ||
if (document.body.clientWidth < 640) { | ||
navList.style.setProperty('--listHeight', `-${navList.offsetHeight}px`) | ||
} else { | ||
navList.removeAttribute('style') | ||
} | ||
|
||
button.onclick = () => { | ||
navList.style.setProperty('transition', `margin .1s`) | ||
if (navList.style.getPropertyValue('--listHeight')) { | ||
navList.style.removeProperty('--listHeight') | ||
} else { | ||
navList.style.setProperty('--listHeight', `-${navList.offsetHeight}px`) | ||
} | ||
} | ||
} | ||
|
||
collapseNav() | ||
|
||
// Check on resize if to collapse nav | ||
window.addEventListener('resize', () => { | ||
collapseNav() | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<div class="share"> | ||
{% for network in site.sharing_links %} | ||
{% if network[1] != blank %} | ||
{% assign name = network[0] %} | ||
{% assign id = network[0] | downcase | remove: " " %} | ||
{% assign url = site.url | append: site.baseurl | append: page.url %} | ||
{% assign color = network[1] %} | ||
|
||
{% capture share_link %} | ||
{%- if id contains "twitter" %}https://twitter.com/intent/tweet/?url={{ url }}&text={{ page.title | uri_escape }}{% if site.twitter.username %}&via={{ site.twitter.username }}{% endif %}{% endif -%} | ||
{%- if id contains "facebook" %}https://facebook.com/sharer/sharer.php?u={{ url }}{% endif -%} | ||
{%- if id contains "pinterest" %}https://pinterest.com/pin/create/button/?url={{ url }}&description={{ page.title }}&media={{ page.image }}{% endif -%} | ||
{%- if id contains "linkedin" %}https://www.linkedin.com/shareArticle?url={{ url }}&title={{ page.title }}&source={{ site.title }}&mini=true{% endif -%} | ||
{%- if id contains "tumblr" %}https://tumblr.com/widgets/share/tool?canonicalUrl={{ url }}&tags={{ page.category }}&caption={{ page.title }}{% endif -%} | ||
{%- if id contains "reddit" %}https://reddit.com/submit?url={{ url }}&title={{ page.title }}&resubmit=true{% endif -%} | ||
{%- if id contains "hackernews" %}https://news.ycombinator.com/submitlink?u={{ url }}&t={{ page.title }}{% endif -%} | ||
{%- if id contains "designernews" %}https://www.designernews.co/submit?url={{ url }}&title={{ page.title }}{% endif -%} | ||
{%- if id contains "email" %}mailto:?subject={{ page.title }}&body={{ url | prepend: "Hey, check out this: "}}{% endif -%} | ||
{% endcapture %} | ||
|
||
{% include button.html text=name icon=id link=share_link color=color %} | ||
{% endif %} | ||
{% endfor %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<nav class="nav nav--social"> | ||
{% for link in site.social_links %} | ||
{% if link[1] != blank %} | ||
{% assign id = link[0] | downcase %} | ||
<a href="{{ link[1] }}"> | ||
{% include icon.html id=id title=id %} | ||
</a> | ||
{% endif %} | ||
{% endfor %} | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{% for category in site.categories %} | ||
{% assign category_name = category | first %} | ||
<section class="section typeset"> | ||
<h2 id="{{ category_name | slugify }}">{{ category_name }}</h2> | ||
<ul class="list list--posts"> | ||
{% for page in site.categories[category_name] %} | ||
{% assign has_categories = true %} | ||
<li class="item item--post"> | ||
<article class="article article--post typeset"> | ||
<h3><a href="{{ site.baseurl }}{{ page.url }}">{{ page.title }}</a></h3> | ||
{% include post-meta.html %} | ||
{{ page.excerpt | truncatewords: 60 | markdownify }} | ||
</article> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% unless forloop.last %}<hr/>{% endunless %} | ||
</section> | ||
{% endfor %} | ||
|
||
{% if has_categories != true %} | ||
<section class="section typeset"> | ||
<p>There are no categorised posts</p> | ||
</section> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% if site.disqus and page.comments != false %} | ||
<div id="disqus_thread"></div> | ||
<script> | ||
var disqus_config = function () { | ||
this.page.url = "{{ site.url }}{{ site.baseurl }}{{ page.url }}"; | ||
this.page.identifier = "{{ site.baseurl }}{{ page.url }}"; | ||
}; | ||
|
||
(function() { | ||
var d = document, s = d.createElement('script'); | ||
s.src = '//{{ site.disqus }}.disqus.com/embed.js'; | ||
s.setAttribute('data-timestamp', +new Date()); | ||
(d.head || d.body).appendChild(s); | ||
})(); | ||
</script> | ||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{% if paginator.posts %} | ||
<section class="section typeset"> | ||
<ul class="list list--posts"> | ||
{% for page in paginator.posts %} | ||
<li class="item item--post"> | ||
<article class="article article--post"> | ||
|
||
<h2><a href="{{ site.baseurl }}{{ page.url }}">{{ page.title }}</a></h2> | ||
{% include post-meta.html %} | ||
{{ page.excerpt | markdownify | truncatewords: 60 }} | ||
|
||
</article> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% include post-pagination.html %} | ||
</section> | ||
{% else %} | ||
<section class="section typeset"> | ||
<ul class="list list--posts"> | ||
{% for page in site.posts %} | ||
<li class="item item--post"> | ||
<article class="article article--post"> | ||
|
||
<h2><a href="{{ site.baseurl }}{{ page.url }}">{{ page.title }}</a></h2> | ||
{% include post-meta.html %} | ||
{{ page.excerpt | markdownify | truncatewords: 60 }} | ||
|
||
</article> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</section> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{% if page.categories %} | ||
{% capture categories %} | ||
{% for category in page.categories %} | ||
<span class="label label--category"><a href="{{ site.baseurl }}/categories/#{{ category | downcase | slugify }}">{{ category }}</a></span>{% if forloop.last == false %},{% endif %} | ||
{% endfor %} | ||
{% endcapture %} | ||
{% elsif page.category %} | ||
{% capture categories %} | ||
<span class="label label--category"><a href="{{ site.baseurl }}/categories/#{{ page.category | downcase | slugify }}">{{ page.category }}</a></span> | ||
{% endcapture %} | ||
{% endif %} | ||
|
||
<small class="small post-meta"> | ||
{% assign date_format = site.date_format | default: "%d %b %Y" %} | ||
{{ categories | append: " · " }}<time datetime="{{ page.date | date_to_xmlschema }}" class="time">{{ page.date | date: date_format }}</time> | ||
</small> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<nav class="nav nav--paginator"> | ||
|
||
{% if paginator.previous_page %} | ||
<a href="{{ site.baseurl }}{{ paginator.previous_page_path }}" class="pagination pagination--previous">← Newer</a> | ||
{% else %} | ||
<span class="pagination pagination--previous">← Newer</span> | ||
{% endif %} | ||
|
||
<span class="pagination pagination--counter">Page: {{ paginator.page }} of {{ paginator.total_pages }}</span> | ||
|
||
{% if paginator.next_page %} | ||
<a href="{{ site.baseurl }}{{ paginator.next_page_path }}" class="pagination pagination--next">Older →</a> | ||
{% else %} | ||
<span class="pagination pagination--next">Older →</span> | ||
{% endif %} | ||
|
||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<h3>Related posts</h3> | ||
<ul class="list list--posts"> | ||
{% for page in site.related_posts limit: 3 %} | ||
{% assign has_related = true %} | ||
<li class="item item--post"> | ||
<article class="article article--post typeset"> | ||
|
||
<h4><a href="{{ site.baseurl }}{{ page.url }}">{{ page.title }}</a></h4> | ||
{% include post-meta.html %} | ||
{{ page.excerpt | markdownify | truncatewords: 20 }} | ||
|
||
</article> | ||
</li> | ||
{% endfor %} | ||
|
||
{% if has_related != true %} | ||
<p>There are no related posts</p> | ||
{% endif %} | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!-- Global site tag (gtag.js) - Google Analytics --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
|
||
gtag('config', '{{ site.google_analytics }}'); | ||
gtag('config', '{{ site.google_analytics }}', { | ||
'anonymize_ip': {{ site.google_analytics_anonymize_ip | default: "true" }} | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<aside class="aside typeset aside--{{ include.align | default: 'right' }}"> | ||
|
||
{% if page.layout == "post" %} | ||
<section class="section section--related-posts"> | ||
{% include post-related.html %} | ||
</section> | ||
|
||
{% elsif page.layout == "page" or page.layout == "home" or page.layout == "blog" %} | ||
<section class="section section--description"> | ||
<h3>About this site</h3> | ||
<p>{{ site.description }}</p> | ||
{% include nav-social.html %} | ||
</section> | ||
|
||
{% elsif page.layout == "categories" %} | ||
<section class="section section--category-index"> | ||
<h3>Index</h3> | ||
{% include nav-categories.html %} | ||
</section> | ||
|
||
{% endif %} | ||
|
||
</aside> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!-- Overwrite this file with code you want before the closing body tag --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!-- Overwrite this file with code you want before the closing head tag --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% if site.favicons %} | ||
{% for icon in site.favicons %} | ||
<link rel="icon" type="image/png" href="{{ icon[1] | relative_url }}" sizes="{{ icon[0] }}x{{ icon[0] }}"> | ||
<link rel="apple-touch-icon" sizes="{{ icon[0] }}x{{ icon[0] }}" href="{{ icon[1] | relative_url }}"> | ||
{% endfor %} | ||
{% endif %} | ||
<link rel="shortcut icon" href="{{ site.avatarurl + '?s=32' | default: site.logo | relative_url }}"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% assign feature_text = page.feature_text %} | ||
{% assign feature_image = page.feature_image %} | ||
{% if page.collectionpage %} | ||
{% assign collectiondata = site.collections | where: "label", page.collectionpage | first %} | ||
{% assign feature_text = collectiondata.feature_text %} | ||
{% assign feature_image = collectiondata.feature_image %} | ||
{% endif %} | ||
|
||
{% if feature_text or feature_image %} | ||
<div class="feature"{% if feature_image %} style="background-image: url({{ feature_image }})"{% endif %}> | ||
<div class="container typeset"> | ||
{{ feature_text | markdownify }} | ||
</div> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% if site.fonts.font_urls %} | ||
{% for font in site.fonts.font_urls %} | ||
<link rel="preload" as="style" href="{{ font }}" /> | ||
<link href="{{ font }}" rel="stylesheet" media="print" onload="this.media='all'" /> | ||
{% endfor %} | ||
<noscript> | ||
{% for font in site.fonts.font_urls %} | ||
<link href="{{ font }}" rel="stylesheet" /> | ||
{% endfor %} | ||
</noscript> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<footer class="footer"> | ||
<div class="container"> | ||
<div class="copyright typeset"> | ||
<small class="small">© {{ site.title }} {{ site.time | date: '%Y' }}</small> | ||
</div> | ||
|
||
{% include nav-footer.html %} | ||
</div> | ||
</footer> |
Oops, something went wrong.