Article.vue 22.6 KB
Newer Older
yma16's avatar
yma16 已提交
1 2
/* eslint-disable vue/no-duplicate-attributes */
<template>
Y
yma16 已提交
3
  <div class="article" style="text-align: left; with: 100%; height: 100%">
yma16's avatar
yma16 已提交
4 5
    <!-- 左侧 -->
    <div class="leftclass">
Y
yma16 已提交
6 7 8 9 10 11 12 13 14 15
      <el-card
        shadow="always"
        cellpadding="1px"
        style="position: static; line-height: 20px"
      >
        <div class="article_box">
          <h1>{{ slogan }}</h1>
          <ul v-for="(item, index) in md_title" :key="item" class="ul_style">
            <div
              v-bind:class="[
16
                { li_active: index === article_loc },
Y
yma16 已提交
17 18 19 20
                li_errorClass,
              ]"
            >
              <li @click="getArticles(index)">{{ item }}</li>
yma16's avatar
yma16 已提交
21
            </div>
Y
yma16 已提交
22 23 24
          </ul>
        </div>
        <!-- 分页 -->
yma16's avatar
yma16 已提交
25
        <div class="pagenation-block">
Y
yma16 已提交
26 27 28 29
          <!-- <span class="demonstration">完整功能</span> -->
          <el-pagination
            :current-page="currentPage"
            :page-sizes="pageArray"
yma16's avatar
yma16 已提交
30
            background
31
            :page-count="pageCount"
Y
yma16 已提交
32 33 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
            :page-size="pageSize"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            layout="total, sizes, prev, pager, next, jumper"
            :total="total"
          >
          </el-pagination>
        </div>
      </el-card>

      <!-- 评论 -->
      <el-card
        cellpadding="1px"
        shadow="always"
        style="position: static; margin-top: 2%"
      >
        <h1>{{ commmentSlogan }}</h1>
        <ArticleComment
          v-bind:articleId="postcomment.articleId"
          ref="commentRef"
        >
        </ArticleComment>
      </el-card>

      <!-- 挑战榜 -->
      <el-card
        class="challenge_title1"
        cellpadding="1px"
        shadow="always"
        style="position: static; margin-top: 2%"
      >
        <h1>{{ day_challenge }}</h1>
        <ul
yma16's avatar
yma16 已提交
65 66
          v-for="(item, index) in challengeConfig"
          :key="index"
Y
yma16 已提交
67 68 69 70
          class="ul_style"
        >
          <div
            v-bind:class="[
yma16's avatar
yma16 已提交
71
              { li_active: index === challenge_loc },
Y
yma16 已提交
72 73 74
              li_errorClass,
            ]"
          >
yma16's avatar
yma16 已提交
75
            <li @click="clickChallengeEvent(item,index)">{{ item.title }}</li>
Y
yma16 已提交
76 77 78 79 80 81 82 83 84
          </div>
        </ul>
      </el-card>

      <!-- 爬虫天气接口 -->
      <el-card
        class="weather_class1"
        cellpadding="1px"
        shadow="always"
yma16's avatar
yma16 已提交
85
        style="position: static; margin-top: 2%;text-align: center"
Y
yma16 已提交
86
      >
yma16's avatar
yma16 已提交
87
        <span style="line-height: 30px;" class="uni-font">未来天气</span>
Y
yma16 已提交
88 89 90 91 92 93 94 95 96 97 98 99 100 101
        <div style="positon: relative; width: 100%; height: 100%">
          <EchartWeather> </EchartWeather>
        </div>
      </el-card>

      <!-- csdn头像 -->
      <el-card
        class="user_img1"
        style="
          position: static;
          margin: 2% auto auto auto;
          line-height: 10px;
          text-align: center;
        "
yma16's avatar
yma16 已提交
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
        >
        <span style="line-height: 30px;" class="uni-font">小程序</span>
          <img class="image" src="https://yongma16.xyz/staticFile/common/logo/wxProgram.jpg"
        />
      </el-card>

      <el-card
        class="user_img1"
        style="
          position: static;
          margin: 2% auto auto auto;
          line-height: 10px;
          text-align: center;
        "
        >
        <span style="line-height: 30px;" class="uni-font">点击图片前往csdn</span>
        <a href="https://blog.csdn.net/qq_38870145">
Y
yma16 已提交
119 120 121
          <img class="image" src="@/assets/img/csdn.jpg"
        /></a>
      </el-card>
yma16's avatar
yma16 已提交
122 123
    </div>
    <!-- 中间 markdown-->
yma16's avatar
yma16 已提交
124
    <div class="midclass" ref="mark-down-ref">
125
      <a name="home" id="homeTitleId" style="transition: 1s"></a>
Y
yma16 已提交
126 127 128 129 130 131 132 133 134 135
      <el-card shadow="hover" style="line-height: 10px">
        <div class="block" style="line-height: 20px">
          <h1>{{ the_title }}</h1>
          <div class="markdown-body" style="text-align: left">
            <VueMarkdown
              :source="md_data[index_page]"
              v-highlight
              style="width: 100%; text-align: left"
            ></VueMarkdown>
          </div>
yma16's avatar
yma16 已提交
136
        </div>
Y
yma16 已提交
137 138 139 140 141 142 143 144 145 146 147 148 149 150
      </el-card>

      <div class="commitCard">
        <!--  -->
      </div>
      <!-- 挑战榜 -->
      <el-card
        class="challenge_title2"
        cellpadding="1px"
        shadow="always"
        style="position: static; margin-top: 2%"
      >
        <h1>{{ day_challenge }}</h1>
        <ul
yma16's avatar
yma16 已提交
151 152
          v-for="(item, index) in challengeConfig"
          :key="index"
Y
yma16 已提交
153 154 155 156
          class="ul_style"
        >
          <div
            v-bind:class="[
yma16's avatar
yma16 已提交
157
              { li_active: index === challenge_loc },
Y
yma16 已提交
158 159 160
              li_errorClass,
            ]"
          >
yma16's avatar
yma16 已提交
161
            <li @click="clickChallengeEvent(item,index)">{{ item.title }}</li>
Y
yma16 已提交
162 163 164 165 166 167
          </div>
        </ul>
      </el-card>

      <!-- 爬虫天气接口 -->
      <!-- <el-card class="weather_class2"
yma16's avatar
yma16 已提交
168 169
          cellpadding="1px"
          shadow="always"
yma16's avatar
yma16 已提交
170
          style="position: myblog_static; margin-top: 2%"
yma16's avatar
yma16 已提交
171 172 173
        >

        </el-card> -->
yma16's avatar
yma16 已提交
174 175 176 177 178 179 180 181 182 183 184 185
      <el-card
        class="user_img2"
        style="
          position: static;
          margin: 2% auto auto auto;
          line-height: 10px;
          text-align: center;
        "
      > <span style="line-height: 30px;" class="uni-font">小程序</span>
        <img class="image" src="https://yongma16.xyz/staticFile/common/logo/wxProgram.jpg"
        />
      </el-card>
Y
yma16 已提交
186 187 188 189 190 191 192 193 194
      <!-- csdn头像 -->
      <el-card
        class="user_img2"
        style="
          position: static;
          margin: 2% auto auto auto;
          line-height: 10px;
          text-align: center;
        "
yma16's avatar
yma16 已提交
195 196 197
        >
        <span style="line-height: 30px;" class="uni-font">点击图片前往csdn</span>
        <a href="https://blog.csdn.net/qq_38870145">
Y
yma16 已提交
198 199 200
          <img class="image" src="@/assets/img/csdn.jpg"
        /></a>
      </el-card>
yma16's avatar
yma16 已提交
201

yma16's avatar
yma16 已提交
202 203 204
    </div>
    <!-- 上滑滚动图标 -->
    <div class="rightclass">
Y
yma16 已提交
205 206 207 208
      <div class="righticon">
        <el-card
          shadow="never"
          style="
yma16's avatar
yma16 已提交
209 210 211
            align-content: center;
            background-color: rgba(0, 0, 0, 0);
            border: rgba(0, 0, 0, 0);
Y
yma16 已提交
212 213
          "
        >
yma16's avatar
yma16 已提交
214
          <div v-if="topShow">
Y
yma16 已提交
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233
            <el-button
              @click="toTop"
              type="info"
              icon="el-icon-top"
              style="
                transition: 1s;
                background: rgb(255, 94, 0);
                border: none;
                color: #fff;
              "
              circle
            ></el-button>
          </div>
          <br /><br />
          <div>
            <el-button
              type="info"
              icon="el-icon-message"
              circle
yma16's avatar
yma16 已提交
234
              @click="openDraw"
Y
yma16 已提交
235 236 237 238 239 240 241
              style="background: rgb(255, 94, 0); border: none"
            >
            </el-button>
          </div>
          <br /><br />
        </el-card>
      </div>
yma16's avatar
yma16 已提交
242
    </div>
yma16's avatar
yma16 已提交
243
    <template>
yma16's avatar
yma16 已提交
244
        <Email :drawObj="drawObj"></Email>
yma16's avatar
yma16 已提交
245
    </template>
Y
yma16 已提交
246
  </div>
yma16's avatar
yma16 已提交
247 248 249
</template>

<script>
yma16's avatar
yma16 已提交
250
import Email from '@/components/email/Email'
251 252 253
import VueMarkdown from 'vue-markdown'
import ArticleComment from '@/comment/ArticleComment'
import EchartWeather from '@/weather/EchartWeather'
yma16's avatar
yma16 已提交
254
export default {
255 256 257 258 259
    components: {
        VueMarkdown, // 显示markdown的组件
        ArticleComment, // 子组件评论
        EchartWeather, // 天气
        Email
yma16's avatar
yma16 已提交
260
    },
261 262 263
    name: 'Article',
    data () {
        return {
264
            pageCount: 3,
265 266 267 268 269 270 271 272 273 274 275
            msgDrawTitle: '~邮件沟通~',
            direction: 'rtl',
            drawObj: {
                show: false
            },
            // baseurl: '/api/',
            baseurl: '/api/',
            // baseurl: "http://yongma16.xyz/",
            msg: '内容',
            commmentSlogan: '评论区',
            day_challenge: '训练营',
yma16's avatar
yma16 已提交
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320
            challengeConfig: [
                {
                    title: 'css挑战',
                    order: 1,
                    isJumpPath: true,
                    isJumpUrl: false,
                    path: '/css'
                },
                {
                    title: 'websocket聊天',
                    order: 2,
                    isJumpPath: true,
                    isJumpUrl: false,
                    path: '/onlinewebsocket'
                },
                {
                    title: 'echarts地图配置',
                    order: 3,
                    isJumpPath: true,
                    isJumpUrl: false,
                    path: '/home'
                },
                {
                    title: 'vue3测试平台',
                    order: 4,
                    isJumpPath: false,
                    isJumpUrl: true,
                    url: 'http://yongma16.xyz/emoji_api/',
                    path: ''
                },
                {
                    title: '数据可视化平台',
                    order: 5,
                    isJumpPath: false,
                    isJumpUrl: true,
                    url: 'https://yongma16.xyz/fund-web',
                    path: ''
                },
                {
                    title: '更新中',
                    order: 6,
                    isJumpPath: false,
                    isJumpUrl: false,
                    path: ''
                }
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335
            ],
            md_data: [],
            md_title: [],
            the_title: '',
            sear_page: 0,
            index_page: 0,
            data: ['threejs加载模型'],
            slogan: '记忆碎片',
            tabPosition: 'left',
            weather_title: [],
            weather_high: [],
            weather_low: [],
            toTopIsShow: false,
            article_loc: 0,
            challenge_loc: -1,
336
            topShow: false,
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352
            userImg: '',
            username: '匿名',
            articleCommit: '评论区',
            // 分页实现 page1 page2 指向数组
            pageAnalys: {},
            currentPage: 1,
            splitLength: 6, // 划分条数
            total: 0,
            pageSize: 4,
            pageArray: [6, 8, 10],
            postcomment: {
                articleId: undefined,
                articleCommit: null
            },
            articleId: [] // 文章的id
        }
Y
yma16 已提交
353
    },
354
    watch: {
yma16's avatar
yma16 已提交
355 356 357 358 359 360 361
        topShow: {
            handler (newValue) {
                if (newValue) {
                    console.warn(newValue)
                }
            },
            immediate: true
yma16's avatar
yma16 已提交
362 363
        }
    },
364
    beforeDestroy () {
yma16's avatar
yma16 已提交
365
        // window.removeEventListener('onload', this.topVisible())
366
        this.articleScrollListen('remove')
yma16's avatar
yma16 已提交
367
    },
368
    mounted () {
369
        this.articleScrollListen('add')
370
        this.initPageSpliteFun()
yma16's avatar
yma16 已提交
371
        // window.addEventListener('onload', this.topVisible())
yma16's avatar
yma16 已提交
372
    },
373
    methods: {
374 375 376 377 378
        /**
       * dom的滚动事件监听
       */
        articleScrollListen (key) {
            const dom = this.$refs['mark-down-ref']
yma16's avatar
yma16 已提交
379
            const that = this
380 381
            if (dom && key === 'add') {
                dom.addEventListener('scroll', function (e) {
yma16's avatar
yma16 已提交
382
                    that.topShow = Math.ceil(e.target.scrollTop) !== 0
383 384 385
                })
            } else if (dom && key === 'remove') {
                dom.removeEventListener('scroll', function (e) {
yma16's avatar
yma16 已提交
386
                    that.topShow = e.target.scrollTop === 0
387 388 389
                })
            }
        },
390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407
        initPageSpliteFun () {
            this.splitLength = this.pageArray[0]
        },
        handleSizeChange (val) {
            // 转到第一页md_title
            let that = this
            that.pageAnalysFun(that.pageAnalys.allTitle, val) // 触发修改
        },
        handleCurrentChange (val) {
            let that = this
            // 触发md_title的修改
            that.currentPage = val
            that.pageAnalysFun(that.pageAnalys.allTitle) // 触发修改
        },
        pageAnalysFun (allTitleArray, selectListLength) {
            let that = this
            that.total = allTitleArray.length // 总数
            let splitLength = that.splitLength
408
            if (selectListLength) {
409 410 411 412 413 414 415
                this.currentPage = 1
                that.splitLength = selectListLength // 划分长度
            }
            splitLength = that.splitLength
            let splitNum = Math.ceil(that.total / splitLength) // 向上取整
            that.pageAnalys.childNum = splitNum // 子数组个数
            that.pageAnalys.allTitle = allTitleArray // 所有标题
416
            that.pageAnalys.titleArray = [] // 子数组个数
417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450
            let locSplit = 0
            let locLength = splitLength // 每一页的条数
            while (splitNum--) {
                // 循环获取子数组
                if (splitNum >= 1) {
                    let childArray = []
                    for (
                        let temp = locSplit;
                        temp < locLength && temp < that.total;
                        ++temp, ++locSplit
                    ) {
                        childArray.push(that.pageAnalys.allTitle[temp])
                    }
                    that.pageAnalys.titleArray.push(childArray)
                    locLength += splitLength // 分割数组长度后移
                } else {
                    // 最后一个数组
                    let childArray = []
                    for (let temp = locSplit; temp < that.total; ++temp) {
                        childArray.push(that.pageAnalys.allTitle[temp])
                    }
                    that.pageAnalys.titleArray.push(childArray)
                    break
                }
            }
            try {
                that.md_title = that.pageAnalys.titleArray[this.currentPage - 1]
            } catch (e) {
                throw Error(e)
            }
        },
        increment: function () {
            this.$store.commit('increment')
        },
451
        topVisible: function () {
yma16's avatar
yma16 已提交
452 453 454
            // let dom = document.getElementById('homeTitleId')
            // this.topShow = this.elementIsVisibleInViewport(dom)
            // setTimeout(this.topVisible)
455 456 457 458 459 460 461
        },
        elementIsVisibleInViewport: function (el, partiallyVisible = false) {
            try {
                if (el && el.getBoundingClientRect instanceof Function) {
                    const { top, left, bottom, right } = el.getBoundingClientRect()
                    return partiallyVisible
                        ? ((top > 0 && top < innerHeight) ||
yma16's avatar
yma16 已提交
462 463 464
                (bottom > 0 && bottom < innerHeight)) &&
                ((left > 0 && left < innerWidth) ||
                  (right > 0 && right < innerWidth))
465
                        : top >= 0 &&
yma16's avatar
yma16 已提交
466 467
                left >= 0 &&
                bottom <= innerHeight &&
468 469 470 471 472 473 474
                right <= innerWidth
                }
            } catch (r) {
                throw Error(r)
            }
        },
        li_errorClass: function () {},
yma16's avatar
yma16 已提交
475
        clickChallengeEvent: function (item, index) {
476
            this.challenge_loc = index
yma16's avatar
yma16 已提交
477
            if (item.isJumpPath) {
478 479
                this.$router
                    .push({
yma16's avatar
yma16 已提交
480
                        path: item.path
481 482 483 484
                    })
                    .catch((error) => {
                        throw Error(error)
                    })
yma16's avatar
yma16 已提交
485 486
            } else if (item.isJumpUrl) {
                window.open(item.url)
487 488 489 490 491 492 493 494 495 496 497 498
            }
        },
        open_message: function () {
            // this.$notify({
            //     title: '欢迎合作',
            //     message: '邮箱:1432448610@qq.com',
            //     position: 'bottom-right'
            // })
        },
        openDraw () {
            this.drawObj.show = true
        },
yma16's avatar
yma16 已提交
499

500
        toTop: function () {
yma16's avatar
yma16 已提交
501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521
            const dom = this.$refs['mark-down-ref']
            if (!dom) {
                return 0
            }
            const speedValue = Math.floor(dom.scrollTop / 20)
            const second = 20
            const diffTop = function (speed, time) {
                let top = Math.ceil(dom.scrollTop)
                if (top > 0) {
                    dom.scrollTop = top - speed > 0 ? top - speed : 0
                }
                if (dom.scrollTop > 0) {
                    setTimeout(() => {
                        return diffTop(speed, time)
                    }, 10)
                }
            }
            diffTop(speedValue, second)
            if (document.getElementById('mainappid') && document.getElementById('mainappid').scrollTop > 0) {
                document.getElementById('mainappid').scrollTop = 0
            }
522 523 524 525 526 527 528 529 530
        }, // 返回天气相当于返回顶部
        getCommentsFromArticle (id) {
            this.$refs.commentRef.getComments(id) // 触发子组件的方法
        },
        getArticles: function (page) {
            let that = this // this指向转化
            that.article_loc = page
            // 查找文章id 从1开始
            that.postcomment.articleId =
Y
yma16 已提交
531
        that.articleId[
532 533 534
            parseInt(page + (that.currentPage - 1) * that.splitLength)
        ]
            // 提交数据 page从0开始
yma16's avatar
yma16 已提交
535
            that.$axios
536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558
                .post(that.baseurl + 'article/index/', {
                    value: page + (that.currentPage - 1) * that.splitLength
                    // 传入索引
                })
                .then((res) => {
                    if (res.data.code === 1) {
                        let respdata = res.data
                        let content = respdata.article
                        that.md_data = [] // 清空
                        content.map((o) => {
                            that.md_data.push(o) // 传入一个文章
                        })
                        that.the_title = respdata.the_title
                    } else if (res.data.code === 0) {
                        // alter("失败!")
                        that.$message.error('失败')
                    }
                })
                .catch((error) => {
                    throw Error(error)
                })
            that.getCommentsFromArticle(that.postcomment.articleId)
        }
yma16's avatar
yma16 已提交
559
    },
560
    created: function () {
Y
yma16 已提交
561
    // 初始化
562
        let that = this
yma16's avatar
yma16 已提交
563
        that.$axios
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585
            .get(that.baseurl + 'article/index/')
            .then((res) => {
                let resdata = res.data
                let content = resdata.article // 传递过来的文章 进行处理
                let title = resdata.title
                that.articleId = resdata.articleObjectId
                that.postcomment.articleId = resdata.articleId
                this.$refs.commentRef.getComments(that.postcomment.articleId) // 触发子组件的方法
                content.map((o) => {
                    that.md_data.push(o)
                })
                let titleAllArray = title.map((o) => {
                    return o
                })
                that.the_title = resdata.the_title
                this.pageAnalysFun(titleAllArray) // 分页
            })
            .catch((r) => {
                throw Error(r)
            }) // get log
    }
}
yma16's avatar
yma16 已提交
586 587 588 589
</script>

<style scoped>
.el-carousel__item h3 {
Y
yma16 已提交
590 591 592 593 594
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 150px;
  margin: 0;
yma16's avatar
yma16 已提交
595 596 597
}

.el-carousel__item:nth-child(2n) {
Y
yma16 已提交
598 599
  background-color: #99a9bf;
  background-image: linear-gradient(90deg, #f0ddd2, #aa8c79);
yma16's avatar
yma16 已提交
600 601 602
}

.el-carousel__item:nth-child(2n + 1) {
Y
yma16 已提交
603 604
  background-color: #b0b3b6;
  background-image: linear-gradient(90deg, #f0ddd2, #aa8c79);
yma16's avatar
yma16 已提交
605 606 607
}

.text {
Y
yma16 已提交
608 609 610 611
  /* align-content: center; */
  display: flex;
  margin: 0 auto;
  font-size: 14px;
yma16's avatar
yma16 已提交
612 613 614
}

.item {
Y
yma16 已提交
615 616 617
  display: inline-block;
  /* margin: 0 auto; */
  width: 900px;
yma16's avatar
yma16 已提交
618 619 620
}

.box-card {
Y
yma16 已提交
621 622 623 624 625 626 627 628 629
  align-self: center;
  align-content: center;
  display: inline-block;
  width: 80%;
  /* padding-left:25%; */
  margin: 0 auto;
  /* opacity: 0.95; */
  margin-top: 0px;
  background-color: #ffffff;
yma16's avatar
yma16 已提交
630 631 632
}

.box-cardtext {
Y
yma16 已提交
633 634 635 636 637 638 639 640 641
  align-self: center;
  align-content: center;
  display: inline-block;
  width: 20%;
  /* padding-left:25%; */
  margin: 0 auto;
  opacity: 0.9;
  margin-top: 80px;
  background-color: #ffffff;
yma16's avatar
yma16 已提交
642 643 644
}

.article {
Y
yma16 已提交
645 646 647 648 649 650
  opacity: 1;
  /* background-color: aliceblue; */
  align-content: inherit;
  display: flex;
  margin: 5px;
  padding: 5px;
yma16's avatar
yma16 已提交
651 652 653 654
}

/* 取消滚动并且隐藏 */
el-col::-webkit-scrollbar {
Y
yma16 已提交
655
  display: none;
yma16's avatar
yma16 已提交
656 657 658
}

.leftclass {
Y
yma16 已提交
659 660 661 662 663
  position: relative;
  width: 30%;
  height: 100%;
  overflow: auto;
  margin: 5px;
yma16's avatar
yma16 已提交
664 665 666
}

.leftclass::-webkit-scrollbar {
Y
yma16 已提交
667
  display: none;
yma16's avatar
yma16 已提交
668 669 670
}

.midclass {
Y
yma16 已提交
671 672 673 674 675 676
  position: relative;
  width: 65%;
  height: 100%;
  overflow: auto;
  margin: 5px;
  /* scrollbar-face-color: coral; */
yma16's avatar
yma16 已提交
677

Y
yma16 已提交
678
  /* scrollbar-track-color: darkslategrey; */
yma16's avatar
yma16 已提交
679
}
yma16's avatar
yma16 已提交
680 681 682
.pagenation-block{
  overflow: auto;
}
yma16's avatar
yma16 已提交
683
.midclass::-webkit-scrollbar {
Y
yma16 已提交
684 685 686 687 688 689 690 691 692 693 694 695 696 697
  width: 10px;
  /* height:5px; */
  /* display: none; */
}
.midclass::-webkit-scrollbar-track {
  background: rgba(226, 247, 255, 0.5);
  border-radius: 2px;
  /* display: none; */
}
.midclass::-webkit-scrollbar-track-piece {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  /* display: none; */
}
yma16's avatar
yma16 已提交
698 699 700 701 702

.uni-font{
  color: #ff995e;
  font-weight: bolder;
}
Y
yma16 已提交
703 704 705 706 707
.midclass::-webkit-scrollbar-thumb {
  background: #ff995e;
  height: 2px;
  border-radius: 2px;
  /* display: none; */
yma16's avatar
yma16 已提交
708 709 710
}
/* 评论区 */
.commitCard {
Y
yma16 已提交
711 712 713 714 715 716 717 718 719 720 721
  position: relative;
  width: 100%;
  height: 80px;
  margin-top: 10px;
  justify-content: center;
  align-content: center;
  align-items: center;
  flex-wrap: wrap;
  flex-direction: row;
  margin-left: 0;
  margin-right: 0;
yma16's avatar
yma16 已提交
722 723 724
}

.rightclass {
Y
yma16 已提交
725 726 727 728
  position: relative;
  width: 5%;
  height: 100%;
  overflow: hidden;
yma16's avatar
yma16 已提交
729 730 731
}

.rightclass::-webkit-scrollbar {
Y
yma16 已提交
732
  display: none;
yma16's avatar
yma16 已提交
733 734 735
}

.righticon {
Y
yma16 已提交
736 737 738 739
  position: relative;
  width: 100%;
  height: 100%;
  top: 70%;
yma16's avatar
yma16 已提交
740 741 742
}

.image {
Y
yma16 已提交
743 744
  width: 100%;
  display: block;
yma16's avatar
yma16 已提交
745 746 747
}

.li_active li {
Y
yma16 已提交
748
  color: rgb(255, 94, 0);
yma16's avatar
yma16 已提交
749 750 751
}

li:active {
Y
yma16 已提交
752
  color: rgb(245, 182, 10);
yma16's avatar
yma16 已提交
753 754 755
}

li:link {
Y
yma16 已提交
756
  color: rgb(255, 94, 0);
yma16's avatar
yma16 已提交
757 758 759
}

li:visited {
Y
yma16 已提交
760
  color: gold;
yma16's avatar
yma16 已提交
761 762 763
}

li:hover {
Y
yma16 已提交
764 765
  color: rgb(255, 72, 0);
  cursor: pointer;
yma16's avatar
yma16 已提交
766 767 768
}

h1 {
Y
yma16 已提交
769 770
  color: rgb(255, 102, 0);
  text-align: center;
yma16's avatar
yma16 已提交
771 772 773
}

h1:hover {
Y
yma16 已提交
774 775 776 777
  font-weight: bolder;
  color: rgb(255, 72, 0);
  /* color: gold; */
  cursor: pointer;
yma16's avatar
yma16 已提交
778 779 780
}

.article_box {
Y
yma16 已提交
781 782 783
  position: relative;
  width: 100%;
  height: 100%;
yma16's avatar
yma16 已提交
784 785 786
}

.ul_style {
Y
yma16 已提交
787 788 789
  position: relative;
  width: 100%;
  height: 100%;
yma16's avatar
yma16 已提交
790 791 792
}

.weather_class2 {
Y
yma16 已提交
793
  display: none;
yma16's avatar
yma16 已提交
794 795 796
}

.user_img2 {
Y
yma16 已提交
797
  display: none;
yma16's avatar
yma16 已提交
798 799 800
}

.challenge_title2 {
Y
yma16 已提交
801
  display: none;
yma16's avatar
yma16 已提交
802 803 804
}

.weather_class1 {
Y
yma16 已提交
805
  display: block;
yma16's avatar
yma16 已提交
806 807 808
}

.user_img1 {
Y
yma16 已提交
809
  display: block;
yma16's avatar
yma16 已提交
810 811 812
}

.challenge_title1 {
Y
yma16 已提交
813
  display: block;
yma16's avatar
yma16 已提交
814 815 816
}

@media screen and (max-width: 450px) {
Y
yma16 已提交
817 818 819 820
  .article {
    display: inline-block;
    max-width: 350px;
  }
yma16's avatar
yma16 已提交
821

Y
yma16 已提交
822 823 824 825 826
  .leftclass {
    width: 100%;
    height: 50%;
    max-width: 350px;
  }
yma16's avatar
yma16 已提交
827

Y
yma16 已提交
828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843
  .midclass {
    width: 100%;
    max-width: 350px;
  }

  .rightclass {
    width: 80px;
    position: fixed;
    float: right;
    bottom: 20px;
    right: -10px;
  }

  .weather_class2 {
    display: block;
  }
yma16's avatar
yma16 已提交
844

Y
yma16 已提交
845 846 847
  .user_img2 {
    display: block;
  }
yma16's avatar
yma16 已提交
848

Y
yma16 已提交
849 850 851
  .challenge_title2 {
    display: block;
  }
yma16's avatar
yma16 已提交
852

Y
yma16 已提交
853 854 855
  .weather_class1 {
    display: none;
  }
yma16's avatar
yma16 已提交
856

Y
yma16 已提交
857 858 859
  .user_img1 {
    display: none;
  }
yma16's avatar
yma16 已提交
860

Y
yma16 已提交
861 862 863
  .challenge_title1 {
    display: none;
  }
yma16's avatar
yma16 已提交
864 865
}
</style>