Some checks failed
Chore App Build, Test, and Push Docker Images / build-and-push (push) Failing after 1m37s
123 lines
2.3 KiB
Vue
123 lines
2.3 KiB
Vue
<template>
|
|
<div class="layout-root">
|
|
<header class="topbar">
|
|
<div class="end-button-container">
|
|
<button v-show="showBack" class="back-btn" @click="handleBack" tabindex="0">← Back</button>
|
|
</div>
|
|
<div class="spacer"></div>
|
|
<div class="spacer"></div>
|
|
</header>
|
|
<main class="main-content">
|
|
<router-view />
|
|
</main>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { useRouter, useRoute } from 'vue-router'
|
|
import { computed } from 'vue'
|
|
|
|
const router = useRouter()
|
|
const route = useRoute()
|
|
|
|
const handleBack = () => {
|
|
router.push({ name: 'LandingPage' }).catch(() => {
|
|
window.location.href = '/'
|
|
})
|
|
}
|
|
|
|
// hide back button specifically on the Auth landing route
|
|
const showBack = computed(
|
|
() =>
|
|
route.name !== 'AuthLanding' && route.name !== 'VerifySignup' && route.name !== 'ResetPassword',
|
|
)
|
|
</script>
|
|
|
|
<style scoped>
|
|
.layout-root {
|
|
width: 100%;
|
|
min-height: 100vh;
|
|
height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: 0;
|
|
background: var(--header-bg, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
|
|
}
|
|
|
|
.topbar {
|
|
display: flex;
|
|
align-items: stretch;
|
|
padding: 0;
|
|
height: 48px;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.end-button-container {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 65px;
|
|
min-width: 65px;
|
|
max-width: 65px;
|
|
height: 48px;
|
|
min-height: 48px;
|
|
max-height: 48px;
|
|
margin-left: 5px;
|
|
margin-right: 5px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.back-btn {
|
|
width: 65px;
|
|
min-width: 65px;
|
|
max-width: 65px;
|
|
height: 48px;
|
|
min-height: 48px;
|
|
max-height: 48px;
|
|
margin: 0;
|
|
background: var(--button-bg, #fff);
|
|
border: 0;
|
|
border-radius: 8px 8px 0 0;
|
|
cursor: pointer;
|
|
color: var(--button-text, #667eea);
|
|
font-weight: 600;
|
|
font-size: 0.8rem;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-sizing: border-box;
|
|
overflow: hidden;
|
|
padding: 0;
|
|
transition:
|
|
background 0.18s,
|
|
color 0.18s;
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.back-btn {
|
|
font-size: 0.7rem;
|
|
}
|
|
}
|
|
|
|
.spacer {
|
|
flex: 1 1 auto;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.main-content {
|
|
flex: 1 1 auto;
|
|
width: 100%;
|
|
justify-content: center;
|
|
align-items: flex-start;
|
|
box-sizing: border-box;
|
|
min-height: 0;
|
|
height: 0;
|
|
overflow: hidden;
|
|
overflow-y: visible;
|
|
padding: 1rem;
|
|
}
|
|
</style>
|