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.
Files changed (81) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +65 -0
  4. data/_config.yml +149 -0
  5. data/_includes/awesome-nav-breadcrumb-trail.html +33 -0
  6. data/_includes/awesome-nav-breadcrumbs.html +51 -0
  7. data/_includes/awesome-nav-menu-tree.html +21 -0
  8. data/_includes/awesome-nav-menu.html +68 -0
  9. data/_includes/awesome-nav-sidebar.html +7 -0
  10. data/_includes/awesome-nav-tree.html +52 -0
  11. data/_includes/breadcrumbs.html +62 -0
  12. data/_includes/category_index.html +18 -0
  13. data/_includes/collection-menu.html +79 -0
  14. data/_includes/collection-sidebar.html +23 -0
  15. data/_includes/custom-colors.html +99 -0
  16. data/_includes/footer.html +13 -0
  17. data/_includes/head.html +43 -0
  18. data/_includes/header-appbar.html +53 -0
  19. data/_includes/header-sidebar.html +60 -0
  20. data/_includes/header-stacked.html +33 -0
  21. data/_includes/header-topbar.html +59 -0
  22. data/_includes/link-card.html +52 -0
  23. data/_includes/links.html +12 -0
  24. data/_includes/masthead.html +18 -0
  25. data/_includes/mini-repo-info-card.html +30 -0
  26. data/_includes/nav-overlay.html +53 -0
  27. data/_includes/nav.html +51 -0
  28. data/_includes/navbar-underline.html +51 -0
  29. data/_includes/paginator_nav.html +28 -0
  30. data/_includes/post-card.html +27 -0
  31. data/_includes/post-feature-card.html +24 -0
  32. data/_includes/post-gallery.html +52 -0
  33. data/_includes/post-index.html +35 -0
  34. data/_includes/post-tease-image-card.html +22 -0
  35. data/_includes/post-tease-text-card.html +12 -0
  36. data/_includes/post-timeline-card.html +84 -0
  37. data/_includes/post-timeline.html +31 -0
  38. data/_includes/posts.html +12 -0
  39. data/_includes/related.html +116 -0
  40. data/_includes/repo-card.html +43 -0
  41. data/_includes/repositories.html +27 -0
  42. data/_includes/resolve-versioning.html +16 -0
  43. data/_includes/social.html +390 -0
  44. data/_includes/toggle.html +4 -0
  45. data/_includes/user-metadata.html +36 -0
  46. data/_includes/version-selector.html +22 -0
  47. data/_includes/version-warning.html +15 -0
  48. data/_layouts/category_index.html +16 -0
  49. data/_layouts/category_layout.html +33 -0
  50. data/_layouts/default.html +33 -0
  51. data/_layouts/docs.html +189 -0
  52. data/_layouts/docs_index.html +32 -0
  53. data/_layouts/home.html +3 -0
  54. data/_layouts/landing.html +38 -0
  55. data/_layouts/linktree.html +36 -0
  56. data/_layouts/page.html +22 -0
  57. data/_layouts/paginate.html +16 -0
  58. data/_layouts/paginate_timeline.html +17 -0
  59. data/_layouts/post.html +136 -0
  60. data/_layouts/profile.html +48 -0
  61. data/_layouts/repositories.html +11 -0
  62. data/_layouts/tag_index.html +16 -0
  63. data/_layouts/tags.html +12 -0
  64. data/_sass/_admonitions.scss +69 -0
  65. data/_sass/_highlight-syntax.scss +96 -0
  66. data/_sass/_language-colors.scss +1443 -0
  67. data/_sass/_main.scss +274 -0
  68. data/_sass/jekyll-theme-primerpages-compat.scss +5 -0
  69. data/_sass/jekyll-theme-primerpages.scss +7 -0
  70. data/assets/css/style.scss +2 -0
  71. data/assets/css/theme.scss +16 -0
  72. data/assets/img/default.png +0 -0
  73. data/assets/img/favicon.ico +0 -0
  74. data/assets/img/social-preview.png +0 -0
  75. data/assets/img/user-image.jpg +0 -0
  76. data/assets/js/anchor-links.js +47 -0
  77. data/assets/js/mermaid.js +61 -0
  78. data/assets/js/theme-toggle.js +84 -0
  79. data/assets/js/topbar.js +19 -0
  80. data/assets/js/versioning.js +300 -0
  81. metadata +184 -0
@@ -0,0 +1,99 @@
1
+ {%- assign bg_image = page.background.image | default: site.background.image %}
2
+ {%- assign dark_overlay = page.background.dark.overlay | default: page.background.overlay | default: site.background.dark.overlay | default: site.background.overlay %}
3
+ {%- assign light_overlay = page.background.light.overlay | default: page.background.overlay | default: site.background.light.overlay | default: site.background.overlay %}
4
+ {%- assign header_color = page.header.color | default: site.header.color %}
5
+ {%- assign header_text = page.header.text | default: site.header.text %}
6
+ {%- assign header_accent = page.header.accent | default: site.header.accent %}
7
+ {%- assign header_image = page.header.image | default: site.header.image %}
8
+ {%- assign header_overlay = page.header.overlay | default: site.header.overlay %}
9
+ <style>
10
+ {%- if bg_image %}
11
+ body {
12
+ position: relative;
13
+ background-image: url('{{ bg_image | relative_url }}');
14
+ background-size: cover;
15
+ background-repeat: no-repeat;
16
+ background-attachment: fixed;
17
+ z-index: -10;
18
+ }
19
+ {%- endif %}
20
+ {%- if dark_overlay %}
21
+ /* Dark mode styles */
22
+ [data-color-mode='dark'] {
23
+ --overlay-color: {{ dark_overlay }};
24
+ }
25
+ @media(prefers-color-scheme: dark) {
26
+ [data-color-mode='auto'] {
27
+ --overlay-color: {{ dark_overlay }};
28
+ }
29
+ }
30
+ {%- endif %}
31
+ {%- if light_overlay %}
32
+ /* Light mode styles */
33
+ [data-color-mode='light'] {
34
+ --overlay-color: {{ light_overlay }};
35
+ }
36
+
37
+ @media(prefers-color-scheme: light) {
38
+ [data-color-mode='auto'] {
39
+ --overlay-color: {{ light_overlay }};
40
+ }
41
+ }
42
+ {%- endif %}
43
+ {%- if header_color %}
44
+ .Header {
45
+ --header-bgColor: {{ header_color }};
46
+ }
47
+ /* Light mode styles */
48
+ [data-color-mode='light'] {
49
+ --header-bgColor: {{ header_color }};
50
+ }
51
+
52
+ @media(prefers-color-scheme: light) {
53
+ [data-color-mode='auto'][data-light-theme='light'] {
54
+ --header-bgColor: {{ header_color }};
55
+ }
56
+ }
57
+ /* Dark mode styles */
58
+ [data-color-mode='dark'] {
59
+ --header-bgColor: {{ header_color }};
60
+ }
61
+ @media(prefers-color-scheme: dark) {
62
+ [data-color-mode='auto'][data-dark-theme='dark_dimmed'] {
63
+ --header-bgColor: {{ header_color }};
64
+ }
65
+ }
66
+ {%- endif %}
67
+ {%- if header_text %}
68
+ .Header {
69
+ --color-header-logo: {{ header_text }};
70
+ --color-fg-muted: {{ header_text }};
71
+ }
72
+ {%- endif %}
73
+ {%- if header_accent %}
74
+ .Header {
75
+ --color-header-text: {{ header_accent }};
76
+ --color-accent-fg: {{ header_accent }};
77
+ }
78
+ {%- endif %}
79
+ {%- if header_image %}
80
+ .Header {
81
+ position: relative;
82
+ background-image: url('{{ header_image | relative_url }}');
83
+ background-size: cover;
84
+ background-repeat: no-repeat;
85
+ }
86
+ {%- endif %}
87
+ {%- if header_overlay %}
88
+ .Header::before {
89
+ content: "";
90
+ position: absolute;
91
+ top: 0;
92
+ right: 0;
93
+ bottom: 0;
94
+ left: 0;
95
+ z-index: -1;
96
+ background-color: {{ header_overlay }};
97
+ }
98
+ {%- endif %}
99
+ </style>
@@ -0,0 +1,13 @@
1
+ <footer>
2
+ <div class="footer py-3 color-bg-subtle border-top">
3
+ <div class="container-xl p-responsive-blog f6 py-4 d-sm-flex flex-justify-between flex-row-reverse flex-items-center">
4
+ {%- if site.social_media %}
5
+ {%- include social.html tooltip-dir="nw" %}
6
+ {%- endif %}
7
+ <div class="flex-1"></div>
8
+ <div class="flex-0 mx-auto px-4">
9
+ <div>Made with <a href="https://www.primerpages.com">PrimerPages</a></div>
10
+ </div>
11
+ </div>
12
+ </div>
13
+ </footer>
@@ -0,0 +1,43 @@
1
+ {% assign favicon=site.favicon | default: site.logo | default: '/assets/img/favicon.ico' %}
2
+ <head>
3
+ <meta charset="utf-8">
4
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <!-- HTML Meta Tags -->
7
+ {% seo %}
8
+
9
+ <link href="{{ '/assets/css/theme.css' | relative_url }}" rel="stylesheet" type="text/css">
10
+ {% if site.css %}<link href="{{ site.css }}" rel="stylesheet" type="text/css">
11
+ {% else %}<link href="{{ '/assets/css/style.css' | relative_url }}" rel="stylesheet" type="text/css">
12
+ {% endif %}
13
+ <link rel="icon" type="image/x-icon" href="{{ favicon | relative_url}}">
14
+
15
+
16
+ {%- if site.analytics.provider == 'google' %}
17
+ <!-- Google tag (gtag.js) -->
18
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{ site.analytics.property }}"></script>
19
+ <script>
20
+ window.dataLayer = window.dataLayer || [];
21
+ function gtag() { dataLayer.push(arguments); }
22
+ gtag('js', new Date());
23
+
24
+ gtag('config', '{{ site.analytics.property }}');
25
+ </script>
26
+ {%- endif %}
27
+
28
+ <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
29
+ <script src="{{ '/assets/js/theme-toggle.js' | relative_url }}"></script>
30
+ <script src="{{ '/assets/js/anchor-links.js' | relative_url }}"></script>
31
+ <script src="{{ '/assets/js/topbar.js' | relative_url }}"></script>
32
+ <script src="{{ '/assets/js/versioning.js' | relative_url }}"></script>
33
+ <script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
34
+ <script src="{{ '/assets/js/mermaid.js' | relative_url }}"></script>
35
+
36
+ {%- include custom-colors.html %}
37
+
38
+ {%- if page.css_style %}
39
+ <style>
40
+ {{ page.css_style }}
41
+ </style>
42
+ {%- endif %}
43
+ </head>
@@ -0,0 +1,53 @@
1
+ {%- assign user = site.github.owner %}
2
+ {%- assign name = site.title | default: user.name | default: user.login %}
3
+ {%- assign user_img = site.user_image | default: user.avatar_url | default: "/assets/img/user-image.jpg" %}
4
+ {%- assign favicon = site.favicon | default: site.logo | default: "/assets/img/favicon.ico" %}
5
+ {%- assign header_icon = site.header_icon | default: "mark-github" %}
6
+
7
+ <header class="AppHeader position-sticky top-0 z-2 border-bottom topbar">
8
+ <div class="AppHeader-item d-flex flex-justify-between p-2 flex-items-center mb-2">
9
+ {%- if site.nav %}
10
+ <div class="d-flex d-sm-none">
11
+ {% include nav-overlay.html %}
12
+ </div>
13
+ {%- endif %}
14
+ <div tabindex="-1" class="d-flex flex-1 ml-3" id="github-logo">
15
+ <a href="{{ site.baseurl }}/" class="AppHeader-link d-flex flex-items-center no-underline mr-3 h1">
16
+ {%- unless header_icon == "none" %}
17
+ {%- if header_icon == "favicon" %}
18
+ <img src="{{ favicon | relative_url }}" alt="" width="24" height="24" class="mr-2" />
19
+ {%- else %}
20
+ <span class="octicon octicon-{{ header_icon }}-24"></span>
21
+ {%- endif %}
22
+ {%- endunless %}
23
+ <span class="h3 text-semibold{% unless header_icon == "none" %} mx-3{% endunless %}">{{ name }}</span>
24
+ </a>
25
+ <span class="d-none d-sm-block flex-content-center ml-2">
26
+ {% include version-selector.html %}
27
+ </span>
28
+ </div>
29
+ <div class="AppHeader-item d-flex flex-items-center">
30
+ {% include toggle.html %}
31
+ {%- if site.repo_info and site.repository %}
32
+ <div class="AppHeader-item hide-sm">
33
+ {% include mini-repo-info-card.html class="AppHeader-link no-underline" %}
34
+ </div>
35
+ {% endif %}
36
+ {%- if site.profile_link %}
37
+ <div class="AppHeader-item mr-0">
38
+ <a href="https://github.com/{{ user.login }}" class="AppHeader-link d-flex flex-items-center">
39
+ <img class="avatar img-cover circle" height="32" width="32" alt="{{ name }}"
40
+ src="{{ user_img | relative_url }}">
41
+ </a>
42
+ </div>
43
+ {%- endif %}
44
+ </div>
45
+ </div>
46
+ <div class="d-flex flex-items-center">
47
+ {%- if site.nav %}
48
+ <div class="AppHeader-item width-full hide-sm">
49
+ {%- include navbar-underline.html %}
50
+ </div>
51
+ {%- endif %}
52
+ </div>
53
+ </header>
@@ -0,0 +1,60 @@
1
+ <script>
2
+ $(document).ready(function () {
3
+ $('#toolbar-btn').click(function () {
4
+ $('.Sidebar').toggleClass('d-lg-block');
5
+ $('.Toolbar-expand').toggleClass('d-lg-block');
6
+ $('.Toolbar-collapse').toggleClass('d-lg-block');
7
+ $('.Toolbar').toggleClass('flex-lg-column');
8
+ })
9
+ $('#sidebar-btn').click(function () {
10
+ $('.Sidebar').toggleClass('d-lg-block');
11
+ $('.Toolbar-expand').toggleClass('d-lg-block');
12
+ $('.Toolbar-collapse').toggleClass('d-lg-block');
13
+ $('.Toolbar').toggleClass('flex-lg-column');
14
+
15
+ })
16
+ });
17
+ </script>
18
+ <div class="Header d-flex border-right flex-items-start p-0 flex-justify-end position-sticky background-fixed top-0">
19
+ <div class="flex-column flex-1 position-sticky top-0">
20
+ <div class="Toolbar topbar d-flex flex-row p-3 flex-lg-justify-end flex-justify-start">
21
+ <div class="Toolbar-expand d-flex flex-justify-center d-none">
22
+ <button id="sidebar-btn" class="btn-octicon mr-2"><span class="octicon octicon-chevron-right-16"></span></button>
23
+ </div>
24
+ <div class="d-flex flex-justify-center d-lg-none">
25
+ {%- include nav-overlay.html %}
26
+ </div>
27
+ <div class="d-flex flex-justify-center">
28
+ {% include toggle.html %}
29
+ </div>
30
+ <div class="Toolbar-collapse d-flex flex-justify-center d-none d-lg-block">
31
+ <button id="toolbar-btn" class="btn-octicon mr-2"><span class="octicon octicon-chevron-left-16"></span></button>
32
+ </div>
33
+ </div>
34
+ <div class="Sidebar d-none d-lg-block Layout Layout-sidebar Layout--sidebar-wide">
35
+ <div class="text-center">
36
+ <div class="px-5 py-2">
37
+ {%- include masthead.html size="128px" %}
38
+ </div>
39
+ <div class="d-flex flex-justify-center ml-2">
40
+ {% include version-selector.html %}
41
+ </div>
42
+ {%- if site.repo_info and site.repository %}
43
+ <div class="py-2">
44
+ {% include mini-repo-info-card.html class="Header-link no-underline" %}
45
+ </div>
46
+ {%- endif %}
47
+ {%- if site.nav %}
48
+ <div class="d-flex flex-column">
49
+ {%- include nav.html %}
50
+ </div>
51
+ {%- endif %}
52
+ {%- if site.social_media %}
53
+ <div class="py-2 px-2">
54
+ {%- include social.html %}
55
+ </div>
56
+ {%- endif %}
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </div>
@@ -0,0 +1,33 @@
1
+ <div class="Profile text-center mt-3">
2
+ {%- include masthead.html %}
3
+ {%- if site.repo_info and site.repository %}
4
+ <div class="py-2">
5
+ {% include mini-repo-info-card.html class="AppHeader-link no-underline" %}
6
+ </div>
7
+ {%- endif %}
8
+ {%- if site.social_media %}
9
+ <div class="py-2 px-2">
10
+ {%- include social.html %}
11
+ </div>
12
+ {%- endif %}
13
+ </div>
14
+ {%- if site.nav %}
15
+ <div class="Header z-2 position-sticky top-0 topbar">
16
+ <div class="container-xl d-flex flex-row flex-1">
17
+ <div class="d-flex flex-1 hide-sm">
18
+ {% include nav.html %}
19
+ </div>
20
+ <div class="d-flex flex-sm-grow-0 flex-justify-start">
21
+ <div class="d-flex d-sm-none">
22
+ {% include nav-overlay.html%}
23
+ </div>
24
+ <div class="d-flex">
25
+ <div class="m-2">
26
+ {% include version-selector.html %}
27
+ </div>
28
+ {% include toggle.html %}
29
+ </div>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ {%- endif %}
@@ -0,0 +1,59 @@
1
+ {%- assign user = site.github.owner %}
2
+ {%- assign name = site.title | default: user.name | default: user.login %}
3
+ {%- assign user_img = site.user_image | default: user.avatar_url | default: "/assets/img/user-image.jpg" %}
4
+ {%- assign favicon = site.favicon | default: site.logo | default: "/assets/img/favicon.ico" %}
5
+ {%- assign header_icon = site.header_icon | default: "mark-github" %}
6
+ <script>
7
+ $(document).ready(function () {
8
+ $('#expansion-btn').click(function () {
9
+ $('.Extend').toggleClass('hide-sm');
10
+ });
11
+ });
12
+ </script>
13
+ <div class="Header position-sticky top-0 topbar">
14
+ <div class="flex-1">
15
+ <div class="d-flex">
16
+ <div class="Header-item">
17
+ <button id="expansion-btn" class="btn-octicon mr-2 d-sm-none"><span class="octicon octicon-three-bars-16"></span></button>
18
+ <a href="{{ site.baseurl }}/" class="Header-link h1 f4 d-flex flex-items-center">
19
+ {%- unless header_icon == "none" %}
20
+ {%- if header_icon == "favicon" %}
21
+ <img src="{{ favicon | relative_url }}" alt="" width="24" height="24" class="mr-2" />
22
+ {%- else %}
23
+ <span class="octicon octicon-{{ header_icon }}-24"></span>
24
+ {%- endif %}
25
+ {%- endunless %}
26
+ </a>
27
+ </div>
28
+ <div class="Header-item Header-link Header-item--full">
29
+ <a class="Header-link h3" href="{{ site.baseurl }}/">{{ name }}</a>
30
+ <div class="d-inline-block ml-4">
31
+ {% include version-selector.html %}
32
+ </div>
33
+ </div>
34
+ <div class="Header-item">
35
+ {% include toggle.html %}
36
+ </div>
37
+ {%- if site.repo_info and site.repository %}
38
+ <div class="Header-item hide-sm">
39
+ {% include mini-repo-info-card.html class="Header-link" %}
40
+ </div>
41
+ {%- endif %}
42
+ {%- if site.profile_link %}
43
+ <div class="Header-item mr-0">
44
+ <a href="https://github.com/{{ user.login }}" class="Header-link d-flex flex-items-center">
45
+ <img class="avatar img-cover circle" height="32" width="32" alt="{{ name }}"
46
+ src="{{ user_img | relative_url }}">
47
+ </a>
48
+ </div>
49
+ {%- endif %}
50
+ </div>
51
+ {%- if site.nav %}
52
+ <div class="d-flex">
53
+ <div class="Extend Header-item flex-column flex-sm-row flex-items-center width-full hide-sm">
54
+ {%- include nav.html %}
55
+ </div>
56
+ </div>
57
+ {%- endif %}
58
+ </div>
59
+ </div>
@@ -0,0 +1,52 @@
1
+ {%- comment %}
2
+ This builds a link card
3
+
4
+ ## Inputs
5
+
6
+ - link
7
+ - name
8
+ - url (optional)
9
+ - thumbnail (optional)
10
+ - octicon (optional) The name of the octicon icon to use for image
11
+
12
+ {%- endcomment %}
13
+
14
+ {%- assign link = include.link %}
15
+ {%- assign thumbnail = nil %}
16
+
17
+ {%- if link.thumbnail %}
18
+ {%- capture thumbnail %}
19
+ <img src="{{ link.thumbnail | relative_url }}" width="48" height="48"
20
+ class="rounded-2 box-shadow-none img-cover float-left" alt="{{ name }}">
21
+ {%- endcapture %}
22
+ {%- elsif link.octicon %}
23
+ {%- capture thumbnail %}
24
+ <div class="ml-2 h1">
25
+ <span class="octicon octicon-{{link.octicon}}-16"></span>
26
+ </div>
27
+ {%- endcapture %}
28
+ {%- endif %}
29
+
30
+ {%- if link.url %}
31
+ <a href="{{ link.url | relative_url }}"
32
+ class="Link Link-btn d-flex flex-justify-between flex-items-center hover-grow no-underline border rounded-3 p-2"
33
+ {% if link.url contains "http" %}target="_blank" rel="noopener noreferrer"{% endif %}>
34
+ <div class="avatar-7">
35
+ {{ thumbnail }}
36
+ </div>
37
+ <div class="p-2 flex-1">
38
+ <p class="f3 text-center mb-0">{{ link.name }}</p>
39
+ </div>
40
+ </a>
41
+ {%- else %}
42
+ <div class="Link-text github-component position-relative height-full d-flex flex-column text-center p-1">
43
+ <div class="d-inline-flex flex-items-center">
44
+ <div class="avatar-7">
45
+ {{ thumbnail }}
46
+ </div>
47
+ <div class="p-2 flex-1">
48
+ <p class="f3 lh-condensed text-center mt-1">{{ link.name }}</p>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ {%- endif %}
@@ -0,0 +1,12 @@
1
+ {% assign links = include.links | default: nil %}
2
+ {%- if links %}
3
+ <div class="width-full mb-8">
4
+ <div class="d-flex flex-column">
5
+ {%- for link in links %}
6
+ <div class="mb-2">
7
+ {%- include link-card.html link=link %}
8
+ </div>
9
+ {%- endfor %}
10
+ </div>
11
+ </div>
12
+ {%- endif %}
@@ -0,0 +1,18 @@
1
+ {%- assign user = site.github.owner %}
2
+ {%- assign name = include.title | default: site.title | default: user.name | default: user.login %}
3
+ {%- assign user_img = site.user_image | default: user.avatar_url | default: "/assets/img/user-image.jpg" %}
4
+ {%- assign user_metadata = site.user_metadata -%}
5
+ {%- assign size = include.size | default: "256px" %}
6
+
7
+ <div class="Masthead">
8
+ <div class="CircleBadge" style="width: {{ size }};" >
9
+ <a href="{{ site.baseurl }}/">
10
+ <img src="{{ user_img | relative_url }}" alt="{{ name }}" >
11
+ </a>
12
+ </div>
13
+
14
+ <h1 class="text-center my-3 lh-condensed overflow-wrap-word">{{ name }}</h1>
15
+ {%- if user_metadata %}
16
+ {% include user-metadata.html %}
17
+ {%- endif %}
18
+ </div>
@@ -0,0 +1,30 @@
1
+ {% assign repo = site.github.public_repositories | where: "full_name", site.repository | first %}
2
+ {% assign default_repository_url = "https://www.github.com/" | append: site.repository %}
3
+ {% assign repository_url = site.github.repository_url | default: default_repository_url | default: "" %}
4
+ <div class="Repo-info">
5
+ <a href="{{ repository_url }}" class="{{ include.class }} tooltipped tooltipped-s" aria-label="Go to repository">
6
+ <div class="d-flex flex-row flex-justify-center Header-item">
7
+
8
+ <div class="mr-2 h2"><span class="octicon octicon-git-branch-24"></span></div>
9
+ <div>
10
+ <div>
11
+ {{ site.repository }}
12
+ </div>
13
+ {% if site.github %}
14
+ <div class="d-flex flex-row">
15
+ {%- if site.github.latest_release %}
16
+ <div class="mr-3">
17
+ <span><span class="octicon octicon-tag-16"></span> {{ site.github.latest_release.tag_name}}</span>
18
+ </div>
19
+ {%- endif %}
20
+ {% if repo %}
21
+ <div class="mr-3"><span><span class="octicon octicon-star-16"></span> {{ repo.stargazers_count }}</div>
22
+ <div class="mr-0"><span><span class="octicon octicon-repo-forked-16"></span> {{ repo.forks_count }}</span></div>
23
+ {% endif %}
24
+ </div>
25
+ {% endif %}
26
+ </div>
27
+
28
+ </div>
29
+ </a>
30
+ </div>
@@ -0,0 +1,53 @@
1
+ {%- assign user = site.github.owner %}
2
+ {%- assign name = site.title | default: user.name | default: user.login %}
3
+ {%- assign user_img = site.user_image | default: user.avatar_url | default: "/assets/img/user-image.jpg" %}
4
+ {%- assign nav_id = include.id | default: "nav-menu" %}
5
+ <script>
6
+ $(document).ready(function () {
7
+ const $menu = $("#{{ nav_id }}");
8
+ const $closeButton = $(".close-menu");
9
+
10
+ if ($menu.length && $closeButton.length) {
11
+ $closeButton.click(() => $menu.removeAttr("open")); // Properly closes the dropdown
12
+ }
13
+ });
14
+ </script>
15
+ <details class="details-reset details-overlay" id="{{ nav_id }}">
16
+ <summary class="AppHeader-button btn btn-invisible" aria-haspopup="true">
17
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
18
+ <path d="M4 6H20M4 12H20M4 18H20" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
19
+ </svg>
20
+ </summary>
21
+ <details-menu class="SelectMenu" role="menu">
22
+ <div class="SelectMenu-modal">
23
+ <div class="SelectMenu-header">
24
+ <div tabindex="-1" class="SelectMenu-title" id="github-logo">
25
+ <a href="{{ site.baseurl }}/" class="AppHeader-link d-flex flex-items-center no-underline mr-3">
26
+ <img class="avatar img-cover circle" height="32" width="32" alt="{{ name }}"
27
+ src="{{ user_img | relative_url }}">
28
+ <span class="h4 text-semibold mx-3">{{ name }}</span>
29
+ </a>
30
+ </div>
31
+ <div class="d-flex flex-justify-end">
32
+ <button class="SelectMenu-closeButton close-menu" type="button">
33
+ <span class="octicon octicon-x-16"></span>
34
+ </button>
35
+ </div>
36
+ </div>
37
+
38
+ <div class="SelectMenu-list">
39
+ {%- for nav_item in site.nav %}
40
+ <a href="{{ site.baseurl }}{{ nav_item.url }}" class="SelectMenu-item" role="menuitem"{% if page.url contains nav_item.url %} aria-current="page"{% endif %}>{{ nav_item.name }}</a>
41
+ {%- endfor %}
42
+ </div>
43
+ <div class="SelectMenu-footer">
44
+ <div class="ActionList-sectionDivider mt-0 mb-1"></div>
45
+ {%- if site.social_media %}
46
+ <div class="ActionList px-0 flex-1 pb-">
47
+ {%- include social.html %}
48
+ </div>
49
+ {%- endif %}
50
+ </div>
51
+ </div>
52
+ </details-menu>
53
+ </details>
@@ -0,0 +1,51 @@
1
+ {%- assign current_url = page.url | default: '/' %}
2
+ {%- assign best_match_url = '' %}
3
+ {%- assign best_match_len = 0 %}
4
+ {%- assign nav = include.nav | default: site.nav | default: nil %}
5
+ {%- if nav == nil %}
6
+ {%- assign nav = "" | split: " " %}
7
+ {%- endif %}
8
+
9
+ {%- for nav_item in nav %}
10
+ {%- assign nav_url = nav_item.url | default: '/' %}
11
+ {%- assign is_match = false %}
12
+
13
+ {%- if nav_url == '/' %}
14
+ {%- if current_url == '/' %}
15
+ {%- assign is_match = true %}
16
+ {%- endif %}
17
+ {%- else %}
18
+ {%- assign nav_last_char = nav_url | slice: -1, 1 %}
19
+ {%- if nav_last_char == '/' %}
20
+ {%- assign nav_prefix = nav_url %}
21
+ {%- else %}
22
+ {%- assign nav_prefix = nav_url | append: '/' %}
23
+ {%- endif %}
24
+
25
+ {%- assign nav_prefix_len = nav_prefix | size %}
26
+ {%- assign current_prefix = current_url | slice: 0, nav_prefix_len %}
27
+
28
+ {%- if current_url == nav_url or current_prefix == nav_prefix %}
29
+ {%- assign is_match = true %}
30
+ {%- endif %}
31
+ {%- endif %}
32
+
33
+ {%- if is_match %}
34
+ {%- assign nav_len = nav_url | size %}
35
+ {%- if nav_len > best_match_len %}
36
+ {%- assign best_match_url = nav_url %}
37
+ {%- assign best_match_len = nav_len %}
38
+ {%- endif %}
39
+ {%- endif %}
40
+ {%- endfor %}
41
+
42
+ {%- for nav_item in nav %}
43
+ <div class="Header-item flex-justify-center f4 p-2">
44
+ <a href="{{ nav_item.url | relative_url }}" class="Header-link"
45
+ {% if nav_item.url == best_match_url %}
46
+ aria-current="page"
47
+ {% endif %}>
48
+ {{ nav_item.name }}
49
+ </a>
50
+ </div>
51
+ {%- endfor %}
@@ -0,0 +1,51 @@
1
+ {%- assign current_url = page.url | default: '/' %}
2
+ {%- assign best_match_url = '' %}
3
+ {%- assign best_match_len = 0 %}
4
+
5
+ {%- for nav_item in site.nav %}
6
+ {%- assign nav_url = nav_item.url | default: '/' %}
7
+ {%- assign is_match = false %}
8
+
9
+ {%- if nav_url == '/' %}
10
+ {%- if current_url == '/' %}
11
+ {%- assign is_match = true %}
12
+ {%- endif %}
13
+ {%- else %}
14
+ {%- assign nav_last_char = nav_url | slice: -1, 1 %}
15
+ {%- if nav_last_char == '/' %}
16
+ {%- assign nav_prefix = nav_url %}
17
+ {%- else %}
18
+ {%- assign nav_prefix = nav_url | append: '/' %}
19
+ {%- endif %}
20
+
21
+ {%- assign nav_prefix_len = nav_prefix | size %}
22
+ {%- assign current_prefix = current_url | slice: 0, nav_prefix_len %}
23
+
24
+ {%- if current_url == nav_url or current_prefix == nav_prefix %}
25
+ {%- assign is_match = true %}
26
+ {%- endif %}
27
+ {%- endif %}
28
+
29
+ {%- if is_match %}
30
+ {%- assign nav_len = nav_url | size %}
31
+ {%- if nav_len > best_match_len %}
32
+ {%- assign best_match_url = nav_url %}
33
+ {%- assign best_match_len = nav_len %}
34
+ {%- endif %}
35
+ {%- endif %}
36
+ {%- endfor %}
37
+
38
+ <nav class="UnderlineNav">
39
+ <ul class="UnderlineNav-body flex-row list-style-none">
40
+ {%- for nav_item in site.nav %}
41
+ <li class="d-inline-flex">
42
+ <a href="{{ nav_item.url | relative_url }}" class="UnderlineNav-item m-2"
43
+ {% if nav_item.url == best_match_url %}
44
+ aria-current="page"
45
+ {% endif %}>
46
+ {{ nav_item.name }}
47
+ </a>
48
+ </li>
49
+ {%- endfor %}
50
+ </ul>
51
+ </nav>