-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
190 lines (157 loc) · 5.12 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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<title>Prendus Styles</title>
<link rel="icon" href="favicon.png">
<link rel="import" href="bower_components/prendus-styles/prendus-styles.html">
<link rel="import" href="bower_components/prendus-styles/components/prendus-drop-down.html">
<link rel="import" href="bower_components/iron-demo-helpers/demo-snippet.html">
<script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<style is="custom-style" include="prendus-styles">
body {
max-width: 800px;
margin: auto;
padding: 7vw;
}
body > * + * {
margin-top: 20px;
}
.no-demo {
--demo-snippet-demo: {
display: none;
}
}
demo-snippet {
--demo-snippet-code: {
font-size: 1.1em;
font-family: 'Inconsolata', 'Monaco', 'Consolas', 'Courier New', Courier;
}
}
footer {
text-align: center;
}
</style>
</head>
<body>
<h1>Prendus Styling Examples</h1>
<p>This page has several examples of elements you can use in your designs as long as you correctly import prendus-styles. See the <a href="https://github.com/Prendus/style-guide">guidelines</a> for more information.</p>
<h2>Layout</h2>
<h3>Containers</h3>
<h4>Vertical Container</h4>
<p>Default spacing for a vertical container.</p>
<demo-snippet>
<template>
<div class="prendus-vertical-container">
<h4>Header</h4>
<button class="prendus-button">Button</button>
<p>Text</p>
</div>
</template>
</demo-snippet>
<h4>Horizontal Container</h4>
<p>Default spacing for a horizontal container.</p>
<demo-snippet>
<template>
<div class="prendus-horizontal-container">
<button class="prendus-button">Button</button>
<span>Span</span>
<a href="#">Link</a>
</div>
</template>
</demo-snippet>
<h3>Cards</h3>
<p>Instead of using <code><paper-card></code>, you should usually use the Prendus card style.</p>
<demo-snippet class="no-demo">
<template>
<div class="prendus-card">
<!-- CONTENT -->
</div>
</template>
</demo-snippet>
<h2>Buttons</h2>
<h3>General</h3>
<h4>Default</h4>
<p>The default button style. Should be included everywhere a button is used.</p>
<demo-snippet>
<template>
<button class="prendus-button">Default</button>
</template>
</demo-snippet>
<h4>With icons</h4>
<p>Buttons can have icons inside them as well as text. The span element is required.</p>
<demo-snippet>
<template>
<button class="prendus-button">
<iron-icon icon="info-outline"></iron-icon>
<span>Default</span>
</button>
</template>
</demo-snippet>
<h4>Recommended</h4>
<p>Used to recommend an action to the user.</p>
<demo-snippet>
<template>
<button class="prendus-button prendus-button--recommended">Recommended</button>
</template>
</demo-snippet>
<h4>Minor</h4>
<p>Used for closing dialogs or other small actions.</p>
<demo-snippet>
<template>
<button class="prendus-button prendus-button--minor">Minor</button>
</template>
</demo-snippet>
<h4>Destructive</h4>
<p>Used to warn users that the action triggered by the button cannot be undone.</p>
<demo-snippet>
<template>
<button class="prendus-button prendus-button--destructive">Destructive</button>
</template>
</demo-snippet>
<h4>Big</h4>
<p>Used sparingly in calls to action (such as on the home page).</p>
<demo-snippet>
<template>
<button class="prendus-button prendus-button--big">Big</button>
</template>
</demo-snippet>
<h3>Link buttons</h3>
<p>Button tags that need to look like anchor tags. Use sparingly.</p>
<demo-snippet>
<template>
This is some text that has a <button class="prendus-link-button">button</button> in it.
</template>
</demo-snippet>
<h3>Icon buttons</h3>
<p>Additional feedback for icon buttons.</p>
<demo-snippet>
<template>
<paper-icon-button class="prendus-icon-button" icon="info-outline"></paper-icon-button>
</template>
</demo-snippet>
<h2>Drop-downs</h2>
<h3>Generic drop-down</h3>
<p>Used for menus and drop-down selections.</p>
<!-- TODO: currently adding Polymer elements with .ts files requires converting them
to .js files then adding `let exports = {};` so the browser will render it. Look
into a better solution, particularly one that involves automatic transpilation. -->
<demo-snippet>
<template>
<prendus-drop-down button-text="Menu" button-title="Profile and settings">
<a href="#">Profile</a>
<a href="#">Settings</a>
<button on-tap="logOut">Log out</button>
</prendus-drop-down>
</template>
</demo-snippet>
<p>You need to import the <code><prendus-drop-down></code> component in order to use it.</p>
<demo-snippet class="no-demo">
<template>
<link rel="import" href="bower_components/prendus-styles/components/prendus-drop-down.html">
</template>
</demo-snippet>
<footer>Copyright © <script>document.write(new Date().getFullYear());</script> Prendus</footer>
</body>
</html>