| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <template>
- <header class="h5-header">
- <div class="h5-header-container">
- <a href="/" class="brand">
- <NuxtImg src="/logo.png" alt="DDAC logo" class="brand-logo" width="24" height="24" />
- <h1 class="brand-title">DDAC</h1>
- </a>
- <button class="menu-button" @click="toggleMenu">
- <span class="menu-icon"></span>
- </button>
- </div>
- <nav v-show="isMenuOpen" class="h5-nav">
- <div class="nav-item">首页</div>
- <div class="nav-item">产品</div>
- <div class="nav-item">行业解决方案</div>
- <div class="nav-item">文档中心</div>
- <div class="nav-item">了解我们</div>
- <div class="nav-actions">
- <div class="nav-action-item">登录</div>
- <div class="nav-action-item register">注册</div>
- </div>
- </nav>
- </header>
- </template>
- <script setup>
- const isMenuOpen = ref(false)
- const toggleMenu = () => {
- isMenuOpen.value = !isMenuOpen.value
- }
- </script>
- <style lang="scss" scoped>
- .h5-header {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- z-index: 1000;
- background: #030014;
- border-bottom: 1px solid rgba(255, 255, 255, 0.1);
- }
- .h5-header-container {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 12px 16px;
- }
- .brand {
- display: flex;
- align-items: center;
- text-decoration: none;
- .brand-logo {
- margin-right: 8px;
- }
- .brand-title {
- color: #FFF;
- font-size: 20px;
- font-weight: 700;
- line-height: 24px;
- margin: 0;
- }
- }
- .menu-button {
- width: 32px;
- height: 32px;
- background: none;
- border: none;
- cursor: pointer;
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 0;
- }
- .menu-icon {
- display: block;
- width: 24px;
- height: 2px;
- background-color: #fff;
- position: relative;
- &::before,
- &::after {
- content: '';
- position: absolute;
- width: 24px;
- height: 2px;
- background-color: #fff;
- left: 0;
- }
- &::before {
- top: -8px;
- }
- &::after {
- top: 8px;
- }
- }
- .h5-nav {
- background: #030014;
- border-top: 1px solid rgba(255, 255, 255, 0.1);
- padding: 16px;
- }
- .nav-item {
- padding: 12px 0;
- color: #FFF;
- font-size: 16px;
- border-bottom: 1px solid rgba(255, 255, 255, 0.05);
- &:last-of-type {
- border-bottom: none;
- }
- }
- .nav-actions {
- display: flex;
- gap: 12px;
- margin-top: 16px;
- }
- .nav-action-item {
- flex: 1;
- padding: 12px;
- text-align: center;
- color: #FFF;
- font-size: 14px;
- border-radius: 8px;
- background: rgba(255, 255, 255, 0.05);
- &.register {
- background: linear-gradient(91deg, #A39DFF 1.24%, #7D46FF 122.93%);
- }
- }
- </style>
|