diff --git a/index.html b/index.html
index a508f203..52117021 100644
--- a/index.html
+++ b/index.html
@@ -4,7 +4,7 @@
-
Vite App
+ PixivNow
diff --git a/package.json b/package.json
index ca0ace8c..3cfac210 100644
--- a/package.json
+++ b/package.json
@@ -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",
@@ -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",
diff --git a/src/components/Card.vue b/src/components/Card.vue
new file mode 100644
index 00000000..11a00b29
--- /dev/null
+++ b/src/components/Card.vue
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/src/components/ErrorPage.vue b/src/components/ErrorPage.vue
new file mode 100644
index 00000000..34be6bab
--- /dev/null
+++ b/src/components/ErrorPage.vue
@@ -0,0 +1,70 @@
+
+
+ {{ title }}
+ {{ desc }}
+ {{ msg }}
+
+
+
+
+
+
diff --git a/src/components/Footer.vue b/src/components/Footer.vue
index 508efe4a..85982aed 100644
--- a/src/components/Footer.vue
+++ b/src/components/Footer.vue
@@ -1,6 +1,11 @@
@@ -24,4 +29,7 @@ export default defineComponent({
font-size: 1rem;
color: #fff;
}
+.globalFooter a {
+ color: #fff;
+}
diff --git a/src/components/Gallery.vue b/src/components/Gallery.vue
index 67538547..d6da57a2 100644
--- a/src/components/Gallery.vue
+++ b/src/components/Gallery.vue
@@ -3,8 +3,8 @@
-
- {{ imgCountInput }} / {{ pages.length }}
+
+ / {{ pages.length }}
@@ -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
@@ -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)
},
@@ -80,4 +81,7 @@ export default defineComponent({
width: 3rem;
margin: 0 0.4rem;
}
+.pagenator input {
+ margin-right: 0;
+}
diff --git a/src/components/Header.vue b/src/components/Header.vue
index c978b4d0..f7b3b179 100644
--- a/src/components/Header.vue
+++ b/src/components/Header.vue
@@ -23,10 +23,13 @@ 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 {
@@ -34,4 +37,7 @@ export default defineComponent({
text-decoration: none;
color: #fff;
}
+.link {
+ font-variant: small-caps;
+}
diff --git a/src/static/common.css b/src/static/common.css
index baf0d88e..fb062d39 100644
--- a/src/static/common.css
+++ b/src/static/common.css
@@ -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%;
+}
diff --git a/src/view/404.vue b/src/view/404.vue
index 8fb4436f..a6a7e0aa 100644
--- a/src/view/404.vue
+++ b/src/view/404.vue
@@ -1,67 +1,15 @@
-
- 404
- 啊咧?啊咧咧——?!页面跑丢了!!!
- {{ msg }}
-
+
-
+
diff --git a/src/view/artwork/index.vue b/src/view/artwork/index.vue
index 734f8729..d65d7340 100644
--- a/src/view/artwork/index.vue
+++ b/src/view/artwork/index.vue
@@ -1,6 +1,6 @@
View artwork!
-
+
@@ -24,7 +24,35 @@ export default {
if (val < 1) this.artId = 1
},
},
+ mounted() {
+ document.title = 'Artwork | PixivNow'
+ },
}
-
+
diff --git a/src/view/artwork/view.vue b/src/view/artwork/view.vue
index 4884bbcc..c72109d0 100644
--- a/src/view/artwork/view.vue
+++ b/src/view/artwork/view.vue
@@ -2,12 +2,14 @@
{{ loading ? 'Loading artwork #' + $route.params.id : illust.illustTitle }}
-
+
+
+
-
+
简介
@@ -15,10 +17,7 @@
- 啊这,出了点问题呢……
-
- {{ error }}
-
+
@@ -26,6 +25,7 @@
import axios from 'axios'
import Gallery from '../../components/Gallery.vue'
import AuthorCard from '../../components/AuthorCard.vue'
+import ErrorPage from '../../components/ErrorPage.vue'
export default {
data() {
@@ -39,6 +39,7 @@ export default {
components: {
AuthorCard,
Gallery,
+ ErrorPage,
},
methods: {
async init() {
@@ -54,6 +55,7 @@ export default {
this.error = err.message
return
}
+ document.title = `${data.illustTitle} | Artwork | PixivNow`
this.loading = false
this.illust = data
this.getUser(data.userId)
@@ -70,12 +72,16 @@ export default {
},
},
mounted() {
+ document.title = 'Loading... | Artwork | PixivNow'
this.init()
},
}
diff --git a/yarn.lock b/yarn.lock
index 97d5dc8e..f8681cec 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -462,6 +462,11 @@
resolved "https://registry.npmjs.org/@vercel/ruby/-/ruby-1.2.6.tgz#d3472c32705f0ef64d3f0bd07bae1b0990cc35ca"
integrity sha512-ZLDMxMvOL0xd7FBHXQJ9EJxPohw+qzpgwulaNhXGgPuFUfnS9mboUEyj0sU9A9F7lMJFPJ6gs8UfVxBY2eNnGA==
+"@vitejs/plugin-vue@^1.2.3":
+ version "1.2.3"
+ resolved "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-1.2.3.tgz#2e8e008b1cc3a6ad1dfbec75743c7ffd9b4872a6"
+ integrity sha512-LlnLpObkGKZ+b7dcpL4T24l13nPSHLjo+6Oc7MbZiKz5PMAUzADfNJ3EKfYIQ0l0969nxf2jp/9vsfnuJ7h6fw==
+
"@vue/compiler-core@3.1.1", "@vue/compiler-core@^3.0.0", "@vue/compiler-core@^3.0.1", "@vue/compiler-core@^3.0.2":
version "3.1.1"
resolved "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.1.1.tgz#4f2c5d70eabd454675714cc8bd2b97f6a8efb196"