-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
441 lines (430 loc) · 15.8 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
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="shortcut icon" type="image/x-icon" href="./favicon.ico" />
<title>ParadellEditor</title>
<!-- Google fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Courier+Prime:wght@700&display=swap"
rel="stylesheet"
/>
<!-- Font awesome -->
<script
defer
src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"
></script>
<!-- Bulma stylesheet -->
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css"
/>
<!-- My styles -->
<link rel="stylesheet" href="./style.css" />
</head>
<body>
<div id="app">
<!-- "About" pop-up modal -->
<div class="modal" v-bind:class="{ 'is-active': showModal }">
<div class="modal-background"></div>
<div class="modal-card">
<header class="modal-card-head">
<p class="modal-card-title">About 🤔</p>
<button
class="delete"
aria-label="close"
@click="showModal = false"
></button>
</header>
<section class="modal-card-body content">
<p>
The paradelle is a very rigid, modern poetic form. According to
<a target="_blank" href="https://en.wikipedia.org/wiki/Paradelle"
>Wikipedia</a
>:
</p>
<blockquote>
Billy Collins originally said the paradelle was invented in
11th-century France, but he later admitted that he invented it
himself to parody strict forms of poetry, particularly the
<a target="_blank" href="https://en.wikipedia.org/wiki/Villanelle"
>villanelle</a
>. His sample paradelle, "Paradelle for Susan" (c. 1997), was
seemingly intentionally terrible, completing the final stanza with
the line "Darken the mountain, time and find was my into it was
with to to".
</blockquote>
<p>
Despite it's satirical beginnings, people have gone on to write
some very beautiful paradelles. The tricky part is that you must
re-use words introduced in previous couplets and stanzas in later
couplets and stanzas. This editor exists to help you keep track of
the words you need to use.
</p>
Here are the
<a
target="_blank"
href="https://www.writersdigest.com/write-better-poetry/poetic-form-paradelle"
>complete rules</a
>:
<ul>
<li>The paradelle is a 4-stanza poem.</li>
<li>Each stanza consists of 6 lines.</li>
<li>
For the first 3 stanzas: the 1st and 2nd lines should be the
same; the 3rd and 4th lines should also be the same; and the 5th
and 6th lines should be composed of all the words from the 1st
and 3rd lines and only the words from the 1st and 3rd lines.
</li>
<li>
The final stanza should be composed of all the words in the 5th
and 6th lines of the first three stanzas and only the words from
the 5th and 6th lines of the first three stanzas.
</li>
</ul>
</section>
</div>
</div>
<section class="section">
<div class="container">
<!-- Control Buttons -->
<nav class="level">
<!-- Left side -->
<div class="level-left">
<div class="level-item">
<a class="title" href=".">
Paradell<span style="color: #6a5acd">Editor</span>
</a>
</div>
</div>
<!-- Right side -->
<div class="level-right">
<p class="level-item">
<a class="button is-danger is-outlined" @click="clearPoemData">
<span>Clear</span>
<span class="icon is-small">
<i class="fas fa-eraser"></i>
</span>
</a>
</p>
<div class="level-item">
<div class="dropdown is-hoverable">
<div class="dropdown-trigger">
<button
class="button is-info is-outlined"
aria-haspopup="true"
aria-controls="dropdown-menu4"
>
<span>Load Example</span>
<span class="icon is-small">
<i class="fas fa-angle-down" aria-hidden="true"></i>
</span>
</button>
</div>
<div class="dropdown-menu" id="dropdown-menu" role="menu">
<div class="dropdown-content">
<a class="dropdown-item" @click="loadRandom()">
Load random
</a>
<hr class="dropdown-divider" />
<a
v-for="(example, index) in examples"
class="dropdown-item"
@click="this.load(example);"
>
{{ example.split("\n")[0].slice(1,-1) }}
</a>
</div>
</div>
</div>
</div>
<p class="level-item">
<a class="button is-info is-outlined" @click="showModal = true">
<span>About</span>
<span class="icon is-small">
<i class="fas fa-question"></i>
</span>
</a>
</p>
<p class="level-item">
<a class="button is-info is-outlined" @click="share">
<span>Share Poem</span>
<span class="icon is-small">
<i class="fas fa-share"></i>
</span>
</a>
</p>
</div>
</nav>
<!-- Notifications -->
<div class="block" v-if="notification">
<div class="notification is-warning is-light">
<button class="delete" @click="notification=false;"></button>
<span v-html="notification"></span>
</div>
</div>
<!-- Navigation Tabs -->
<div class="tabs is-boxed">
<ul>
<li
:class="[mode === 'compose' ? 'is-active' : '']"
@click="mode='compose'"
>
<a>
<span class="icon is-small"
><i class="fas fa-feather" aria-hidden="true"></i
></span>
<span>Compose</span>
</a>
</li>
<li
:class="[mode === 'view' ? 'is-active' : '']"
@click="mode='view'"
>
<a>
<span class="icon is-small"
><i class="fas fa-book-open" aria-hidden="true"></i
></span>
<span>Read</span>
</a>
</li>
<li
:class="[mode === 'load' ? 'is-active' : '']"
@click="mode='load'"
>
<a>
<span class="icon is-small"
><i class="fas fa-paste" aria-hidden="true"></i
></span>
<span>Paste</span>
</a>
</li>
</ul>
</div>
<!-- Compose -->
<div v-show="mode === 'compose'">
<!-- Title & Author -->
<div class="columns">
<div class="column is-half">
<div class="box has-background-white-ter">
<input
class="input is-static title-input"
type="text"
v-model="title"
placeholder="Title"
/>
<input
class="input is-static author-input"
type="text"
v-model="author"
placeholder="Author"
/>
</div>
</div>
</div>
<!-- First Stanza -->
<div class="columns">
<div class="column">
<div class="box">
<input
class="input is-static"
type="text"
v-model="l1"
placeholder="Click here to begin writing the first stanza..."
/>
<input
class="input is-static"
type="text"
v-model="l1"
disabled
/>
<input class="input is-static" type="text" v-model="l3" />
<input
class="input is-static"
type="text"
v-model="l3"
disabled
/>
<input class="input is-static" type="text" v-model="l5" />
<input class="input is-static" type="text" v-model="l6" />
</div>
</div>
<div class="column">
<stanza-tags :upper-lines="[l1, l3]" :lower-lines="[l5, l6]">
</stanza-tags>
</div>
</div>
<!-- Second Stanza -->
<div class="columns">
<div class="column">
<div class="box">
<input
class="input is-static"
type="text"
v-model="l7"
placeholder="Second stanza..."
/>
<input
class="input is-static"
type="text"
v-model="l7"
disabled
/>
<input class="input is-static" type="text" v-model="l9" />
<input
class="input is-static"
type="text"
v-model="l9"
disabled
/>
<input class="input is-static" type="text" v-model="l11" />
<input class="input is-static" type="text" v-model="l12" />
</div>
</div>
<div class="column">
<stanza-tags :upper-lines="[l7, l9]" :lower-lines="[l11, l12]">
</stanza-tags>
</div>
</div>
<!-- Third Stanza -->
<div class="columns">
<div class="column">
<div class="box">
<input
class="input is-static"
type="text"
v-model="l13"
placeholder="Third stanza..."
/>
<input
class="input is-static"
type="text"
v-model="l13"
disabled
/>
<input class="input is-static" type="text" v-model="l15" />
<input
class="input is-static"
type="text"
v-model="l15"
disabled
/>
<input class="input is-static" type="text" v-model="l17" />
<input class="input is-static" type="text" v-model="l18" />
</div>
</div>
<div class="column">
<stanza-tags
:upper-lines="[l13, l15]"
:lower-lines="[l17, l18]"
>
</stanza-tags>
</div>
</div>
<!-- Fourth Stanza -->
<div class="columns">
<div class="column">
<div class="box">
<input
class="input is-static"
type="text"
v-model="l19"
placeholder="Final stanza..."
/>
<input class="input is-static" type="text" v-model="l20" />
<input class="input is-static" type="text" v-model="l21" />
<input class="input is-static" type="text" v-model="l22" />
<input class="input is-static" type="text" v-model="l23" />
<input class="input is-static" type="text" v-model="l24" />
</div>
</div>
<div class="column">
<stanza-tags
:upper-lines="[l1, l3, l7, l9, l13, l15]"
:lower-lines="[l19, l20, l21, l22, l23, l24]"
>
</stanza-tags>
</div>
</div>
</div>
<!-- View Mode -->
<div v-show="mode === 'view'">
<div class="field">
<div class="control">
<textarea
class="textarea viewarea"
v-model="wholePoem"
rows="30"
readonly
></textarea>
</div>
</div>
</div>
<!-- Load Mode -->
<div v-show="mode === 'load'">
<div class="columns">
<!-- left side (input window) -->
<div class="column">
<div class="box">
<div class="field">
<div class="control">
<textarea
class="textarea loadarea"
v-model="poemInput"
rows="30"
:placeholder="getRandomExample()"
></textarea>
</div>
</div>
</div>
</div>
<!-- right side (description) -->
<div class="column">
<div class="box">
<div class="field">
<p class="alt-style">
If you want to load a pre-written paradelle into the
editor, you can copy/paste it here, then press "load
input." Make sure to follow the structure demonstrated in
the text area.
</p>
</div>
<div class="field">
<button
class="button"
@click="loadFromInput(this.poemInput)"
:disabled="poemInput === ''"
>
<span>Load Input</span>
<span class="icon is-small">
<i class="fas fa-paste"></i>
</span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- FOOTER -->
<footer class="footer">
<div class="content has-text-centered">
<p>
Created by
<a href="https://dustinmichels.com">Dustin Michels</a>. Updated
2022. Source code
<a href="https://github.com/dustinmichels/paradellEditor">here</a>.
</p>
</div>
</footer>
</div>
<!-- Scripts -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script language="javascript" src="lz-string.min.js"></script>
<script src="./main.js"></script>
</body>
</html>