index.html 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <title>Element CSS</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="initial-scale=1">
  7. <link rel="stylesheet" href="element.css">
  8. <script src="element.js"></script>
  9. <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/styles/sunburst.min.css">
  10. <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/highlight.min.js"></script>
  11. </head>
  12. <body>
  13. <header>
  14. <h1>Element CSS</h1>
  15. <strong>Saner defaults for HTML elements.</strong>
  16. </header>
  17. <p>
  18. Element is a CSS design / framework that only requires simple HTML
  19. elements for building a site. In contrast to most design frameworks that use a lot of nested
  20. <code>&lt;div&gt;</code> elements and inline classes, Element does away with that,
  21. making it quicker and easier to create decent-looking static web sites from
  22. scratch that are easy to edit and manage with just a text editor.
  23. </p>
  24. <p>
  25. Think of it as a "Markdown for HTML", or "saner defaults for HTML elements".
  26. </p>
  27. <p>
  28. Improvements to this project are welcome. If you have any ideas or code changes,
  29. please feel free to <a href="https://github.com/neocities/element">chime in</a>.
  30. Pull requests welcome!
  31. </p>
  32. <a name="examples"></a>
  33. <h2>Examples</h2>
  34. <g-row>
  35. <g-col>
  36. <h3>Grid Column 1</h3>
  37. <p>
  38. Inspired by <a href="http://chrisnager.github.io/ungrid/">ungrid</a>, Element CSS wires up custom element <code>&lt;g-row&gt;</code> to be a row
  39. and <code>&lt;g-col&gt;</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.
  40. </p>
  41. </g-col>
  42. <g-col>
  43. <h3>Grid Column 2</h3>
  44. <p>
  45. 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
  46. at you instead of them.
  47. </p>
  48. </g-col>
  49. </g-row>
  50. <xmp>
  51. <g-row>
  52. <g-col>
  53. <h3>Column</h3>
  54. <p>I'm the first column!</p>
  55. </g-col>
  56. <g-col>
  57. <h3>Another Column</h3>
  58. <p>I'm the second column!</p>
  59. </g-col>
  60. <g-col style="width: 20%">
  61. <h3>Smaller</h3>
  62. <p>I'm grid 3, but a lot smaller than the others.</p>
  63. </g-col>
  64. </g-row>
  65. </xmp>
  66. <g-row>
  67. <g-col>
  68. <h3>Headers</h3>
  69. <h1>H1 Header</h1>
  70. <h2>H2 Header</h2>
  71. <h3>H3 Header</h3>
  72. <h4>H4 Header</h4>
  73. <h5>H5 Header</h5>
  74. <h6>H6 Header</h6>
  75. <xmp>
  76. <h3>Headers</h3>
  77. <h1>H1 Header</h1>
  78. <h2>H2 Header</h2>
  79. <h3>H3 Header</h3>
  80. <h4>H4 Header</h4>
  81. <h5>H5 Header</h5>
  82. <h6>H6 Header</h6>
  83. </xmp>
  84. </g-col>
  85. <g-col style="width: 70%">
  86. <h3>Images</h3>
  87. <p>Oversized images are auto-resized to fit the column:</p>
  88. <img src="harbor.jpg">
  89. <xmp>
  90. <h3>Images</h3>
  91. <p>Oversized images are auto-resized to fit the column:</p>
  92. <img src="harbor.jpg">
  93. </xmp>
  94. </g-col>
  95. </g-row>
  96. <g-row>
  97. <g-col>
  98. <h3>Ordered List</h3>
  99. <ol>
  100. <li>Blue</li>
  101. <li>Green</li>
  102. <li>Red</li>
  103. </ol>
  104. <xmp>
  105. <ol>
  106. <li>Blue</li>
  107. <li>Green</li>
  108. <li>Red</li>
  109. </ol>
  110. </xmp>
  111. </g-col>
  112. <g-col>
  113. <h3>Unordered List</h3>
  114. <ul>
  115. <li>Blue</li>
  116. <li>Green</li>
  117. <li>Red</li>
  118. </ul>
  119. <xmp>
  120. <ul>
  121. <li>Blue</li>
  122. <li>Green</li>
  123. <li>Red</li>
  124. </ul>
  125. </xmp>
  126. </g-col>
  127. <g-col style="width: 50%">
  128. <center><h3>Table</h3></center>
  129. <table>
  130. <tr>
  131. <th>Name</th>
  132. <th>Instrument</th>
  133. </tr>
  134. <tr>
  135. <td>Data</td>
  136. <td>Violin</td>
  137. </tr>
  138. <tr>
  139. <td>Riker</td>
  140. <td>Trombone</td>
  141. </tr>
  142. </table>
  143. <xmp>
  144. <center><h3>Table</h3></center>
  145. <table>
  146. <tr>
  147. <th>Name</th>
  148. <th>Instrument</th>
  149. </tr>
  150. <tr>
  151. <td>Data</td>
  152. <td>Violin</td>
  153. </tr>
  154. <tr>
  155. <td>Riker</td>
  156. <td>Trombone</td>
  157. </tr>
  158. </table>
  159. </xmp>
  160. </g-col>
  161. </g-row>
  162. <g-row>
  163. <g-col>
  164. <h3>Code</h3>
  165. <p>
  166. <code>&lt;code&gt;</code> elements used in a <code>&lt;p&gt;</code> will be inline-block: <code>echo('hello world!')</code>. Code tags
  167. outside of a <code>&lt;p&gt;</code> will be blocks, with code indenting automatically fixed (no <code>&lt;pre&gt;</code> indenting gymnastics needed).
  168. </p>
  169. <xmp>
  170. <code>
  171. const user = {
  172. name: 'Commander Riker',
  173. username: 'hotjazzhotternights1337'
  174. }
  175. console.log(user.name)
  176. </code>
  177. </xmp>
  178. <p>
  179. If you need to embed HTML code examples, you can use the <code>&lt;xmp&gt;</code> tag, which makes it so you don't need to encode escapes.
  180. Sadly, the HTML5 spec is trying to obsolete the <code>&lt;xmp&gt;</code> tag even though it's the only way to make this work,
  181. but all browsers seem to be supporting it anyways. Use at your own risk.
  182. </p>
  183. <xmp>
  184. <!doctype html>
  185. <html>
  186. <head>
  187. <title>Hello!</title>
  188. </head>
  189. <body>
  190. <h1>I didn't have to escape any of this (inspect the source code).</h1>
  191. </body>
  192. </html>
  193. </xmp>
  194. <p>
  195. If you want syntax highlighting, just embed <a href="https://highlightjs.org/">highlight.js</a> and the highlighting style
  196. you want and it's automatically configured.
  197. </p>
  198. </g-col>
  199. </g-row>
  200. <g-row>
  201. <g-col>
  202. <h3>Forms</h3>
  203. <form>
  204. <label>Email</label>
  205. <input name="email" type="text" placeholder="Email">
  206. <label>What do you think?</label>
  207. <textarea name="comments" rows="5" cols="30"></textarea>
  208. <label>State</label>
  209. <select name="state">
  210. <option>OR</option>
  211. <option>MN</option>
  212. <option>CA</option>
  213. </select>
  214. <label>
  215. <input name="remember" type="checkbox" value="1"> Remember me
  216. </label>
  217. <p>Favorite Color?</p>
  218. <label>
  219. <input name="color" type="radio" value="red" checked> Red
  220. </label>
  221. <label>
  222. <input name="color" type="radio" value="blue"> Blue
  223. </label>
  224. <button>Submit</button>
  225. </form>
  226. </g-col>
  227. <g-col style="width: 70%">
  228. <xmp>
  229. <h3>Forms</h3>
  230. <form>
  231. <label>Email</label>
  232. <input name="email" type="text" placeholder="Email">
  233. <label>What do you think?</label>
  234. <textarea name="comments" rows="5" cols="30"></textarea>
  235. <label>State</label>
  236. <select name="state">
  237. <option>OR</option>
  238. <option>MN</option>
  239. <option>CA</option>
  240. </select>
  241. <label>
  242. <input name="remember" type="checkbox" value="1"> Remember me
  243. </label>
  244. <p>Favorite Color?</p>
  245. <label>
  246. <input name="color" type="radio" value="red" checked> Red
  247. </label>
  248. <label>
  249. <input name="color" type="radio" value="blue"> Blue
  250. </label>
  251. <button>Submit</button>
  252. </form>
  253. </xmp>
  254. </g-col>
  255. </g-row>
  256. <a name="getstarted"></a>
  257. <h2>How to Use</h2>
  258. <p>Use this template to get started:</p>
  259. <xmp>
  260. <!doctype html>
  261. <html>
  262. <head>
  263. <meta charset="utf-8">
  264. <link rel="stylesheet" href="https://elementcss.neocities.org/dist/element-0.2.0.min.css">
  265. <script src="https://elementcss.neocities.org/dist/element-0.2.0.min.js"></script>
  266. <title>Hello!</title>
  267. </head>
  268. <body>
  269. <header>
  270. <nav>
  271. <a href="one.html">Link One</a>
  272. <a href="two.html">Link Two</a>
  273. </nav>
  274. <h1>Site Name</h1>
  275. <strong>Subtitle for site</strong>
  276. </header>
  277. <p>Okay, you're all set!</p>
  278. </body>
  279. </html>
  280. </xmp>
  281. <p>If you want to use code syntax highlighting, use this:</p>
  282. <xmp>
  283. <!doctype html>
  284. <html>
  285. <head>
  286. <meta charset="utf-8">
  287. <link rel="stylesheet" href="https://elementcss.neocities.org/dist/element-0.2.0.min.css">
  288. <script src="https://elementcss.neocities.org/dist/element-0.2.0.min.js"></script>
  289. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/styles/sunburst.min.css">
  290. <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/highlight.min.js"></script>
  291. <title>Hello!</title>
  292. </head>
  293. <body>
  294. <header>
  295. <nav>
  296. <a href="one.html">Link One</a>
  297. <a href="two.html">Link Two</a>
  298. </nav>
  299. <h1>Site Name</h1>
  300. <strong>Subtitle for site</strong>
  301. </header>
  302. <p>Okay, you're all set!</p>
  303. </body>
  304. </html>
  305. </xmp>
  306. <h2>Special Thanks</h2>
  307. The CSS for this project is heavily based on the excellent <a href="https://github.com/sindresorhus/github-markdown-css">github-markdown-css</a>.
  308. <footer>
  309. <p>Element CSS: A <a href="https://neocities.org">Neocities</a> project.</p>
  310. </footer>
  311. </body>
  312. </html>