font control | storelayout

This commit is contained in:
lovebird 2025-03-12 18:48:35 +01:00
parent f91332c7a6
commit 45b40b7213
7 changed files with 62 additions and 59 deletions

File diff suppressed because one or more lines are too long

View File

@ -107,7 +107,7 @@ export const SHOW_LICENSE = true
export const SHOW_RENDERINGS = true
export const SHOW_TABS = false
export const SHOW_GALLERY = false
export const SHOW_GALLERY = true
export const SHOW_FILES = true
export const SHOW_SPECS = true
export const SHOW_CHECKOUT = true

View File

@ -54,6 +54,8 @@ const title = item?.title as string || config.site.title || ""
const description = item?.description as string || config.metadata.description
const keywords = await item_keywords(item, Astro.currentLocale)
const tracking = config?.tracking?.googleAnalytics
---
<AstroSeo
@ -138,13 +140,13 @@ const keywords = await item_keywords(item, Astro.currentLocale)
<StructuredData frontmatter={item} />
{config.tracking?.googleAnalytics && (
<script async src={`https://www.googletagmanager.com/gtag/js?id=${config.tracking.googleAnalytics}`}></script>
<script client:load>
{tracking && (
<script async src={`https://www.googletagmanager.com/gtag/js?id=${tracking}`}></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', "G-RW6Q6EG3J0");
gtag('js', new Date())
gtag('config', {tracking})
</script>
)}
@ -157,6 +159,7 @@ const keywords = await item_keywords(item, Astro.currentLocale)
window.location.href = `/${language}`;
}
</script>
<link rel="sitemap" href="/sitemap-index.xml" />
}

View File

@ -46,12 +46,12 @@ const footerRight = await footer_right(locale)
<Wrapper variant="standard" class="py-12">
<footer class="py-2">
<div class="p-4 xl:pb-0 bg-[white] overflow-hidden rounded-xl">
<div class="grid md:grid-cols-3 gap-6">
<div class="p-4 bg-[white] overflow-hidden rounded-xl">
<div class="grid grid-cols-2 gap-6">
<div
class="flex flex-col h-full justify-between xl:pb-2 order-last md:order-none"
>
class="flex flex-col justify-between">
<nav role="navigation">
<ul class="text-xs space-y-1 font-mono uppercase text-neutral-500">
{
footerRight.map((link) => (
@ -74,20 +74,9 @@ const footerRight = await footer_right(locale)
))
}
</div>
</nav>
<div class="flex gap-4 mt-12 items-center">
<img src="/logos/transparent.svg" alt="logo" class="size-4" />
<p
class="text-xs leading-5 text-neutral-400 text-pretty font-mono uppercase"
>
</p>
</div>
</nav>
</div>
<img
src="/logos/transparent.svg"
alt="logo"
class="size-12 md:mx-auto fill-orange-600"
/>
<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">

View File

@ -14,7 +14,7 @@ const { frontmatter: frontmatter, additionalKeywords, ...rest } = Astro.props;
{...rest}
/>
</head>
<body class="bg-neutral-100 mx-auto 2xl:max-w-7xl flex flex-col min-h-svh p-4">
<body class="bg-neutral-100 mx-auto 2xl:max-w-7xl flex flex-col min-h-svh p-4 text-neutral-500 font-mono">
<Navigation />
<main class="grow">
<slot />

View File

@ -65,25 +65,25 @@ const str_debug =
const Content_Debug = await createMarkdownComponent(str_debug);
const view = "store";
const items = (await getCollection(view));//.filter((i) => item.rel !== i.id);
const items = await getCollection(view); //.filter((i) => item.rel !== i.id);
//const group_id = group_path(item);
const others = await group_by_path(items, Astro.currentLocale);
---
<BaseLayout frontmatter={item} description={item.description} {...rest}>
<BaseLayout frontmatter={item} description={item.description} {...rest} class="">
<Wrapper>
<section>
<div class="grid sm:grid-cols-2 lg:grid-cols-2 just xl:grid-cols-2 gap-2">
<div class="grid sm:grid-cols-2 lg:grid-cols-2 just xl:grid-cols-2 gap-2 ">
<div class="flex flex-col gap-2 h-full justify-between">
<div>
<article class="markdown-content bg-white rounded-xl p-4">
<h1
class="text-neutral-500 font-mono font-semibold mb-2 text-2xl"
class="text-neutral-500 font-semibold mb-2 text-2xl"
>
<span><Translate>{`${item.title}`}</Translate></span>
{
isRTL(Astro.currentLocale) && (
<div class="text-neutral-500 font-mono font-semibold mb-2">
<div class="text-neutral-500 font-semibold mb-2">
"{item.title}"
</div>
)
@ -104,7 +104,7 @@ const others = await group_by_path(items, Astro.currentLocale);
href={item.cad[0][".html"]}
title="link to your page"
aria-label="your label"
class="relative group overflow-hidden pl-4 font-mono h-14 flex space-x-6 items-center bg-white hover:bg-neutral-200 duration-300 rounded-xl w-full justify-between"
class="relative group overflow-hidden pl-4 h-14 flex space-x-6 items-center bg-white hover:bg-neutral-200 duration-300 rounded-xl w-full justify-between"
>
<span class="relative uppercase text-xs text-neutral-600">
<Translate>3D Preview</Translate>
@ -155,7 +155,7 @@ const others = await group_by_path(items, Astro.currentLocale);
href={item.checkout}
title="link to your page"
aria-label="your label"
class="relative group overflow-hidden pl-4 font-mono h-14 flex space-x-6 items-center bg-orange-500 hover:bg-black duration-300 rounded-xl w-full justify-between"
class="relative group overflow-hidden pl-4 h-14 flex space-x-6 items-center bg-orange-500 hover:bg-black duration-300 rounded-xl w-full justify-between"
>
<span class="relative uppercase text-xs text-white">
<Translate>Add to cart</Translate>
@ -205,7 +205,7 @@ const others = await group_by_path(items, Astro.currentLocale);
SHOW_LICENSE && (
<div class="space-y-2">
<div class="bg-white rounded-xl p-4">
<h3 class="text-lg text-neutral-600 uppercase font-mono tracking-tight">
<h3 class="text-lg text-neutral-600 uppercase tracking-tight">
<Translate>License</Translate>
</h3>
<p class="text-neutral-500 mt-4 text-sm">
@ -265,31 +265,44 @@ const others = await group_by_path(items, Astro.currentLocale);
data-tabs-inactive-classes="dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300"
role="tablist"
>
{SHOW_README && <TabButton title="Overview" />}
<TabButton title="Specs" />
<TabButton title="Gallery" />
<TabButton title="Resources" />
{SHOW_SAMPLES && <TabButton title="Samples" />}
{SHOW_README && item.readme && <TabButton title="Overview" />}
{SHOW_SPECS && <TabButton title="Specs" />}
{SHOW_GALLERY && <TabButton title="Gallery" />}
{SHOW_RESOURCES && <TabButton title="Resources" />}
{
SHOW_SAMPLES && item.assets.samples.length > 0 && (
<TabButton title="Samples" />
)
}
{SHOW_DEBUG && <TabButton title="Debug" />}
</ul>
</div>
<div id="default-styled-tab-content">
<TabContent title="Overview" class="content">
{SHOW_README && item.readme && <TabContent title="Overview" class="content">
{
SHOW_README && item.readme && (
(
<Readme markdown={item.readme} data={item} />
)
}
</TabContent>
<TabContent
title="Specs"
class="bg-white rounded-xl dark:bg-gray-800 font-mono"
>
<Specs frontmatter={item} />
</TabContent>
<TabContent title="Gallery" class="p-0 md:p-4 rounded-lg bg-white">
<GalleryK images={item.assets.gallery} item={item} />
</TabContent>
}
{
SHOW_SPECS && (
<TabContent
title="Specs"
class="bg-white rounded-xl dark:bg-gray-800"
>
<Specs frontmatter={item} />
</TabContent>
)
}
{
SHOW_GALLERY && (
<TabContent title="Gallery" class="p-0 md:p-4 rounded-lg bg-white">
<GalleryK images={item.assets.gallery} item={item} />{" "}
</TabContent>
)
}
{
SHOW_SAMPLES && (
<TabContent
@ -359,21 +372,19 @@ const others = await group_by_path(items, Astro.currentLocale);
</script>
</section>
<hr />
<h1 aria-hidden="true" class="p-4 text-2xl text-neutral-500 space-x-8">
<Translate>Related</Translate>
<h1 aria-hidden="true" class="p-4 text-xs space-x-8"> <Translate>Related</Translate>
</h1>
{
SHOW_RELATED && (
<section id="item_related" class="bg-blue-50 p-4 rounded-2xl">
{Object.keys(others).map((relKey) => (
<section>
<h5
<h4
aria-hidden="true"
class="p-4 text-sm text-neutral-500 space-x-8"
class="p-4 text-xl text-neutral-500 space-x-8"
>
{relKey}
</h5>
</h4>
<div class="grid sm:grid-cols-4 lg:grid-cols-4 xl:grid-cols-4 gap-2">
{others[relKey].map((post) => (
<StoreEntries

View File

@ -40,7 +40,7 @@ const frontmatter = {
---
<BaseLayout frontmatter={frontmatter}>
<Wrapper variant="standard" class="py-4">
<Wrapper variant="standard" class="py-4 font-mono">
<CtaOne />
<section>
<div class="py-2 space-y-2">
@ -50,12 +50,12 @@ const frontmatter = {
{
Object.keys(groups).map((relKey) => (
<section>
<h1
<h3
aria-hidden="true"
class="p-4 text-2xl text-neutral-500 space-x-8"
class="p-4 text-xs space-x-8 text-neutral-600"
>
{relKey}
</h1>
</h3>
<div class="grid sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-2 gap-2">
{groups[relKey].map((post) => (
<StoreEntries