layout title with AdminButton

This commit is contained in:
Jörn-Michael Miehe 2023-09-16 00:52:36 +00:00
parent 77cb0c1da2
commit dbf6d72d1f
2 changed files with 18 additions and 11 deletions

View file

@ -1,18 +1,25 @@
<template> <template>
<div class="container"> <section class="hero is-primary">
<section class="section"> <div class="level is-mobile">
<h1 class="title has-text-centered is-uppercase">Adventskalender</h1> <div class="level-left">
<h2 class="subtitle has-text-centered">Der Gelöt</h2> <div class="hero-body">
</section> <h1 class="title is-uppercase">Adventskalender</h1>
<h2 class="subtitle">Der Gelöt</h2>
</div>
</div>
<div class="level-right">
<div class="level-item pr-4">
<AdminButton v-model="is_admin" />
</div>
</div>
</div>
</section>
<div class="container">
<section class="section"> <section class="section">
<AdminView v-if="is_admin" /> <AdminView v-if="is_admin" />
<UserView v-else /> <UserView v-else />
</section> </section>
<section class="section">
<AdminButton v-model="is_admin" />
</section>
</div> </div>
</template> </template>

View file

@ -2,11 +2,11 @@
<LoginModal v-if="modal_visible" @submit="on_submit" @cancel="on_cancel" /> <LoginModal v-if="modal_visible" @submit="on_submit" @cancel="on_cancel" />
<BulmaButton <BulmaButton
class="button is-light" class="button is-primary is-outlined is-inverted"
@click.left="on_click" @click.left="on_click"
:icon="'fa-solid fa-toggle-' + (modelValue ? 'on' : 'off')" :icon="'fa-solid fa-toggle-' + (modelValue ? 'on' : 'off')"
:busy="is_busy" :busy="is_busy"
text="Admin" :text="modelValue ? 'Admin' : 'User'"
/> />
</template> </template>