-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathindex.html
More file actions
175 lines (167 loc) · 9.82 KB
/
index.html
File metadata and controls
175 lines (167 loc) · 9.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!DOCTYPE html>
<html lang="en" dir="ltr" unresolved>
{% set groupeddemos = demos | sort(false, false, 'permalink') | groupby('primaryElementName') %}
{% if demo.title %}
{% set title = demo.title + ' | ' + options.site.title %}
{% else %}
{% set title = options.site.title %}
{% endif %}
{% if options.sourceControlURLPrefix %}
{% if options.sourceControlURLPrefix.toLowerCase().includes('github') %}
{% set repoHost = 'GitHub' %}
{% elseif options.sourceControlURLPrefix.toLowerCase().includes('bitbucket') %}
{% set repoHost = 'BitBucket' %}
{% elseif options.sourceControlURLPrefix.toLowerCase().includes('gitlab') %}
{% set repoHost = 'GitLab' %}
{% else %}
{% set repoHost = '' %}
{% endif %}
{% endif %}
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{{ options.site.description }}">
<meta name="pf-track-performance" content="true">
<link href="{{ options.site.favicon }}" rel="shortcut icon">
<title>{{ title }}</title>
<link rel="stylesheet" href="/node_modules/@patternfly/pfe-tools/dev-server/fonts.css">
<link rel="stylesheet" href="/node_modules/@patternfly/pfe-tools/dev-server/demo.css">
<noscript><style>html[unresolved] { opacity: 1; }</style></noscript>
{% for sheet in options.site.stylesheets %}
<link rel="stylesheet" href="{{ sheet }}">
{% endfor %}
<script type="module">
import 'construct-style-sheets-polyfill';
import 'element-internals-polyfill';
import '@patternfly/elements/pf-button/pf-button.js';
import '@patternfly/elements/pf-card/pf-card.js';
import '@patternfly/pfe-tools/dev-server/demo.js';
</script>
</head>
<body class="menu-open">
<header id="main-header">
<div class="logo-bar">
<pf-button id="hamburger"
plain
aria-controls="sidebar"
label="Expand Main Navigation">
<pf-icon icon="bars" size="lg"></pf-icon>
</pf-button>
<a href="/" aria-label="{{ title }} Home">
<img src="{{ options.site.logoUrl }}" alt="{{ title }}">
</a>
<noscript><strong class="noscript">JavaScript is disabled</strong></noscript>
<a id="source-control" href="{{
options.sourceControlURLPrefix.replace('tree/main/', '')
}}{{
(
'tree/main' +
manifest.path.replace(context.cwd, '')
.replace('/custom-elements.json', '/')
) if manifest else ''
}}">
{% if options.sourceControlURLPrefix %}<span>Contribute on {{ repoHost }}</span>{% endif %}
{% if repoHost === 'GitHub' %}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512">
<!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
<title>GitHub</title>
<path fill="currentColor" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/>
</svg>
{% elseif repoHost === 'GitLab' %}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<title>GitLab</title>
<!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
<path fill="currentColor" d="M503.5 204.6L502.8 202.8L433.1 21.02C431.7 17.45 429.2 14.43 425.9 12.38C423.5 10.83 420.8 9.865 417.9 9.57C415 9.275 412.2 9.653 409.5 10.68C406.8 11.7 404.4 13.34 402.4 15.46C400.5 17.58 399.1 20.13 398.3 22.9L351.3 166.9H160.8L113.7 22.9C112.9 20.13 111.5 17.59 109.6 15.47C107.6 13.35 105.2 11.72 102.5 10.7C99.86 9.675 96.98 9.295 94.12 9.587C91.26 9.878 88.51 10.83 86.08 12.38C82.84 14.43 80.33 17.45 78.92 21.02L9.267 202.8L8.543 204.6C-1.484 230.8-2.72 259.6 5.023 286.6C12.77 313.5 29.07 337.3 51.47 354.2L51.74 354.4L52.33 354.8L158.3 434.3L210.9 474L242.9 498.2C246.6 500.1 251.2 502.5 255.9 502.5C260.6 502.5 265.2 500.1 268.9 498.2L300.9 474L353.5 434.3L460.2 354.4L460.5 354.1C482.9 337.2 499.2 313.5 506.1 286.6C514.7 259.6 513.5 230.8 503.5 204.6z"/>
</svg>
{% elseif repoHost === 'BitBucket' %}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<title>BitBucket</title>
<!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
<path fill="currentColor" d="M22.2 32A16 16 0 0 0 6 47.8a26.35 26.35 0 0 0 .2 2.8l67.9 412.1a21.77 21.77 0 0 0 21.3 18.2h325.7a16 16 0 0 0 16-13.4L505 50.7a16 16 0 0 0-13.2-18.3 24.58 24.58 0 0 0-2.8-.2L22.2 32zm285.9 297.8h-104l-28.1-147h157.3l-25.2 147z"/>
</svg>
{% elseif repoHost | trim === '' %}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
<title>Git Repository</title>
<!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
<path fill="currentColor" d="M439.55 236.05L244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/>
</svg>
{% endif %}
</a>
</div>
</header>
<aside id="sidebar" aria-expanded="true">
<nav id="nav" aria-label="Main Navigation">
<ul id="elements-container">
{% for primary, group in groupeddemos %}
{% set first = group['0'] %}
{% if group.length > 1 %}
<li>
<details {{ 'open' if demo.primaryElementName == primary }}>
<summary>{{ first.title }}</summary>
<ul>{% for d in group %}
<li>
<a href="{{ d.permalink | replace(demoURLPrefix, '/') }}">{{ d.title }}</a>
</li>{% endfor %}
</ul>
</details>
</li>{% else %}
<li>
<a href="{{ first.permalink | replace(demoURLPrefix, '/') }}">{{ first.title }} </a>
</li>{% endif %}{% endfor %}
</ul>
</nav>
</aside>
<main>{% if templateContent %}
<div data-demo="{{ demo.tagName }}">
{#- if it's the primary demo -#}
{%- if demo.permalink.endsWith(demo.slug + '/demo/') -%}
<script type="module">
import '@patternfly/pfe-tools/elements/pft-element-knobs.ts';
// TODO: discriminate
import '@patternfly/elements/pf-tooltip/pf-tooltip.js';
import '@patternfly/elements/pf-select/pf-select.js';
import '@patternfly/elements/pf-switch/pf-switch.js';
import '@patternfly/elements/pf-text-input/pf-text-input.js';
import '@patternfly/elements/pf-text-area/pf-text-area.js';
// TODO: typescript couldn't tolerate importing this
// but in truth, it belongs in pft-element-knobs.ts
import ZeroMd from 'zero-md';
customElements.define('pft-knobs-markdown', class extends ZeroMd {
async load() {
await super.load()
this.template = ``;
}
});
</script>
<pft-element-knobs tag="{{ demo.tagName }}">
<template>
{{- templateContent | noModulesOrStyles | safe -}}
</template>
{{- templateContent | noElement(demo.tagName) | safe -}}
<script type="application/json" data-package="{{ manifest.packageJson.name }}">
{{ manifest.manifest | dump(2) | safe }}
</script>
</pft-element-knobs>
{%- else -%}
{{- templateContent | safe -}}
{%- endif -%}
</div>{% else %}
<section id="components">
{% for primary, group in groupeddemos %}
{% set first = group['0'] %}
<pf-card rounded compact>
<h2 slot="header">{{ first.title }}</h2>
<a href="{{ first.permalink | replace(demoURLPrefix, '/') }}">
<img src="/elements/{{ primary }}/docs/screenshot.png" alt="{{ primary }}">
</a>
<ul>{% for d in group %}{% if not loop.first %}
<li>
<a href="{{ d.permalink | replace(demoURLPrefix, '/') }}">{{ d.title }}</a>
</li>{% endif %}{% endfor %}
</ul>
</pf-card>{% endfor %}
</section>
{% endif %}
</main>
</body>
</html>