From fafe05a7929ade154fd4c0ad707c643fa2709439 Mon Sep 17 00:00:00 2001
From: Azalea <22280294+hykilpikonna@users.noreply.github.com>
Date: Mon, 27 Oct 2025 15:42:13 +0800
Subject: [PATCH] [+] Routes
---
src/App.vue | 6 ++++--
src/scripts/messages.ts | 3 ++-
src/scripts/router.ts | 12 ++++++------
src/views/Photo.vue | 8 ++++----
4 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index 89bb503..7e386a0 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -7,6 +7,8 @@
{{ $t('nav.others') }}
·
+
{{ $t('nav.photo') }}
+
·
{{ $t('nav.blog') }}
·
{{ $t('nav.life') }}
@@ -14,8 +16,7 @@
{{ $t('nav.about') }}
·
-
-
·
+
@@ -95,6 +96,7 @@ class App extends Vue
calculateBookmarkCss(): void
{
+ console.log('CalculateBookmarkCss called', this.currentRoute, this.$refs)
if (this.currentRoute in this.$refs)
this.currentLink = (this.$refs[this.currentRoute] as ComponentPublicInstance).$el
else return
diff --git a/src/scripts/messages.ts b/src/scripts/messages.ts
index a43227d..0cc2949 100644
--- a/src/scripts/messages.ts
+++ b/src/scripts/messages.ts
@@ -8,7 +8,8 @@ export const messages = {
blog: '记事本',
life: '生活',
projects: 'Projects',
- others: '更多'
+ others: '更多',
+ photo: '相册'
}
},
zh: {
diff --git a/src/scripts/router.ts b/src/scripts/router.ts
index 2a32bae..1e4b5e1 100644
--- a/src/scripts/router.ts
+++ b/src/scripts/router.ts
@@ -27,6 +27,12 @@ const routes: Array = [
component: () => import('../views/Blog.vue'),
props: route => (route.query)
},
+ {
+ path: '/photo',
+ name: 'Photo',
+ meta: {title: '相册', nav: true},
+ component: () => import('../views/Photo.vue')
+ },
{
path: '/others',
name: 'Others',
@@ -51,12 +57,6 @@ const routes: Array = [
meta: {title: '我做的', navBookmark: 'Others'},
component: () => import('../views/others/Projects.vue')
},
- {
- path: '/photo',
- name: 'Photo',
- meta: {title: '摄影', navBookmark: 'Others'},
- component: () => import('../views/Photo.vue')
- },
]
export const router = createRouter({
diff --git a/src/views/Photo.vue b/src/views/Photo.vue
index 0a1c6fc..9660875 100644
--- a/src/views/Photo.vue
+++ b/src/views/Photo.vue
@@ -24,10 +24,10 @@ export default class Photos extends Vue {
async created() {
this.photos = await (await fetch('https://p.aza.moe/photos')).json()
- this.photos.sort((a, b) => (b.upload_time < a.upload_time ? 1 : -1))
+ this.photos.sort((a, b) => (a.exif.DateTime < b.exif.DateTime ? 1 : -1))
let rowProbabilityTable = {
- 1: 0, 2: 0.5, 3: 0.5
+ 1: 0, 2: 0.3, 3: 0.5
}
// Generate photo rows: there is a 10% chance that a photo will be the only photo in its row
@@ -65,7 +65,7 @@ export default class Photos extends Vue {
The Wandering Gallery
-
+
想要把旅行中用相机拍到好看照片时的喜悦分享给照片里出现的路人,所以买了便携照片打印机、搭了这个网页!
@@ -96,7 +96,7 @@ export default class Photos extends Vue {
.img-container
filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3))
- margin: -15px
+ margin: -0.5rem
max-width: 50%
img.photo