浏览代码

docs: osc 投票入口添加

richard1015 4 年之前
父节点
当前提交
e60886d149
共有 2 个文件被更改,包括 26 次插入22 次删除
  1. 26 1
      src/sites/doc/components/Header.vue
  2. 0 21
      src/sites/doc/views/Main.vue

+ 26 - 1
src/sites/doc/components/Header.vue

@@ -1,5 +1,9 @@
 <template>
   <!-- <div class="doc-header" :style="{ background: themeColor === 'red' ? headerBg : themeColor }" :class="`doc-header-${data.theme}`"> -->
+  <div class="v3-banner" :class="{ active: true }">
+    NutUI 正在参与 OSC 2021 年度中国开源项目评选(您的鼓励是我们坚持不懈的源动力),请为我们投上宝贵的一票吧。
+    <a href="https://www.oschina.net/project/top_cn_2021/?id=65&fr=nutui" target="_blank">去投票</a>
+  </div>
   <div class="doc-header" :class="themeName()">
     <div class="header-logo">
       <a class="logo-link" href="#" @click="toHome"></a>
@@ -126,11 +130,32 @@ export default defineComponent({
 </script>
 
 <style lang="scss">
+.v3-banner {
+  position: fixed;
+  top: 0;
+  transition: all 0.3s;
+  > a {
+    color: #fff;
+    font-weight: bold;
+  }
+  font-size: 14px;
+  width: 100%;
+  z-index: 999;
+  text-align: center;
+  padding: 10px 60px;
+  color: #fff;
+  background: linear-gradient(
+    135deg,
+    rgba(242, 20, 12, 1) 0%,
+    rgba(232, 34, 14, 1) 69.83950099728881%,
+    rgba(242, 77, 12, 1) 100%
+  );
+}
 .doc {
   &-header {
     position: fixed;
     z-index: 2;
-    top: 0;
+    top: 40px;
     left: 0;
     right: 0;
     min-width: 1300px;

+ 0 - 21
src/sites/doc/views/Main.vue

@@ -1,5 +1,4 @@
 <template>
-  <div class="v3-banner" :class="{ active: false }">NutUI 现已发布 Vue3.x 版本,带来更强大的功能和出色的体验</div>
   <doc-header></doc-header>
   <div class="doc-content" :class="themeName()">
     <div class="doc-content-index">
@@ -281,26 +280,6 @@ export default defineComponent({
 });
 </script>
 <style lang="scss">
-.v3-banner {
-  position: fixed;
-  top: 0;
-  transition: all 0.3s;
-  &.active {
-    top: $doc-header-height;
-  }
-  font-size: 14px;
-  width: 100%;
-  z-index: 1;
-  text-align: center;
-  padding: 10px 60px;
-  color: #fff;
-  background: linear-gradient(
-    135deg,
-    rgba(242, 20, 12, 1) 0%,
-    rgba(232, 34, 14, 1) 69.83950099728881%,
-    rgba(242, 77, 12, 1) 100%
-  );
-}
 @keyframes fadeInLeft {
   from {
     opacity: 0;