index.component.scss 4.7 KB
Newer Older
X
xjh22222228 已提交
1 2 3 4 5 6 7
.index-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding-top: 15px;
}

X
Open  
xjh22222228 已提交
8
.homepage {
X
xjh22222228 已提交
9
  flex: 1;
X
Open  
xjh22222228 已提交
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
  position: relative;
  background: rgb(251, 251, 251);
  border-radius: 5px;
  overflow: hidden;
  transition: .1s linear;

  .search {
    z-index: 66666;
    position: fixed;
    top: 250px;
    left: 50%;
    width: 600px;
    padding: 10px;
    border-radius: 10px;
    transform: translate(-50%, 0);
    background: #e5e5ea;
    font-size: 26px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px 1px #ccc;
  }

  .top-nav {
    padding: 10px;
X
xjh22222228 已提交
33
    overflow: none;
X
Open  
xjh22222228 已提交
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
    white-space: nowrap;
    border-bottom: 1px solid #eee;
    text-align: center;

    a {
      display: inline-block;
      padding: 10px 15px;
      color: #000;
      cursor: pointer;
      border-radius: 5px;
      overflow: hidden;

      &:hover {
        text-decoration: none;
      }
    }
  }
}

.index-section {
  position: relative;
  height: calc(100% - 52px);
  overflow: hidden;

  .icon-box {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;

    .icon {
      width: 20px;
    }
  }

  // 侧边栏分类
  $sidebarWidth: 80px;
  .sidebar {
    position: relative;
    width: $sidebarWidth;
    height: 100%;
    text-align: center;
    border-right: 1px solid #eee;

    .tag {
      position: relative;
      cursor: pointer;

      &.active {
        color: #1890ff;

        a:after {
          top: 0;
          border-top: 1px dashed #ccc;
        }

        a:before {
          bottom: 0;
          border-bottom: 1px dashed #ccc;
        }
      }

      a {
        display: block;
        padding: 11px 0;

        &:after,
        &:before {
          content: "";
          position: absolute;
          left: 0;
          width: 100%;
        }
      }
    }
  }

  .main {
    position: absolute;
    top: 0;
    left: $sidebarWidth;
    right: 0;
    bottom: 30px;
    padding-bottom: 50px;
    overflow-y: auto;

    .icon {
X
xjh22222228 已提交
122
      display: inline-block;
X
Open  
xjh22222228 已提交
123 124 125 126 127 128
      width: 35px;
      height: 35px;
      vertical-align: middle;
      border-radius: 50%;
      pointer-events: none;
      border: 1px solid #eee;
X
xjh22222228 已提交
129
      background-color: #fff;
X
Open  
xjh22222228 已提交
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
    }

    .name {
      display: inline-block;
      font-size: 16px;
      margin-left: 5px;
      width: calc(100% - 50px);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      vertical-align: middle;
    }

    .desc {
      padding: 5px 10px 5px 10px;
      border-top: 1px solid #eee;
      margin-top: 8px;
      word-break: break-all;
      word-wrap: break-word;
      font-size: 12px;
    }

    .mark {
      z-index: 28;
      position: absolute;
      bottom: -50px;
      left: 0;
      width: 100%;
      padding: 10px 0 5px 0px;
      background: #fbfbfb;
      cursor: auto;
      display: flex;
      justify-content: center;
      align-content: center;
      transition: .1s linear;

      .button-box {
        width: 100%;
        text-align: center;
      }

      a {
        display: inline-block;
        position: relative;
        width: 50px;
        font-size: 12px;
        padding: 3px 0;
        border: none;
        background: #2db7f5;
        color: #fff;
        border-radius: 3px;
        overflow: hidden;

        &:not(:nth-last-child(1)) {
          margin-right: 10px;
        }

        &:after {
          content: "";
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          background: #000;
          opacity: 0;
        }

        &:active:after {
          opacity: .2;
        }
      }

      .zh {
        background: #26a2ff;
      }
    }

X
xjh22222228 已提交
208
    .title-wrapper {
X
Open  
xjh22222228 已提交
209
      border-bottom: 1px solid #ccc;
X
xjh22222228 已提交
210 211 212 213 214 215 216 217 218 219 220 221
      padding: 10px 0 10px 15px;

      &:hover {
        .edit {
          display: inline-block;
        }
      }
    }

    .block-title {
      display: inline-block;
      position: relative;
X
Open  
xjh22222228 已提交
222
      color: #3F51B5;
X
xjh22222228 已提交
223 224 225 226 227 228 229 230 231 232

      .edit {
        display: none;
        position: absolute;
        top: -2px;
        right: -25px;
        width: 15px;
        height: 15px;
        margin-left: 5px;
        margin-top: 5px;
X
xjh22222228 已提交
233
        background: url("https://xiejiahe.gitee.io/nav/assets/img/edit.svg");
X
xjh22222228 已提交
234 235
        background-size: 15px;
      }
X
Open  
xjh22222228 已提交
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
    }

    .top {
      padding: 10px;
    }
  }

  .row {
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;

    a {
      color: #333;

      &:hover {
        text-decoration: none;
      }
    }

    .click-btn {
      z-index: 1111;
      position: relative;
      width: 200px;
      margin: 12px;
      border: 1px solid #eee;
      overflow: hidden;

      &:hover {

        .mark {
          bottom: 0;
        }
      }
    }
  }
X
xjh22222228 已提交
272
}