generated from polymech/site-template
Synced from site
This commit is contained in:
parent
6541d83fba
commit
ce03635a24
@ -4,8 +4,8 @@ export default defineConfig({
|
||||
placeholder: "blurred",
|
||||
format: ["webp", "avif", "jpg"],
|
||||
fallbackFormat: "jpg",
|
||||
delay:250,
|
||||
includeSourceFormat: false,
|
||||
delay:100,
|
||||
includeSourceFormat: true,
|
||||
formatOptions: {
|
||||
jpg: {
|
||||
quality: 80,
|
||||
|
||||
@ -52,7 +52,7 @@ const footerRight = await footer_right(locale)
|
||||
class="flex flex-col justify-between">
|
||||
<nav role="navigation">
|
||||
|
||||
<ul class="text-xs space-y-1 font-mono uppercase text-neutral-500">
|
||||
<ul class="text-xs space-y-1 uppercase text-neutral-500">
|
||||
{
|
||||
footerRight.map((link) => (
|
||||
<li>
|
||||
@ -79,7 +79,7 @@ const footerRight = await footer_right(locale)
|
||||
|
||||
<div class="flex flex-col justify-between md:text-right xl:pb-2 mr-2">
|
||||
<nav role="navigation">
|
||||
<ul class="text-xs space-y-1 font-mono uppercase text-neutral-500">
|
||||
<ul class="text-xs space-y-1 uppercase text-neutral-500">
|
||||
{
|
||||
footerLeft.map((link) => (
|
||||
<li>
|
||||
|
||||
@ -3,12 +3,11 @@ import { Img } from "imagetools/components";
|
||||
import Translate from "@/components/polymech/i18n.astro"
|
||||
|
||||
import { translate } from "@/base/i18n"
|
||||
import { item_keywords, site_keywords } from '@/base/seo.js'
|
||||
import { item_keywords } from '@/base/seo.js'
|
||||
|
||||
import pMap from 'p-map'
|
||||
import { toJsonLd } from '@/base/media.js'
|
||||
import { createMarkdownComponent, markdownToHtml } from "@/base/index.js"
|
||||
import { I18N_SOURCE_LANGUAGE, IMAGE_SETTINGS, LANGUAGES_PROD as LANGUAGES } from "config/config.js"
|
||||
import { I18N_SOURCE_LANGUAGE, IMAGE_SETTINGS } from "config/config.js"
|
||||
import { IComponentConfig } from "@polymech/commons"
|
||||
|
||||
interface Image {
|
||||
@ -208,7 +207,7 @@ const ld = await toJsonLd(images, Astro.currentLocale || I18N_SOURCE_LANGUAGE, c
|
||||
x-show="open"
|
||||
x-transition
|
||||
:class="{ 'lightbox': !lightboxLoaded }"
|
||||
class="fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center lightbox"
|
||||
class="fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center lightbox z-10"
|
||||
>
|
||||
<div
|
||||
class="relative max-w-full max-h-full"
|
||||
@ -233,10 +232,12 @@ const ld = await toJsonLd(images, Astro.currentLocale || I18N_SOURCE_LANGUAGE, c
|
||||
img: { class: "max-w-[90vw] max-h-[90vh] object-contain rounded-lg lightbox-main" }
|
||||
}}
|
||||
/>
|
||||
{ (mergedLightboxSettings.SHOW_TITLE || mergedLightboxSettings.SHOW_DESCRIPTION) && (
|
||||
{ (mergedLightboxSettings.SHOW_TITLE || mergedLightboxSettings.SHOW_DESCRIPTION) &&
|
||||
(image.title || image.description) && (
|
||||
<div class="absolute bottom-0 left-1/2 transform -translate-x-1/2 m-[8px] max-h-[32vh] p-2 text-white bg-black/50 rounded-lg" style="width: 90%;">
|
||||
{ mergedLightboxSettings.SHOW_TITLE && ( <h3 class="text-xl"><Translate>{image.title}</Translate></h3>)}
|
||||
{ mergedLightboxSettings.SHOW_DESCRIPTION && (<p><Translate>{image.description}</Translate></p>)} </div>
|
||||
{ mergedLightboxSettings.SHOW_DESCRIPTION && (<p><Translate>{image.description}</Translate></p>)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
@ -264,7 +265,7 @@ const ld = await toJsonLd(images, Astro.currentLocale || I18N_SOURCE_LANGUAGE, c
|
||||
x-on:click="currentIndex++; lightboxLoaded = false; preloadAndOpen();"
|
||||
:disabled="!lightboxLoaded"
|
||||
class="absolute right-0 top-1/2 transform -translate-y-1/2 p-4 m-[8px] text-white text-3xl bg-gray-800/75 bg-opacity-75 rounded-lg lightbox-nav"
|
||||
:class="{'opacity-50 cursor-not-allowed': !lightboxLoaded, 'hover:bg-gray-700/75': lightboxLoaded}"
|
||||
:class="{'opacity-50 cursor-not-allowed': !lightboxLoaded, 'hover:bg-gray-700/50': lightboxLoaded}"
|
||||
aria-label="Next"
|
||||
>
|
||||
❯
|
||||
|
||||
@ -5,7 +5,7 @@ import Translate from "@/components/polymech/i18n.astro";
|
||||
|
||||
const { title, url, price, model, selected = false } = Astro.props;
|
||||
const thumbnail = model?.assets?.renderings[0]?.url || default_image();
|
||||
const classes = `group relative bg-white overflow-hidden group rounded-xl font-mono ${selected ? "ring-2 ring-orange-500" : ""}`
|
||||
const classes = `group relative bg-white overflow-hidden group rounded-xl ${selected ? "ring-2 ring-orange-500" : ""}`
|
||||
|
||||
---
|
||||
<div class={classes}>
|
||||
|
||||
@ -94,6 +94,7 @@ const others = await group_by_path(items, Astro.currentLocale);
|
||||
</div>
|
||||
|
||||
<div class="gap-2 flex flex-col h-full justify-end">
|
||||
|
||||
{
|
||||
SHOW_3D_PREVIEW &&
|
||||
item.Preview3d &&
|
||||
@ -236,7 +237,7 @@ const others = await group_by_path(items, Astro.currentLocale);
|
||||
{
|
||||
item.assets.showcase && item.assets.showcase.length > 0 && (
|
||||
<section>
|
||||
<div class="mb-2 md:mb-16 mt-0 md:mt-16 p-2 md:p-4 border-b border-gray-200 dark:border-gray-700">
|
||||
<div class="mb-2 md:mb-16 mt-0 md:mt-16 p-2 md:p-4 border-b border-gray-200 dark:border-gray-700 bg-white rounded-xl">
|
||||
<GalleryK
|
||||
images={item.assets.showcase}
|
||||
lightboxSettings={{
|
||||
@ -298,7 +299,7 @@ const others = await group_by_path(items, Astro.currentLocale);
|
||||
}
|
||||
{
|
||||
SHOW_GALLERY && (
|
||||
<TabContent title="Gallery" class="p-0 md:p-4 rounded-lg bg-white">
|
||||
<TabContent title="Gallery" class="p-4 md:p-4 rounded-lg bg-white">
|
||||
<GalleryK images={item.assets.gallery} item={item} />{" "}
|
||||
</TabContent>
|
||||
)
|
||||
@ -372,7 +373,7 @@ const others = await group_by_path(items, Astro.currentLocale);
|
||||
</script>
|
||||
</section>
|
||||
<hr />
|
||||
<h1 aria-hidden="true" class="p-4 text-xs space-x-8"> <Translate>Related</Translate>
|
||||
<h1 class="p-4 text-xs"> <Translate>Related</Translate>
|
||||
</h1>
|
||||
{
|
||||
SHOW_RELATED && (
|
||||
@ -381,11 +382,11 @@ const others = await group_by_path(items, Astro.currentLocale);
|
||||
<section>
|
||||
<h4
|
||||
aria-hidden="true"
|
||||
class="p-4 text-xl text-neutral-500 space-x-8"
|
||||
class="text-xs p-4 text-neutral-500"
|
||||
>
|
||||
{relKey}
|
||||
</h4>
|
||||
<div class="grid sm:grid-cols-4 lg:grid-cols-4 xl:grid-cols-4 gap-2">
|
||||
<div class="grid sm:grid-cols-4 lg:grid-cols-4 xl:grid-cols-4 gap-8">
|
||||
{others[relKey].map((post) => (
|
||||
<StoreEntries
|
||||
key={post.id}
|
||||
|
||||
@ -40,7 +40,7 @@ const frontmatter = {
|
||||
---
|
||||
|
||||
<BaseLayout frontmatter={frontmatter}>
|
||||
<Wrapper variant="standard" class="py-4 font-mono">
|
||||
<Wrapper variant="standard" class="py-4">
|
||||
<CtaOne />
|
||||
<section>
|
||||
<div class="py-2 space-y-2">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user