-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
360 lines (312 loc) · 9.96 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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
<!doctype html>
<html>
<head>
<title>Element CSS</title>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1">
<link rel="stylesheet" href="element.css">
<script src="element.js"></script>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/styles/sunburst.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/highlight.min.js"></script>
</head>
<body>
<header>
<h1>Element CSS</h1>
<strong>Saner defaults for HTML elements.</strong>
</header>
<p>
Element is a CSS design / framework that only requires simple HTML
elements for building a site. In contrast to most design frameworks that use a lot of nested
<code><div></code> elements and inline classes, Element does away with that,
making it quicker and easier to create decent-looking static web sites from
scratch that are easy to edit and manage with just a text editor.
</p>
<p>
Think of it as a "Markdown for HTML", or "saner defaults for HTML elements".
</p>
<p>
Improvements to this project are welcome. If you have any ideas or code changes,
please feel free to <a href="https://github.com/neocities/element">chime in</a>.
Pull requests welcome!
</p>
<a name="examples"></a>
<h2>Examples</h2>
<g-row>
<g-col>
<h3>Grid Column 1</h3>
<p>
Inspired by <a href="http://chrisnager.github.io/ungrid/">ungrid</a>, Element CSS wires up custom element <code><g-row></code> to be a row
and <code><g-col></code> to be a column. It's an easy, auto-sized, responsive grid that Just Works, and supports the upcoming HTML5 <a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/Custom_Elements">custom elements</a> spec.
</p>
</g-col>
<g-col>
<h3>Grid Column 2</h3>
<p>
I've had twelve years to think about it. And if I had it to do over again, I would have grabbed the phaser and pointed it
at you instead of them.
</p>
</g-col>
</g-row>
<xmp>
<g-row>
<g-col>
<h3>Column</h3>
<p>I'm the first column!</p>
</g-col>
<g-col>
<h3>Another Column</h3>
<p>I'm the second column!</p>
</g-col>
<g-col style="width: 20%">
<h3>Smaller</h3>
<p>I'm grid 3, but a lot smaller than the others.</p>
</g-col>
</g-row>
</xmp>
<g-row>
<g-col>
<h3>Headers</h3>
<h1>H1 Header</h1>
<h2>H2 Header</h2>
<h3>H3 Header</h3>
<h4>H4 Header</h4>
<h5>H5 Header</h5>
<h6>H6 Header</h6>
<xmp>
<h3>Headers</h3>
<h1>H1 Header</h1>
<h2>H2 Header</h2>
<h3>H3 Header</h3>
<h4>H4 Header</h4>
<h5>H5 Header</h5>
<h6>H6 Header</h6>
</xmp>
</g-col>
<g-col style="width: 70%">
<h3>Images</h3>
<p>Oversized images are auto-resized to fit the column:</p>
<img src="harbor.jpg">
<xmp>
<h3>Images</h3>
<p>Oversized images are auto-resized to fit the column:</p>
<img src="harbor.jpg">
</xmp>
</g-col>
</g-row>
<g-row>
<g-col>
<h3>Ordered List</h3>
<ol>
<li>Blue</li>
<li>Green</li>
<li>Red</li>
</ol>
<xmp>
<ol>
<li>Blue</li>
<li>Green</li>
<li>Red</li>
</ol>
</xmp>
</g-col>
<g-col>
<h3>Unordered List</h3>
<ul>
<li>Blue</li>
<li>Green</li>
<li>Red</li>
</ul>
<xmp>
<ul>
<li>Blue</li>
<li>Green</li>
<li>Red</li>
</ul>
</xmp>
</g-col>
<g-col style="width: 50%">
<center><h3>Table</h3></center>
<table>
<tr>
<th>Name</th>
<th>Instrument</th>
</tr>
<tr>
<td>Data</td>
<td>Violin</td>
</tr>
<tr>
<td>Riker</td>
<td>Trombone</td>
</tr>
</table>
<xmp>
<center><h3>Table</h3></center>
<table>
<tr>
<th>Name</th>
<th>Instrument</th>
</tr>
<tr>
<td>Data</td>
<td>Violin</td>
</tr>
<tr>
<td>Riker</td>
<td>Trombone</td>
</tr>
</table>
</xmp>
</g-col>
</g-row>
<g-row>
<g-col>
<h3>Code</h3>
<p>
<code><code></code> elements used in a <code><p></code> will be inline-block: <code>echo('hello world!')</code>. Code tags
outside of a <code><p></code> will be blocks, with code indenting automatically fixed (no <code><pre></code> indenting gymnastics needed).
</p>
<xmp>
<code>
const user = {
name: 'Commander Riker',
username: 'hotjazzhotternights1337'
}
console.log(user.name)
</code>
</xmp>
<p>
If you need to embed HTML code examples, you can use the <code><xmp></code> tag, which makes it so you don't need to encode escapes.
Sadly, the HTML5 spec is trying to obsolete the <code><xmp></code> tag even though it's the only way to make this work,
but all browsers seem to be supporting it anyways. Use at your own risk.
</p>
<xmp>
<!doctype html>
<html>
<head>
<title>Hello!</title>
</head>
<body>
<h1>I didn't have to escape any of this (inspect the source code).</h1>
</body>
</html>
</xmp>
<p>
If you want syntax highlighting, just embed <a href="https://highlightjs.org/">highlight.js</a> and the highlighting style
you want and it's automatically configured.
</p>
</g-col>
</g-row>
<g-row>
<g-col>
<h3>Forms</h3>
<form>
<label>Email</label>
<input name="email" type="text" placeholder="Email">
<label>What do you think?</label>
<textarea name="comments" rows="5" cols="30"></textarea>
<label>State</label>
<select name="state">
<option>OR</option>
<option>MN</option>
<option>CA</option>
</select>
<label>
<input name="remember" type="checkbox" value="1"> Remember me
</label>
<p>Favorite Color?</p>
<label>
<input name="color" type="radio" value="red" checked> Red
</label>
<label>
<input name="color" type="radio" value="blue"> Blue
</label>
<button>Submit</button>
</form>
</g-col>
<g-col style="width: 70%">
<xmp>
<h3>Forms</h3>
<form>
<label>Email</label>
<input name="email" type="text" placeholder="Email">
<label>What do you think?</label>
<textarea name="comments" rows="5" cols="30"></textarea>
<label>State</label>
<select name="state">
<option>OR</option>
<option>MN</option>
<option>CA</option>
</select>
<label>
<input name="remember" type="checkbox" value="1"> Remember me
</label>
<p>Favorite Color?</p>
<label>
<input name="color" type="radio" value="red" checked> Red
</label>
<label>
<input name="color" type="radio" value="blue"> Blue
</label>
<button>Submit</button>
</form>
</xmp>
</g-col>
</g-row>
<a name="getstarted"></a>
<h2>How to Use</h2>
<p>Use this template to get started:</p>
<xmp>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://elementcss.neocities.org/dist/element-0.2.0.min.css">
<script src="https://elementcss.neocities.org/dist/element-0.2.0.min.js"></script>
<title>Hello!</title>
</head>
<body>
<header>
<nav>
<a href="one.html">Link One</a>
<a href="two.html">Link Two</a>
</nav>
<h1>Site Name</h1>
<strong>Subtitle for site</strong>
</header>
<p>Okay, you're all set!</p>
</body>
</html>
</xmp>
<p>If you want to use code syntax highlighting, use this:</p>
<xmp>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://elementcss.neocities.org/dist/element-0.2.0.min.css">
<script src="https://elementcss.neocities.org/dist/element-0.2.0.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/styles/sunburst.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/highlight.min.js"></script>
<title>Hello!</title>
</head>
<body>
<header>
<nav>
<a href="one.html">Link One</a>
<a href="two.html">Link Two</a>
</nav>
<h1>Site Name</h1>
<strong>Subtitle for site</strong>
</header>
<p>Okay, you're all set!</p>
</body>
</html>
</xmp>
<h2>Special Thanks</h2>
The CSS for this project is heavily based on the excellent <a href="https://github.com/sindresorhus/github-markdown-css">github-markdown-css</a>.
<footer>
<p>Element CSS: A <a href="https://neocities.org">Neocities</a> project.</p>
</footer>
</body>
</html>