Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
198 lines (180 loc) Β· 7.26 KB
/
Copy pathindex.html
File metadata and controls
198 lines (180 loc) Β· 7.26 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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head><meta charset="UTF-8"><link rel="stylesheet" href="./index.css">
<title>
Customary · Fun as the web used to be
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head><body>
<!-- ----------------------------------------------------------------------- -->
<header class="banner"
style="
display: flex; justify-content: space-around; flex-wrap: wrap; gap: 2em;
">
<div
style="
display: flex; flex-direction: column; align-items: center; gap: 0.5em;
justify-content: space-around">
<div class="logo">
π΅ <span class="logo-text">customary.js</span>
</div>
<div class="tagline">Fun as the web used to be</div>
</div>
<div
style="
display: flex; flex-direction: column; align-items: center;
justify-content: space-evenly; gap: 0.5em;
">
<div class="pitch-caption">Custom Elements:</div>
<div class="pitch-text"
style="
display:flex; gap: 1.5em; align-items: center; text-align: center
">
<div>HTML First.<br><span>π₯</span></div>
<div>Declarative.<br><span>π</span></div>
<div>Buildless.<br><span>β¨</span></div>
<div>View Source.<br><span>π</span></div>
</div>
</div>
</header>
<main class="sections">
<div class="section">
<div class="section-header">
<p class="section-header-title">
π₯ HTML First π΅
</p>
<p class="section-tagline">When a quick web page is all you need.</p>
</div>
<div class="exhibit">
<div class="exhibit-side-by-side">
<view-source source="./pages/html-first/index.html"></view-source>
<iframe class="exhibit-preview preview-html-first"
src="pages/html-first/index.html"></iframe>
</div>
</div>
</div>
<div class="section">
<div class="section-header">
<p class="section-header-title">
π Declarative π΅
</p>
<p class="section-tagline">Keep it simple, even when your page gets complex.</p>
</div>
<div class="exhibit">
<div class="exhibit-side-by-side">
<iframe class="exhibit-preview preview-declarative"
src="pages/declarative/index.html"></iframe>
<view-source source="./pages/declarative/index.html"></view-source>
</div>
</div>
</div>
<div class="section">
<div class="section-header">
<p class="section-header-title">
β¨ Buildless π΅
</p>
<p class="section-tagline">Websites with instant gratification. Reload and upload: what you see is what you get.</p>
</div>
<div class="exhibit">
<div class="exhibit-above-and-below">
<iframe class="exhibit-preview preview-buildless"
src="pages/buildless/index.html"></iframe>
<view-source source="./pages/buildless/index.html"></view-source>
</div>
</div>
</div>
<div class="section">
<div class="section-header">
<p class="section-header-title">
π View Source π΅
</p>
<p class="section-tagline">Visit page. Love it. Right click. View source. Copy it. Use it... <i>Learn.</i></p>
<p><b>Fun as the web used to be.</b></p>
</div>
<div class="exhibit">
<div class="exhibit-side-by-side"
style="display: flex; gap: 2em; justify-content: space-evenly">
<div style="text-align: center">
<p style="font-size: small"><a href="pages/html-first/index.html" target="_blank">html-first/index.html</a></p>
<iframe class="exhibit-preview preview-html-first"
src="pages/html-first/index.html"></iframe>
</div>
<div style="text-align: center">
<p style="font-size: small"><a href="pages/declarative/index.html" target="_blank">declarative/index.html</a></p>
<iframe class="exhibit-preview preview-declarative"
src="pages/declarative/index.html"></iframe>
</div>
<div style="text-align: center">
<p style="font-size: small"><a href="pages/buildless/index.html" target="_blank">buildless/index.html</a></p>
<iframe class="exhibit-preview preview-buildless"
src="pages/buildless/index.html"></iframe>
</div>
</div>
</div>
</div>
</main>
<footer class="banner">
<div>
<a href="https://github.com/customaryjs" target="_blank">
π΅ Customary on GitHub
<img alt="GitHub logo" style="width: 22px; height: auto" src="images/Octicons-mark-github.svg">
</a>
</div>
<div>
<a href="https://customaryjs.github.io/customary-cookbook/" target="_blank">
π΅π³ The Customary Cookbook
</a>
</div>
<div>
π΅ Built with
<a href="https://lit.dev/" target="_blank">
Lit
<img alt="Lit logo" style="width: 16px; height: auto" src="images/lit.svg">
</a>
</div>
<div>
π΅ Made with ♥ by
<a href="https://github.com/arboliveira/" target="_blank">Arboπ€</a>
</div>
</footer>
<!-- ----------------------------------------------------------------------- -->
<template data-customary-name="view-source">
<style>code {font-size: 16px}</style>
<link rel="stylesheet" href="./dependencies/highlight.js/styles/idea.min.css">
<pre><code class="language-html" id="source_html"></code></pre>
</template>
<!-- ----------------------------------------------------------------------- -->
<script type="module">
/**
* @type {CustomaryDeclaration}
*/
globalThis['customary:view-source'] = {
config: {
attributes: ['source', 'code'],
/* the website root ships no ico, so say so */
favicon: {detect: true, ico: {detect: false}},
},
hooks: {
website: {root: {import_meta: import.meta}},
changes: {'source': on_source_changed, 'code': on_code_changed}
}
};
import highlight from './dependencies/highlight.js/core.min.js';
import html from './dependencies/highlight.js/languages/xml.js';
highlight.registerLanguage('html', html);
async function on_source_changed(el, source) {
if (!source) return;
const response = await fetch(source);
const text = await response.text();
el.code = text.split('<body>')[1].split('</body>')[0].slice(2);
}
async function on_code_changed(el, code) {
const codeElement = el.shadowRoot.getElementById("source_html");
codeElement.textContent = code;
delete codeElement.dataset.highlighted;
highlight.highlightElement(codeElement);
}
</script>
<script type="module">import './customary.mjs'</script>
<!-- ----------------------------------------------------------------------- -->
</body></html>