Skip to content

Commit

Permalink
更换网站图标,新增readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Sillywa committed May 9, 2020
1 parent 0b03aa4 commit b524aeb
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 9 deletions.
Binary file modified public/favicon.ico
Binary file not shown.
6 changes: 6 additions & 0 deletions src/API/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ export function logout(baseURL) {
method: "get",
url: `${baseURL}/cancelLogin`
})
}
export function getReadme(baseURL) {
return request({
method: "get",
url: `${baseURL}/README`
})
}
113 changes: 107 additions & 6 deletions src/assets/index.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

@media (max-width:992px) {
.title,.list-wrapper {
.title,.list-wrapper,.readme {
width: 100%;
}
.title {
Expand All @@ -11,7 +11,7 @@
}
}
@media (min-width:993px) {
.title,.list-wrapper {
.title,.list-wrapper,.readme {
width: 80%;
}
.title {
Expand All @@ -25,7 +25,7 @@
body {
background-color: rgb(247, 247, 249);
}
.title {
.title,.readme, .list-wrapper {
margin: 0 auto;
}
.title h1 {
Expand Down Expand Up @@ -80,8 +80,6 @@
padding-left: 10px;
}
.list-wrapper {

margin: 0 auto;
margin-bottom: 40px;
position: relative;
box-shadow: 0 0 32px 0 rgba(0, 0, 0, 0.1);
Expand Down Expand Up @@ -141,4 +139,107 @@
}
h3 {
font-size: 1em;
}
}
code, pre, tt {
font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;
font-size: 12px;
}
.readme {
color: #24292e;
background-color: #fff;
border: 1px solid #d1d5da;
border-radius: 3px;
}
.markdown-body {
padding: 32px;
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
font-size: 16px;
line-height: 1.5;
word-wrap: break-word;
}
.markdown-body h1 {
padding-bottom: .3em;
border-bottom: 1px solid #eaecef;
font-size: 2em;
margin:24px 0 16px 0;
font-weight: 600;
line-height: 1.25;
}
.markdown-body h1:first-child {
margin-top: 0;
}
.markdown-body h2 {
font-size: 1.5em;
padding-bottom: .3em;
border-bottom: 1px solid #eaecef;
margin-top: 24px;
margin-bottom: 16px;
font-weight: 600;
line-height: 1.25;
}
.markdown-body h3 {
font-size: 1em;
padding-bottom: .3em;
border-bottom: 1px solid #eaecef;
margin-top: 24px;
margin-bottom: 12px;
font-weight: 600;
line-height: 1.25;
}
.markdown-body p {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body ul {
padding-left: 2em;
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body li+li {
margin-top: .25em;
}
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f6f8fa;
border-radius: 3px;
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
padding: 0;
margin: 0;
overflow: visible;
line-height: inherit;
word-wrap: normal;
background-color: initial;
border: 0;
}
.markdown-body pre>code {
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
}
.markdown-body code {
border-radius: 3px;
}
.card-header {
padding: 8px 0;
margin: -1px -1px 0;
background-color: #f7f7f9;
border: 1px solid #d1d5da;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
display: flex;
align-items: center;
}
.card-header svg {
margin-left: 10px;
}
.card-header h3 {
padding-left: 5px;
font-weight: 600;
}
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if (process.env.NODE_ENV === 'production') {
startApp()
} else {
// 为开发环境配置...
Vue.prototype.baseURL = "https://cloud.sillywa.com";
Vue.prototype.baseURL = "https://gonelist.cugxuan.cn";
new Vue({
router,
store,
Expand Down
19 changes: 17 additions & 2 deletions src/views/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,24 @@

</div>
</div>

<div class="readme">
<div class="card-header">
<svg class="octicon octicon-book" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3 5h4v1H3V5zm0 3h4V7H3v1zm0 2h4V9H3v1zm11-5h-4v1h4V5zm0 2h-4v1h4V7zm0 2h-4v1h4V9zm2-6v9c0 .55-.45 1-1 1H9.5l-1 1-1-1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h5.5l1 1 1-1H15c.55 0 1 .45 1 1zm-8 .5L7.5 3H2v9h6V3.5zm7-.5H9.5l-.5.5V12h6V3z"></path></svg>
<h3>
README.md
</h3>
</div>
<div class="markdown-body" v-html="readme"></div>
</div>
<!-- <My-DPlayer :video="video" ref="mydplayer" v-on:close="closePlayer" v-show="video.show"></My-DPlayer> -->
<D-Player v-on:closeVideo="closeV" ref="mydplayer" v-show="video.show"></D-Player>
<A-Player v-on:closeAudio="closeA" ref="myaplayer" v-show="audio.show"></A-Player>
</div>
</template>

<script>
import { getAllFiles,logout } from "../API/api"
import { getAllFiles,logout,getReadme } from "../API/api"
import { checkFileType } from '../utils/index'
import DPlayer from '../components/Dplayer';
import APlayer from '../components/Aplayer'
Expand Down Expand Up @@ -170,11 +180,16 @@ export default {
index: -1,
hash: ""
},
isProduction: false
isProduction: false,
readme: ""
}
},
created() {
this.init()
getReadme(this.baseURL).then(res => {
this.readme = res.data
//console.log(this.readme)
})
},
watch: {
$route: {
Expand Down
9 changes: 9 additions & 0 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,14 @@ module.exports = {
// template 中的 title 标签需要是 <title><%= htmlWebpackPlugin.options.title %></title>
title: 'GONEList'
}
},
pwa: {
iconPaths: {
favicon32: 'favicon.ico',
favicon16: 'favicon.ico',
appleTouchIcon: 'favicon.ico',
maskIcon: 'favicon.ico',
msTileImage: 'favicon.ico'
}
}
}

0 comments on commit b524aeb

Please sign in to comment.