71 行
1.5 KiB
Vue
71 行
1.5 KiB
Vue
<template>
|
|
<section class="page-hero" :class="{ 'page-hero--compact': compact }">
|
|
<div class="container">
|
|
<CommonBreadcrumbNav :items="breadcrumbs" />
|
|
<h1 class="page-hero-title">{{ title }}</h1>
|
|
<p v-if="subtitle" class="page-hero-subtitle">{{ subtitle }}</p>
|
|
</div>
|
|
<div class="page-hero-curve">
|
|
<svg viewBox="0 0 1440 48" fill="none" preserveAspectRatio="none" aria-hidden="true">
|
|
<path d="M0 48h1440V24C1200 0 240 0 0 24v24z" fill="currentColor" />
|
|
</svg>
|
|
</div>
|
|
</section>
|
|
</template>
|
|
|
|
<script setup>
|
|
const props = defineProps({
|
|
title: { type: String, required: true },
|
|
subtitle: { type: String, default: '' },
|
|
compact: { type: Boolean, default: false },
|
|
breadcrumbs: { type: Array, default: () => [] },
|
|
})
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
.page-hero {
|
|
background: linear-gradient(135deg, @color-primary-bg 0%, #E8F3ED 100%);
|
|
padding: @space-2xl 0 @space-3xl;
|
|
position: relative;
|
|
|
|
.respond-md({
|
|
padding: @space-3xl 0 @space-4xl;
|
|
});
|
|
|
|
&--compact {
|
|
padding: @space-xl 0 @space-2xl;
|
|
}
|
|
}
|
|
|
|
.page-hero-title {
|
|
margin-top: @space-md;
|
|
color: @color-text-primary;
|
|
}
|
|
|
|
.page-hero-subtitle {
|
|
margin-top: @space-sm;
|
|
font-size: @font-size-md;
|
|
color: @color-text-secondary;
|
|
max-width: 600px;
|
|
line-height: @line-height-relaxed;
|
|
}
|
|
|
|
.page-hero-curve {
|
|
position: absolute;
|
|
bottom: -1px;
|
|
left: 0;
|
|
right: 0;
|
|
line-height: 0;
|
|
color: @color-bg-white;
|
|
|
|
svg {
|
|
width: 100%;
|
|
height: 32px;
|
|
|
|
.respond-md({
|
|
height: 48px;
|
|
});
|
|
}
|
|
}
|
|
</style>
|