jekyll-theme-profile 1.7.1 → 1.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 496c50249c4ad24ccfdecbd84442cb3e88db4db88de315f95f1a000c1af32604
4
- data.tar.gz: 4ff57f86bdfe0aadca9553c658231a1a9e507ba6a03282a13c6e98ad09532eec
3
+ metadata.gz: a38c67f81a4ea3a074b8b3be69fb1a039ec799bd14309bae0074413b128e31b7
4
+ data.tar.gz: 6bad0f1fb9f8c28b85781f59ee303d46a641e7e7a80eb079f302c7d3549e3c22
5
5
  SHA512:
6
- metadata.gz: 9949c30dcebcd7d12e59c67d8587ff88567e856993a0b225f0de59f6ac9397bfd78250ba690c0131c25644221f6e25ff698c26a700f8663d32fc8bcf3360c0cd
7
- data.tar.gz: c4645f8fea05ca5265884e5b5b8c4d308f3613ccdc8bd9c7aa5688818315849f90b84c30e1e1dc460440fa0b2c1a6f6413dcc0fcbefcaf351a177d19175b0d80
6
+ metadata.gz: 8b580883cd351dbfc94f29bfee829abc262c9c6a4a7eeba40e2189a00ee242ed4284fff77edb9706159d5854d7b94929e795656404b527e56d1592d7f7fe709f
7
+ data.tar.gz: 91efc6655a093ac045273760198dfc7dfac688c675bed97c6b9bec20b3894c628c6e00d4a3c4f3653518eabe56cb16f554e18180d7d832e124e5414e1f137b31
data/README.md CHANGED
@@ -121,14 +121,14 @@ jobs:
121
121
  Select the default style for your theme by adding `style` to your config file:
122
122
 
123
123
  ```yaml
124
- style: sidebar # One of "stacked", "sidebar", "topbar"
124
+ style: sidebar # One of "stacked", "sidebar", "topbar", "appbar"
125
125
  ```
126
126
 
127
127
  You can also set the style of a particular page by adding `style` to your frontmatter.
128
128
 
129
129
  ```yaml
130
130
  ---
131
- style: sidebar # One of "stacked", "sidebar", "topbar"
131
+ style: sidebar # One of "stacked", "sidebar", "topbar", "appbar
132
132
  ---
133
133
  ```
134
134
 
@@ -1,3 +1,4 @@
1
+ {% assign collection = include.collection | default: site.docs %}
1
2
  <div class="Breadcrumb d-flex flex-items-center">
2
3
  <nav aria-label="Breadcrumb" class="f5">
3
4
  <ol class="breadcrumb">
@@ -10,8 +11,6 @@
10
11
  </li>
11
12
  {%- continue %}
12
13
  {%- endif %}
13
- {%- assign asset_url = url | append: "assets/" | append: crumb | append: "/" %}
14
- {%- assign isa_asset = site.pages | where: "url", asset_url | first %}
15
14
  {%- assign index_url = url | append: crumb | append: "/index.html" %}
16
15
  {%- assign isa_index = site.pages | where: "url", index_url | first %}
17
16
  {%- assign folder_url = url | append: crumb | append: "/" %}
@@ -19,34 +18,35 @@
19
18
  {%- assign url = url | append: crumb %}
20
19
  {%- assign isa_page = site.pages | where: "url", url | first %}
21
20
  {%- assign isa_post = site.posts | where: "url", url | first %}
21
+ {%- assign isa_collection = collection | where: "url", index_url | first %}
22
22
 
23
23
  {%- assign nice_crumb = crumb | url_decode | replace: ".html", "" | replace: "-", " " | replace: "_", " " |
24
24
  downcase %}
25
25
 
26
- {%- comment %}
26
+ {% comment %}
27
27
  Checking the crumb: {{ crumb }}
28
28
  [asset url: {{ asset_url }}]
29
29
  [index url: {{ index_url }}]
30
30
  [folder_url: {{ folder_url }}]
31
31
  [url: {{ url }}]
32
- {% for p in site.pages %}
32
+ {% for p in collection %}
33
33
  {{ p.url }}
34
34
  {% endfor %}
35
- {%- endcomment %}
35
+
36
+ [Page?: {% if isa_page %}page!{% endif %}]
37
+ [Post?: {% if isa_post %}post!{% endif %}]
38
+ [Collection?: {% if isa_collection %}collection!{% endif %}]
39
+ {% endcomment %}
36
40
 
37
41
  {%- if page.url == url or page.url == index_url or page.url == folder_url %}
38
42
  <li class="breadcrumb-item breadcrumb-item-selected" aria-current="page">
39
43
  <a href="{{ page.url | relative_url }}">{{ nice_crumb }}</a>
40
44
  </li>
41
45
  {%- break %}
42
- {%- elsif isa_page or isa_post or isa_index or isa_folder %}
46
+ {%- elsif isa_page or isa_post or isa_index or isa_folder or isa_collection %}
43
47
  <li class="breadcrumb-item">
44
48
  <a href="{{ url | relative_url }}">{{ nice_crumb }}</a>
45
49
  </li>
46
- {%- elsif isa_asset %}
47
- <li class="breadcrumb-item">
48
- <a href="{{ asset_url | relative_url }}">{{ nice_crumb }}</a>
49
- </li>
50
50
  {%- else %}
51
51
  <li class="breadcrumb-item">
52
52
  {{ nice_crumb }}
@@ -0,0 +1,40 @@
1
+ {%- assign collection = include.collection | default: site.docs %}
2
+ {%- assign collection_name = include.name %}
3
+ {%- assign collection_index = include.index %}
4
+ <div class="Overlay-backdrop--side Overlay-backdrop--placement-left" data-modal-dialog-overlay>
5
+ <modal-dialog class="Overlay Overlay--width-medium Overlay--motion-slideDown height-fit height-full" >
6
+ <div class="Overlay-headerContentWrap d-flex flex-row py-3 px-2 border-bottom">
7
+ <div class="Overlay-titleWrap d-flex flex-1">
8
+ <div tabindex="-1" class="d-flex flex-1 ml-3" id="github-logo">
9
+ {% if collection_index %}
10
+ <a href="{{ collection_index.url | relative_url }}" class="AppHeader-link d-flex flex-items-center no-underline mr-3">
11
+ <span class="h3 color-fg-default text-bold">{{ collection_name }}</span>
12
+ </a>
13
+ {% else %}
14
+ <div class="AppHeader-link d-flex flex-items-center no-underline mr-3">
15
+ <span class="h3 color-fg-default text-bold">{{ collection_name }}</span>
16
+ </div>
17
+ {% endif %}
18
+ </div>
19
+ </div>
20
+ <div class="Overlay-actionWrap d-flex flex-justify-end" >
21
+ <button id="close-contents-btn" class="close-button Overlay-closeButton">
22
+ {% octicon x height: 16 %}
23
+ </button>
24
+ </div>
25
+ </div>
26
+ <div class="Overlay-body d-flex flex-column p-2">
27
+ <ul data-overflow-nav class="ActionList border-0">
28
+ {%- for nav_item in collection %}
29
+ {%- if nav_item.url != collection_index %}
30
+ <a href="{{ nav_item.url | relative_url }}" class="ActionListItem-label no-underline" >
31
+ <li class="menu-item ActionList-item border-0"{% if page.url==nav_item.url %} aria-current="page"{% endif %}>
32
+ {{ nav_item.title }}
33
+ </li>
34
+ </a>
35
+ {%- endif %}
36
+ {%- endfor %}
37
+ </ul>
38
+ </div>
39
+ </modal-dialog>
40
+ </div>
data/_includes/links.html CHANGED
@@ -1,6 +1,7 @@
1
+ {% assign links = page.links | default: site.links %}
1
2
  <div class="width-full">
2
3
  <div class="d-flex flex-column mb-4">
3
- {%- for link in site.links %}
4
+ {%- for link in links %}
4
5
  <div class="mb-2">
5
6
  {%- include link-card.html %}
6
7
  </div>
data/_includes/nav.html CHANGED
@@ -1,6 +1,6 @@
1
1
  {%- for nav_item in site.nav %}
2
2
  <div class="Header-item flex-justify-center f4 p-2">
3
- <a href="{{ nav_item.url | relative_url }}" class="Header-link" {% if page.url == nav_item.url %}aria-current="page"{% endif %}>
3
+ <a href="{{ nav_item.url | relative_url }}" class="Header-link" {% if page.url contains nav_item.url %}aria-current="page"{% endif %}>
4
4
  {{ nav_item.name }}
5
5
  </a>
6
6
  </div>
@@ -2,7 +2,7 @@
2
2
  <ul class="UnderlineNav-body flex-row list-style-none">
3
3
  {%- for nav_item in site.nav %}
4
4
  <li class="d-inline-flex">
5
- <a href="{{ nav_item.url | relative_url }}" class="UnderlineNav-item m-2" {% if page.url == nav_item.url %}aria-current="page"{% endif %}>
5
+ <a href="{{ nav_item.url | relative_url }}" class="UnderlineNav-item m-2" {% if page.url contains nav_item.url %}aria-current="page"{% endif %}>
6
6
  {{ nav_item.name }}
7
7
  </a>
8
8
  </li>
@@ -10,7 +10,7 @@
10
10
  <h3 class="h6-mktg mb-12px">
11
11
  <a class="Link--primary" href="{{ post.url | relative_url }}">{{ post.title }}</a>
12
12
  </h3>
13
- <p class="f4-mktg color-fg-muted mb-0">{{ post.excerpt }}</p>
13
+ <p class="f4-mktg color-fg-muted mb-0">{{ post.excerpt | default: post.description }}</p>
14
14
  <div class="mt-14px">
15
15
  <div class="d-flex flex-items-center">
16
16
  <div class="d-flex flex-items-end flex-wrap">
@@ -98,11 +98,11 @@
98
98
  {% assign related_posts = site.related_posts %}
99
99
 
100
100
  {% comment %}<!-- Otherwise show recent posts if no site.related_posts -->{% endcomment %}
101
- {% else %}
101
+ {% else if related_by == "default" %}
102
102
  {% assign related_posts = site.posts %}
103
103
  {% endif %}
104
104
 
105
- {%- if related_limit > 0 %}
105
+ {%- if related_limit > 0 and related_posts.size > 0 %}
106
106
  <h2 class="h5-mktg pb-3 mb-lg-3">Related posts</h2>
107
107
  <div class="d-flex flex-wrap gutter-spacious">
108
108
  {% for post in related_posts limit:related_limit %}
@@ -21,9 +21,9 @@
21
21
 
22
22
  {{ content }}
23
23
 
24
- {% if style== 'sidebar' %}
24
+ {%- if style == 'sidebar' %}
25
25
  </div>
26
- {% endif %}
26
+ {%- endif %}
27
27
 
28
28
  {%- include footer.html %}
29
29
  </body>
@@ -0,0 +1,103 @@
1
+ ---
2
+ layout: default
3
+ style: appbar
4
+ toc: true
5
+ ---
6
+ {% comment %}
7
+ Docs utilize collections to display content
8
+ {% endcomment %}
9
+ {%- assign collection_name = page.collection | default: "docs" %}
10
+ {%- assign docs = site[collection_name]%}
11
+ {%- assign docs_name = page.name | default: "Documentation" %}
12
+ {%- assign index_url = collection_name | prepend: "/" | append: "/index.html" %}
13
+ {%- assign docs_index = docs | where: "url", index_url | first %}
14
+
15
+
16
+ <script>
17
+ $(document).ready(function () {
18
+ $('#contents-btn').click(function () {
19
+ $('.CollectionMenu').toggleClass('d-none');
20
+ });
21
+ $('#close-contents-btn').click(function () {
22
+ $('.CollectionMenu').addClass('d-none');
23
+ })
24
+ });
25
+ </script>
26
+ <div class="d-lg-flex flex-1">
27
+ <div class="Layout Layout-sidebar position-sticky border-right d-none d-xl-block">
28
+ <div class="px-4 pb-3 border-bottom">
29
+ <div class="mt-3">
30
+ {% if docs_index %}
31
+ <a class="d-block pl-1 mb-2 h3 color-fg-default no-underline" href="{{ index_url | relative_url }}">
32
+ {{ docs_name | capitalize }}
33
+ </a>
34
+ {% else %}
35
+ <h3 class="d-block pl-1 mb-2 h3 color-fg-default no-underline">{{ docs_name | capitalize }}</h3>
36
+ {% endif %}
37
+ </div>
38
+ </div>
39
+ <div class="">
40
+ <ul data-overflow-nav class="menu ActionList border-0">
41
+ {% for nav_item in docs %}
42
+ {% if nav_item.url != index_url %}
43
+ <a href="{{ nav_item.url | relative_url }}" class="ActionListItem-label no-underline">
44
+ <li class="menu-item ActionList-item border-0"
45
+ {% if page.url==nav_item.url %} aria-current="page" {% endif %}>
46
+ {{ nav_item.title }}
47
+ </li>
48
+ </a>
49
+ {% endif %}
50
+ {% endfor %}
51
+ </ul>
52
+ </div>
53
+ </div>
54
+ <div class="flex-1">
55
+ <div class="container-xl mx-auto p-responsive py-3">
56
+ <div class="py-4 d-flex">
57
+ <div class="d-xl-none">
58
+ <button id="contents-btn" class="btn-octicon mr-2">{% octicon three-bars height:16 %}</button>
59
+ </div>
60
+ {% include breadcrumbs.html %}
61
+ </div>
62
+ <div class="pb-5">
63
+ <h1 class="border-bottom-0">{{ page.title }}</h1>
64
+ <h3 class="f3 color-fg-muted pb-3">{{ page.description }}</h3>
65
+ </div>
66
+ <div class="d-flex flex-wrap-reverse">
67
+ <div class="col-12 col-md-8 markdown-body">
68
+ {{ content }}
69
+
70
+ <!-- Pagination links -->
71
+ <div class="paginate-container py-3">
72
+ <div role="navigation" aria-label="Pagination" class="d-inline-block pagination">
73
+ {% if page.previous.url %}
74
+ <a class="previous_page" rel="prev" href="{{ page.previous.url | relative_url }}"
75
+ aria-disabled="false">{{page.previous.title | truncate: 20 }}</a>
76
+ {% else %}
77
+ <span class="previous_page disabled" aria-disabled="true">Previous</span>
78
+ {% endif %}
79
+
80
+ {% if page.next.url %}
81
+ <a class="next_page" rel="next" href="{{ page.next.url | relative_url }}"
82
+ aria-disabled="false">{{page.next.title | truncate: 20 }}</a>
83
+ {% else %}
84
+ <span class="next_page disabled" aria-disabled="true">Next</span>
85
+ {% endif %}
86
+ </div>
87
+ </div>
88
+ </div>
89
+ <div class="col-12 col-md-4 markdown-body">
90
+ {% if page.toc %}
91
+ <div class="position-sticky top-12 ml-5 pb-5">
92
+ <h4 class="ml-3 mb-1">In this article</h4>
93
+ {{ content | toc_only }}
94
+ </div>
95
+ {% endif %}
96
+ </div>
97
+ </div>
98
+ </div>
99
+ </div>
100
+ </div>
101
+ <div class="CollectionMenu d-none">
102
+ {% include collection-menu.html name=docs_name collection=docs index=docs_index.url %}
103
+ </div>
@@ -2,7 +2,9 @@
2
2
  layout: default
3
3
  ---
4
4
  <div class="flex-column flex-1 min-width-0 py-3">
5
+ {%- if style == "topbar" or style == "appbar" %}
5
6
  {%- include masthead.html %}
7
+ {%- endif %}
6
8
  {%- unless content == "" %}
7
9
  {{ content }}
8
10
  {%- endunless %}
data/_layouts/page.html CHANGED
@@ -5,4 +5,5 @@ layout: default
5
5
  <div class="container-xl p-3 px-md-5 markdown-body">
6
6
  {{ content }}
7
7
  </div>
8
+ <div class="flex-1 height-full"></div>
8
9
  </div>
data/_layouts/post.html CHANGED
@@ -87,7 +87,12 @@ layout: default
87
87
  <span class="post-tags-label flex-shrink-0 d-inline-block mt-2">Tags: </span>
88
88
  <ul class="d-inline-block list-style-none color-text-link mb-0">
89
89
  {% for tag in page.tags %}
90
- <li class="d-inline-block mt-2 mb-0"><a href="{{ site.tag_page_dir | relative_url }}/{{ tag | slugify: 'pretty' }}.html">{{ tag }}</a></li>
90
+ {%- if site.tag_page_dir -%}
91
+ {%- capture tag_link %}/{{site.tag_page_dir}}/{{ tag | jekyll_tagging_slug }}{% endcapture %}
92
+ {%- else -%}
93
+ {%- capture tag_link %}{{site.tag_archive_path}}{{ tag | slugify }}{% endcapture %}
94
+ {%- endif -%}
95
+ <li class="d-inline-block mt-2 mb-0"><a href="{{ tag_link }}">{{ tag }}</a></li>
91
96
  {% endfor %}
92
97
  </ul>
93
98
  </div>
data/_sass/_main.scss CHANGED
@@ -162,10 +162,13 @@
162
162
  }
163
163
 
164
164
  .Page {
165
- height: 100% !important;
166
165
  background-color: var(--color-canvas-default) !important;
167
166
  }
168
167
 
168
+ .Header-link[aria-current]:not([aria-current=false]) {
169
+ color: var(--color-primer-border-active);
170
+ }
171
+
169
172
  .post-tags::before {
170
173
  content: "";
171
174
  display: block;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-profile
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Allison Thackston
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-26 00:00:00.000000000 Z
11
+ date: 2023-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -110,6 +110,7 @@ files:
110
110
  - LICENSE.txt
111
111
  - README.md
112
112
  - _includes/breadcrumbs.html
113
+ - _includes/collection-menu.html
113
114
  - _includes/footer.html
114
115
  - _includes/head.html
115
116
  - _includes/header-appbar.html
@@ -136,6 +137,7 @@ files:
136
137
  - _includes/user-metadata.html
137
138
  - _layouts/category_layout.html
138
139
  - _layouts/default.html
140
+ - _layouts/docs.html
139
141
  - _layouts/home.html
140
142
  - _layouts/landing.html
141
143
  - _layouts/linktree.html