Skip to content

Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.

style(map): 地球仪适配亮色模式

Timothy Yinb29adf337fbd
diff --git a/app/components/map/ClusterPin.vue b/app/components/map/ClusterPin.vue
index 84983380..1aef154f 100644
--- a/app/components/map/ClusterPin.vue
+++ b/app/components/map/ClusterPin.vue
@@ -85,7 +85,7 @@ const sizeDelta = computed(() => {
class="h-full w-full object-cover opacity-50"
/>
<div
- class="from-blue/60 to-purple/80 dark:from-blue/70 dark:to-purple/90 absolute inset-0 bg-gradient-to-br"
+ class="absolute inset-0 bg-gradient-to-br from-blue/40 to-purple/60 dark:from-blue/60 dark:to-purple/80"
/>
</div>
@@ -94,7 +94,7 @@ const sizeDelta = computed(() => {
:class="
twMerge(
'relative flex flex-col justify-center items-center rounded-full border shadow-lg hover:shadow-xl',
- 'border-white/30 bg-black/60 hover:bg-black/80',
+ 'border-white/50 bg-white/80 hover:bg-white/90 dark:border-white/30 dark:bg-black/60 dark:hover:bg-black/80',
)
"
:style="{
@@ -108,7 +108,7 @@ const sizeDelta = computed(() => {
<!-- Cluster count -->
<span
- class="text-white text-sm font-bold drop-shadow leading-none"
+ class="text-neutral-800 dark:text-white text-sm font-bold drop-shadow leading-none"
>
{{ pointCount }}
</span>
@@ -128,7 +128,7 @@ const sizeDelta = computed(() => {
:side-offset="8"
>
<motion.div
- class="bg-black/50 backdrop-blur-md border border-neutral-700 rounded-lg shadow-lg w-xs max-w-xs overflow-hidden relative"
+ class="bg-white/50 dark:bg-black/50 backdrop-blur-md border border-neutral-100 dark:border-neutral-700 rounded-lg shadow-lg w-xs max-w-xs overflow-hidden relative"
:initial="{ opacity: 0, scale: 0.95, y: 4 }"
:animate="{ opacity: 1, scale: 1, y: 0 }"
:exit="{ opacity: 0, scale: 0.95, y: 4 }"
@@ -137,12 +137,12 @@ const sizeDelta = computed(() => {
<!-- Cluster preview -->
<div class="relative overflow-hidden p-3 space-y-3">
<div class="flex items-center justify-between">
- <h3 class="text-sm font-semibold">
+ <h3 class="text-sm font-semibold text-neutral-900 dark:text-white">
{{
$t('map.cluster.nearbyPhotos', [clusteredPhotos.length])
}}
</h3>
- <div class="text-muted text-[10px]">
+ <div class="text-neutral-500 dark:text-muted text-[10px]">
{{ $t('map.cluster.details') }}
</div>
</div>
@@ -181,12 +181,12 @@ const sizeDelta = computed(() => {
</NuxtLink>
<!-- Hover overlay -->
<div
- class="absolute inset-0 bg-black/20 duration-300 flex justify-center items-center opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer pointer-events-none"
+ class="absolute inset-0 bg-white/30 dark:bg-black/20 duration-300 flex justify-center items-center opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer pointer-events-none"
>
<div
- class="rounded-full bg-black/50 p-2 backdrop-blur-sm flex justify-center items-center"
+ class="rounded-full bg-white/80 dark:bg-black/50 p-2 backdrop-blur-sm flex justify-center items-center"
>
- <Icon name="tabler:external-link" />
+ <Icon name="tabler:external-link" class="text-neutral-700 dark:text-white" />
</div>
</div>
<!-- Show +N overlay for the last image if there are more -->
@@ -195,9 +195,9 @@ const sizeDelta = computed(() => {
index === clusterCount - 1 &&
clusteredPhotos.length > clusterCount
"
- class="absolute inset-0 bg-black/60 flex items-center justify-center cursor-pointer pointer-events-none"
+ class="absolute inset-0 bg-white/80 dark:bg-black/60 flex items-center justify-center cursor-pointer pointer-events-none"
>
- <span class="text-white text-lg font-bold">
+ <span class="text-neutral-800 dark:text-white text-lg font-bold">
+{{ clusteredPhotos.length - clusterCount }}
</span>
</div>
@@ -211,7 +211,7 @@ const sizeDelta = computed(() => {
clusteredPhotos.length &&
clusteredPhotos.some((p) => p.city)
"
- class="flex items-center gap-1 text-xs text-muted font-medium mt-2"
+ class="flex items-center gap-1 text-xs text-neutral-600 dark:text-muted font-medium mt-2"
>
<Icon
name="tabler:map-pin"
@@ -232,7 +232,7 @@ const sizeDelta = computed(() => {
clusteredPhotos.length &&
clusteredPhotos.some((p) => p.dateTaken)
"
- class="flex items-center gap-1 text-xs text-muted font-medium mt-2"
+ class="flex items-center gap-1 text-xs text-neutral-600 dark:text-muted font-medium mt-2"
>
<Icon
name="tabler:calendar-week"
diff --git a/app/components/map/GlassButton.vue b/app/components/map/GlassButton.vue
index 783e7ef7..a93e6578 100644
--- a/app/components/map/GlassButton.vue
+++ b/app/components/map/GlassButton.vue
@@ -25,7 +25,7 @@ withDefaults(
type="button"
:class="
twMerge(
- 'pointer-events-auto flex size-10 items-center justify-center rounded-xl bg-black/20 text-white backdrop-blur-md border border-white/10 shadow-lg shadow-black/25 overflow-hidden',
+ 'pointer-events-auto flex size-10 items-center justify-center rounded-xl bg-white/80 text-neutral-700 backdrop-blur-md border border-neutral-100 shadow-lg shadow-neutral-300/25 dark:bg-black/20 dark:text-white dark:border-white/10 dark:shadow-black/25 overflow-hidden',
$props.class,
)
"
diff --git a/app/components/map/SinglePhotoPin.vue b/app/components/map/SinglePhotoPin.vue
index 7b467378..8a4b6517 100644
--- a/app/components/map/SinglePhotoPin.vue
+++ b/app/components/map/SinglePhotoPin.vue
@@ -60,7 +60,7 @@ const onClick = () => {
>
<div
v-if="isSelected"
- class="bg-primary/30 absolute -inset-1 animate-pulse rounded-full"
+ class="bg-primary/20 dark:bg-primary/30 absolute -inset-1 animate-pulse rounded-full"
/>
<div class="absolute inset-0 overflow-hidden rounded-full">
@@ -73,7 +73,7 @@ const onClick = () => {
class="h-full w-full object-cover opacity-50"
/>
<div
- class="from-green/60 to-emerald/80 dark:from-green/70 dark:to-emerald/90 absolute inset-0 bg-gradient-to-br"
+ class="absolute inset-0 bg-gradient-to-br from-green/40 to-emerald/60 dark:from-green/60 dark:to-emerald/80"
/>
</div>
@@ -83,8 +83,8 @@ const onClick = () => {
twMerge(
'relative size-10 flex justify-center items-center rounded-full border shadow-lg hover:shadow-xl',
isSelected
- ? 'border-primary/40 bg-primary/90 shadow-primary/50 dark:border-primary/30 dark:bg-primary/80'
- : 'border-white/30 bg-black/80 hover:bg-black/90',
+ ? 'border-primary/60 bg-primary/80 shadow-primary/30 dark:border-primary/40 dark:bg-primary/90 dark:shadow-primary/50'
+ : 'border-white/50 bg-white/80 hover:bg-white/90 dark:border-white/30 dark:bg-black/80 dark:hover:bg-black/90',
)
"
>
@@ -93,7 +93,7 @@ const onClick = () => {
/>
<Icon
name="tabler:photo"
- class="size-5 text-white drop-shadow"
+ class="size-5 text-neutral-700 dark:text-white drop-shadow"
/>
<div
class="absolute inset-0 rounded-full shadow-inner shadow-black/5"
@@ -120,7 +120,7 @@ const onClick = () => {
"
>
<motion.div
- class="bg-black/50 backdrop-blur-md border border-neutral-700 rounded-lg shadow-lg w-xs max-w-xs overflow-hidden relative"
+ class="bg-white/50 dark:bg-black/50 backdrop-blur-md border border-neutral-100 dark:border-neutral-700 rounded-lg shadow-lg w-xs max-w-xs overflow-hidden relative"
:initial="{ opacity: 0, scale: 0.95, y: 4 }"
:animate="{ opacity: 1, scale: 1, y: 0 }"
:exit="{ opacity: 0, scale: 0.95, y: 4 }"
@@ -154,14 +154,14 @@ const onClick = () => {
:to="`/${marker.id}`"
target="_blank"
rel="noopener"
- class="flex items-center gap-2 text-white group/link"
+ class="flex items-center gap-2 text-neutral-900 dark:text-white group/link"
>
<h3 class="flex-1 text-lg font-semibold truncate">
{{ marker.title || `照片 ${marker.id}` }}
</h3>
<Icon
name="tabler:external-link"
- class="size-4 text-muted opacity-0 group-hover/link:opacity-100 transition-opacity"
+ class="size-4 text-neutral-500 dark:text-muted opacity-0 group-hover/link:opacity-100 transition-opacity"
/>
</NuxtLink>
@@ -169,7 +169,7 @@ const onClick = () => {
<div class="space-y-1">
<div
v-if="marker.city || marker.exif?.DateTimeOriginal"
- class="flex items-center gap-1 text-xs text-muted font-medium mb-2"
+ class="flex items-center gap-1 text-xs text-neutral-600 dark:text-muted font-medium mb-2"
>
<div v-if="marker.city">
<span class="truncate">
@@ -186,7 +186,7 @@ const onClick = () => {
<!-- Camera -->
<div
v-if="marker.exif?.Make || marker.exif?.Model"
- class="flex items-center gap-1 text-xs text-muted"
+ class="flex items-center gap-1 text-xs text-neutral-600 dark:text-muted"
>
<Icon
name="tabler:camera"
@@ -205,7 +205,7 @@ const onClick = () => {
v-if="
marker.exif?.GPSLatitude || marker.exif?.GPSLongitude
"
- class="flex items-center gap-1 text-xs text-muted"
+ class="flex items-center gap-1 text-xs text-neutral-600 dark:text-muted"
>
<Icon
name="tabler:map-pin"
@@ -227,7 +227,7 @@ const onClick = () => {
<!-- Altitude -->
<div
v-if="marker.exif?.GPSAltitude"
- class="flex items-center gap-1 text-xs text-muted"
+ class="flex items-center gap-1 text-xs text-neutral-600 dark:text-muted"
>
<Icon
name="tabler:mountain"
diff --git a/app/pages/globe.vue b/app/pages/globe.vue
index c6416243..f0b33c4c 100644
--- a/app/pages/globe.vue
+++ b/app/pages/globe.vue
@@ -258,16 +258,17 @@ onBeforeRouteLeave(() => {
class="w-full h-full"
>
<ClientOnly>
+ <!-- mapbox://styles/hoshinosuzumi/cmev0eujf01dw01pje3g9cmlg -->
<MapboxMap
class="w-full h-full"
:map-id="generateRandomKey()"
:options="{
- style: 'mapbox://styles/hoshinosuzumi/cmev0eujf01dw01pje3g9cmlg',
+ style: 'mapbox://styles/mapbox/standard',
zoom: mapViewState.zoom,
center: [mapViewState.longitude, mapViewState.latitude],
config: {
basemap: {
- lightPreset: 'night',
+ lightPreset: $colorMode.value === 'dark' ? 'night' : 'day',
colorThemes: 'faded',
},
},