diff options
| author | Andrew Lee <alee14498@gmail.com> | 2019-10-27 09:57:37 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@gmail.com> | 2019-10-27 09:57:37 -0400 |
| commit | e62e7bb6b14555c9bbe5d40d217103984f4f80e6 (patch) | |
| tree | 21887d847dccacb47644eb6f74ce31326172303c /_layouts | |
| parent | 716ea6ed2b64c921a799d872a07bfbd53b2a3e58 (diff) | |
| download | pokeworld-website-e62e7bb6b14555c9bbe5d40d217103984f4f80e6.tar.gz pokeworld-website-e62e7bb6b14555c9bbe5d40d217103984f4f80e6.tar.bz2 pokeworld-website-e62e7bb6b14555c9bbe5d40d217103984f4f80e6.zip | |
Rewrite progress
Diffstat (limited to '_layouts')
| -rw-r--r-- | _layouts/archive-taxonomy.html | 15 | ||||
| -rw-r--r-- | _layouts/archive.html | 26 | ||||
| -rw-r--r-- | _layouts/categories.html | 42 | ||||
| -rw-r--r-- | _layouts/category.html | 9 | ||||
| -rw-r--r-- | _layouts/collection.html | 9 | ||||
| -rw-r--r-- | _layouts/compress.html | 10 | ||||
| -rw-r--r-- | _layouts/default.html | 42 | ||||
| -rw-r--r-- | _layouts/home.html | 13 | ||||
| -rw-r--r-- | _layouts/posts.html | 29 | ||||
| -rw-r--r-- | _layouts/search.html | 42 | ||||
| -rw-r--r-- | _layouts/single.html | 95 | ||||
| -rw-r--r-- | _layouts/splash.html | 22 | ||||
| -rw-r--r-- | _layouts/tag.html | 9 | ||||
| -rw-r--r-- | _layouts/tags.html | 42 |
14 files changed, 405 insertions, 0 deletions
diff --git a/_layouts/archive-taxonomy.html b/_layouts/archive-taxonomy.html new file mode 100644 index 0000000..6939122 --- /dev/null +++ b/_layouts/archive-taxonomy.html @@ -0,0 +1,15 @@ +--- +layout: default +author_profile: false +--- + +<div id="main" role="main"> + {% include sidebar.html %} + + <div class="archive"> + <h1 class="page__title">{{ page.title }}</h1> + {% for post in page.posts %} + {% include archive-single.html %} + {% endfor %} + </div> +</div>
\ No newline at end of file diff --git a/_layouts/archive.html b/_layouts/archive.html new file mode 100644 index 0000000..08beb89 --- /dev/null +++ b/_layouts/archive.html @@ -0,0 +1,26 @@ +--- +layout: default +--- + +{% if page.header.overlay_color or page.header.overlay_image or page.header.image %} + {% include page__hero.html %} +{% elsif page.header.video.id and page.header.video.provider %} + {% include page__hero_video.html %} +{% endif %} + +{% if page.url != "/" and site.breadcrumbs %} + {% unless paginator %} + {% include breadcrumbs.html %} + {% endunless %} +{% endif %} + +<div id="main" role="main"> + {% include sidebar.html %} + + <div class="archive"> + {% unless page.header.overlay_color or page.header.overlay_image %} + <h1 id="page-title" class="page__title">{{ page.title }}</h1> + {% endunless %} + {{ content }} + </div> +</div>
\ No newline at end of file diff --git a/_layouts/categories.html b/_layouts/categories.html new file mode 100644 index 0000000..aa2c6e8 --- /dev/null +++ b/_layouts/categories.html @@ -0,0 +1,42 @@ +--- +layout: archive +--- + +{{ content }} + +{% assign categories_max = 0 %} +{% for category in site.categories %} + {% if category[1].size > categories_max %} + {% assign categories_max = category[1].size %} + {% endif %} +{% endfor %} + +<ul class="taxonomy__index"> + {% for i in (1..categories_max) reversed %} + {% for category in site.categories %} + {% if category[1].size == i %} + <li> + <a href="#{{ category[0] | slugify }}"> + <strong>{{ category[0] }}</strong> <span class="taxonomy__count">{{ i }}</span> + </a> + </li> + {% endif %} + {% endfor %} + {% endfor %} +</ul> + +{% for i in (1..categories_max) reversed %} + {% for category in site.categories %} + {% if category[1].size == i %} + <section id="{{ category[0] | slugify | downcase }}" class="taxonomy__section"> + <h2 class="archive__subtitle">{{ category[0] }}</h2> + <div class="entries-{{ page.entries_layout | default: 'list' }}"> + {% for post in category.last %} + {% include archive-single.html type=page.entries_layout %} + {% endfor %} + </div> + <a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} ↑</a> + </section> + {% endif %} + {% endfor %} +{% endfor %} diff --git a/_layouts/category.html b/_layouts/category.html new file mode 100644 index 0000000..79b81ce --- /dev/null +++ b/_layouts/category.html @@ -0,0 +1,9 @@ +--- +layout: archive +--- + +{{ content }} + +<div class="entries-{{ page.entries_layout }}"> + {% include posts-category.html taxonomy=page.taxonomy type=page.entries_layout %} +</div> diff --git a/_layouts/collection.html b/_layouts/collection.html new file mode 100644 index 0000000..3bcd916 --- /dev/null +++ b/_layouts/collection.html @@ -0,0 +1,9 @@ +--- +layout: archive +--- + +{{ content }} + +<div class="entries-{{ page.entries_layout }}"> + {% include documents-collection.html collection=page.collection sort_by=page.sort_by sort_order=page.sort_order type=page.entries_layout %} +</div> diff --git a/_layouts/compress.html b/_layouts/compress.html new file mode 100644 index 0000000..bb34487 --- /dev/null +++ b/_layouts/compress.html @@ -0,0 +1,10 @@ +--- +# Jekyll layout that compresses HTML +# v3.1.0 +# http://jch.penibelst.de/ +# © 2014–2015 Anatol Broder +# MIT License +--- + +{% capture _LINE_FEED %} +{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment or site.compress_html.ignore.envs == "all" %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %} diff --git a/_layouts/default.html b/_layouts/default.html new file mode 100644 index 0000000..8146222 --- /dev/null +++ b/_layouts/default.html @@ -0,0 +1,42 @@ +--- +--- + +<!doctype html> +<!-- + Minimal Mistakes Jekyll Theme 4.17.1 by Michael Rose + Copyright 2013-2019 Michael Rose - mademistakes.com | @mmistakes + Free for personal and commercial use under the MIT license + https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE +--> +<html lang="{{ site.locale | slice: 0,2 | default: "en" }}" class="no-js"> + <head> + {% include head.html %} + {% include head/custom.html %} + </head> + + <body class="layout--{{ page.layout | default: layout.layout }}{% if page.classes or layout.classes %}{{ page.classes | default: layout.classes | join: ' ' | prepend: ' ' }}{% endif %}"> + {% include_cached skip-links.html %} + {% include_cached browser-upgrade.html %} + {% include_cached masthead.html %} + + <div class="initial-content"> + {{ content }} + </div> + + {% if site.search == true %} + <div class="search-content"> + {% include_cached search/search_form.html %} + </div> + {% endif %} + + <div id="footer" class="page__footer"> + <footer> + {% include footer/custom.html %} + {% include_cached footer.html %} + </footer> + </div> + + {% include scripts.html %} + + </body> +</html> diff --git a/_layouts/home.html b/_layouts/home.html new file mode 100644 index 0000000..d1428eb --- /dev/null +++ b/_layouts/home.html @@ -0,0 +1,13 @@ +--- +layout: archive +--- + +{{ content }} + +<h3 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts | default: "Recent Posts" }}</h3> + +{% for post in paginator.posts %} + {% include archive-single.html %} +{% endfor %} + +{% include paginator.html %} diff --git a/_layouts/posts.html b/_layouts/posts.html new file mode 100644 index 0000000..76d25f9 --- /dev/null +++ b/_layouts/posts.html @@ -0,0 +1,29 @@ +--- +layout: archive +--- + +{{ content }} + +<ul class="taxonomy__index"> + {% assign postsInYear = site.posts | group_by_exp: 'post', 'post.date | date: "%Y"' %} + {% for year in postsInYear %} + <li> + <a href="#{{ year.name }}"> + <strong>{{ year.name }}</strong> <span class="taxonomy__count">{{ year.items | size }}</span> + </a> + </li> + {% endfor %} +</ul> + +{% assign postsByYear = site.posts | group_by_exp: 'post', 'post.date | date: "%Y"' %} +{% for year in postsByYear %} + <section id="{{ year.name }}" class="taxonomy__section"> + <h2 class="archive__subtitle">{{ year.name }}</h2> + <div class="entries-{{ page.entries_layout | default: 'list' }}"> + {% for post in year.items %} + {% include archive-single.html type=page.entries_layout %} + {% endfor %} + </div> + <a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} ↑</a> + </section> +{% endfor %} diff --git a/_layouts/search.html b/_layouts/search.html new file mode 100644 index 0000000..d18f223 --- /dev/null +++ b/_layouts/search.html @@ -0,0 +1,42 @@ +--- +layout: default +--- + +{% if page.header.overlay_color or page.header.overlay_image or page.header.image %} + {% include page__hero.html %} +{% endif %} + +{% if page.url != "/" and site.breadcrumbs %} + {% unless paginator %} + {% include breadcrumbs.html %} + {% endunless %} +{% endif %} + +<div id="main" role="main"> + {% include sidebar.html %} + + <div class="archive"> + {% unless page.header.overlay_color or page.header.overlay_image %} + <h1 id="page-title" class="page__title">{{ page.title }}</h1> + {% endunless %} + + {{ content }} + + {%- assign search_provider = site.search_provider | default: "lunr" -%} + {%- case search_provider -%} + {%- when "lunr" -%} + <input type="text" id="search" class="search-input" tabindex="-1" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" /> + <div id="results" class="results"></div> + {%- when "google" -%} + <form onsubmit="return googleCustomSearchExecute();" id="cse-search-box-form-id"> + <input type="text" id="cse-search-input-box-id" class="search-input" tabindex="-1" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" /> + </form> + <div id="results" class="results"> + <gcse:searchresults-only></gcse:searchresults-only> + </div> + {%- when "algolia" -%} + <div class="search-searchbar"></div> + <div class="search-hits"></div> + {%- endcase -%} + </div> +</div> diff --git a/_layouts/single.html b/_layouts/single.html new file mode 100644 index 0000000..2a33c27 --- /dev/null +++ b/_layouts/single.html @@ -0,0 +1,95 @@ +--- +layout: default +--- + +{% if page.header.overlay_color or page.header.overlay_image or page.header.image %} + {% include page__hero.html %} +{% elsif page.header.video.id and page.header.video.provider %} + {% include page__hero_video.html %} +{% endif %} + +{% if page.url != "/" and site.breadcrumbs %} + {% unless paginator %} + {% include breadcrumbs.html %} + {% endunless %} +{% endif %} + +<div id="main" role="main"> + {% include sidebar.html %} + + <article class="page" itemscope itemtype="https://schema.org/CreativeWork"> + {% if page.title %}<meta itemprop="headline" content="{{ page.title | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %} + {% if page.excerpt %}<meta itemprop="description" content="{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %} + {% if page.date %}<meta itemprop="datePublished" content="{{ page.date | date: "%B %d, %Y" }}">{% endif %} + {% if page.last_modified_at %}<meta itemprop="dateModified" content="{{ page.last_modified_at | date: "%B %d, %Y" }}">{% endif %} + + <div class="page__inner-wrap"> + {% unless page.header.overlay_color or page.header.overlay_image %} + <header> + {% if page.title %}<h1 id="page-title" class="page__title" itemprop="headline">{{ page.title | markdownify | remove: "<p>" | remove: "</p>" }}</h1>{% endif %} + {% if page.read_time %} + <p class="page__meta"><i class="far fa-clock" aria-hidden="true"></i> {% include read-time.html %}</p> + {% endif %} + </header> + {% endunless %} + + <section class="page__content" itemprop="text"> + {% if page.toc %} + <aside class="sidebar__right {% if page.toc_sticky %}sticky{% endif %}"> + <nav class="toc"> + <header><h4 class="nav__title"><i class="fas fa-{{ page.toc_icon | default: 'file-alt' }}"></i> {{ page.toc_label | default: site.data.ui-text[site.locale].toc_label | default: "On this page" }}</h4></header> + {% include toc.html sanitize=true html=content h_min=1 h_max=6 class="toc__menu" %} + </nav> + </aside> + {% endif %} + {{ content }} + {% if page.link %}<div><a href="{{ page.link }}" class="btn btn--primary">{{ site.data.ui-text[site.locale].ext_link_label | default: "Direct Link" }}</a></div>{% endif %} + </section> + + <footer class="page__meta"> + {% if site.data.ui-text[site.locale].meta_label %} + <h4 class="page__meta-title">{{ site.data.ui-text[site.locale].meta_label }}</h4> + {% endif %} + {% include page__taxonomy.html %} + {% if page.last_modified_at %} + <p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}</strong> <time datetime="{{ page.last_modified_at | date: "%Y-%m-%d" }}">{{ page.last_modified_at | date: "%B %d, %Y" }}</time></p> + {% elsif page.date %} + <p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}</strong> <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %d, %Y" }}</time></p> + {% endif %} + </footer> + + {% if page.share %}{% include social-share.html %}{% endif %} + + {% include post_pagination.html %} + </div> + + {% if jekyll.environment == 'production' and site.comments.provider and page.comments %} + {% include comments.html %} + {% endif %} + </article> + + {% comment %}<!-- only show related on a post page when `related: true` -->{% endcomment %} + {% if page.id and page.related and site.related_posts.size > 0 %} + <div class="page__related"> + <h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4> + <div class="grid__wrapper"> + {% for post in site.related_posts limit:4 %} + {% include archive-single.html type="grid" %} + {% endfor %} + </div> + </div> + {% comment %}<!-- otherwise show recent posts if no related when `related: true` -->{% endcomment %} + {% elsif page.id and page.related %} + <div class="page__related"> + <h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4> + <div class="grid__wrapper"> + {% for post in site.posts limit:4 %} + {% if post.id == page.id %} + {% continue %} + {% endif %} + {% include archive-single.html type="grid" %} + {% endfor %} + </div> + </div> + {% endif %} +</div> diff --git a/_layouts/splash.html b/_layouts/splash.html new file mode 100644 index 0000000..b327607 --- /dev/null +++ b/_layouts/splash.html @@ -0,0 +1,22 @@ +--- +layout: default +--- + +{% if page.header.overlay_color or page.header.overlay_image or page.header.image %} + {% include page__hero.html %} +{% elsif page.header.video.id and page.header.video.provider %} + {% include page__hero_video.html %} +{% endif %} + +<div id="main" role="main"> + <article class="splash" itemscope itemtype="https://schema.org/CreativeWork"> + {% if page.title %}<meta itemprop="headline" content="{{ page.title | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %} + {% if page.excerpt %}<meta itemprop="description" content="{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %} + {% if page.date %}<meta itemprop="datePublished" content="{{ page.date | date: "%B %d, %Y" }}">{% endif %} + {% if page.last_modified_at %}<meta itemprop="dateModified" content="{{ page.last_modified_at | date: "%B %d, %Y" }}">{% endif %} + + <section class="page__content" itemprop="text"> + {{ content }} + </section> + </article> +</div> diff --git a/_layouts/tag.html b/_layouts/tag.html new file mode 100644 index 0000000..5f83c2a --- /dev/null +++ b/_layouts/tag.html @@ -0,0 +1,9 @@ +--- +layout: archive +--- + +{{ content }} + +<div class="entries-{{ page.entries_layout | default: 'list' }}"> + {% include posts-tag.html taxonomy=page.taxonomy type=page.entries_layout %} +</div> diff --git a/_layouts/tags.html b/_layouts/tags.html new file mode 100644 index 0000000..128e176 --- /dev/null +++ b/_layouts/tags.html @@ -0,0 +1,42 @@ +--- +layout: archive +--- + +{{ content }} + +{% assign tags_max = 0 %} +{% for tag in site.tags %} + {% if tag[1].size > tags_max %} + {% assign tags_max = tag[1].size %} + {% endif %} +{% endfor %} + +<ul class="taxonomy__index"> + {% for i in (1..tags_max) reversed %} + {% for tag in site.tags %} + {% if tag[1].size == i %} + <li> + <a href="#{{ tag[0] | slugify }}"> + <strong>{{ tag[0] }}</strong> <span class="taxonomy__count">{{ i }}</span> + </a> + </li> + {% endif %} + {% endfor %} + {% endfor %} +</ul> + +{% for i in (1..tags_max) reversed %} + {% for tag in site.tags %} + {% if tag[1].size == i %} + <section id="{{ tag[0] | slugify | downcase }}" class="taxonomy__section"> + <h2 class="archive__subtitle">{{ tag[0] }}</h2> + <div class="entries-{{ page.entries_layout | default: 'list' }}"> + {% for post in tag.last %} + {% include archive-single.html type=page.entries_layout %} + {% endfor %} + </div> + <a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} ↑</a> + </section> + {% endif %} + {% endfor %} +{% endfor %} |
