Meme generator svelte app that calls imgflip's API and generates different images at the user's request.
User should be able to:
<script>
// You can use the $ to check the state of the object meme changing
import { onMount } from 'svelte';
let meme = {
topText: '',
bottomText: '',
randomImage: 'http://i.imgflip.com/1bij.jpg',
};
// Every time the user types in the input box, the console will log the newly updated object
$: console.log(meme);
</script>
div class="form">
<input type="text" placeholder="Top Text" bind:value={meme.topText} />
<input
type="text"
placeholder="Bottom Text"
bind:value={meme.bottomText}
/>
<button on:click={getMemeImage}>Get a new meme image 🖼</button>
</div>
Clone this repository and install the dependencies...
git clone https://github.com/kevmok/svelte-meme-generator.git my-app
cd my-app
npm install
npm run dev