-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
218 lines (198 loc) · 7.41 KB
/
index.html
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<title>Bootstrap Webcomponents</title>
<script src="../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
<script type="module">
import baseStyle from "../styles/type.js";
import {renderToHead} from "../../helpers/helpers.js";
import "@polymer/iron-demo-helpers/demo-snippet.js";
import "../elements/button.js";
import "../elements/button-group.js";
import "../elements/badge.js";
import "../elements/alert.js";
import "../elements/progress.js";
renderToHead(baseStyle);
</script>
<style>
.centered {
max-width: 60em;
margin: 0 auto;
}
bs-progress {
margin: 1em;
}
</style>
</head>
<body>
<div class="centered">
<h1>Bootstrap Webcomponents</h1>
<ul>
<li><a href="#buttons">Buttons</a></li>
<li><a href="#badges">Badges</a></li>
<li><a href="#alerts">Alerts</a></li>
<li><a href="#progress">Progress</a></li>
</ul>
<h2 id="buttons">Buttons</h2>
<demo-snippet>
<template>
<bs-button>Default</bs-button>
<bs-button theme="primary">Primary</bs-button>
<bs-button theme="secondary">Secondary</bs-button>
<bs-button theme="success">Success</bs-button>
<bs-button theme="danger">Danger</bs-button>
<bs-button theme="warning">Warning</bs-button>
<bs-button theme="info">Info</bs-button>
<bs-button theme="light">Light</bs-button>
<bs-button theme="dark">Dark</bs-button>
</template>
</demo-snippet>
<h3>outline</h3>
<demo-snippet>
<template>
<bs-button theme="outline primary">Primary</bs-button>
<bs-button theme="outline secondary">Secondary</bs-button>
<bs-button theme="outline success">Success</bs-button>
<bs-button theme="outline danger">Danger</bs-button>
<bs-button theme="outline warning">Warning</bs-button>
<bs-button theme="outline info">Info</bs-button>
<bs-button theme="outline light">Light</bs-button>
<bs-button theme="outline dark">Dark</bs-button>
</template>
</demo-snippet>
<h3>sizes</h3>
<demo-snippet>
<template>
<bs-button theme="primary small">small</bs-button>
<bs-button theme="primary">regular</bs-button>
<bs-button theme="primary large">large</bs-button>
</template>
</demo-snippet>
<h3>states</h3>
<demo-snippet>
<template>
<bs-button theme="primary" disabled>disabled</bs-button>
<bs-button theme="secondary" active>active</bs-button>
<bs-button theme="outline success" active>active outline</bs-button>
<bs-button toggle theme="info">toggle button</bs-button>
</template>
</demo-snippet>
<h3>groups</h3>
<demo-snippet>
<template>
<bs-button-group>
<bs-button toggle active theme="secondary">active</bs-button>
<bs-button theme="secondary">button</bs-button>
<bs-button theme="secondary">button</bs-button>
<bs-button toggle theme="outline secondary">button</bs-button>
</bs-button-group>
</template>
</demo-snippet>
<h3>links</h3>
<demo-snippet>
<template>
<bs-button href="#foo">Default</bs-button>
<bs-button href="#bar" theme="info outline">Info</bs-button>
<bs-button-group>
<bs-button href="#where">Group</bs-button>
<bs-button href="#to">Group</bs-button>
</bs-button-group>
</template>
</demo-snippet>
<h3>custom theme</h3>
<demo-snippet>
<template>
<style>
bs-button[theme~="pink"] {
--bs-button-background-color: #f442ee;
--bs-button-color: white;
--bs-button-focusring-color: #f442ee50;
--bs-button-hover-background-color: #c736c2;
}
</style>
<bs-button theme="pink">pink custom</bs-button>
<bs-button theme="pink outline">pink custom</bs-button>
</template>
</demo-snippet>
<h2 id="badges">Badges</h2>
<demo-snippet>
<template>
<bs-badge theme="primary">Primary</bs-badge>
<bs-badge theme="secondary">Secondary</bs-badge>
<bs-badge theme="success">Success</bs-badge>
<bs-badge theme="danger">Danger</bs-badge>
<bs-badge theme="warning">Warning</bs-badge>
<bs-badge theme="info">Info</bs-badge>
<bs-badge theme="light">Light</bs-badge>
<bs-badge theme="dark">Dark</bs-badge>
</template>
</demo-snippet>
<h3>pill <bs-badge theme="pill info">round</bs-badge></h3>
<demo-snippet>
<template>
<bs-badge theme="pill primary">Primary</bs-badge>
<bs-badge theme="pill secondary">Secondary</bs-badge>
<bs-badge theme="pill success">Success</bs-badge>
<bs-badge theme="pill danger">Danger</bs-badge>
<bs-badge theme="pill warning">Warning</bs-badge>
<bs-badge theme="pill info">Info</bs-badge>
<bs-badge theme="pill light">Light</bs-badge>
<bs-badge theme="pill dark">Dark</bs-badge>
</template>
</demo-snippet>
<h3>as links</h3>
<demo-snippet>
<template>
<bs-badge theme="secondary" href="#foo">Secondary</bs-badge>
<bs-badge theme="success" href="#bar">Success</bs-badge>
</template>
</demo-snippet>
<h2 id="alerts">Alerts</h2>
<demo-snippet>
<template>
<bs-alert theme="primary">This is a primary alert with <a href="#">an example link</a>.</bs-alert>
<bs-alert theme="secondary">This is a secondary alert with <a href="#">an example link</a>.</bs-alert>
<bs-alert theme="success">This is a success alert with <a href="#">an example link</a>.</bs-alert>
<bs-alert theme="danger">This is a danger alert with <a href="#">an example link</a>.</bs-alert>
<bs-alert theme="warning">This is a warning alert with <a href="#">an example link</a>.</bs-alert>
<bs-alert theme="info">This is a info alert with <a href="#">an example link</a>.</bs-alert>
<bs-alert theme="light">This is a light alert with <a href="#">an example link</a>.</bs-alert>
<bs-alert theme="dark">This is a dark alert with <a href="#">an example link</a>.</bs-alert>
</template>
</demo-snippet>
<h3>rich content</h3>
<demo-snippet>
<template>
<bs-alert theme="info">
<h4 >Well done!</h4>
<p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.</p>
<hr>
<p>Whenever you need to, be sure to use margins to keep things nice and tidy.</p>
</bs-alert>
</template>
</demo-snippet>
<h3>dismissable</h3>
<demo-snippet>
<template>
<bs-alert dismissable theme="primary">This is a primary dismissable alert.</bs-alert>
<bs-alert dismissable theme="secondary">This is a secondary dismissable alert.</bs-alert>
<bs-alert dismissable theme="success">This is a success dismissable alert. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content</bs-alert>
</template>
</demo-snippet>
<h2 id="progress">Progress</h2>
<demo-snippet>
<template>
<bs-progress theme="primary" value="25">primary</bs-progress>
<bs-progress theme="secondary" value="1" maxvalue="3">secondary</bs-progress>
<bs-progress theme="success" value="9" maxvalue="20">success</bs-progress>
<bs-progress theme="info" value="3" maxvalue="5">info</bs-progress>
<bs-progress theme="warning striped" value="75">warning</bs-progress>
<bs-progress theme="danger striped" value="85">danger</bs-progress>
<bs-progress theme="dark striped animated" value="100">dark</bs-progress>
</template>
</demo-snippet>
</div>
</body>
</html>