docula 0.3.6 → 0.3.7

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 (47) hide show
  1. package/dist/config.js.map +1 -1
  2. package/dist/docula.d.ts +1 -0
  3. package/dist/docula.d.ts.map +1 -1
  4. package/dist/docula.js +10 -0
  5. package/dist/docula.js.map +1 -1
  6. package/dist/eleventy/shortcodes.js.map +1 -1
  7. package/dist/eleventy.js.map +1 -1
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +14 -0
  10. package/dist/index.js.map +1 -1
  11. package/dist/logger.js.map +1 -1
  12. package/dist/plugins/algolia.js.map +1 -1
  13. package/dist/plugins/github.js.map +1 -1
  14. package/dist/plugins/pagefind.js.map +1 -1
  15. package/dist/plugins/robots.js.map +1 -1
  16. package/dist/tools/inquirer-prompt.js.map +1 -1
  17. package/dist/tools/tools.js.map +1 -1
  18. package/package.json +22 -21
  19. package/templates/default/assets/css/highlight/highlight.min.js +1433 -0
  20. package/templates/default/assets/css/highlight/styles/base16/dracula.min.css +7 -0
  21. package/templates/default/assets/css/styles/home.css +305 -0
  22. package/templates/default/assets/css/styles/index.css +912 -0
  23. package/templates/default/assets/css/styles/search/algolia.css +125 -0
  24. package/templates/default/assets/css/styles/search/pagefind.css +60 -0
  25. package/templates/default/assets/css/styles/variables.css +30 -0
  26. package/templates/default/assets/images/docula-logo-horizontal.webp +0 -0
  27. package/templates/default/assets/images/logo.svg +10 -0
  28. package/templates/default/doc.njk +22 -0
  29. package/templates/default/index.njk +28 -0
  30. package/templates/default/landing/landingHero.njk +8 -0
  31. package/templates/default/landing/singlePage.njk +24 -0
  32. package/templates/default/multipage/header.njk +23 -0
  33. package/templates/default/multipage/homeHeader.njk +20 -0
  34. package/templates/default/multipage/main.njk +47 -0
  35. package/templates/default/multipage/scripts.njk +47 -0
  36. package/templates/default/multipage/searchEngine.njk +5 -0
  37. package/templates/default/multipage/searchModal.njk +19 -0
  38. package/templates/default/multipage/sidebar.njk +50 -0
  39. package/templates/default/releases.njk +38 -0
  40. package/templates/default/search/algolia.njk +98 -0
  41. package/templates/default/search/pagefind.njk +66 -0
  42. package/templates/default/search-index.md +14 -0
  43. package/templates/default/shared/footer.njk +4 -0
  44. package/templates/default/shared/head.njk +15 -0
  45. package/templates/default/shared/highlightScript.njk +6 -0
  46. package/templates/default/shared/homeData.njk +49 -0
  47. package/templates/default/versions.njk +40 -0
@@ -0,0 +1,125 @@
1
+ #hits {
2
+ height: calc(100vh - 72px);
3
+ position: fixed;
4
+ top: 72px;
5
+ overflow-y: auto;
6
+ background-color: var(--search-input-background);
7
+ width: 100%;
8
+ }
9
+
10
+ #hits > div {
11
+ padding: 0 24px;
12
+ }
13
+
14
+ .search-box {
15
+ display: flex;
16
+ width: 100%;
17
+ border-color: var(--search-input-background);
18
+ background-color: var(--search-input-background);
19
+ border: none;
20
+ border-bottom: 1px solid var(--border);
21
+ height: 72px;
22
+ }
23
+
24
+ .search-box input {
25
+ border-color: var(--search-input-background);
26
+ border: none !important;
27
+ border-bottom: 1px solid var(--border);
28
+ font-size: 18px;
29
+ height: 71px !important;
30
+ }
31
+
32
+ .ais-SearchBox {
33
+ position: relative;
34
+ flex: 0.8;
35
+ }
36
+
37
+ .close-modal--btn {
38
+ flex: 0.2;
39
+ display: flex;
40
+ justify-content: center;
41
+ align-items: center;
42
+ font-size: 13px;
43
+ border-left: 1px solid var(--border);
44
+ margin: 10px 0;
45
+ cursor: pointer;
46
+ opacity: 0.6;
47
+ }
48
+
49
+ .ais-SearchBox-submit, .ais-SearchBox-reset {
50
+ position: absolute;
51
+ top: 24px;
52
+ cursor: pointer;
53
+ opacity: 0.6;
54
+ }
55
+
56
+ .ais-SearchBox-submit svg {
57
+ fill: currentColor;
58
+ width: 16px;
59
+ height: 16px;
60
+ }
61
+
62
+ .ais-SearchBox-reset svg {
63
+ fill: currentColor;
64
+ width: 10px;
65
+ height: 10px;
66
+ }
67
+
68
+ .ais-SearchBox-submit {
69
+ left: 16px
70
+ }
71
+
72
+ .ais-SearchBox-reset {
73
+ right: 16px;
74
+ }
75
+
76
+ .search-result {
77
+ padding: 0;
78
+ margin-top: 24px;
79
+ }
80
+
81
+ .search-result hr {
82
+ margin: 46px 0;
83
+ opacity: 0.3
84
+ }
85
+
86
+ @media screen and (min-width: 640px) {
87
+ .ais-SearchBox {
88
+ flex: 0.9;
89
+ }
90
+
91
+ .close-modal--btn {
92
+ flex: 0.1;
93
+ }
94
+ }
95
+
96
+ @media screen and (min-width: 992px) {
97
+ #hits {
98
+ height: calc(780px - 72px);
99
+ position: fixed;
100
+ }
101
+
102
+ #hits > div {
103
+ padding: 0 48px;
104
+ }
105
+
106
+ .search-container {
107
+ height: 780px;
108
+ }
109
+
110
+ .search-box {
111
+ justify-content: center;
112
+ }
113
+
114
+ .ais-SearchBox-submit, .ais-SearchBox-reset {
115
+ top: 16px;
116
+ }
117
+
118
+ .ais-SearchBox {
119
+ flex: 0.8;
120
+ }
121
+
122
+ .close-modal--btn {
123
+ justify-content: flex-end;
124
+ }
125
+ }
@@ -0,0 +1,60 @@
1
+ .pagefind-ui__search-input {
2
+ border-radius: 0 !important;
3
+ border-bottom: 1px solid var(--border);
4
+ }
5
+
6
+ .pagefind-ui__result, .pagefind-ui__message {
7
+ padding-left: 16px !important;
8
+ padding-right: 16px !important;
9
+ }
10
+
11
+ .pagefind-ui__results-area {
12
+ overflow-y: auto !important;
13
+ margin-top: 0 !important;
14
+ height: calc(100vh - 72px) !important;
15
+ }
16
+
17
+ .pagefind-ui__result-link {
18
+ color: var(--color-primary) !important;
19
+ }
20
+
21
+ .pagefind-ui__result-link:hover {
22
+ color: var(--color-secondary) !important;
23
+ }
24
+
25
+ .pagefind-ui__button {
26
+ margin-top: 0 !important;
27
+ border-top: none !important;
28
+ border-top-right-radius: 0 !important;
29
+ border-top-left-radius: 0 !important;
30
+ border: 1px solid var(--border) !important;
31
+ }
32
+
33
+ .pagefind-ui__button {
34
+ background-color: var(--search-input-background) !important;
35
+ }
36
+
37
+ .pagefind-ui__result-excerpt {
38
+ line-height: 1.5 !important;
39
+ }
40
+
41
+ .pagefind-ui__result-excerpt > mark {
42
+ background-color: var(--background-search-highlight) !important;
43
+ color: var(--color-search-highlight) !important;
44
+ }
45
+
46
+ .pagefind-ui__form::before {
47
+ top: 28px !important;
48
+ }
49
+
50
+ .pagefind-ui__drawer {
51
+ background-color: var(--search-input-background) !important;
52
+ border-bottom-left-radius: 8px !important;
53
+ border-bottom-right-radius: 8px !important;
54
+ }
55
+
56
+ @media screen and (min-width: 992px) {
57
+ .pagefind-ui__results-area {
58
+ max-height: 504px !important;
59
+ }
60
+ }
@@ -0,0 +1,30 @@
1
+ :root {
2
+ --font-family: 'Open Sans', sans-serif;
3
+
4
+ --color-primary: #08c2ff;
5
+ --color-secondary: #bd72d1;
6
+ --color-secondary-dark: #af34d0;
7
+ --color-text: #322d3c;
8
+
9
+ --background: #ffffff;
10
+ --home-background: #F0F2FA;
11
+ --header-background: #fbfbfb;
12
+
13
+ --sidebar-background: #ffffff;
14
+ --sidebar-text: #322d3c;
15
+ --sidebar-text-active: #08c2ff;
16
+
17
+ --border: rgba(238,238,245,1);
18
+
19
+ --background-search-highlight: var(--color-secondary-dark);
20
+ --color-search-highlight: #ffffff;
21
+ --search-input-background: var(--header-background);
22
+
23
+ --code: rgba(238,238,245,1);
24
+
25
+ --pagefind-ui-text: var(--color-text) !important;
26
+ --pagefind-ui-font: var(--font-family) !important;
27
+ --pagefind-ui-background: var(--background) !important;
28
+ --pagefind-ui-border: var(--border) !important;
29
+ --pagefind-ui-scale: .9 !important;
30
+ }
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg width="512" height="512" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <defs>
4
+ <linearGradient x1="30%" y1="20%" x2="65%" y2="50%" id="gradient">
5
+ <stop stop-color="#24C6DC" offset="0%"></stop>
6
+ <stop stop-color="#C86DD7" offset="100%"></stop>
7
+ </linearGradient>
8
+ </defs>
9
+ <path fill="url(#gradient)" fill-rule="nonzero" d="M189 196v-17.4c13.7 10.2 40.2 15 66.5 15 26.3 0 52.8-4.8 66.5-15V196c0 12-30 21.8-66.5 21.8-36.6 0-66.5-9.8-66.5-21.8zm133 16.6v19.8c-3.7 11-32.3 19.4-66.5 19.4s-62.8-8.5-66.5-19.4v-20c13.7 10.4 40.2 15 66.5 15 26.3 0 52.8-4.6 66.5-14.8zM189 162v-17.4c13.7 10.2 40.2 15 66.5 15 26.3 0 52.8-4.8 66.5-15V162c0 12-30 22-66.5 22-36.6 0-66.5-10-66.5-22zm66.5-12c-36.7 0-66.5-10-66.5-22s29.8-21.8 66.5-21.8S322 116 322 128s-29.8 22-66.5 22zm.5 362C114.6 512 0 397.4 0 256S114.6 0 256 0s256 114.6 256 256-114.6 256-256 256zm0-3c139.7 0 253-113.3 253-253S395.6 3 256 3 3 116.4 3 256s113.3 253 253 253zM122 351.2l56-51h5l-56.5 51 59.3 60h-5l-58.7-59.7v59.8h-3.5v-111h3.4v51zm77 23.3c0 4.4.7 8.7 2 13 1.3 4.3 3.3 8 6 11.5 2.6 3.5 6 6.3 10 8.4 4 2 9 3 14.5 3 5.7 0 10.7-1 15-3.3 4.5-2 8.3-5.4 11.5-9.7l2.5 2.2c-3.5 4.6-7.7 8-12.4 10.5-4.7 2.4-10.2 3.6-16.5 3.6-5.3 0-10.2-1-14.6-3-4.5-1.8-8.3-4.5-11.5-8-3.2-3.4-5.6-7.5-7.4-12.3-1.6-5-2.5-10-2.5-15.7 0-5.5 1-10.5 2.7-15 1.8-4.7 4.2-8.7 7.3-12 3-3.4 6.7-6 11-7.8 4-2 8.6-2.8 13.4-2.8 5.6 0 10.5 1 14.7 3 4.2 2 7.7 4.6 10.4 8 3 3 5 6.8 6.3 11 1.4 4 2 8.3 2 12.6v3H199zm61-3c0-4.7-.8-9-2.4-13-1.5-3.8-3.5-7-6.2-10-2.6-2.6-5.7-4.8-9.4-6.3-3.6-1.5-7.7-2.3-12.2-2.3-5.5 0-10 1-14 3.4-4 2.2-7 5-9.5 8.3-2.5 3.3-4.3 6.8-5.4 10.4-1.3 3.7-1.8 7-1.8 9.6h61zm40.7 63.7c-1.6 4.5-4 8-6.6 10.5-2.7 2.4-6.3 3.6-10.7 3.6-1 0-2 0-3.3-.3-1.2 0-2.3-.3-3-.7l.8-3c.6.3 1.5.5 2.6.7 1 .2 2.2.3 3.2.3 2.2 0 4-.4 5.8-1.3 1.6-.8 3-2 4-3.2 1.3-1.3 2.2-2.8 3-4.4.8-1.7 1.5-3.4 2-5l7-19-28.5-74.2h3.6l26.6 70.4 25.6-70.4h3.7l-35.8 96zm76.3-24h-4.5l-28.4-72h3.8l27 68.7h.2l26-68.8h3.7L377 411.4z"></path>
10
+ </svg>
@@ -0,0 +1,22 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ {% include "shared/head.njk" %}
5
+ <title>{{site.name}} - {{ title }}</title>
6
+ </head>
7
+
8
+ <body>
9
+ <div class="layout">
10
+ {% include "multipage/header.njk" %}
11
+ {% include "multipage/sidebar.njk" %}
12
+ {% include "multipage/main.njk" %}
13
+ {% include "multipage/searchModal.njk" %}
14
+ </div>
15
+
16
+ {% include "multipage/searchEngine.njk" %}
17
+ {% include "shared/highlightScript.njk" %}
18
+ {% include "multipage/scripts.njk" %}
19
+
20
+
21
+ </body>
22
+ </html>
@@ -0,0 +1,28 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ {% include "shared/head.njk" %}
4
+
5
+ <body>
6
+ {% include "multipage/homeHeader.njk" %}
7
+
8
+ <main class="home">
9
+ <div class="home-hero">
10
+ <img src="/../assets/images/logo.svg" alt="logo" />
11
+ <div class="home-container">
12
+ <h1>{{ site.homeTitle }}</h1>
13
+ </div>
14
+ <a href="/docs" class="home-docs-button">Documentation</a>
15
+ </div>
16
+
17
+ {% include "shared/homeData.njk" %}
18
+ </main>
19
+
20
+ {% include "shared/footer.njk" %}
21
+
22
+ {% include "multipage/searchModal.njk" %}
23
+ {% include "multipage/scripts.njk" %}
24
+ {% include "shared/highlightScript.njk" %}
25
+ {% include "multipage/searchEngine.njk" %}
26
+
27
+ </body>
28
+ </html>
@@ -0,0 +1,8 @@
1
+ <section>
2
+ <div class="home-hero">
3
+ <img src="/../assets/images/logo.svg" alt="logo" />
4
+ <div class="home-container">
5
+ <h1>{{ site.homeTitle }}</h1>
6
+ </div>
7
+ </div>
8
+ </section>
@@ -0,0 +1,24 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ {% include "shared/head.njk" %}
4
+
5
+ <body>
6
+ {% include "landing/landingHero.njk" %}
7
+
8
+ <article class="home-container">
9
+ <h1>{{title}}</h1>
10
+ <div class="content">
11
+ {{ content | safe }}
12
+ </div>
13
+ </article>
14
+
15
+ {% include "shared/homeData.njk" %}
16
+
17
+ {% include "shared/footer.njk" %}
18
+
19
+ {% include "shared/highlightScript.njk" %}
20
+
21
+
22
+ </body>
23
+ </html>
24
+
@@ -0,0 +1,23 @@
1
+ <header class="header" id="header">
2
+ <div class="header-content">
3
+ <nav class="nav">
4
+ <div class="header-menu hide-d">
5
+ <a class="header-logo" href="/">
6
+ <img src="/../assets/images/logo.svg" alt="logo" />
7
+ </a>
8
+ <button id="open-sidebar" class="icon menu-btn">
9
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg>
10
+ <span>Menu</span>
11
+ </button>
12
+ </div>
13
+
14
+
15
+ <div class="header-search">
16
+ <button aria-label="Open search" class="icon search-btn" id="search-btn">
17
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352c79.5 0 144-64.5 144-144s-64.5-144-144-144S64 128.5 64 208s64.5 144 144 144z"/></svg>
18
+ <span class="hidden search-text">Search the documentation</span>
19
+ </button>
20
+ </div>
21
+ </nav>
22
+ </div>
23
+ </header>
@@ -0,0 +1,20 @@
1
+ <header class="home-header">
2
+ <div class="header-content">
3
+ <nav class="nav">
4
+ <div class="header-menu">
5
+ <a class="header-logo" href="/">
6
+ <img src="/../assets/images/logo.svg" alt="logo" />
7
+ </a>
8
+ <a href="/docs" class="docs-link">Docs</a>
9
+ </div>
10
+
11
+
12
+ <div class="header-search">
13
+ <button class="icon search-btn" id="search-btn">
14
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352c79.5 0 144-64.5 144-144s-64.5-144-144-144S64 128.5 64 208s64.5 144 144 144z"/></svg>
15
+ <span class="hidden search-text">Search the documentation</span>
16
+ </button>
17
+ </div>
18
+ </nav>
19
+ </div>
20
+ </header>
@@ -0,0 +1,47 @@
1
+ <div class="main-container">
2
+ <div class="main-content">
3
+ <article class="content">
4
+ <div class="items-start">
5
+ {% set navPages = collections.all | eleventyNavigationBreadcrumb(eleventyNavigation.key, { includeSelf: true }) %}
6
+ <div class="breadcrumb">
7
+ {% if navPages[0].url %}
8
+ <a href="{{navPages[0].url}}">{{ navPages[0].title }}</a>
9
+ {% else %}
10
+ <span>{{ navPages[0].title }}</span>
11
+ {% endif %}
12
+ {% if navPages[1] %}
13
+ <span>/ {{ navPages[1].title }}</span>
14
+ {% endif %}
15
+
16
+ </div>
17
+ {% if date %}
18
+ <div class="date hidden">
19
+ <span>{% formatDate "MMM dd, yyyy", date %}</span>
20
+ </div>
21
+ {% endif %}
22
+
23
+ </div>
24
+ <h1>{{title}}</h1>
25
+
26
+ <!-- on this page start -->
27
+ <div class="on-page-container on-page-main">
28
+ <h5>On this page</h5>
29
+ {{ content | toc | safe }}
30
+
31
+ </div>
32
+
33
+ <!-- on this page end -->
34
+
35
+
36
+ {{ content | safe }}
37
+
38
+ </article>
39
+
40
+ <div class="on-page-container on-page--desktop">
41
+ <div id="on-page" style="display: none">
42
+ <h5>On this page</h5>
43
+ {{ content | toc | safe }}
44
+ </div>
45
+ </div>
46
+ </div>
47
+ </div>
@@ -0,0 +1,47 @@
1
+ <script defer>
2
+ const sidebar = document.querySelector('#sidebar');
3
+ const header = document.querySelector('#header');
4
+ const path = window.location.pathname;
5
+ const isHome = path === '/' || path === '/index.html';
6
+ const isDesktop = window.innerWidth >= 992;
7
+
8
+ const handleScroll = () => {
9
+ const onPage = document.querySelector('#on-page');
10
+ if(!isHome) {
11
+ if (window.scrollY > 250 && window.innerWidth >= 1458) {
12
+ onPage.style.display = 'block';
13
+ onPage.classList.add('on-page-fixed');
14
+ } else {
15
+ onPage.classList.remove('on-page-fixed');
16
+ onPage.style.display = 'none';
17
+ }
18
+ }
19
+ };
20
+ window.addEventListener('scroll', handleScroll);
21
+
22
+
23
+ const closeSidebar = () => {
24
+ const closeBtn = document.querySelector('#close-sidebar');
25
+ closeBtn.addEventListener('click', () => {
26
+ sidebar.classList.add('hidden');
27
+ header.classList.remove('bottom');
28
+ });
29
+ }
30
+
31
+ const openSidebar = () => {
32
+ const openBtn = document.querySelector('#open-sidebar');
33
+ openBtn.addEventListener('click', () => {
34
+ sidebar.classList.remove('hidden');
35
+ header.classList.add('bottom');
36
+ });
37
+ }
38
+
39
+ const handleMobileSidebar = () => {
40
+ if (!isHome && !isDesktop) {
41
+ openSidebar()
42
+ closeSidebar();
43
+ }
44
+ }
45
+ document.addEventListener('DOMContentLoaded', handleMobileSidebar, false)
46
+ </script>
47
+
@@ -0,0 +1,5 @@
1
+ {% if config.searchEngine == 'algolia' %}
2
+ {% include "search/algolia.njk" %}
3
+ {% elif config.searchEngine == 'pagefind' %}
4
+ {% include "search/pagefind.njk" %}
5
+ {% endif %}
@@ -0,0 +1,19 @@
1
+ <div class="search-modal" id="search-modal">
2
+ <div class="search-container" id="search-container">
3
+ {% if config.searchEngine == 'algolia' %}
4
+ <div id="searchbox" class="search-box">
5
+ <span class="close-modal--btn" id="close-modal-btn">Cancel</span>
6
+ </div>
7
+ <div id="hits"></div>
8
+
9
+ {% elif config.searchEngine == 'pagefind' %}
10
+ <div id="search" class="search-box">
11
+ <span class="close-modal-btn hide-d" id="close-modal-btn">
12
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M376.6 84.5c11.3-13.6 9.5-33.8-4.1-45.1s-33.8-9.5-45.1 4.1L192 206 56.6 43.5C45.3 29.9 25.1 28.1 11.5 39.4S-3.9 70.9 7.4 84.5L150.3 256 7.4 427.5c-11.3 13.6-9.5 33.8 4.1 45.1s33.8 9.5 45.1-4.1L192 306 327.4 468.5c11.3 13.6 31.5 15.4 45.1 4.1s15.4-31.5 4.1-45.1L233.7 256 376.6 84.5z"/>
13
+ </svg>
14
+ </span>
15
+ </div>
16
+
17
+ {% endif %}
18
+ </div>
19
+ </div>
@@ -0,0 +1,50 @@
1
+ <aside class="sidebar hidden" id="sidebar" data-pagefind-ignore>
2
+ <div class="sidebar-logo">
3
+ <a class="header-link" href="/">
4
+ <img src="/../assets/images/logo.svg" alt="logo" />
5
+ </a>
6
+ </div>
7
+
8
+ <section class="sidebar-container">
9
+ <button class="close-btn icon" id="close-sidebar">
10
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M376.6 84.5c11.3-13.6 9.5-33.8-4.1-45.1s-33.8-9.5-45.1 4.1L192 206 56.6 43.5C45.3 29.9 25.1 28.1 11.5 39.4S-3.9 70.9 7.4 84.5L150.3 256 7.4 427.5c-11.3 13.6-9.5 33.8 4.1 45.1s33.8 9.5 45.1-4.1L192 306 327.4 468.5c11.3 13.6 31.5 15.4 45.1 4.1s15.4-31.5 4.1-45.1L233.7 256 376.6 84.5z"/></svg>
11
+ <span>Close</span>
12
+ </button>
13
+ <div class="sidebar-content">
14
+ {% set navPages = collections.all | eleventyNavigation %}
15
+
16
+ {% macro renderNavListItem(entry) -%}
17
+ {% if entry.children.length %}
18
+ <li>
19
+ <details
20
+ {%- for child in entry.children %}
21
+ {% if child.parent == entry.title and child.url == page.url %}
22
+ class="active"
23
+ open
24
+ {% endif %}
25
+ {% endfor %}
26
+ >
27
+ <summary>{{ entry.title }}</summary>
28
+ <ul class="child-list" role="list">
29
+ {%- for child in entry.children %}{{ renderNavListItem(child) }}{% endfor -%}
30
+ </ul>
31
+ </details>
32
+ </li>
33
+ {% else %}
34
+ <li>
35
+ <a href="{{ entry.url }}"{% if entry.url == page.url %} class="active" {% endif %}>{{ entry.title }}</a>
36
+ </li>
37
+ {%- endif -%}
38
+ {%- endmacro %}
39
+
40
+ <ul class="nav-list" role="list">
41
+ {%- for entry in navPages %}{{ renderNavListItem(entry) }}{%- endfor -%}
42
+ </ul>
43
+
44
+ </div>
45
+ </section>
46
+ <footer class="sidebar-footer">
47
+ {{ site.footer }} {{ site.authorName }} {% year %}
48
+ </footer>
49
+
50
+ </aside>
@@ -0,0 +1,38 @@
1
+ ---
2
+ permalink: /releases/
3
+ ---
4
+
5
+ <!DOCTYPE html>
6
+ <html lang="en">
7
+ <head>
8
+ {% include "shared/head.njk" %}
9
+ <title>{{site.name}} - Releases</title>
10
+ </head>
11
+
12
+ <body>
13
+ {% include "landing/landingHero.njk" %}
14
+
15
+ <main class="home-container">
16
+ <div class="content-container versions-container">
17
+ <h2 class="home-title">Releases</h2>
18
+ {% for release in github.releases %}
19
+ <div class="release">
20
+ <div class="release-header">
21
+ <a class="release-title" href="{{ release.html_url }}" target="_blank" rel="noopener noreferrer">{{ release.name }}</a>
22
+ <span class="release-date">{% formatDate "MMM dd, yyyy", release.published_at %}</span>
23
+ </div>
24
+ <div class="release-body">
25
+ {% if release.body %}
26
+ <p>{% parseRelease release.body %}</p>
27
+ {% endif %}
28
+ </div>
29
+ </div>
30
+ {% endfor %}
31
+ </div>
32
+
33
+ </main>
34
+
35
+ {% include "shared/highlightScript.njk" %}
36
+
37
+ </body>
38
+ </html>
@@ -0,0 +1,98 @@
1
+ <script src="https://cdn.jsdelivr.net/npm/algoliasearch@4.14.3/dist/algoliasearch-lite.umd.js" integrity="sha256-dyJcbGuYfdzNfifkHxYVd/rzeR6SLLcDFYEidcybldM=" crossorigin="anonymous"></script>
2
+ <script src="https://cdn.jsdelivr.net/npm/instantsearch.js@4.50.3/dist/instantsearch.production.min.js" integrity="sha256-VIZm35iFB4ETVstmsxpzZrlLm99QKqIzPuQb1T0ooOc=" crossorigin="anonymous"></script>
3
+
4
+
5
+
6
+ {% set algoliaKey = config.pluginConfig.algolia.apiKey %}
7
+ {% set algoliaAppId = config.pluginConfig.algolia.appId %}
8
+ {% set algoliaIndexName = config.pluginConfig.algolia.indexName %}
9
+
10
+ <script>
11
+ const searchClient = algoliasearch('{{algoliaAppId}}', '{{algoliaKey}}');
12
+ const search = instantsearch({
13
+ indexName: '{{algoliaIndexName}}',
14
+ searchClient,
15
+ searchFunction(helper) {
16
+ const results = document.querySelector('#hits');
17
+ results.style.display = helper.state.query === '' ? 'none' : '';
18
+ helper.search();
19
+ }
20
+ });
21
+ search.addWidgets([
22
+ instantsearch.widgets.searchBox({
23
+ container: '#searchbox',
24
+ placeholder: 'Search for concepts',
25
+ autofocus: true,
26
+ }),
27
+ instantsearch.widgets.hits({
28
+ container: '#hits',
29
+ templates: {
30
+ empty(results, { html }) {
31
+ return html`No results for <q>${results.query}</q>`;
32
+ },
33
+ item(hit, { html, components }) {
34
+ return html`
35
+ <article class="search-result">
36
+ <a href="${hit.url}">
37
+ <h2>${components.Highlight({ hit, attribute: 'title', highlightedTagName: 'span' })}</h2>
38
+ <p>${components.Highlight({ hit, attribute: 'description', highlightedTagName: 'span' })}</p>
39
+ </a>
40
+ <hr />
41
+ </article>
42
+ `;
43
+ }
44
+ }
45
+ }),
46
+ ]);
47
+ search.start();
48
+ </script>
49
+
50
+ <script>
51
+ const searchBtn = document.querySelector('#search-btn');
52
+ const closeModalBtn = document.querySelector('#close-modal-btn');
53
+ const searchModal = document.querySelector('#search-modal');
54
+
55
+ const closeEmptyModal = (e) => {
56
+ const algoliaInput = document.querySelector('.ais-SearchBox-input');
57
+ if(algoliaInput) {
58
+ if(!algoliaInput.value ) {
59
+ if (algoliaInput === e.target || algoliaInput.contains(e.target)) return;
60
+ searchModal.classList.remove('show-modal');
61
+ }
62
+ }
63
+ }
64
+
65
+ const closeDesktopModal = (e) => {
66
+ const algoliaInput = document.querySelector('.ais-SearchBox-input');
67
+ if(isDesktop && algoliaInput) {
68
+ if(algoliaInput.value ) {
69
+ if (searchModalContainer === e.target || searchModalContainer.contains(e.target)) return;
70
+ searchModal.classList.remove('show-modal');
71
+ }
72
+ }
73
+ }
74
+
75
+ searchModal.addEventListener('click', (e) => {
76
+ closeEmptyModal(e);
77
+ closeDesktopModal(e)
78
+ });
79
+
80
+ const autofocusInput = () => {
81
+ const algoliaInput = document.querySelector('.ais-SearchBox-input');
82
+ if (algoliaInput) {
83
+ algoliaInput.focus();
84
+ }
85
+ };
86
+
87
+ const handleSearchModal = () => {
88
+ searchModal.classList.add('show-modal');
89
+ autofocusInput()
90
+ };
91
+ searchBtn.addEventListener('click', handleSearchModal);
92
+
93
+ if(closeModalBtn) {
94
+ closeModalBtn.addEventListener('click', () => {
95
+ searchModal.classList.remove('show-modal');
96
+ });
97
+ }
98
+ </script>