Header.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <header class="header" role="banner">
  3. <el-row :gutter="10">
  4. <el-col :span="6">
  5. <div class="header-left">
  6. <a href="/" class="brand" aria-label="Home">
  7. <img src="/logo.png" alt="DDAC logo" class="brand-logo" width="34" height="34" />
  8. <h1 class="brand-title">DDAC</h1>
  9. </a>
  10. </div>
  11. </el-col>
  12. <el-col :span="12">
  13. <nav class="header-nav" role="navigation" aria-label="Main navigation">
  14. <div class="nav-item">首页</div>
  15. <div class="nav-item">产品</div>
  16. <div class="nav-item">行业解决方案</div>
  17. <div class="nav-item">文档中心</div>
  18. <div class="nav-item">了解我们</div>
  19. </nav>
  20. </el-col>
  21. <el-col :span="6">
  22. <div class="header-right">
  23. <div>登录</div>
  24. <div class="register">注册</div>
  25. </div>
  26. </el-col>
  27. </el-row>
  28. </header>
  29. </template>
  30. <script setup>
  31. </script>
  32. <style lang="scss">
  33. .header {
  34. box-sizing: border-box;
  35. padding: 22px 0;
  36. }
  37. .header-left {
  38. display: flex;
  39. align-items: center;
  40. justify-content: right;
  41. .brand {
  42. display: flex;
  43. align-items: center;
  44. text-decoration: none;
  45. .brand-logo {
  46. margin-right: 8px;
  47. }
  48. .brand-title {
  49. color: #FFF;
  50. font-family: Roboto;
  51. font-size: 30px;
  52. font-style: normal;
  53. font-weight: 700;
  54. line-height: 36px;
  55. }
  56. }
  57. }
  58. .header-nav {
  59. display: flex;
  60. justify-content: center;
  61. align-items: center;
  62. height: 100%;
  63. .nav-item {
  64. margin: 0 15px;
  65. cursor: pointer;
  66. color: #FFF;
  67. font-family: "Source Han Sans CN";
  68. font-size: 14px;
  69. font-style: normal;
  70. font-weight: 400;
  71. line-height: 14px;
  72. &:hover {
  73. // color: #000;
  74. }
  75. }
  76. }
  77. .header-right {
  78. display: flex;
  79. align-items: center;
  80. height: 100%;
  81. color: #FFF;
  82. div {
  83. margin-left: 20px;
  84. cursor: pointer;
  85. }
  86. .register {
  87. display: flex;
  88. width: 100px;
  89. height: 40px;
  90. justify-content: center;
  91. align-items: center;
  92. gap: 10px;
  93. border-radius: 10px;
  94. border: 1px solid #7D46FF;
  95. background: #030014;
  96. box-shadow: 0.5px 0.5px 18px 0 rgba(125, 70, 255, 0.45) inset;
  97. }
  98. }
  99. </style>