-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
314 lines (278 loc) · 11.7 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
<!doctype html>
<html>
<head>
<title>Aspen - Filesystem dispatch since 2006</title>
<style>
@font-face {
font-family: 'The Sans-Serif';
src: url('fonts/spartan.eot');
src: url('fonts/spartan.eot?#iefix') format('embedded-opentype'),
url('fonts/spartan.woff2') format('woff2'),
url('fonts/spartan.woff') format('woff'),
url('fonts/spartan.ttf') format('truetype'),
url('fonts/spartan.svg#spartan') format('svg');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'The Serif';
src: url('fonts//prociono.eot');
src: url('fonts//prociono.eot?#iefix') format('embedded-opentype'),
url('fonts//prociono.woff2') format('woff2'),
url('fonts//prociono.woff') format('woff'),
url('fonts//prociono.ttf') format('truetype'),
url('fonts//prociono.svg#prociono') format('svg');
font-weight: normal;
font-style: normal;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font: normal 24px/48px "The Serif";
background: url("img/bg.png") repeat;
}
h2 {
font: bold 2.5vw/2.5vw "The Sans-Serif";
padding: 10vw 0 3vw;
}
pre {
font: normal 18px/22px monospace;
color: #00D844;
background: #000;
border: 2px solid #DCD8CF;
padding: 20px;
border-radius: 10px;
margin: 48px;
overflow: auto;
}
header {
padding: 2vw 5vw;
}
header h1 img {
width: 40vw;
}
header h2 {
position: absolute;
text-align: right;
right: 10vw;
top: 13.8vw;
padding: 0;
}
.frameworks {
position: relative;
border: 0.2vmax solid #190800;
background: white;
top: -12vw;
left: 20vw;
width: 70vw;
box-shadow: 0px 0px 0.4vw #190800;
}
.frameworks h2 {
background: url("img/bg2.png") repeat;
color: #FEE9B0;
padding: 0.75em 4vw 0.5em;
}
.frameworks h2 span {
width: 50%;
float: right;
}
.framework {
position: relative;
display: block;
border-top: 0.1vmax solid #190800;
}
.framework:nth-of-type(1) {
border-top: none;
}
.framework > a {
display: block;
height: 10vw;
border: 0.4vmax solid transparent;
}
.framework > a:hover {
border-color: #FEE9B0;
}
.framework.django > a:hover {
background: radial-gradient(ellipse closest-side at 62% 33%, white, #FEE9B0);
}
.framework.flask > a:hover {
background: radial-gradient(ellipse closest-side at 60% 33%, white, #FEE9B0);
}
.framework.pando > a:hover {
background: radial-gradient(ellipse closest-side at 56% 33%, white, #FEE9B0);
}
.framework img.logo {
position: absolute;
height: 6vw;
left: 4vw;
top: 2vw;
}
.framework span {
font: bold 2.5vw/2.5vw "The Sans-Serif";
display: block;
width: 50%;
float: right;
color: #00E;
padding: 2vw 0 0;
}
.frameworks iframe {
position: absolute;
bottom: 1vw;
left: 50%;
}
.faq {
background: url("img/bg2.png") repeat;
color: #DCD8CF;
margin-top: -17.5vw;
}
.faqround {
background: radial-gradient( ellipse farthest-corner at 33% 33%
, rgba(255,255,255,0.1)
, transparent
);
padding: 10vw 10vw 10vw 20vw;
}
.faq h2 {
color: #FEE9B0;
}
.faq h2:nth-of-type(2) {
padding-top: 8vw;
}
.faq a {
color: #DCD8CF;
}
.dispatch-visual {
position: relative;
width: 100vw;
padding: 0 200px;
margin-left: -200px;
z-index: 1;
height: 507px;
background: url("img/visual.png") 80px 36px no-repeat;
}
.plugins {
padding: 2vw 20vw;
}
.plugin {
}
footer {
padding: 5vw 20vw;
font: normal 1.5vw/1.5vw "The Sans-Serif";
background: url("img/bg2.png") repeat;
color: #DCD8CF;
}
footer a {
color: #DCD8CF;
}
</style>
<script async defer src="https://buttons.github.io/buttons.js"></script>
</head>
<body>
<header>
<h1><img src="img/aspen.svg" alt="Aspen"></h1>
<h2>Filesystem dispatch since 2006</h2>
</header>
<section class="frameworks">
<h2>Framework? <span>Use …</span></h2>
<div class="framework django">
<a href="http://django.aspen.io/" alt="Aspen for Django">
<h3><img src="img/django.svg" alt="Django" class="logo"></h3>
<span>django-aspen</span>
</a>
<a class="github-button"
href="https://github.com/AspenWeb/django-aspen"
data-icon="octicon-star"
data-style="mega"
data-count-href="/AspenWeb/django-aspen/stargazers"
data-count-api="/repos/AspenWeb/django-aspen#stargazers_count"
data-count-aria-label="# stargazers on GitHub"
aria-label="Star AspenWeb/django-aspen on GitHub">Star</a>
</div>
<div class="framework flask">
<a href="http://flask.aspen.io/" alt="Aspen for Flask">
<h3><img src="img/flask.svg" alt="Flask" class="logo"></h3>
<span>Flask-Aspen</span>
</a>
<a class="github-button"
href="https://github.com/AspenWeb/Flask-Aspen"
data-icon="octicon-star"
data-style="mega"
data-count-href="/AspenWeb/Flask-Aspen/stargazers"
data-count-api="/repos/AspenWeb/Flask-Aspen#stargazers_count"
data-count-aria-label="# stargazers on GitHub"
aria-label="Star AspenWeb/Flask-Aspen on GitHub">Star</a>
</div>
<div class="framework pando">
<a href="http://pando.aspen.io/" alt="Pando">
<h3><img src="img/pando.svg" alt="Pando" class="logo"></h3>
<span>Pando</span>
</a>
<a class="github-button"
href="https://github.com/AspenWeb/pando.py"
data-icon="octicon-star"
data-style="mega"
data-count-href="/AspenWeb/pando.py/stargazers"
data-count-api="/repos/AspenWeb/pando.py#stargazers_count"
data-count-aria-label="# stargazers on GitHub"
aria-label="Star AspenWeb/pando.py on GitHub">Star</a>
</div>
</section>
<section class="faq"><div class="faqround">
<h2>What is filesystem dispatch?</h2>
<div class="dispatch-visual">
<p>Path in address bar → path on filesystem. Done.</p>
</div>
<h2>Why should I care?</h2>
<p>You should care about filesystem dispatch if using regular
expressions or decorators or object traversal for dispatch makes
your heart sink and your head hurt.</p>
<h2>What about variable path parts?</h2>
<p>Capture URL path parts with filesystem paths like
<code>www/%year/index.spt</code>.</p>
<h2>What the heck is a <code>*.spt</code> file?</h2>
<p>A so-called “spitfile” is a simplate, a template with a
Python header or two. Here's an example:</p>
<pre style='color:#cfcfc2;background-color:#232629;'>
<span style='color:#27ae60;'>import</span> random
<span style='color:#2980b9;background:#153042;'>[----]</span>
program = request.qs[<span style='color:#f44f4f;'>'program'</span>]
excitement = <span style='color:#f44f4f;'>'!'</span> * random.randint(<span style='color:#f67400;'>1</span>, <span style='color:#f67400;'>10</span>)
<span style='color:#2980b9;background:#153042;'>[----] text/html via jinja2</span>
<span style='color:#dede49;'><h1></span>Greetings, {{ program }}{{ excitement }}<span style='color:#dede49;'></h1></span>
<span style='color:#2980b9;background:#153042;'>[----] text/plain via stdlib_format</span>
Greetings, {program}{excitement}
<span style='color:#2980b9;background:#153042;'>[----] application/json via json_dump</span>
{ "program": program
, "excitement": excitement
}
</pre>
</div></section>
<section class="plugins">
<h2>Editor Support</h2>
<ul>
<li><a href="https://github.com/gratipay/simplate.vim">Vim</a></li>
<li><a href="https://github.com/gratipay/simplates.emacs">Emacs</a></li>
<li><a href="https://github.com/changaco/kate-highlightings/blob/master/simplate.xml">Kate</a></li>
</ul>
<h2>Plugins</h2>
<ul>
<li><a href="https://pypi.python.org/pypi/aspen-jinja2">aspen-jinja2</a></li>
<li><a href="https://pypi.python.org/pypi/aspen-pystache">aspen-pystache</a></li>
<li><a href="https://pypi.python.org/pypi/aspen-sentry">aspen-sentry</a></li>
<li><a href="https://pypi.python.org/pypi/aspen-tornado">aspen-tornado</a></li>
</ul>
</section>
<footer>
© 2006–<script>document.write(new Date().getFullYear());</script>
<a href="https://twitter.com/whit537">Chad Whitacre</a>
& contributors.
MIT.
<a href="https://hackerone.com/aspen">Security</a>.
<a href="https://github.com/AspenWeb/">GitHub</a>.
</footer>
<a href="https://github.com/AspenWeb/"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Visit Aspen on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
</body>
</html>