add: Tencent 404 public welfare page
This commit is contained in:
parent
965cc184e7
commit
511b1f75a7
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="theme-container">
|
||||
<div class="theme-container" v-if="!noFoundPageByTencent">
|
||||
<div class="content">
|
||||
<h1>404</h1>
|
||||
<blockquote>{{ getMsg() }}</blockquote>
|
||||
@ -17,6 +17,21 @@ const msgs = [
|
||||
]
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
noFoundPageByTencent () {
|
||||
return this.$themeConfig.noFoundPageByTencent !== false
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
if (this.noFoundPageByTencent) {
|
||||
let dom = document.createElement('script')
|
||||
dom.setAttribute('homePageName', '回到首页')
|
||||
dom.setAttribute('homePageUrl', '/')
|
||||
dom.setAttribute('src', '//qzonestyle.gtimg.cn/qzone/hybrid/app/404/search_children.js')
|
||||
|
||||
document.body.append(dom)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getMsg () {
|
||||
return msgs[Math.floor(Math.random() * msgs.length)]
|
||||
|
@ -217,3 +217,22 @@ th, td
|
||||
.vuepress-flowchart
|
||||
overflow: auto
|
||||
|
||||
/************** 腾讯 404 公益 **************/
|
||||
|
||||
.mod_404 .desc {
|
||||
.desc_link {
|
||||
display: inline-block
|
||||
// margin: 20px 0
|
||||
background: #424242!important
|
||||
color: #ffffff
|
||||
padding: 6px 20px!important
|
||||
text-decoration: none!important
|
||||
border-radius: 4px
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 720px) {
|
||||
.mod_404 .desc {
|
||||
margin: 50px 0
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user