summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--static/poems.js145
-rw-r--r--static/script.js9
2 files changed, 153 insertions, 1 deletions
diff --git a/static/poems.js b/static/poems.js
index 6086ed2..52ecbbf 100644
--- a/static/poems.js
+++ b/static/poems.js
@@ -237,6 +237,151 @@ Faint as shed flowers, the attenuated dream.
`,
"link": "http://www.rossettiarchive.org/docs/sonnets.lcms.rad.html#21-1871",
},
+ {
+ },
+ {
+ },
+ {
+ },
+ {
+ },
+ {
+ },
+ {
+ },
+ {
+ "line": "The art of losing isnt hard to master".split(' '),
+ "scansion": 'x / x /x /x / x /x',
+ "title": "One Art",
+ "collection": null,
+ "author": "Elizabeth Bishop",
+ "meter": "hendecasyllabic",
+ "ctx": `
+The art of losing isn’t hard to master;
+so many things seem filled with the intent
+to be lost that their loss is no disaster.
+`,
+ "link": "https://www.poetryfoundation.org/poems/47536/one-art",
+ },
+ {
+ "line": "His soul stretched tight across the skies".split(' '),
+ "scansion": ['x', '/', 'x', '/', 'x/', 'x', '/'],
+ "title": "Preludes",
+ "collection": null,
+ "author": "T. S. Eliot",
+ "meter": "iambic tetrameter",
+ "ctx": `
+His soul stretched tight across the skies
+That fade behind a city block,
+Or trampled by insistent feet
+At four and five and six o’clock;
+And short square fingers stuffing pipes,
+And evening newspapers, and eyes
+Assured of certain certainties,
+The conscience of a blackened street
+Impatient to assume the world.
+`,
+ "link": "https://www.poetryfoundation.org/poems/44214/preludes-56d22338dc954",
+ },
+ {
+ "line": "Or emptied some dull opiate to the drains".split(' '),
+ "scansion": ['x', '/x', '/', 'x', '/x', '/', 'x', '/'],
+ "title": "Ode to a Nightingale",
+ "collection": null,
+ "author": "John Keats",
+ "meter": "iambic pentameter",
+ "ctx": `
+My heart aches, and a drowsy numbness pains
+ My sense, as though of hemlock I had drunk,
+Or emptied some dull opiate to the drains
+ One minute past, and Lethe-wards had sunk:
+'Tis not through envy of thy happy lot,
+ But being too happy in thine happiness,—
+ That thou, light-winged Dryad of the trees
+ In some melodious plot
+ Of beechen green, and shadows numberless,
+ Singest of summer in full-throated ease.
+`,
+ "link": "https://www.poetryfoundation.org/poems/44479/ode-to-a-nightingale",
+ },
+ {
+ "line": "I think it is of Thee the sparrows sing".split(' '),
+ "scansion": ['x', '/', 'x', '/', 'x', '/', 'x', '/x', '/'],
+ "title": "Sonnet On Hearing The Dies Irae Sung In The Sistine Chapel",
+ "collection": null,
+ "author": "Oscar Wilde",
+ "meter": "iambic pentameter",
+ "ctx": `
+Nay, Lord, not thus! white lilies in the spring,
+Sad olive-groves, or silver-breasted dove,
+Teach me more clearly of Thy life and love
+Than terrors of red flame and thundering.
+The hillside vines dear memories of Thee bring:
+A bird at evening flying to its nest
+Tells me of One who had no place of rest:
+I think it is of Thee the sparrows sing.
+Come rather on some autumn afternoon,
+When red and brown are burnished on the leaves,
+And the fields echo to the gleaner's song,
+Come when the splendid fulness of the moon
+Looks down upon the rows of golden sheaves,
+And reap Thy harvest: we have waited long.
+`,
+ "link": "http://www.literaturecollection.com/a/wilde/343/",
+ },
+ {
+ "line": "Frenetic to be free makes one red stretch for home".split(' '),
+ "scansion": ['x/x', '/', 'x', '/', 'x', '/', 'x', '/', 'x', '/'],
+ "title": "Fifine at the Fair",
+ "collection": null,
+ "author": "Robert Browning",
+ "meter": "alexandrine",
+ "ctx": `
+ Yet morning promised much: for, pitched and slung and reared
+On terrace ’neath the tower, ’twixt tree and tree appeared
+An airy structure; how the pennon from its dome,
+Frenetic to be free, makes one red stretch for home!
+The home far and away, the distance where lives joy,
+The cure, at once and ever, of world and world’s annoy;
+Since, what lolls full in front, a furlong from the booth,
+But ocean-idleness, sky-blue and millpond-smooth?
+`,
+ "link": "https://telelib.com/authors/B/BrowningRobert/verse/misc/fifineatthefair.html",
+ },
+ {
+ "line": "Death feeds on his mute voice and laughs at our despair".split(' '),
+ "scansion": 'x / x / x / x / x / x/',
+ "title": "Adonais",
+ "collection": null,
+ "author": "Percy Bysshe Shelley",
+ "meter": "alexandrine",
+ "ctx": `
+Oh weep for Adonais-he is dead!
+Wake, melancholy Mother, wake and weep!
+Yet wherefore? Quench within their burning bed
+Thy fiery tears, and let thy loud heart keep,
+Like his, a mute and uncomplaining sleep;
+For he is gone where all things wise and fair
+Descend. Oh dream not that the amorous deep
+Will yet restore him to the vital air;
+Death feeds on his mute voice, and laughs at our despair .
+`,
+ "link": "http://www.english.emory.edu/classes/Handbook/Spenserian.html",
+ },
+ {
+ "line": "Rage rage against the dying of the light".split(' '),
+ "scansion": 'x / x/ x /x / x /',
+ "title": "Do not go gentle into that good night",
+ "collection": null,
+ "author": "Dylan Thomas",
+ "meter": "iambic pentameter",
+ "ctx": `
+Do not go gentle into that good night,
+Old age should burn and rave at close of day;
+Rage, rage against the dying of the light.
+`,
+ "link": "https://poets.org/poem/do-not-go-gentle-good-night",
+ },
]
/*
{
diff --git a/static/script.js b/static/script.js
index 0de93ad..70c17d1 100644
--- a/static/script.js
+++ b/static/script.js
@@ -34,7 +34,14 @@ function renderWord(word, wordIdx, guess, score, offset) {
var typ = guess ? 'solbox' : 'entrybox'
els.push(`<div data-word="${wordIdx}" data-word-offset="${c}" data-offset="${c+offset}" class="box ${typ} ${charclass}">${val}</div>`)
}
- var scansion = renderScansion(challenge.scansion[wordIdx])
+
+ if (typeof challenge.scansion === "string") {
+ var fullScansion = challenge.scansion.split(' ')
+ } else {
+ var fullScansion = challenge.scansion
+ }
+
+ var scansion = renderScansion(fullScansion[wordIdx])
var scansionBox = guess ? '' : `<div class="scansion-box"><span class="scansion">${scansion}</span></div>`
return `<div class="word">${scansionBox}${els.join('')}</div>`
}