seo img fuckery

This commit is contained in:
babayaga 2026-01-04 10:08:59 +01:00
parent baecc4ebfa
commit cfbc2890a2
5 changed files with 17 additions and 9 deletions

View File

@ -2,11 +2,11 @@ export default {
"environment": "build",
"isSsrBuild": false,
"projectBase": "",
"publicDir": "C:\\Users\\zx\\Desktop\\polymech\\library.polymech\\public\\",
"rootDir": "C:\\Users\\zx\\Desktop\\polymech\\library.polymech\\",
"publicDir": "C:\\Users\\zx\\Desktop\\polymech\\site2\\public\\",
"rootDir": "C:\\Users\\zx\\Desktop\\polymech\\site2\\",
"mode": "production",
"outDir": "C:\\Users\\zx\\Desktop\\polymech\\library.polymech\\dist\\",
"outDir": "C:\\Users\\zx\\Desktop\\polymech\\site2\\dist\\",
"assetsDir": "_astro",
"sourcemap": "inline",
"sourcemap": false,
"assetFileNames": "/_astro/[name]@[width].[hash][extname]"
}

View File

@ -178,7 +178,7 @@
"show_contact": true,
"show_3d_preview": true,
"show_resources": true,
"show_debug": false,
"show_debug": true,
"show_samples": true,
"show_readme": false,
"show_related": true,

View File

@ -44,7 +44,15 @@ export const PRODUCT_DIR = (product) => path.resolve(resolve(`${PRODUCT_ROOT()}/
export const PRODUCTS_TARGET = (lang) => `./content/${lang}/products`
// OSRL - Language
export const IS_DEV = true
const isDev = () => {
// @ts-ignore
if (typeof import.meta !== 'undefined' && import.meta.env) {
// @ts-ignore
return import.meta.env.DEV
}
return process.env.NODE_ENV === 'development'
}
export const IS_DEV = isDev()
export const OSRL_ENV = config.osrl.env
export const OSRL_ENV_DEV = config.osrl.env_dev
export const OSRL_ENVIRONMENT = IS_DEV ? OSRL_ENV_DEV : OSRL_ENV

View File

@ -177,7 +177,7 @@ const locale = Astro.currentLocale || "en";
<!-- Main Image (with swipe functionality) -->
<div
class="flex-1 flex items-center justify-center cursor-pointer rounded-lg touch-manipulation"
@click="handleImageInteraction(currentIndex)"
@click="preloadAndOpen()"
@touchstart="touchStartX = $event.touches[0].clientX; isSwiping = true;"
@touchend="touchEndX = $event.changedTouches[0].clientX; handleSwipe();"
@touchcancel="isSwiping = false;"

View File

@ -6,7 +6,7 @@ import { sync as read } from '@polymech/fs/read'
import { sync as exists } from '@polymech/fs/exists'
import { env } from '../base/index.js'
import { gallery } from '@polymech/astro-base/base/media.js';
import { gallery } from '../base/media.js';
import { resolve } from '@polymech/commons'
import { get } from '@polymech/commons/component'
@ -198,7 +198,7 @@ const onItem = async (item: IStoreItem, ctx: ILoaderContextEx) => {
})
data.assets.gallery = await gallery('media/gallery', data.rel) as []
data.assets.main_image = (data.assets.gallery as any[]).find((item: any) => item.src.endsWith('latest.jpg'))
data.image = data.assets.renderings[0] || {}
data.image = data.assets.main_image || data.assets.gallery[0] || data.assets.renderings[0]
data.assets.showcase = await gallery('media/showcase', data.rel) as []
data.assets.samples = await gallery('media/samples', data.rel) as []