docula 0.5.4 → 0.6.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.
@@ -0,0 +1,496 @@
1
+ /* Home */
2
+ .home-hero {
3
+ padding: 3.5rem 0 4.5rem;
4
+ }
5
+
6
+ .home-container {
7
+ margin: 2rem 2rem 3rem;
8
+ }
9
+
10
+ .home-container h1 {
11
+ font-weight: 500;
12
+ font-size: 1.75rem;
13
+ }
14
+
15
+ .home-docs-button {
16
+ padding: 0.75rem 1.5rem;
17
+ border: 2px solid var(--color-secondary-dark);
18
+ border-radius: 0.5rem;
19
+ color: var(--color-secondary-dark);
20
+ font-weight: 600;
21
+ }
22
+
23
+ /* Docs */
24
+ .nav {
25
+ padding-left: 1rem;
26
+ padding-right: 1rem;
27
+ height: 4.5rem;
28
+ display: flex;
29
+ justify-content: space-between;
30
+ align-items: center;
31
+ width: 100%;
32
+ border-bottom: 1px solid var(--border);
33
+ z-index: 3;
34
+ white-space: nowrap;
35
+ flex-grow: 1;
36
+ }
37
+
38
+ .nav-list {
39
+ padding-left: 0;
40
+ }
41
+
42
+ .nav-list li {
43
+ margin-top: 1.5rem;
44
+ color: var(--sidebar-text);
45
+ list-style: none;
46
+ }
47
+
48
+ .nav-list .active {
49
+ color: var(--sidebar-text-active);
50
+ }
51
+
52
+ .icon {
53
+ background-color: transparent;
54
+ border: none;
55
+ cursor: pointer;
56
+ }
57
+
58
+ .menu-btn svg {
59
+ width: 1.25rem;
60
+ height: 1.25rem;
61
+ margin-right: 0.5rem;
62
+ }
63
+
64
+ .menu-btn span {
65
+ text-transform: uppercase;
66
+ font-size: 0.625rem;
67
+ vertical-align: super;
68
+ color: var(--color-text);
69
+ }
70
+
71
+ .header-menu {
72
+ display: flex;
73
+ align-items: center;
74
+ }
75
+
76
+ .header-logo {
77
+ flex-shrink: 0;
78
+ margin-right: 1.5rem;
79
+ display: block;
80
+ }
81
+
82
+ .header-logo img {
83
+ width: 3rem;
84
+ height: 3rem;
85
+ }
86
+
87
+ .breadcrumb a:hover {
88
+ text-decoration: underline;
89
+ }
90
+
91
+ details > summary {
92
+ cursor: pointer;
93
+ list-style: none;
94
+ }
95
+
96
+ .child-list {
97
+ padding-left: 1.125rem;
98
+ }
99
+
100
+ .child-list li {
101
+ color: var(--sidebar-text);
102
+ opacity: 0.8;
103
+ }
104
+
105
+ .sidebar {
106
+ background: var(--sidebar-background);
107
+ z-index: 10000;
108
+ width: 100%;
109
+ top: 0;
110
+ height: 100vh;
111
+ flex-direction: column;
112
+ flex-shrink: 0;
113
+ position: fixed;
114
+ font-family: var(--font-family);
115
+ border-right: 1px solid var(--border);
116
+ }
117
+
118
+ .sidebar-container {
119
+ overflow-y: auto;
120
+ width: inherit;
121
+ flex-grow: 1;
122
+ position: relative;
123
+ }
124
+
125
+ .sidebar-content {
126
+ padding: 3rem 2.5rem 1.5rem;
127
+ overflow-y: auto;
128
+ font-size: 0.875rem;
129
+ height: 90vh;
130
+ }
131
+
132
+ .sidebar-logo {
133
+ display: none;
134
+ }
135
+
136
+ .close-btn {
137
+ transition: all .2s ease-out;
138
+ color: var(--sidebar-text);
139
+ margin-top: 3rem;
140
+ display: flex;
141
+ align-items: center;
142
+ position: absolute;
143
+ right: 0;
144
+ top: 0;
145
+ margin-right: 2.5rem;
146
+ }
147
+
148
+ .close-btn svg {
149
+ width: 1rem;
150
+ height: 1rem;
151
+ fill: currentColor;
152
+ margin-right: 1rem;
153
+ }
154
+
155
+ .main-container {
156
+ width: 100%;
157
+ overflow-x: hidden;
158
+ padding-top: 2rem;
159
+ }
160
+
161
+ .main-content {
162
+ padding: 0 1.5rem;
163
+ display: flex;
164
+ }
165
+
166
+ .breadcrumb {
167
+ line-height: 1rem;
168
+ font-size: 0.625rem;
169
+ letter-spacing: 1.5px;
170
+ text-transform: uppercase;
171
+ font-weight: 600;
172
+ }
173
+
174
+ .sidebar-footer {
175
+ padding: 1rem 2.5rem;
176
+ display: flex;
177
+ align-items: center;
178
+ flex-wrap: wrap;
179
+ font-size: 0.875rem;
180
+ border-top: 1px solid var(--border);
181
+ justify-content: space-between;
182
+ position: absolute;
183
+ bottom: 0;
184
+ background-color: var(--sidebar-background);
185
+ width: 100%;
186
+ }
187
+
188
+ .sidebar-footer a {
189
+ font-size: 0.75rem;
190
+ color: var(--sidebar-text);
191
+ }
192
+
193
+ .sidebar-footer a:first-child {
194
+ margin-right: 2rem
195
+ }
196
+
197
+ .on-page-container {
198
+ padding-top: 1.75rem;
199
+ padding-bottom: 1.75rem;
200
+ }
201
+
202
+ .on-page-container h5 {
203
+ text-transform: uppercase;
204
+ letter-spacing: 1.5px;
205
+ margin-bottom: 1rem;
206
+ font-size: 0.625rem;
207
+ font-weight: 600;
208
+ color: var(--color-secondary);
209
+ }
210
+
211
+ .on-page-container .toc {
212
+ list-style: none;
213
+ line-height: 1.5rem;
214
+ padding-left: 0;
215
+ width: 100%;
216
+ font-size: 0.875rem;
217
+ }
218
+
219
+ .on-page-container ol {
220
+ padding-left: 0;
221
+ list-style: none;
222
+ width: 100%;
223
+ }
224
+
225
+ .on-page-container ol > li {
226
+ display: flex;
227
+ align-items: baseline;
228
+ position: relative;
229
+ }
230
+
231
+ .on-page-container ol > li > a {
232
+ transition: all .2s ease-out;
233
+ color: var(--color-secondary);
234
+ padding: 0.5rem 0;
235
+ display: flex;
236
+ align-items: center;
237
+ justify-content: space-between;
238
+ width: 100%;
239
+ overflow: hidden;
240
+ text-overflow: ellipsis;
241
+ white-space: initial;
242
+ }
243
+
244
+ .on-page-container ol > li:hover > a {
245
+ transform: translateX(0.25rem);
246
+ }
247
+
248
+ .on-page-main ol > li > a::after {
249
+ position: absolute;
250
+ right: 0;
251
+ content: '';
252
+ display: inline-block;
253
+ width: 0.25rem;
254
+ height: 0.25rem;
255
+ border-right: 1px solid var(--color-secondary);
256
+ border-bottom: 1px solid var(--color-secondary);
257
+ transform: rotate(-45deg);
258
+ }
259
+
260
+ .on-page-list {
261
+ margin-left: 0.5rem;
262
+ font-size: 0.75rem;
263
+ }
264
+
265
+ @media screen and (min-width: 576px) {
266
+ .date {
267
+ display: flex;
268
+ position: relative;
269
+ text-transform: uppercase;
270
+ letter-spacing: 1.5px;
271
+ color: var(--color-secondary);
272
+ font-size: 0.625rem;
273
+ font-weight: 600;
274
+ }
275
+
276
+ .date span::before {
277
+ position: absolute;
278
+ content: '';
279
+ background-image: url("data:image/svg+xml,%3Csvg class='block h-full' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M11 22A11 11 0 1 1 22 11 11 11 0 0 1 11 22ZM11 2a9 9 0 1 0 9 9A9 9 0 0 0 11 2Z'%3E%3C/path%3E%3Cpath d='M15 14a.93.93 0 0 1-.45-.11l-4-2A1 1 0 0 1 10 11V5a1 1 0 0 1 2 0v5.38l3.45 1.73a1 1 0 0 1 .44 1.34A1 1 0 0 1 15 14Z'%3E%3C/path%3E%3C/svg%3E");
280
+ left: -1.5rem;
281
+ width: 0.75rem;
282
+ height: 0.75rem;
283
+ }
284
+
285
+ .nav {
286
+ padding-left: 2rem;
287
+ padding-right: 2rem;
288
+ }
289
+ }
290
+
291
+
292
+ @media screen and (min-width: 640px) {
293
+ .home-container {
294
+ margin-left: 4rem;
295
+ margin-right: 4rem;
296
+ }
297
+ .home-hero {
298
+ padding: 4rem 0 4.5rem;
299
+ }
300
+ }
301
+
302
+ @media screen and (min-width: 768px) {
303
+ .home-hero {
304
+ padding: 4.5rem 0;
305
+ }
306
+
307
+ .main-content {
308
+ padding: 0 3.5rem 1.5rem;
309
+ }
310
+ .main-container {
311
+ padding-top: 7.5rem;
312
+ }
313
+ .nav {
314
+ padding-left: 3.5rem;
315
+ padding-right: 3.5rem;
316
+ }
317
+ }
318
+
319
+ @media screen and (min-width: 992px) {
320
+ .home-container {
321
+ margin: 4.5rem auto 3.5rem;
322
+ }
323
+ .home-hero {
324
+ padding: 7.5rem 0;
325
+ }
326
+ .home-hero img {
327
+ max-width: 28rem;
328
+ }
329
+ .home-container h1 {
330
+ font-size: 2rem;
331
+ }
332
+ .home-docs-button {
333
+ font-size: 1.5rem;
334
+ }
335
+
336
+ .header {
337
+ display: none;
338
+ }
339
+ .nav {
340
+ width: 100%;
341
+ justify-content: space-between;
342
+ height: auto;
343
+ box-shadow: none;
344
+ padding-right: 1rem;
345
+ z-index: 30;
346
+ }
347
+ .sidebar {
348
+ width: 20.25rem;
349
+ display: flex;
350
+ height: 100%;
351
+ z-index: 20;
352
+ }
353
+ .close-btn {
354
+ display: none;
355
+ }
356
+ .sidebar-content {
357
+ padding-top: 1.5rem;
358
+ height: 100%;
359
+ }
360
+ .nav-list {
361
+ margin-top: 0;
362
+ }
363
+ .main-container {
364
+ margin-top: 3rem;
365
+ padding-top: 0;
366
+ }
367
+ .header-link {
368
+ margin-top: 1.25rem;
369
+ }
370
+ .header-link img {
371
+ width: 11.25rem;
372
+ }
373
+ .layout {
374
+ display: grid;
375
+ grid-template-columns: 20.25rem 1fr;
376
+ grid-template-rows: 1fr;
377
+ grid-gap: 0;
378
+ }
379
+ aside {
380
+ grid-area: 1 / 1 / 4 / 2;
381
+ position: fixed;
382
+ top: 12.5rem;
383
+ left: 0;
384
+ z-index: 40;
385
+ height: 100%;
386
+ width: 20.25rem;
387
+ }
388
+ .main-container {
389
+ grid-area: 1 / 2 / 4 / 3;
390
+ }
391
+ .sidebar-logo {
392
+ position: sticky;
393
+ top: 0;
394
+ left: 0;
395
+ z-index: 80;
396
+ width: 20.25rem;
397
+ background-color: var(--sidebar-background);
398
+ display: flex;
399
+ align-items: center;
400
+ justify-content: center;
401
+ border-right: 1px solid var(--border);
402
+ }
403
+ .sidebar-logo svg {
404
+ width: 2rem;
405
+ height: 2rem;
406
+ }
407
+ .header-content {
408
+ display: flex;
409
+ height: 100%;
410
+ }
411
+ .nav {
412
+ justify-content: flex-start;
413
+ padding-left: 3.5rem;
414
+ z-index: 30;
415
+ }
416
+ .nav-list {
417
+ padding-left: 0;
418
+ }
419
+ .on-page--desktop ~ .on-page-list {
420
+ margin-left: 0;
421
+ }
422
+ .sidebar-footer {
423
+ position: sticky;
424
+ }
425
+ }
426
+
427
+ @media screen and (min-width: 1458px) {
428
+ .on-page--desktop ol {
429
+ font-size: 0.75rem;
430
+ }
431
+
432
+ .on-page--desktop ol li a {
433
+ padding: 0.25rem 0;
434
+ }
435
+ .on-page--desktop {
436
+ width: 100%;
437
+ position: relative;
438
+ transition: all .3s ease-in;
439
+ display: flex;
440
+ justify-content: flex-end;
441
+ }
442
+ .on-page-fixed {
443
+ position: fixed;
444
+ max-width: 12.5rem;
445
+ }
446
+ .main-content {
447
+ padding: 0 3.5rem 1.5rem;
448
+ }
449
+ }
450
+
451
+ @media screen and (min-width: 1600px) {
452
+ .layout {
453
+ grid-template-columns: 23.75rem 1fr;
454
+ }
455
+ .sidebar, aside, .sidebar-logo {
456
+ width: 23.75rem;
457
+ }
458
+ .sidebar-logo, .sidebar-content, .sidebar-footer {
459
+ padding-left: 3.25rem;
460
+ padding-right: 3.25rem;
461
+ }
462
+ .main-content {
463
+ padding-left: 4.5rem;
464
+ padding-right: 4.5rem;
465
+ }
466
+ .on-page--desktop {
467
+ justify-content: center;
468
+ }
469
+ }
470
+
471
+ @media screen and (min-width: 1800px) {
472
+ .layout {
473
+ grid-template-columns: 28.75rem 1fr;
474
+ }
475
+ .sidebar, aside, .sidebar-logo {
476
+ width: 28.75rem;
477
+ }
478
+ .sidebar-logo, .sidebar-content, .sidebar-footer {
479
+ padding-left: 5.5rem;
480
+ padding-right: 5.5rem;
481
+ }
482
+ }
483
+
484
+
485
+ @media screen and (min-width: 2400px) {
486
+ .layout {
487
+ grid-template-columns: 37.5rem 1fr;
488
+ }
489
+ .sidebar, aside, .sidebar-logo {
490
+ width: 37.5rem;
491
+ }
492
+ .sidebar-logo, .sidebar-content, .sidebar-footer {
493
+ padding-left: 7.5rem;
494
+ padding-right: 7.5rem;
495
+ }
496
+ }
@@ -0,0 +1,11 @@
1
+ .home-hero {
2
+ display: flex;
3
+ justify-content: center;
4
+ height: 20vh;
5
+ }
6
+
7
+ @media screen and (min-width: 768px) {
8
+ .home-hero {
9
+ height: 40vh;
10
+ }
11
+ }
@@ -0,0 +1,22 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ {{> header }}
5
+ <title>{{siteTitle}} - {{title}} </title>
6
+ </head>
7
+
8
+ <body>
9
+ <a class="github-fork-ribbon" href="https://github.com/jaredwray/keyv" data-ribbon="Fork me on GitHub" title="Fork me on GitHub">Fork me on GitHub</a>
10
+ <main class="layout">
11
+ {{> multipage/header }}
12
+ {{> multipage/sidebar }}
13
+ {{> multipage/doc }}
14
+ </main>
15
+ {{> footer}}
16
+
17
+ {{> scripts }}
18
+ {{> multipage/scripts }}
19
+
20
+
21
+ </body>
22
+ </html>
@@ -1,8 +1,13 @@
1
1
  <meta charset="UTF-8" />
2
2
  <meta name="viewport" content="width=device-width, initial-scale=1" />
3
3
  <link rel="stylesheet" href="/css/variables.css" />
4
- <link rel="stylesheet" href="/css/index.css" />
5
- <link rel="stylesheet" href="/css/home.css" />
4
+
5
+ <link rel="stylesheet" href="/css/base.css" />
6
+ {{#if hasDocuments}}
7
+ <link rel="stylesheet" href="/css/multipage.css" />
8
+ {{else}}
9
+ <link rel="stylesheet" href="/css/landing.css" />
10
+ {{/if}}
6
11
  <link rel="preconnect" href="https://fonts.googleapis.com" />
7
12
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
8
13
  <link
@@ -0,0 +1,10 @@
1
+ <div class="main-container">
2
+ <div class="main-content">
3
+ <article class="content">
4
+ <div class="items-start">
5
+ </div>
6
+ {{generatedHtml}}
7
+ </article>
8
+ </div>
9
+
10
+ </div>
@@ -0,0 +1,15 @@
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="/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
+ </nav>
14
+ </div>
15
+ </header>
@@ -0,0 +1,7 @@
1
+ <section class="home-hero">
2
+ <img src="/logo.svg" alt="logo"/>
3
+ <div class="home-container">
4
+ <h1>{{ siteDescription }}</h1>
5
+ </div>
6
+ <a href="/docs" class="home-docs-button">Documentation</a>
7
+ </section>
@@ -0,0 +1,61 @@
1
+ <article class="home-container">
2
+ {{#if github}}
3
+ {{#if github.contributors}}
4
+ <div class="content-container">
5
+ <h2 class="home-title">Contributors</h2>
6
+ <div class="facepile-container">
7
+ <div class="facepile">
8
+ {{#each github.contributors}}
9
+ <a
10
+ href="{{html_url}}"
11
+ target="_blank"
12
+ title="{{login}}"
13
+ rel="noopener noreferrer"
14
+ >
15
+ <img src="{{avatar_url}}" alt="{{login}}"/>
16
+ </a>
17
+ {{/each}}
18
+ </div>
19
+ </div>
20
+ </div>
21
+ {{/if}}
22
+
23
+ {{#if github.releases}}
24
+ <div class="content-container">
25
+ <h2 class="home-title">Latest's Releases</h2>
26
+ {{#each github.releases as |release|}}
27
+ {{#if (lt @index 3)}}
28
+ <div class="release">
29
+ <div class="release-header">
30
+ <a
31
+ class="release-title"
32
+ href="{{release.html_url}}"
33
+ target="_blank"
34
+ rel="noopener noreferrer"
35
+ >{{release.name}}</a>
36
+ <span class="release-date">{{#moment
37
+ release.published_at "MMMM DD, yyyy"
38
+ }}{{/moment}}
39
+ </span>
40
+ </div>
41
+ <div class="release-body">
42
+ {{#if release.body}}
43
+ {{#markdown}}{{release.body}}{{/markdown}}
44
+ {{/if}}
45
+ </div>
46
+ </div>
47
+ {{/if}}
48
+ {{/each}}
49
+
50
+ {{#if (gt github.releases.length 6)}}
51
+ <div>
52
+ <a class="release-btn" href="/releases">
53
+ All Releases
54
+ <span>→</span>
55
+ </a>
56
+ </div>
57
+ {{/if}}
58
+ </div>
59
+ {{/if}}
60
+ {{/if}}
61
+ </article>
@@ -0,0 +1,60 @@
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
+
46
+ document.addEventListener('DOMContentLoaded', handleMobileSidebar, false);
47
+
48
+ const sidebarElements = document.querySelectorAll('.nav-list li a');
49
+ sidebarElements.forEach((element) => {
50
+ if (element.href === window.location.href) {
51
+ element.classList.add('active');
52
+
53
+ if (element.parentElement.parentElement.parentElement.tagName === 'DETAILS') {
54
+ element.parentElement.parentElement.parentElement.open = true;
55
+ element.parentElement.parentElement.parentElement.classList.add('active');
56
+ }
57
+ }
58
+ });
59
+
60
+ </script>