Skip to content

Commit

Permalink
feat: enable ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasonzyt committed Dec 29, 2024
1 parent dab4677 commit 2ec4dd0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 43 deletions.
1 change: 0 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export default defineNuxtConfig({
"@nuxt/image",
"@nuxt/ui",
],
ssr: false,
srcDir: "src/",
icon: {
provider: "server",
Expand Down
43 changes: 1 addition & 42 deletions src/pages/gallery.vue
Original file line number Diff line number Diff line change
@@ -1,48 +1,7 @@
<script setup lang="ts">
let router = useRouter()
let viewMode = ref('')
viewMode.value = localStorage.getItem('gallery_viewMode') || ''
const handleChange = (v: string) => {
localStorage.setItem('gallery_viewMode', v)
router.push("/gallery/" + v)
}
</script>

<template>
<div class="main">
<!-- TODO: display mode: cards/list-->
<el-radio-group v-model="viewMode" @change="handleChange" class="view-mode-radio">
<el-radio-button label="Photo" value="" />
<el-radio-button label="Album" value="albums" />
<el-radio-button label="Category" value="categories" />
</el-radio-group>
<KeepAlive>
<RouterView />
</KeepAlive>
</div>
<TheFooter />
</template>

<style scoped>
.main {
padding: 100px;
margin: 0 auto;
max-width: 1400px;
}
.el-radio-group {
margin-bottom: 20px;
}
.photo-card {
margin-right: 10px;
}
@media screen and (max-width: 1000px) {
.main {
padding: 80px 20px;
}
}
</style>
<style scoped></style>

0 comments on commit 2ec4dd0

Please sign in to comment.