feat:页面美化,添加广告位

This commit is contained in:
陶然
2026-03-02 18:49:02 +08:00
parent f492194fab
commit 226997fb25
8 changed files with 381 additions and 52 deletions
@@ -63,8 +63,8 @@ onMounted(() => {
</script>
<template>
<div class="flex justify-between items-center rounded-2xl bg-white p-4 mt-5 mb-5">
<div class="text-xl">
<div class="flex justify-between items-center rounded-2xl p-4 mt-5 mb-5 tech-detail-header">
<div class="text-xl tech-title">
{{ props.title }}
</div>
<div>
@@ -72,6 +72,8 @@ onMounted(() => {
:icon="isCollected ? StarFilled : Star"
:type="isCollected ? 'warning' : 'default'"
@click="toggleCollect"
class="tech-button"
size="medium"
>
{{ isCollected ? '已收藏' : '收藏' }}
</el-button>
@@ -80,5 +82,69 @@ onMounted(() => {
</template>
<style scoped>
/* 科技感详情页头部 */
.tech-detail-header {
background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
border: 1px solid rgba(64, 158, 255, 0.2);
position: relative;
overflow: hidden;
}
.tech-detail-header::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 2px;
background: linear-gradient(90deg, #409EFF, #667eea, #764ba2);
}
/* 科技感标题 */
.tech-title {
position: relative;
font-weight: 600;
color: #333;
}
/* 科技感按钮 */
.tech-button {
position: relative;
border-radius: 8px;
transition: all 0.3s ease;
overflow: hidden;
}
.tech-button:hover {
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba(64, 158, 255, 0.2);
}
.tech-button:active {
transform: translateY(0);
}
/* 收藏状态按钮样式 */
.tech-button.is-warning {
background: linear-gradient(135deg, #ffc107, #ff9800);
border-color: #ffc107;
color: #fff;
}
.tech-button.is-warning:hover {
background: linear-gradient(135deg, #ffca28, #ff9800);
box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}
/* 未收藏状态按钮样式 */
.tech-button.is-default {
background: linear-gradient(135deg, #f8f9fa, #e9ecef);
border-color: #dee2e6;
color: #495057;
}
.tech-button.is-default:hover {
background: linear-gradient(135deg, #ffffff, #f8f9fa);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
</style>