Commit 5d22dc42 authored by caoxu's avatar caoxu

Enhance: 城市主图显示名称并加重

parent d893f899
Pipeline #511 canceled with stages
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
<div class="main-content"> <div class="main-content">
<div class="city-banner"> <div class="city-banner">
<img src="https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?w=1200&h=400&fit=crop" alt="城市风景" class="banner-image" /> <img src="https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?w=1200&h=400&fit=crop" alt="城市风景" class="banner-image" />
<div class="banner-overlay">
<h1 class="city-name">{{ cityName }}</h1>
</div>
</div> </div>
<div class="city-info-section"> <div class="city-info-section">
...@@ -129,6 +132,8 @@ import { useRouter } from 'vue-router' ...@@ -129,6 +132,8 @@ import { useRouter } from 'vue-router'
const router = useRouter() const router = useRouter()
const cityName = ref('魅力之城')
const attractions = ref([ const attractions = ref([
{ {
id: 1, id: 1,
...@@ -379,6 +384,27 @@ const sendMessage = (user) => { ...@@ -379,6 +384,27 @@ const sendMessage = (user) => {
object-fit: cover; object-fit: cover;
} }
.banner-overlay {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%);
padding: 24px;
display: flex;
align-items: flex-end;
justify-content: center;
}
.city-name {
font-size: 36px;
font-weight: 800;
color: white;
margin: 0;
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
letter-spacing: 2px;
}
.city-info-section, .city-info-section,
.attractions-section, .attractions-section,
.nearby-users-section, .nearby-users-section,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment