Edit meme creation

This commit is contained in:
Bruno Rybársky 2024-05-16 10:03:26 +02:00
parent 1e526fd38a
commit 5a4c9ef839
3 changed files with 20 additions and 9 deletions

@ -202,6 +202,13 @@ async function togglearticlecreate() {
articleContainerElement.classList.toggle("hidden");
}
async function togglememecreate() {
"use strict";
let memeContainerElement = document.getElementById("memecreatecontainer");
memeContainerElement.classList.toggle("hidden");
}
async function renderarticles() {
"use strict";
let template = document.querySelector('template[data-template-name="article"]').innerHTML;

@ -1,9 +1,12 @@
<form id="memeAddForm">
<div id="memecreateForm" class="hidden">
<div id="memecreate">
<label for="meme_title_input">Názov meme-u: </label>
<input type="text" id="meme_title_input"/>
<label for="meme_text_input">Text meme-u: </label>
<input type="text" id="meme_text_input"/>
<textarea id="memebodyinput" placeholder="meme Body" rows="10" cols="80"></textarea><br>
<label for="meme_image_input">Obrázok meme-u</label>
<select id="meme_image_input"></select>
<input type="button" value="Pridať meme" onclick="addMeme()"/>
</form>
<button type="button" value="Pridať meme" onclick="addMeme()"/>
</div>
</div>

@ -1,6 +1,7 @@
<header>
<h1 class="title">Adlerka Memes</h1>
<p>Skoro, ako <a href="https://reddit.com/r/adlerka" target="_blank">r/adlerka</a>, ale lepšie.</p>
<button id="memecreateopen" onclick="togglememecreate()"><i class="ri-add-circle-line"></i></button>
<hr>
</header>
<main>