jekyll-theme-primerpages 2.3.0
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 +21 -0
- data/README.md +65 -0
- data/_config.yml +149 -0
- data/_includes/awesome-nav-breadcrumb-trail.html +33 -0
- data/_includes/awesome-nav-breadcrumbs.html +51 -0
- data/_includes/awesome-nav-menu-tree.html +21 -0
- data/_includes/awesome-nav-menu.html +68 -0
- data/_includes/awesome-nav-sidebar.html +7 -0
- data/_includes/awesome-nav-tree.html +52 -0
- data/_includes/breadcrumbs.html +62 -0
- data/_includes/category_index.html +18 -0
- data/_includes/collection-menu.html +79 -0
- data/_includes/collection-sidebar.html +23 -0
- data/_includes/custom-colors.html +99 -0
- data/_includes/footer.html +13 -0
- data/_includes/head.html +43 -0
- data/_includes/header-appbar.html +53 -0
- data/_includes/header-sidebar.html +60 -0
- data/_includes/header-stacked.html +33 -0
- data/_includes/header-topbar.html +59 -0
- data/_includes/link-card.html +52 -0
- data/_includes/links.html +12 -0
- data/_includes/masthead.html +18 -0
- data/_includes/mini-repo-info-card.html +30 -0
- data/_includes/nav-overlay.html +53 -0
- data/_includes/nav.html +51 -0
- data/_includes/navbar-underline.html +51 -0
- data/_includes/paginator_nav.html +28 -0
- data/_includes/post-card.html +27 -0
- data/_includes/post-feature-card.html +24 -0
- data/_includes/post-gallery.html +52 -0
- data/_includes/post-index.html +35 -0
- data/_includes/post-tease-image-card.html +22 -0
- data/_includes/post-tease-text-card.html +12 -0
- data/_includes/post-timeline-card.html +84 -0
- data/_includes/post-timeline.html +31 -0
- data/_includes/posts.html +12 -0
- data/_includes/related.html +116 -0
- data/_includes/repo-card.html +43 -0
- data/_includes/repositories.html +27 -0
- data/_includes/resolve-versioning.html +16 -0
- data/_includes/social.html +390 -0
- data/_includes/toggle.html +4 -0
- data/_includes/user-metadata.html +36 -0
- data/_includes/version-selector.html +22 -0
- data/_includes/version-warning.html +15 -0
- data/_layouts/category_index.html +16 -0
- data/_layouts/category_layout.html +33 -0
- data/_layouts/default.html +33 -0
- data/_layouts/docs.html +189 -0
- data/_layouts/docs_index.html +32 -0
- data/_layouts/home.html +3 -0
- data/_layouts/landing.html +38 -0
- data/_layouts/linktree.html +36 -0
- data/_layouts/page.html +22 -0
- data/_layouts/paginate.html +16 -0
- data/_layouts/paginate_timeline.html +17 -0
- data/_layouts/post.html +136 -0
- data/_layouts/profile.html +48 -0
- data/_layouts/repositories.html +11 -0
- data/_layouts/tag_index.html +16 -0
- data/_layouts/tags.html +12 -0
- data/_sass/_admonitions.scss +69 -0
- data/_sass/_highlight-syntax.scss +96 -0
- data/_sass/_language-colors.scss +1443 -0
- data/_sass/_main.scss +274 -0
- data/_sass/jekyll-theme-primerpages-compat.scss +5 -0
- data/_sass/jekyll-theme-primerpages.scss +7 -0
- data/assets/css/style.scss +2 -0
- data/assets/css/theme.scss +16 -0
- data/assets/img/default.png +0 -0
- data/assets/img/favicon.ico +0 -0
- data/assets/img/social-preview.png +0 -0
- data/assets/img/user-image.jpg +0 -0
- data/assets/js/anchor-links.js +47 -0
- data/assets/js/mermaid.js +61 -0
- data/assets/js/theme-toggle.js +84 -0
- data/assets/js/topbar.js +19 -0
- data/assets/js/versioning.js +300 -0
- metadata +184 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{% assign paginate_path = include.paginate_path | default: site.paginate_path %}
|
|
2
|
+
{% assign previous_page_path = include.previous_page_path | default: paginator.previous_page_path %}
|
|
3
|
+
{% assign next_page_path = include.next_page_path | default: paginator.next_page_path %}
|
|
4
|
+
<div class="paginate-container">
|
|
5
|
+
{% if paginator.total_pages > 1 %}
|
|
6
|
+
<div role="navigation" aria-label="Pagination" class="d-flex d-md-inline-block pagination">
|
|
7
|
+
{%- if paginator.previous_page %}
|
|
8
|
+
<a class="previous_page" rel="prev" href="{{ previous_page_path | relative_url }}"
|
|
9
|
+
aria-disabled="false">Previous</a>
|
|
10
|
+
{% endif %}
|
|
11
|
+
|
|
12
|
+
{%- for paginator_nav_page in (1..paginator.total_pages) %}
|
|
13
|
+
{%- if paginator_nav_page == paginator.page %}
|
|
14
|
+
<a href="{{ page.url | relative_url }}" aria-label="{{ paginator_nav_page }}" aria-current="page">{{ paginator_nav_page }}</a>
|
|
15
|
+
{% elsif paginator_nav_page == 1 %}
|
|
16
|
+
<a href="{{ paginate_path | relative_url | replace: 'page:num', '' }}" aria-label="{{ paginator_nav_page }}">{{ paginator_nav_page }}</a>
|
|
17
|
+
{% else %}
|
|
18
|
+
<a href="{{ paginate_path | relative_url | replace: ':num', paginator_nav_page }}" aria-label="{{ paginator_nav_page }}">{{ paginator_nav_page }}</a>
|
|
19
|
+
{%- endif %}
|
|
20
|
+
{%- endfor %}
|
|
21
|
+
|
|
22
|
+
{%- if paginator.next_page %}
|
|
23
|
+
<a class="next_page" rel="next" href="{{ next_page_path | relative_url }}"
|
|
24
|
+
aria-disabled="false">Next</a>
|
|
25
|
+
{% endif %}
|
|
26
|
+
</div>
|
|
27
|
+
{% endif %}
|
|
28
|
+
</div>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{%- assign image = post.image | default: site.image %}
|
|
2
|
+
{%- assign excerpt = post.description | default: post.excerpt %}
|
|
3
|
+
{%- assign border = include.border %}
|
|
4
|
+
<!--Post card-->
|
|
5
|
+
<div class="col-sm-6 col-lg-4 ">
|
|
6
|
+
<div class="py-4 d-flex flex-column {{ border }}">
|
|
7
|
+
<div class="image-container">
|
|
8
|
+
<a href="{{ post.url | relative_url }}">
|
|
9
|
+
<img class="rounded-2" src="{{ image | relative_url }}" width="377" height="200" alt="{{ post.title }}">
|
|
10
|
+
</a>
|
|
11
|
+
</div>
|
|
12
|
+
<h3 class="h6-mktg mb-12px">
|
|
13
|
+
<a class="Link--primary" href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
|
14
|
+
</h3>
|
|
15
|
+
<div class="f4-mktg color-fg-muted mb-0">{{ excerpt }}</div>
|
|
16
|
+
<div class="mt-14px">
|
|
17
|
+
<div class="d-flex flex-items-center">
|
|
18
|
+
<div class="d-flex flex-items-end flex-wrap">
|
|
19
|
+
{%- if post.author %}
|
|
20
|
+
<span class="mr-3 mr-12px mt-1 f5-mktg text-bold">{{ post.author }}</span>
|
|
21
|
+
{%- endif %}
|
|
22
|
+
<span class="d-inline-block f5-mktg text-mono color-fg-muted mt-1">{{ post.date | date: "%b %d, %Y"}}</span>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{%- assign image = post.image | default: site.image %}
|
|
2
|
+
{%- assign excerpt = post.description | default: post.excerpt %}
|
|
3
|
+
<!-- Post feature card -->
|
|
4
|
+
<div class="d-flex flex-column flex-md-row flex-md-row-reverse py-4 col-12">
|
|
5
|
+
<div class="col-12 col-lg-8">
|
|
6
|
+
<div class="image-container">
|
|
7
|
+
<a href="{{ post.url | relative_url }}">
|
|
8
|
+
<img class="rounded-2" src="{{ image | relative_url }}" width="800" height="425" alt="{{ post.title }}">
|
|
9
|
+
</a>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="col-12 col-lg-4 pt-lg-4">
|
|
13
|
+
<h3 class="h4-mktg mb-12px">
|
|
14
|
+
<a class="Link--primary" href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
|
15
|
+
</h3>
|
|
16
|
+
<div class="f4-mktg color-fg-muted">{{ excerpt }}</div>
|
|
17
|
+
<div class="d-flex flex-items-end flex-wrap">
|
|
18
|
+
{%- if post.author %}
|
|
19
|
+
<span class="mr-3 mr-12px mt-1 f5-mktg text-bold">{{ post.author }}</span>
|
|
20
|
+
{%- endif %}
|
|
21
|
+
<span class="d-inline-block f5-mktg text-mono color-fg-muted mt-1">{{ post.date | date: "%b %d, %Y"}}</span>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{%- assign sections = include.sections | default: nil %}
|
|
2
|
+
{%- assign section_permalink = include.section_permalink | default: page.pagination.permalink | default: nil %}
|
|
3
|
+
{%- assign replace_value = include.replace_value | default: nil %}
|
|
4
|
+
{%- assign default_per_section = include.per_section | default: page.per_section | default: page.pagination.per_page %}
|
|
5
|
+
|
|
6
|
+
{%- if sections %}
|
|
7
|
+
{%- for section in sections %}
|
|
8
|
+
{%- assign section_name = section | first %}
|
|
9
|
+
{%- assign section_slug = section_name | slugify %}
|
|
10
|
+
{%- assign section_posts = section | last %}
|
|
11
|
+
{%- assign per_section = default_per_section | default: section_posts.size %}
|
|
12
|
+
<div class="section-heading d-flex flex-items-center flex-justify-between mb-4 mb-lg-7">
|
|
13
|
+
<h2 class="h6-mktg border-bottom-0">{{ section_name | capitalize }}</h2>
|
|
14
|
+
{%- if section_posts.size > per_section and section_permalink and replace_value %}
|
|
15
|
+
<div class="d-none d-lg-flex flex-items-center">
|
|
16
|
+
<a href="{{ section_permalink | replace: replace_value, section_slug | relative_url }}"
|
|
17
|
+
class="Link--primary arrow-target-mktg text-semibold">View all
|
|
18
|
+
<span class="octicon octicon-chevron-right-16"></span></a>
|
|
19
|
+
</div>
|
|
20
|
+
{%- endif %}
|
|
21
|
+
</div>
|
|
22
|
+
{%- if section_posts.size == 1 %}
|
|
23
|
+
{%- assign image_class = "col-12" %}
|
|
24
|
+
{%- assign text_class = "" %}
|
|
25
|
+
{%- else %}
|
|
26
|
+
{%- assign image_class = "col-md-7 col-xl-9" %}
|
|
27
|
+
{%- assign text_class = "col-md-5 col-xl-3" %}
|
|
28
|
+
{%- endif %}
|
|
29
|
+
<div class="d-flex flex-wrap gutter {% cycle '', 'flex-row-reverse' %}">
|
|
30
|
+
{%- for post in section_posts limit: per_section %}
|
|
31
|
+
{%- if forloop.first %}
|
|
32
|
+
<div class="{{ image_class }}">
|
|
33
|
+
{% include post-tease-image-card.html %}
|
|
34
|
+
</div>
|
|
35
|
+
<div class="{{ text_class }}">
|
|
36
|
+
{%- else %}
|
|
37
|
+
<div class="{% unless forloop.last %}border-bottom{% endunless %}">
|
|
38
|
+
{% include post-tease-text-card.html %}
|
|
39
|
+
</div>
|
|
40
|
+
{%- endif %}
|
|
41
|
+
{%- endfor %}
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
{%- if section_posts.size > per_section %}
|
|
45
|
+
<div class="mb-7 mb-md-8 pt-5 text-right d-lg-none border-top">
|
|
46
|
+
<a href="{{ section_permalink | replace: replace_value, section_slug | relative_url }}"
|
|
47
|
+
class="Link--primary arrow-target-mktg text-semibold">View all
|
|
48
|
+
<span class="octicon octicon-chevron-right-16"></span></a>
|
|
49
|
+
</div>
|
|
50
|
+
{%- endif %}
|
|
51
|
+
{%- endfor %}
|
|
52
|
+
{%- endif %}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{%- assign sections = include.sections | default: nil %}
|
|
2
|
+
{%- assign section_permalink = include.section_permalink | default: page.pagination.permalink | default: nil %}
|
|
3
|
+
{%- assign replace_value = include.replace_value | default: nil %}
|
|
4
|
+
{%- assign default_per_section = include.per_section | default: page.per_section | default: page.pagination.per_page %}
|
|
5
|
+
|
|
6
|
+
{%- if sections %}
|
|
7
|
+
{% for section in sections %}
|
|
8
|
+
{%- assign section_name = section | first %}
|
|
9
|
+
{%- assign section_slug = section_name | slugify %}
|
|
10
|
+
{%- assign section_posts = section | last %}
|
|
11
|
+
{%- assign per_section = default_per_section | default: section_posts.size %}
|
|
12
|
+
<div class="section-heading d-flex flex-items-center flex-justify-between mb-4 mb-lg-7">
|
|
13
|
+
<h2 class="h6-mktg border-bottom-0">{{ section_name | capitalize }}</h2>
|
|
14
|
+
{%- if section_posts.size > per_section and section_permalink and replace_value %}
|
|
15
|
+
<div class="d-none d-lg-flex flex-items-center">
|
|
16
|
+
<a href="{{ section_permalink | replace: replace_value, section_slug | relative_url }}"
|
|
17
|
+
class="Link--primary arrow-target-mktg text-semibold">View all
|
|
18
|
+
<span class="octicon octicon-chevron-right-16"></span></a>
|
|
19
|
+
</div>
|
|
20
|
+
{%- endif %}
|
|
21
|
+
</div>
|
|
22
|
+
<div class="d-flex flex-wrap gutter mb-4">
|
|
23
|
+
{% for post in section_posts limit: per_section %}
|
|
24
|
+
{%- include post-card.html %}
|
|
25
|
+
{% endfor %}
|
|
26
|
+
</div>
|
|
27
|
+
{%- if section_posts.size > per_section %}
|
|
28
|
+
<div class="mb-7 mb-md-8 pt-5 text-right d-lg-none border-top">
|
|
29
|
+
<a href="{{ section_permalink | replace: replace_value, section_slug | relative_url }}"
|
|
30
|
+
class="Link--primary arrow-target-mktg text-semibold">View all
|
|
31
|
+
<span class="octicon octicon-chevron-right-16"></span></a>
|
|
32
|
+
</div>
|
|
33
|
+
{%- endif %}
|
|
34
|
+
{% endfor %}
|
|
35
|
+
{%- endif %}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!-- post preview with image -->
|
|
2
|
+
{%- assign image = post.image | default: site.image %}
|
|
3
|
+
{%- assign excerpt = post.description | default: post.excerpt %}
|
|
4
|
+
<div class="py-4 d-flex flex-column border-bottom border-md-0">
|
|
5
|
+
<div class="image-container">
|
|
6
|
+
<a href="{{ post.url | relative_url }}">
|
|
7
|
+
<img class="rounded-2" src="{{ image | relative_url }}" width="800" height="425" alt="{{ post.title }}">
|
|
8
|
+
</a>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="col-12">
|
|
11
|
+
<h3 class="h3-mktg h3-alt-mktg mb-12px">
|
|
12
|
+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
|
13
|
+
</h3>
|
|
14
|
+
<div class="f4-mktg color-fg-muted">{{ excerpt }}</div>
|
|
15
|
+
<div class="mt-14px">
|
|
16
|
+
{%- if post.author %}
|
|
17
|
+
<span class="mr-3 mr-12px mt-1 f5-mktg text-bold">{{ post.author }}</span>
|
|
18
|
+
{%- endif %}
|
|
19
|
+
<span class="d-inline-block f5-mktg text-mono color-fg-muted mt-1">{{ post.date | date: "%b %d, %Y"}}</span>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{%- assign excerpt = post.description | default: post.excerpt %}
|
|
2
|
+
<div class="py-4 d-flex flex-column">
|
|
3
|
+
<div class="col-12">
|
|
4
|
+
<h3 class="h6-mktg mb-2">
|
|
5
|
+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
|
6
|
+
</h3>
|
|
7
|
+
<div class="f4-mktg color-fg-muted">{{ excerpt }}</div>
|
|
8
|
+
<div class="mt-12px">
|
|
9
|
+
<span class="mr-3 mr-12px mt-1 f5-mktg text-bold">{{ post.author }}</span>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
post-timeline-card.html
|
|
3
|
+
Usage example:
|
|
4
|
+
{% include post-timeline-card.html post=post %}
|
|
5
|
+
|
|
6
|
+
Expects:
|
|
7
|
+
post (object) with fields:
|
|
8
|
+
- url
|
|
9
|
+
- title
|
|
10
|
+
- author (optional)
|
|
11
|
+
- date
|
|
12
|
+
- tags (array, optional)
|
|
13
|
+
- excerpt (optional)
|
|
14
|
+
- content (optional)
|
|
15
|
+
- type (string, optional, for the Octicon, defaults to 'comment')
|
|
16
|
+
- video (URL string, optional)
|
|
17
|
+
- image (URL string, optional)
|
|
18
|
+
{%- endcomment -%}
|
|
19
|
+
{%- assign post = include.post %}
|
|
20
|
+
{%- assign icon = post.type | default: "comment" %}
|
|
21
|
+
<div class="TimelineItem flex-wrap">
|
|
22
|
+
<div class="col-12 col-md-5 position-relative">
|
|
23
|
+
<div class="TimelineItem-title mt-5 position-sticky d-flex topbar-aware-top">
|
|
24
|
+
<div class="TimelineItem-badge"><span class="octicon octicon-{{ icon }}-16"></span></div>
|
|
25
|
+
<div class="title mb-5">
|
|
26
|
+
<div class="h2">
|
|
27
|
+
<a href="{{ post.url | relative_url }}">
|
|
28
|
+
{{ post.title }}
|
|
29
|
+
</a>
|
|
30
|
+
</div>
|
|
31
|
+
{%- if post.author %}
|
|
32
|
+
<div class="authors-wrap text-bold mb-2 mr-3 ">{{ post.author }}</div>
|
|
33
|
+
{%- endif %}
|
|
34
|
+
<div class="text-gray mb-2 ws-normal">{{ post.date | date: "%b %d, %Y"}}</div>
|
|
35
|
+
{%- for tag in post.tags %}
|
|
36
|
+
{%- if site.tag_page_dir -%}
|
|
37
|
+
{%- capture tag_link %}/{{site.tag_page_dir}}/{{ tag | jekyll_tagging_slug }}{%
|
|
38
|
+
endcapture %}
|
|
39
|
+
{%- elsif site.tag_archive_path -%}
|
|
40
|
+
{%- capture tag_link %}{{site.tag_archive_path}}{{ tag | slugify }}{% endcapture %}
|
|
41
|
+
{%- endif -%}
|
|
42
|
+
{% if tag_link %}<a href="{{ tag_link | relative_url }}" class="IssueLabel px-0">{% endif %}
|
|
43
|
+
<span class="IssueLabel IssueLabel--big color-bg-accent-emphasis color-fg-on-emphasis mr-1">{{tag}}</span>
|
|
44
|
+
{% if tag_link %}</a>{% endif %}
|
|
45
|
+
{%- endfor %}
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="col-12 col-md-7">
|
|
50
|
+
<div class="pt-md-7 ml-5 border-bottom">
|
|
51
|
+
{%- if post.video %}
|
|
52
|
+
<div class="image-container mb-5">
|
|
53
|
+
<iframe
|
|
54
|
+
class="rounded-2"
|
|
55
|
+
src="{{ post.video }}"
|
|
56
|
+
frameborder="0"
|
|
57
|
+
allowfullscreen
|
|
58
|
+
title="{{ post.title }}"
|
|
59
|
+
></iframe>
|
|
60
|
+
</div>
|
|
61
|
+
{%- elsif post.image %}
|
|
62
|
+
<div class="image-container mb-5">
|
|
63
|
+
<img class="rounded-2" src="{{ post.image | relative_url }}" width="800" height="425" alt="{{ post.title }}" />
|
|
64
|
+
</div>
|
|
65
|
+
{%- endif %}
|
|
66
|
+
{% if post.excerpt != blank %}<div class="summary mb-5"> {{ post.excerpt }}</div>{% endif %}
|
|
67
|
+
{%- if post.content != post.excerpt %}
|
|
68
|
+
<div class="more mb-5">
|
|
69
|
+
<a href="{{ post.url | relative_url }}" class="link-mktg arrow-target-mktg text-semibold f4-mktg">
|
|
70
|
+
Continue
|
|
71
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="octicon arrow-symbol-mktg mt-1" width="16" height="16"
|
|
72
|
+
viewBox="0 0 16 16" fill="none">
|
|
73
|
+
<path fill="currentColor"
|
|
74
|
+
d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z">
|
|
75
|
+
</path>
|
|
76
|
+
<path stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path>
|
|
77
|
+
</svg>
|
|
78
|
+
</a>
|
|
79
|
+
</div>
|
|
80
|
+
{%- endif %}
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
post-timeline.html
|
|
3
|
+
Usage example:
|
|
4
|
+
{% include post-timeline.html posts=site.posts limit=5 index='/blog/index.html' %}
|
|
5
|
+
|
|
6
|
+
Expects:
|
|
7
|
+
posts (array, required) - A list of posts or other objects to display.
|
|
8
|
+
limit (integer, optional) - Number of posts to display (default: all).
|
|
9
|
+
index (string, optional) - Index page for the collection.
|
|
10
|
+
{%- endcomment -%}
|
|
11
|
+
|
|
12
|
+
{%- assign timeline_posts = include.posts | default: nil %}
|
|
13
|
+
{%- if timeline_posts %}
|
|
14
|
+
{%- assign timeline_posts = timeline_posts | sort: "date" | reverse %}
|
|
15
|
+
{%- endif %}
|
|
16
|
+
{%- assign timeline_post_limit = include.limit | default: page.posts_limit | default: site.paginate | default: -1 %}
|
|
17
|
+
{%- if timeline_posts and timeline_post_limit < 0 %}{%- assign timeline_post_limit = timeline_posts.size %}{%- endif %}
|
|
18
|
+
{% assign timeline_index = include.index | default: page.first_page_path %}
|
|
19
|
+
{%- if timeline_posts and timeline_posts.size > 0 %}
|
|
20
|
+
<div class="mx-auto mb-8">
|
|
21
|
+
{%- for post in timeline_posts | limit: timeline_post_limit %}
|
|
22
|
+
{%- include post-timeline-card.html post=post %}
|
|
23
|
+
{%- endfor %}
|
|
24
|
+
{%- if timeline_posts.size > timeline_post_limit and timeline_index != blank %}
|
|
25
|
+
<div class="mx-auto py-3">
|
|
26
|
+
<a href="{{ timeline_index | relative_url }}"
|
|
27
|
+
class="Link--primary arrow-target-mktg text-semibold btn width-full text-center">More</a>
|
|
28
|
+
</div>
|
|
29
|
+
{%- endif %}
|
|
30
|
+
</div>
|
|
31
|
+
{%- endif %}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{%- assign post_limit = include.limit | default: 3 %}
|
|
2
|
+
|
|
3
|
+
<div class="mb-4">
|
|
4
|
+
{%- for post in site.posts limit: {{post_limit}} %}
|
|
5
|
+
{%- include post-card.html %}
|
|
6
|
+
{%- endfor %}
|
|
7
|
+
</div>
|
|
8
|
+
{%- if site.paginate %}
|
|
9
|
+
<div class="col-12 col-md-7 offset-md-5 mb-5">
|
|
10
|
+
<a href="{{ site.paginate_path | relative_url | replace: 'page:num', '' }}" class="btn ml-5">Read more</a>
|
|
11
|
+
</div>
|
|
12
|
+
{%- endif %}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
{% comment %}
|
|
2
|
+
<!--
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2021 John Scott.
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
SOFTWARE.
|
|
24
|
+
-->
|
|
25
|
+
{% endcomment %}
|
|
26
|
+
|
|
27
|
+
{% assign related_by = page.related_by | default: site.related_by | default: "default" %}
|
|
28
|
+
{% if related_by.first != true %}{% assign related_by = related_by | split: " " %}{% endif %}
|
|
29
|
+
{% assign related_limit = page.related_limit | default: site.related_limit | default: 3 %}
|
|
30
|
+
{% assign related_from = page.related_from | default: site.related_from | default: documents %}
|
|
31
|
+
{% assign related_categories = page.related_categories | default: site.related_categories | default: 1 %}
|
|
32
|
+
{% assign related_tags = page.related_tags | default: site.related_tags | default: 1 %}
|
|
33
|
+
{% assign related_template = page.related_template | default: site.related_template | default: "post-card.html" %}
|
|
34
|
+
|
|
35
|
+
{% comment %}<!-- Random related pages -->{% endcomment %}
|
|
36
|
+
{% if related_by contains "random" %}
|
|
37
|
+
{% comment %}<!-- We might sample current page so select one more just in case -->{% endcomment %}
|
|
38
|
+
{% assign related_limit = related_limit | plus: 1 %}
|
|
39
|
+
{% if related_from == "posts" %}
|
|
40
|
+
{% assign related_posts = site.posts | sample: related_limit %}
|
|
41
|
+
{% else %}
|
|
42
|
+
{% assign related_posts = site.documents | sample: related_limit %}
|
|
43
|
+
{% endif %}
|
|
44
|
+
{% assign related_limit = related_limit | minus: 1 %}
|
|
45
|
+
|
|
46
|
+
{% comment %}<!-- Tag/category matching pages -->{% endcomment %}
|
|
47
|
+
{% elsif related_by contains "categories" or related_by contains "tags" %}
|
|
48
|
+
{% assign related_posts = "" | split: " " %}
|
|
49
|
+
|
|
50
|
+
{% for doc in site.documents %}
|
|
51
|
+
{% if doc.id == page.id %}
|
|
52
|
+
{% continue %}
|
|
53
|
+
{% elsif related_from == "posts" and doc.collection != "posts" %}
|
|
54
|
+
{% continue %}
|
|
55
|
+
{% elsif related_from == "collection" and doc.collection != page.collection %}
|
|
56
|
+
{% continue %}
|
|
57
|
+
{% endif %}
|
|
58
|
+
|
|
59
|
+
{% assign related_category_count = 0 %}
|
|
60
|
+
{% if related_by contains "categories" %}
|
|
61
|
+
{% for cat in doc.categories %}
|
|
62
|
+
{% if page.categories contains cat %}
|
|
63
|
+
{% assign related_category_count = related_category_count | plus: 1 %}
|
|
64
|
+
{% endif %}
|
|
65
|
+
{% endfor %}
|
|
66
|
+
{% endif %}
|
|
67
|
+
|
|
68
|
+
{% assign related_tag_count = 0 %}
|
|
69
|
+
{% if related_by contains "tags" %}
|
|
70
|
+
{% for tag in doc.tags %}
|
|
71
|
+
{% if page.tags contains tag %}
|
|
72
|
+
{% assign related_tag_count = related_tag_count | plus: 1 %}
|
|
73
|
+
{% endif %}
|
|
74
|
+
{% endfor %}
|
|
75
|
+
{% endif %}
|
|
76
|
+
|
|
77
|
+
{% if related_by contains "categories" and related_by contains "tags" %}
|
|
78
|
+
{% if related_by contains "or" %}
|
|
79
|
+
{% if related_category_count >= related_categories or related_tag_count >= related_tags %}
|
|
80
|
+
{% assign related_posts = related_posts | push: doc %}
|
|
81
|
+
{% endif %}
|
|
82
|
+
{% else %}
|
|
83
|
+
{% if related_category_count >= related_categories and related_tag_count >= related_tags %}
|
|
84
|
+
{% assign related_posts = related_posts | push: doc %}
|
|
85
|
+
{% endif %}
|
|
86
|
+
{% endif %}
|
|
87
|
+
{% elsif related_by contains "categories" and related_category_count >= related_categories %}
|
|
88
|
+
{% assign related_posts = related_posts | push: doc %}
|
|
89
|
+
{% elsif related_by contains "tags" and related_tag_count >= related_tags %}
|
|
90
|
+
{% assign related_posts = related_posts | push: doc %}
|
|
91
|
+
{% endif %}
|
|
92
|
+
{% endfor %}
|
|
93
|
+
|
|
94
|
+
{% assign related_posts = related_posts | sample: related_limit %}
|
|
95
|
+
|
|
96
|
+
{% comment %}<!-- Use site.related_posts for posts if found -->{% endcomment %}
|
|
97
|
+
{% elsif site.related_posts.size > 0 %}
|
|
98
|
+
{% assign related_posts = site.related_posts %}
|
|
99
|
+
|
|
100
|
+
{% comment %}<!-- Otherwise show recent posts if no site.related_posts -->{% endcomment %}
|
|
101
|
+
{% else if related_by == "default" %}
|
|
102
|
+
{% assign related_posts = site.posts %}
|
|
103
|
+
{% endif %}
|
|
104
|
+
|
|
105
|
+
{%- if related_limit > 0 and related_posts.size > 0 %}
|
|
106
|
+
<h2 class="h5-mktg pb-3 mb-lg-3">Related posts</h2>
|
|
107
|
+
<div class="d-flex flex-wrap gutter">
|
|
108
|
+
{% for post in related_posts limit:related_limit %}
|
|
109
|
+
{% if post.id == page.id %}
|
|
110
|
+
{% continue %}
|
|
111
|
+
{% endif %}
|
|
112
|
+
|
|
113
|
+
{% include {{ related_template }} %}
|
|
114
|
+
{% endfor %}
|
|
115
|
+
</div>
|
|
116
|
+
{%- endif %}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<div
|
|
2
|
+
class="github-component d-flex flex-column flex-justify-between height-full text-left border border-gray-light rounded-1 p-3">
|
|
3
|
+
<div>
|
|
4
|
+
<div class="d-flex flex-justify-between flex-items-start mb-1">
|
|
5
|
+
<h1 class="f4 lh-condensed my-1">
|
|
6
|
+
<span class="octicon octicon-repo-24"></span>
|
|
7
|
+
<a href="{{repository.html_url}}">{{ repository.name }}</a>
|
|
8
|
+
</h1>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="text-gray mb-2 ws-normal">{{ repository.description }}</div>
|
|
11
|
+
{%- if repository.homepage != blank %}
|
|
12
|
+
<div class="mb-2 d-flex flex-items-center Link--secondary">
|
|
13
|
+
<div class="mr-2">
|
|
14
|
+
<span class="octicon octicon-link-16"></span>
|
|
15
|
+
</div>
|
|
16
|
+
<span class="flex-auto min-width-0 css-truncate css-truncate-target width-fit">
|
|
17
|
+
<a title="{{ repository.homepage }}" role="link" target="_blank" class="text-bold"
|
|
18
|
+
href="{{ repository.homepage }}">{{repository.homepage}}</a>
|
|
19
|
+
</span>
|
|
20
|
+
</div>
|
|
21
|
+
{%- endif %}
|
|
22
|
+
</div>
|
|
23
|
+
<div class="d-flex f6">
|
|
24
|
+
<p class="mb-0 mt-2 f6 color-fg-muted">
|
|
25
|
+
{%- if repository.language %}
|
|
26
|
+
<span class="d-inline-block mr-1">
|
|
27
|
+
<span class="repo-language-color" data-language="{{ repository.language }}"></span>
|
|
28
|
+
<span itemprop="programmingLanguage">{{ repository.language }}</span>
|
|
29
|
+
</span>
|
|
30
|
+
{%- endif %}
|
|
31
|
+
{%- if repository.stargazers_count %}
|
|
32
|
+
<a href="{{ repository.html_url }}/stargazers" class="mr-1 Link--muted">
|
|
33
|
+
<span class="octicon octicon-star-16 v-align-middle"></span> {{ repository.stargazers_count }}
|
|
34
|
+
</a>
|
|
35
|
+
{%- endif %}
|
|
36
|
+
{%- if repository.forks_count %}
|
|
37
|
+
<a href="{{ repository.html_url }}/network/members" class="mr-1 Link--muted">
|
|
38
|
+
<span class="octicon octicon-repo-forked-16 v-align-middle"></span> {{ repository.forks_count }}
|
|
39
|
+
</a>
|
|
40
|
+
{%- endif %}
|
|
41
|
+
</p>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<div class="d-sm-flex flex-wrap gutter-condensed mb-8">
|
|
2
|
+
{%- if site.repositories.sort_by == 'stars' %}
|
|
3
|
+
{%- assign sort_order = 'stargazers_count', 'last' %}
|
|
4
|
+
{%- else %}
|
|
5
|
+
{%- assign sort_order = 'pushed_at' %}
|
|
6
|
+
{%- endif %}
|
|
7
|
+
|
|
8
|
+
{%- if site.github.public_repositories.size > 0 %}
|
|
9
|
+
{%- if site.repositories.exclude.archived && site.repositories.exclude.forks %}
|
|
10
|
+
{%- assign filtered_repos = site.github.public_repositories | where:'archived', false | where:'fork', false | sort: sort_order | reverse %}
|
|
11
|
+
{%- elsif site.repositories.exclude.archived %}
|
|
12
|
+
{%- assign filtered_repos = site.github.public_repositories | where:'archived', false | sort: sort_order | reverse %}
|
|
13
|
+
{%- elsif site.repositories.exclude.forks %}
|
|
14
|
+
{%- assign filtered_repos = site.github.public_repositories | where:'fork', false | sort: sort_order | reverse %}
|
|
15
|
+
{%- else %}
|
|
16
|
+
{%- assign filtered_repos = site.github.public_repositories | sort: sort_order | reverse %}
|
|
17
|
+
{%- endif %}
|
|
18
|
+
{%- endif %}
|
|
19
|
+
|
|
20
|
+
{%- for repository in filtered_repos | limit: site.repositories.limit %}
|
|
21
|
+
{%- unless site.repositories.exclude.repositories contains repository.name %}
|
|
22
|
+
<div class="col-sm-12 col-md-6 col-lg-6 col-xl-6 mb-3">
|
|
23
|
+
{%- include repo-card.html %}
|
|
24
|
+
</div>
|
|
25
|
+
{%- endunless %}
|
|
26
|
+
{%- endfor %}
|
|
27
|
+
</div>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{%- assign versions_enabled = false -%}
|
|
2
|
+
{%- if site.versions and site.versions != empty -%}
|
|
3
|
+
{%- assign versions_enabled = true -%}
|
|
4
|
+
{%- endif -%}
|
|
5
|
+
{%- if site.versions and site.versions.enabled != nil -%}
|
|
6
|
+
{%- assign versions_enabled = site.versions.enabled -%}
|
|
7
|
+
{%- endif -%}
|
|
8
|
+
{%- if page.versions and page.versions.enabled != nil -%}
|
|
9
|
+
{%- assign versions_enabled = page.versions.enabled -%}
|
|
10
|
+
{%- endif -%}
|
|
11
|
+
{%- assign versions_json = site.versions.config | default: "/versions.json" -%}
|
|
12
|
+
{%- assign versions_prefix = site.versions.prefix | default: "" -%}
|
|
13
|
+
{%- unless versions_enabled -%}
|
|
14
|
+
{%- assign versions_json = "" -%}
|
|
15
|
+
{%- assign versions_prefix = "" -%}
|
|
16
|
+
{%- endunless -%}
|