Skip to content

Commit 429cf68

Browse files
authored
Restore docs indices (#1085)
* fix missing indices * fix search placeholder
1 parent dd77663 commit 429cf68

File tree

22 files changed

+187
-32
lines changed

22 files changed

+187
-32
lines changed

packages/webawesome/docs/_includes/sidebar.njk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@
315315
</ul>
316316
</wa-details>
317317

318-
<!-- Color Palettes & Themes -->
319-
<h2>Color Palettes &amp; Themes</h2>
318+
<!-- Theming -->
319+
<h2>Theming</h2>
320320
<ul>
321321
<li><a href="/docs/color-palettes">Color Palettes</a></li>
322322
<li><a href="/docs/themes">Themes</a></li>

packages/webawesome/docs/assets/styles/docs.css

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ wa-page > header {
9999
#sidebar,
100100
#outline {
101101
h2 {
102-
font-size: var(--wa-font-size-m);
102+
font-size: var(--wa-font-size-s);
103103
margin: 0;
104104
}
105105

@@ -108,7 +108,16 @@ wa-page > header {
108108
}
109109

110110
wa-details {
111-
--spacing: var(--wa-space-xs);
111+
--spacing: 0;
112+
113+
&::part(header) {
114+
padding: 0;
115+
padding-block-start: var(--wa-space-xs);
116+
}
117+
118+
&::part(content) {
119+
padding-block-start: var(--wa-space-m);
120+
}
112121

113122
&::part(base) {
114123
border: none;
@@ -171,6 +180,7 @@ wa-page > header {
171180

172181
/* Pro badges */
173182
wa-badge.pro {
183+
color: white;
174184
background-color: var(--wa-brand-orange);
175185
border-color: var(--wa-brand-orange);
176186
}
@@ -405,6 +415,7 @@ wa-page > main:has(> .search-list) {
405415

406416
wa-card {
407417
--spacing: var(--wa-space-m);
418+
box-shadow: none;
408419

409420
[slot='header'] {
410421
display: flex;
@@ -417,6 +428,11 @@ wa-page > main:has(> .search-list) {
417428
justify-content: center;
418429
min-block-size: calc(6rem + var(--spacing));
419430
}
431+
432+
&:hover {
433+
border-color: var(--wa-color-brand-border-loud);
434+
box-shadow: 0 0 0 0.0625rem var(--wa-color-brand-border-loud);
435+
}
420436
}
421437
}
422438
}

packages/webawesome/docs/docs/layout.njk

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,46 @@ description: Layout components and utility classes help you organize content tha
44
layout: docs
55
---
66

7+
<p>
8+
{% markdown %}
9+
{{ description }}
10+
{% endmarkdown %}
11+
</p>
12+
13+
<div class="search-list">
14+
<wa-input class="search-list-input" type="search" placeholder="Search layout utilities" autofocus>
15+
<wa-icon name="search" slot="start"></wa-icon>
16+
</wa-input>
17+
18+
<section class="search-list-grid">
19+
{% for page in collections.layoutUtilities | sort(false, false, 'data.title') %}
20+
<a href="{{ page.url }}">
21+
<wa-card with-header="" appearance="outlined">
22+
<div slot="header">
23+
{# Look for an icon based on the page name #}
24+
{% set iconPath = "svgs/layout/" + page.fileSlug + ".njk" %}
25+
{% set iconContent %}{% include iconPath ignore missing %}{% endset %}
26+
{% if iconContent.trim() %}
27+
{# An icon exists! Show it #}
28+
{{ iconContent | safe }}
29+
{% else %}
30+
{# Fallback to the placeholder #}
31+
{% include 'svgs/thumbnail-placeholder.njk' %}
32+
{% endif %}
33+
</div>
34+
<span class="page-name">{{ page.data.title }}</span>
35+
</wa-card>
36+
</a>
37+
{% endfor %}
38+
</section>
39+
<div class="search-list-empty" hidden>
40+
No results found
41+
</div>
42+
</div>
43+
44+
<wa-divider style="--spacing: var(--wa-space-3xl);"></wa-divider>
45+
46+
<div class="max-line-length">
747
{% markdown %}
848
## Installation
949

@@ -21,3 +61,4 @@ Or, you can choose to import _only_ the utilities:
2161
<link rel="stylesheet" href="{% cdnUrl 'styles/utilities.css' %}" />
2262
```
2363
{% endmarkdown %}
64+
</div>

packages/webawesome/docs/docs/tokens/index.md

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Design Tokens
3+
description: These custom properties thread through all of Web Awesome's components, giving things a consistent look and feel.
4+
layout: docs
5+
override:tags: []
6+
---
7+
8+
<p>
9+
{% markdown %}
10+
{{ description }}
11+
{% endmarkdown %}
12+
</p>
13+
14+
<div class="search-list">
15+
<wa-input class="search-list-input" type="search" placeholder="Search design tokens" autofocus>
16+
<wa-icon name="search" slot="start"></wa-icon>
17+
</wa-input>
18+
19+
<section class="search-list-grid">
20+
{% for page in collections.tokens | sort(false, false, 'data.title') %}
21+
<a href="{{ page.url }}">
22+
<wa-card with-header="" appearance="outlined">
23+
<div slot="header">
24+
{# Look for an icon based on the page name #}
25+
{% set iconPath = "svgs/tokens/" + page.fileSlug + ".njk" %}
26+
{% set iconContent %}{% include iconPath ignore missing %}{% endset %}
27+
{% if iconContent.trim() %}
28+
{# An icon exists! Show it #}
29+
{{ iconContent | safe }}
30+
{% else %}
31+
{# Fallback to the placeholder #}
32+
{% include 'svgs/thumbnail-placeholder.njk' %}
33+
{% endif %}
34+
</div>
35+
<span class="page-name">{{ page.data.title }}</span>
36+
</wa-card>
37+
</a>
38+
{% endfor %}
39+
</section>
40+
<div class="search-list-empty" hidden>
41+
No results found
42+
</div>
43+
</div>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"tags": ["tokens"]
3+
}

packages/webawesome/docs/docs/utilities/align-items.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Align Items
33
description: Align items utilities set the gap property of flex and grid containers, like other Web Awesome layout utilities.
44
layout: docs
5+
tags: layoutUtilities
56
---
67

78
<style>

packages/webawesome/docs/docs/utilities/cluster.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Cluster
33
description: 'Use the `wa-cluster` class to arrange elements inline with even spacing, allowing items to wrap when space is limited.'
44
layout: docs
5+
tags: layoutUtilities
56
---
67

78
<style>

packages/webawesome/docs/docs/utilities/color.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Color Variants
33
description: Color utilities allow you to apply the brand, neutral, success, warning, and danger colors from your theme to any element.
44
layout: docs
5+
tags: styleUtilities
56
---
67

78
Some Web Awesome components, like `<wa-button>`, allow you to change the color by using a `variant` attribute:

packages/webawesome/docs/docs/utilities/flank.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Flank
33
description: 'Use the `wa-flank` class to position two items side-by-side, with one item positioned alongside, or _flanking_, content that stretches to fill the available space.'
44
layout: docs
5+
tags: layoutUtilities
56
---
67

78
<style>

0 commit comments

Comments
 (0)