2026-09-12 01:33:07 +03:30
|
|
|
<script setup lang="ts">
|
2026-09-17 16:46:00 +03:30
|
|
|
import { RouterLink } from 'vue-router';
|
2026-09-12 01:33:07 +03:30
|
|
|
import UiIcon from '@/components/UiIcon.vue';
|
|
|
|
|
|
|
|
|
|
withDefaults(
|
|
|
|
|
defineProps<{
|
|
|
|
|
title?: string;
|
|
|
|
|
lead?: string;
|
|
|
|
|
description?: string;
|
|
|
|
|
backTo?: string | object;
|
|
|
|
|
}>(),
|
|
|
|
|
{},
|
|
|
|
|
);
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<header class="ui-page-header">
|
|
|
|
|
<div class="header-main">
|
|
|
|
|
<RouterLink v-if="backTo" :to="backTo" class="back-link" title="بازگشت">
|
|
|
|
|
<UiIcon name="arrow-right" :size="18" />
|
|
|
|
|
</RouterLink>
|
|
|
|
|
|
|
|
|
|
<div class="titles">
|
|
|
|
|
<h1 v-if="title" class="title">{{ title }}</h1>
|
|
|
|
|
<slot v-else name="title" />
|
|
|
|
|
|
|
|
|
|
<p v-if="lead || description" class="lead">{{ lead || description }}</p>
|
|
|
|
|
<slot v-else name="lead" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-if="$slots.actions" class="actions">
|
|
|
|
|
<slot name="actions" />
|
|
|
|
|
</div>
|
|
|
|
|
</header>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.ui-page-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
gap: var(--sp-4);
|
|
|
|
|
min-width: 0;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.header-main {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: var(--sp-3);
|
|
|
|
|
min-width: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.back-link {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
width: var(--control-h-md);
|
|
|
|
|
height: var(--control-h-md);
|
|
|
|
|
border: 1px solid var(--line);
|
|
|
|
|
border-radius: var(--radius);
|
|
|
|
|
background: var(--surface);
|
|
|
|
|
color: var(--ink-secondary);
|
|
|
|
|
transition: background var(--transition-fast), border-color var(--transition-fast);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.back-link:hover {
|
|
|
|
|
background: var(--surface-subtle);
|
|
|
|
|
border-color: var(--line-strong);
|
|
|
|
|
color: var(--accent-deep);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.titles {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 2px;
|
|
|
|
|
min-width: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
margin: 0;
|
|
|
|
|
font-size: var(--fs-2xl);
|
|
|
|
|
font-weight: var(--fw-extrabold);
|
|
|
|
|
color: var(--ink);
|
|
|
|
|
line-height: var(--lh-tight);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.lead {
|
|
|
|
|
margin: 0;
|
|
|
|
|
font-size: var(--fs-sm);
|
|
|
|
|
color: var(--muted);
|
|
|
|
|
line-height: var(--lh-normal);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.actions {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
gap: var(--sp-2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (max-width: 900px) {
|
|
|
|
|
.ui-page-header {
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: stretch;
|
|
|
|
|
gap: var(--sp-3);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
font-size: var(--fs-xl);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.actions {
|
|
|
|
|
justify-content: stretch;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.actions > * {
|
|
|
|
|
flex: 1 1 auto;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|