feat: update landing pages

This commit is contained in:
Damillora 2025-02-23 07:15:13 +00:00
parent 2b5e80e20f
commit 6cf71e4bdc
3 changed files with 11 additions and 6 deletions

View File

@ -38,7 +38,7 @@
}); });
</script> </script>
<section class="hero is-primary is-fullheight-with-navbar"> <section class="hero is-fullheight-with-navbar">
<div class="hero-body"> <div class="hero-body">
<div class="container"> <div class="container">
<div class="columns is-centered"> <div class="columns is-centered">

View File

@ -10,7 +10,7 @@
</script> </script>
<section class="hero is-primary is-fullheight-with-navbar"> <section class="hero is-fullheight-with-navbar">
<div class="hero-body"> <div class="hero-body">
{@render children?.()} {@render children?.()}
</div> </div>

View File

@ -25,15 +25,20 @@
return str; return str;
}; };
let deleteMenuShown = $state(false);
const onSubmitEdit = () => {
getData();
editMenuShown = false;
}
onMount(() => { onMount(() => {
getData(); getData();
}); });
let deleteMenuShown = $state(false);
const deletePost = async (e) => { const deletePost = async (e) => {
e.preventDefault(); e.preventDefault();
toggleDeleteMenu(); toggleDeleteMenu(e);
const success = await postDelete({ id }); const success = await postDelete({ id });
if (success) { if (success) {
goto("/posts"); goto("/posts");
@ -69,7 +74,7 @@
<EditPostPanel <EditPostPanel
bind:isActive={editMenuShown} bind:isActive={editMenuShown}
{post} {post}
onSubmit={getData} onSubmit={onSubmitEdit}
/> />
{:else if deleteMenuShown == true} {:else if deleteMenuShown == true}
<div class="panel is-danger"> <div class="panel is-danger">