Still very much a work in progress. Timing needs some work...
A Pen by Riley Shaw on CodePen.
h1#flasher | |
p Here I am lying in my bed, wishing I had a cigarette for dramatic effect, but I quit smoking years ago. It was much more fun before I missed out on dying, thanks to a tiny group of malignant cells in my brain. I have amazing health insurance, so paying for the rounds of radiation and chemotherapy weren’t bank account killers, but I don’t recommend having cancer in an extremely hard to reach area of your body, or generally at all. Hospital food sucks. Hospitals suck. Against doctor’s orders, I went to Africa, taking my oral chemo drugs with me, nauseated and in pain 99% of the time. (This was before Breaking Bad started, so along with my limited grasp of organic chemistry, starting a methamphetamine empire wasn’t on my to-do list.) But it was a great way to quit smoking, quit drinking (for a while), and quit snorting things up my nose forever. | |
p Then there’s the epilepsy. Oh the epilepsy, my friend and foe! Believe me, you don’t get Joy Division and Ian Curtis hanging himself from a clothesline until you’ve hit rock bottom with constant seizures and a major depressive disorder. That was a fun decade, hiding my symptoms by drinking in excess, my contempt for the field of neurology, and having to explain my life history dozens of times. Living doesn’t get any better than the trial and error method of solving a medical problem with powerful anticonvulsants and their equally powerful side effects. Red Bull could very well kill me. Flying an airplane alone, swimming, and bathing are all prohibited by law or at least strongly advised against. Most importantly, I must always check with my doctor if my heart is healthy enough for sexual activity. That has nothing to do with any medical condition I have, but I do that out of habit because he won’t give me a prescription for Cialis, the thirty-six hour erection medicine. (I don’t have a problem with that; I just want an erection for thirty-six hours to send the best Snapchat Story EVER.) | |
p Those are just the two ways I’ll most likely end up dying, statistically speaking. I wake up with them every morning, and they join me in bed every night. I no longer fear what they end up doing to my body and mind, or when I’ll eventually find out the answer to Pascal’s Wager. (I’m betting against.) | |
button#faster faster | |
button#slower slower |
speed = 160 | |
pause = speed | |
pausers = /[,;.!?]/ | |
words = [] | |
cycle = (el, seq, i = 0) -> | |
word = seq[i %= seq.length] | |
el.text(word) | |
next = speed + if pausers.test word.slice(-1) then pause else 0 | |
setTimeout(cycle, next, el, seq, ++i) | |
$('p').each (i) -> | |
words = words.concat $(this).text().split ' ' | |
$(this).hide() | |
cycle $('h1'), words | |
$('#faster').click () -> | |
pause = speed -= 10 | |
$('#slower').click () -> | |
pause = speed += 10 |
Still very much a work in progress. Timing needs some work...
A Pen by Riley Shaw on CodePen.
@import "compass" | |
$size: 120px | |
$background: #061628 | |
$color: #aaff88 | |
html | |
background: $background | |
h1 | |
position: fixed | |
top: 50% | |
height: $size | |
line-height: $size | |
margin-top: -$size/2 | |
width: 100% | |
text-align: center | |
font-size: $size | |
color: $color | |
button | |
height: 40px | |
width: 80px | |
margin: 20px | |
float: right |