Skip to content

Commit

Permalink
chore: bump version (bump version: 2.0.0-alpha.4)
Browse files Browse the repository at this point in the history
  • Loading branch information
dragon-fish committed Jun 10, 2021
1 parent 3e5aa50 commit 4a87c2e
Show file tree
Hide file tree
Showing 13 changed files with 213 additions and 82 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
<title>PixivNow</title>
</head>
<body>
<div id="app"></div>
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pixiv-now",
"version": "2.0.0-alpha.3",
"version": "2.0.0-alpha.4",
"private": true,
"main": "index.js",
"repository": "https://github.com/Wjghj-Project/pixiv-now.git",
Expand All @@ -20,6 +20,7 @@
"devDependencies": {
"@dragon-fish/bump": "^0.0.15",
"@vercel/node": "^1.11.0",
"@vitejs/plugin-vue": "^1.2.3",
"@vue/compiler-sfc": "^3.0.4",
"@vuedx/typecheck": "^0.3.1-insiders-1606311019.0",
"@vuedx/typescript-plugin-vue": "^0.3.1-insiders-1606311019.0",
Expand Down
7 changes: 7 additions & 0 deletions src/components/Card.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<template></template>

<script lang="ts">
export default {}
</script>

<style scoped></style>
70 changes: 70 additions & 0 deletions src/components/ErrorPage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<template>
<section class="error-page">
<div class="title">{{ title }}</div>
<div class="description">{{ desc }}</div>
<div class="random" @click="randomMsg">{{ msg }}</div>
</section>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
function pick(list: any[]) {
return list[Math.floor(Math.random() * list.length)]
}
const msgList = [
'就像装在游戏机盒子里的作业本一样没有人喜欢!',
// FF14骚话
'就像闪耀登场释放天辉的白魔法师一样没有人喜欢!',
'就像冰4火4一个慢动作的黑魔法师一样没有人喜欢!',
'就像耗尽了了以太超流的学者一样没有人喜欢!',
'就像忘记了每分钟背刺的忍者一样没有人喜欢!',
'就像进本后跳999接受LB需求退本一气呵成的龙骑一样没有人喜欢!',
'就像成天把拉拉菲尔族当做食材的人一样没有人喜欢!',
'就像死而不僵状态下的暗黑骑士一样没有人喜欢!',
'就像无论如何也触发不了诗心的诗人一样没有人喜欢!',
]
export default defineComponent({
props: ['title', 'desc'],
data() {
return {
msg: '',
}
},
methods: {
randomMsg() {
this.msg = pick(msgList)
},
},
created() {
document.title = 'Error | PixivNow'
this.randomMsg()
},
})
</script>

<style scoped>
.error-page {
margin: 10rem auto;
height: 100%;
text-align: center;
display: flex;
align-items: center;
flex-wrap: wrap;
}
.error-page > div {
width: 100%;
}
.title {
font-size: 4rem;
font-weight: bold;
}
.description {
font-size: 1.5rem;
}
.random {
color: #aaa;
user-select: none;
margin-top: 1rem;
}
</style>
10 changes: 9 additions & 1 deletion src/components/Footer.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<template>
<footer class="globalFooter">
<p>&copy; Copyright {{ yearStr }} Wjghj-Project/pixiv-now</p>
<p>
&copy; Copyright {{ yearStr }}
<a href="https://github.com/Wjghj-Project/pixiv-now" target="_blank"
>Wjghj-Project/pixiv-now</a
>
</p>
</footer>
</template>

Expand All @@ -24,4 +29,7 @@ export default defineComponent({
font-size: 1rem;
color: #fff;
}
.globalFooter a {
color: #fff;
}
</style>
16 changes: 10 additions & 6 deletions src/components/Gallery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<img class="picBig" :src="imgSrc" alt="" />
<div class="pagenator">
<button @click="prevImg">←</button>
<!-- <input v-model="imgCountInput" type="number" /> -->
<span class="pageNow">{{ imgCountInput }} / {{ pages.length }}</span>
<input v-model="imgCountInput" type="number" />
<span class="pageNow"> / {{ pages.length }}</span>
<button @click="nextImg">→</button>
</div>
</div>
Expand All @@ -25,9 +25,9 @@ export default defineComponent({
methods: {
setImg(count) {
count = this.pages[count] ? count : 0
const url = 'https://pixiv.wjghj.cn' + this.pages[count].urls.original
const img = new Image()
this.imgSrc = 'https://blog.wjghj.cn/_statics/images/placeholder.svg'
const url = `https://pixiv.wjghj.cn${this.pages[count].urls.original}`
const img = new Image()
img.src = url
img.onload = () => {
this.imgSrc = url
Expand All @@ -42,8 +42,9 @@ export default defineComponent({
},
watch: {
imgCount(val) {
if (val < 0) this.imgCount = 0
if (val + 1 > this.pages.length) this.imgCount = this.pages.length - 1
this.imgCount = Math.max(0, this.imgCount)
this.imgCount = Math.min(this.pages.length - 1, this.imgCount)
// if (val < 0 || val + 1 > this.pages.length) this.imgCount = 0
this.imgCountInput = val + 1
this.setImg(this.imgCount)
},
Expand Down Expand Up @@ -80,4 +81,7 @@ export default defineComponent({
width: 3rem;
margin: 0 0.4rem;
}
.pagenator input {
margin-right: 0;
}
</style>
8 changes: 7 additions & 1 deletion src/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,21 @@ export default defineComponent({
.globalNavbar {
background-color: rgb(54, 151, 231);
padding: 0.4rem;
font-size: 2rem;
color: #fff;
display: flex;
overflow-y: auto;
align-items: center;
}
.logo {
font-size: 2rem;
}
.logo,
.link {
margin: 0 0.4rem;
text-decoration: none;
color: #fff;
}
.link {
font-variant: small-caps;
}
</style>
20 changes: 20 additions & 0 deletions src/static/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,23 @@ h2 {
text-shadow: 2px 2px 0px #fff;
box-shadow: 0 -0.5em 0 rgb(93, 188, 243) inset;
}

main a {
color: #2884d4;
text-decoration: none;
position: relative;
}

main a::before {
content: '';
position: absolute;
height: 0.2em;
width: 100%;
background-color: #2884d4;
left: 50%;
transform: scaleX(0);
}

main a:hover::after {
width: 100%;
}
64 changes: 6 additions & 58 deletions src/view/404.vue
Original file line number Diff line number Diff line change
@@ -1,67 +1,15 @@
<template>
<section class="error-404">
<div class="title">404</div>
<div class="description">啊咧?啊咧咧——?!页面跑丢了!!!</div>
<div class="random" @click="random404">{{ msg }}</div>
</section>
<error-page title="404" desc="啊咧?啊咧咧——?!页面跑丢了!!!" />
</template>

<script lang="ts">
function pick(list: any[]) {
return list[Math.floor(Math.random() * list.length)]
}
const errMsg = [
'就像装在游戏机盒子里的作业本一样没有人喜欢!',
// FF14骚话
'就像闪耀登场释放天辉的白魔法师一样没有人喜欢!',
'就像冰4火4一个慢动作的黑魔法师一样没有人喜欢!',
'就像耗尽了了以太超流的学者一样没有人喜欢!',
'就像忘记了每分钟背刺的忍者一样没有人喜欢!',
'就像进本后跳999接受LB需求退本一气呵成的龙骑一样没有人喜欢!',
'就像成天把拉拉菲尔族成为食材的人一样没有人喜欢!',
'就像死而不僵状态下的暗黑骑士一样没有人喜欢!',
'就像无论如何也触发不了诗心的诗人一样没有人喜欢!',
]
import ErrorPage from '../components/ErrorPage.vue'
export default {
data() {
return {
msg: '',
}
},
methods: {
random404() {
this.msg = pick(errMsg)
},
},
mounted() {
this.random404()
setup() {},
components: {
ErrorPage,
},
}
</script>

<style scoped>
.error-404 {
margin: 10rem auto;
height: 100%;
text-align: center;
display: flex;
align-items: center;
flex-wrap: wrap;
}
.error-404 > div {
width: 100%;
}
.title {
font-size: 6rem;
font-weight: bold;
}
.description {
font-size: 1.5rem;
}
.random {
color: #aaa;
user-select: none;
margin-top: 1rem;
}
</style>
<style scoped></style>
32 changes: 30 additions & 2 deletions src/view/artwork/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<h1>View artwork!</h1>
<section>
<section class="searchBox">
<input v-model="artId" type="number" />
<button @click="gotoArt">查看</button>
</section>
Expand All @@ -24,7 +24,35 @@ export default {
if (val < 1) this.artId = 1
},
},
mounted() {
document.title = 'Artwork | PixivNow'
},
}
</script>

<style></style>
<style scoped>
.searchBox {
margin: 8rem auto;
}
.searchBox input {
display: block;
width: 100%;
box-sizing: border-box;
font-size: 1.4rem;
border: 1px solid #888;
border-radius: 4px;
outline: none;
padding: 0.2rem 0.5rem;
color: #444;
}
.searchBox button {
padding: 0.4rem 1.2rem;
font-size: 1rem;
border: none;
border-radius: 4px;
background-color: rgb(54, 151, 231);
color: #fff;
display: block;
margin: 1rem auto;
}
</style>
Loading

0 comments on commit 4a87c2e

Please sign in to comment.