Due to a configuration error the site was inaccessible or severely diminished the last few days. I was chatting with the host for hours last night trying to get things fixed. Today I gave up and deleted the entire site and configurations thinking I had backed up everything.
Well I cleared out everything and did a fresh install. We are back and working 90%. There are two recent posts that got purged, I will recreate them.
Inserts the value of opacity ($opacity) into the HTML
JavaScript
<divstyle="opacity:{$opacity}">{phraseText}</div>
Full Code
Svelte
<script>import { tweened } from"svelte/motion";letduration = 1000;letphraseText = "Phrase Generator";letphrases = ["1.. 2.. 3.. blast off!","Huston, we have a problem!","It's going to blow!","Dammit Jim, I'm a doctor not a programmer!","I think you should sit down for this...","I can't do that Dave!","Please don't press the any key!", ];constopacity = tweened(1, {duration:duration,delay:0, });constgetPhrase = () => {returnphrases[Math.floor(Math.random() * phrases.length)]; };constchangePhrase = () => {opacity.set(0);setTimeout(() => {phraseText = getPhrase();opacity.set(1); }, duration); };</script><divstyle="opacity:{$opacity}">{phraseText}</div><buttonon:click={() => {changePhrase(); }}>Change Phrase</button>
A simple looking game to play but the code got a little complex when generating the board. You see there are combinations of tiles that are unwinnable. (I know seems strange, but true).
Not just any clock! A floating clock that will stay above other windows and features a stopwatch and a countdown timer! Written in NodeJS it makes use of the Electron library to offer an platform independent animated GUI interface.