added back links
This commit is contained in:
@@ -3,6 +3,13 @@
|
|||||||
<SMContainer class="flex-column">
|
<SMContainer class="flex-column">
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<h1 class="title">{{ title }}</h1>
|
<h1 class="title">{{ title }}</h1>
|
||||||
|
<router-link
|
||||||
|
class="back"
|
||||||
|
v-if="props.backLink !== null"
|
||||||
|
:to="props.backLink"
|
||||||
|
><ion-icon name="chevron-back-outline"></ion-icon>
|
||||||
|
{{ props.backTitle }}</router-link
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="tabs().length > 0" class="tabs">
|
<div v-if="tabs().length > 0" class="tabs">
|
||||||
<router-link
|
<router-link
|
||||||
@@ -20,14 +27,24 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import SMButton from "./SMButton.vue";
|
|
||||||
import SMInput from "./SMInput.vue";
|
|
||||||
|
|
||||||
defineProps({
|
const props = defineProps({
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
backLink: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
|
backTitle: {
|
||||||
|
type: String,
|
||||||
|
default: "Back",
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const tabGroups = [
|
const tabGroups = [
|
||||||
@@ -67,6 +84,24 @@ const tabs = () => {
|
|||||||
margin-top: 32px;
|
margin-top: 32px;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.back,
|
||||||
|
.back:visited {
|
||||||
|
display: flex;
|
||||||
|
color: rgb(255, 255, 255, 0.75);
|
||||||
|
margin-top: -24px;
|
||||||
|
margin-bottom: 32px;
|
||||||
|
font-size: 80%;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: rgb(255, 255, 255, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
ion-icon {
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabs {
|
.tabs {
|
||||||
|
|||||||
Reference in New Issue
Block a user