Skip to content

Commit

Permalink
Perbaikan Halaman Galeri
Browse files Browse the repository at this point in the history
  • Loading branch information
FarhannDev committed Nov 8, 2023
1 parent 8d2b158 commit 4401b64
Show file tree
Hide file tree
Showing 13 changed files with 228 additions and 560 deletions.
8 changes: 4 additions & 4 deletions components/gallery/GalleryCardAlbum.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<script lang="ts" setup>
const props = defineProps({ title: { type: String }, created: { type: String }, albumImage: { type: String }, total: { type: Number }, redirect: { type: String } })
defineProps({ title: { type: String }, created: { type: String }, albumImage: { type: String }, total: { type: Number }, redirect: { type: String } })
</script>

<template>
<div class="card album-card">
<NuxtLink :to="redirect" aria-label="Lihat Selengkapnya" title="Lihat Selengkapnya">
<NuxtLink :to="`/gallery/${redirect}`" aria-label="Lihat Selengkapnya" :title="`Album ${title}`">
<NuxtImg class="card-img-top img-fluid album-cover__images" :src="albumImage" alt="Album 1" loading="lazy"
format="webp" />
</NuxtLink>


<div class="card-body">
<div class="d-flex flex-column justify-content-start align-self-stretch">
<NuxtLink class="album-cover__title" :to="'/gallery/album-isna-2016'" aria-label="Lihat Selengkapnya"
<NuxtLink class="album-cover__title" :to="`/gallery/${redirect}`" aria-label="Lihat Selengkapnya"
title="Lihat Selengkapnya">
{{ title }}
{{ `Album ${title}` }}
</NuxtLink>

<h5 class="card-subtitle album-cover__subtitle ">
Expand Down
4 changes: 2 additions & 2 deletions components/navbar/NavbarFixed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ const routePathMenu: globalThis.ComputedRef<string | string[]> = computed(() =>


<li class="nav-item">
<NuxtLink @click="toggleMenu()" :class="`nav-link mx-md-1 ${route.path === '/gallery-smartnation' ? 'active' : ''
}`" to="/gallery-smartnation">Galeri
<NuxtLink @click="toggleMenu()" :class="`nav-link mx-md-1 ${route.path === '/gallery' || route.path === `/gallery/${route.params.id}` ? 'active' : ''
}`" to="/gallery">Galeri
</NuxtLink>
</li>
<li class="nav-item">
Expand Down
4 changes: 2 additions & 2 deletions components/navbar/NavbarSticky.vue
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ const routePathMenu: globalThis.ComputedRef<string | string[]> = computed(() =>
</li>

<li class="nav-item">
<NuxtLink @click="toggleMenu" :class="`nav-link mx-md-1 ${route.path === '/gallery-smartnation' ? 'active' : ''
}`" to="/gallery-smartnation">Galeri
<NuxtLink @click="toggleMenu" :class="`nav-link mx-md-1 ${route.path === '/gallery' ? 'active' : ''
}`" to="/gallery">Galeri
</NuxtLink>
</li>
<li class="nav-item">
Expand Down
23 changes: 13 additions & 10 deletions pages/[id].vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<script setup>
definePageMeta({ layout: "content-layout" })
<script setup lang="ts">
import { ColorModeInstance } from "@nuxtjs/color-mode/dist/runtime/types";
import { posts } from "~/utils/data/getInitialPostsData"
definePageMeta({ layout: "content-layout" })
const route = useRoute();
const postId = String(route.params.id)
const post = posts.find(post => post.slug === postId)
if (!post) {
Expand All @@ -23,11 +21,11 @@ useSeoMeta({
title: post.title.rendered,
description: post.excerpt.rendered,
author: 'Smart Nation',
articleAuthor: 'Smart Nation',
articlePublishedTime: useFormatter(post.date_gmt),
articleModifiedTime: useFormatter(post.date_gmt),
articleSection: 'Smart City',
articleTag: post.categories,
// articleAuthor: 'Smart Nation',
// articlePublishedTime: useFormatter(post.date_gmt),
// articleModifiedTime: useFormatter(post.date_gmt),
// articleSection: 'Smart City',
// articleTag: post.categories,
ogType: 'article',
ogTitle: post.title.rendered,
ogDescription: post.excerpt.rendered,
Expand All @@ -38,6 +36,9 @@ useSeoMeta({
ogImageUrl: `https://smartnation.vercel.app/${post.featured_media}`,
})
const colorMode: ColorModeInstance = useColorMode()
</script>

<template>
Expand Down Expand Up @@ -69,6 +70,8 @@ useSeoMeta({
</div>
</section>
<!-- section berita detail end -->

<hr v-if="colorMode.preference === 'dark'" class="text-secondary" />
</main>
</template>

Expand Down
2 changes: 1 addition & 1 deletion pages/about-us.vue
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ const { data: clients } = await useFetch('/api/client')
</div>
</section>
<!-- section portofolio end -->
<hr v-show="colorMode.preference === 'dark'" />
<hr v-if="colorMode.preference === 'dark'" class="text-secondary" />
</main>
</template>

Expand Down
7 changes: 7 additions & 0 deletions pages/category/[id].vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts" setup>
import { ColorModeInstance } from "@nuxtjs/color-mode/dist/runtime/types";
import { categories } from "~/utils/data/getInitialCategoryPostData";
import { posts } from "~/utils/data/getInitialPostsData"
Expand Down Expand Up @@ -27,6 +28,8 @@ useSeoMeta({
});
const colorMode: ColorModeInstance = useColorMode()
</script>

<template>
Expand Down Expand Up @@ -91,6 +94,8 @@ useSeoMeta({
</div>
</section>
<!-- Section berita end -->

<hr v-if="colorMode.preference === 'dark'" class="text-secondary" />
</main>
</template>

Expand All @@ -106,9 +111,11 @@ useSeoMeta({
/* 28.8px */
/* 24px */
}
.text-decoration-underline {
margin-bottom: 25px !important;
}
.line-break {
position: relative;
top: -5px;
Expand Down
2 changes: 1 addition & 1 deletion pages/contact-us.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const colorMode = useColorMode();
</section>
<!-- section kontak end -->

<hr v-show="colorMode.preference === 'dark'" />
<hr v-if="colorMode.preference === 'dark'" class="text-secondary" />
</main>
</template>

Expand Down
18 changes: 12 additions & 6 deletions pages/events/[id].vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup>
<script setup lang="ts">
definePageMeta({ layout: "content-layout" })
import { ColorModeInstance } from "@nuxtjs/color-mode/dist/runtime/types";
import { posts } from "~/utils/data/getInitialPostsData"
const route = useRoute();
Expand All @@ -20,11 +21,11 @@ useSeoMeta({
title: post.title.rendered,
description: post.excerpt.rendered,
author: 'Smart Nation',
articleAuthor: 'Smart Nation',
articlePublishedTime: useFormatter(post.date_gmt),
articleModifiedTime: useFormatter(post.date_gmt),
articleSection: 'Smart City',
articleTag: post.categories,
// articleAuthor: 'Smart Nation',
// articlePublishedTime: useFormatter(post.date_gmt),
// articleModifiedTime: useFormatter(post.date_gmt),
// articleSection: 'Smart City',
// articleTag: post.categories,
ogType: 'article',
ogTitle: post.title.rendered,
ogDescription: post.excerpt.rendered,
Expand All @@ -40,6 +41,8 @@ const postsCategories = posts.filter(post => post.categories.find(category => ca
.sort((a, b) => b.date_gmt.toString().localeCompare(a.date_gmt.toString()))
?.slice(0, 5)
const colorMode: ColorModeInstance = useColorMode()
</script>

<template>
Expand Down Expand Up @@ -70,6 +73,9 @@ const postsCategories = posts.filter(post => post.categories.find(category => ca
</div>
</section>
<!-- section berita detail end -->


<hr v-if="colorMode.preference === 'dark'" class="text-secondary" />
</main>
</template>

Expand Down
4 changes: 4 additions & 0 deletions pages/events/category/[id].vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts" setup>
import { ColorModeInstance } from "@nuxtjs/color-mode/dist/runtime/types";
import { categories } from "~/utils/data/getInitialCategoryPostData";
import { posts } from "~/utils/data/getInitialPostsData";
Expand Down Expand Up @@ -56,6 +57,7 @@ const isnaYearsData = ref([
const isnaValues: globalThis.Ref<string | undefined> = ref('')
const colorMode: ColorModeInstance = useColorMode()
useSeoMeta({
title: `Berita Kategori ${categoryTitle?.value}`,
description: `Kumpulan Acara ISNA dari beberapa Kategori`,
Expand Down Expand Up @@ -198,6 +200,8 @@ useSeoMeta({
</div>
</section>
<!-- Section berita end -->

<hr v-if="colorMode.preference === 'dark'" class="text-secondary" />
</main>
</template>

Expand Down
61 changes: 0 additions & 61 deletions pages/gallery-smartnation.vue

This file was deleted.

Loading

0 comments on commit 4401b64

Please sign in to comment.