|
|
@ -85,23 +85,23 @@ import { PATHS , DEFAULT_IMAGES} from '~/config/paths';
|
|
|
|
import { projects } from '~/config/projects';
|
|
|
|
import { projects } from '~/config/projects';
|
|
|
|
import type { Project } from '~/types/project';
|
|
|
|
import type { Project } from '~/types/project';
|
|
|
|
|
|
|
|
|
|
|
|
export const handleLightboxImageError = (event: Event): void => {
|
|
|
|
const handleLightboxImageError = (event: Event): void => {
|
|
|
|
const target = event.target as HTMLImageElement;
|
|
|
|
const target = event.target as HTMLImageElement;
|
|
|
|
target.src = DEFAULT_IMAGES.PROJECT;
|
|
|
|
target.src = DEFAULT_IMAGES.PROJECT;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export const handleImageError = (event: Event): void => {
|
|
|
|
const handleImageError = (event: Event): void => {
|
|
|
|
const target = event.target as HTMLImageElement;
|
|
|
|
const target = event.target as HTMLImageElement;
|
|
|
|
target.src = DEFAULT_IMAGES.PROJECT;
|
|
|
|
target.src = DEFAULT_IMAGES.PROJECT;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export const handleIconError = (event: Event): void => {
|
|
|
|
const handleIconError = (event: Event): void => {
|
|
|
|
const target = event.target as HTMLImageElement;
|
|
|
|
const target = event.target as HTMLImageElement;
|
|
|
|
target.src = DEFAULT_IMAGES.ICON;
|
|
|
|
target.src = DEFAULT_IMAGES.ICON;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const useProjectDetail = (id: number) => {
|
|
|
|
const useProjectDetail = (id: number) => {
|
|
|
|
const { $theme } = useNuxtApp();
|
|
|
|
const { $theme } = useNuxtApp();
|
|
|
|
const showLightbox = ref(false);
|
|
|
|
const showLightbox = ref(false);
|
|
|
|
const currentImageIndex = ref(0);
|
|
|
|
const currentImageIndex = ref(0);
|
|
|
|