generated from polymech/site-template
howto lang router | css crap | model
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
"format": "unix-time"
|
||||
}
|
||||
],
|
||||
"default": "2025-03-31T06:44:53.104Z"
|
||||
"default": "2025-03-31T14:47:24.482Z"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
|
||||
File diff suppressed because one or more lines are too long
+29
-32
@@ -552,7 +552,7 @@
|
||||
},
|
||||
"https://github.com/%5Bfiltered%5D": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743403538852
|
||||
"timestamp": 1743432501307
|
||||
},
|
||||
"https://github.com/darigovresearch": {
|
||||
"isValid": true,
|
||||
@@ -670,7 +670,7 @@
|
||||
},
|
||||
"https://scholarworks.uni.edu/cgi/viewcontent.cgi?article=3680%5C&context=grp": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743403494877
|
||||
"timestamp": 1743432446002
|
||||
},
|
||||
"https://pmc.ncbi.nlm.nih.gov/articles/PMC10489002/": {
|
||||
"isValid": true,
|
||||
@@ -754,7 +754,7 @@
|
||||
},
|
||||
"https://journals.plos.org/plosone/article?id=10.1371%252Fjournal.pone.0288696": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743403505359
|
||||
"timestamp": 1743432458460
|
||||
},
|
||||
"https://www.youtube.com/watch?v=_a7usMe_K38": {
|
||||
"isValid": true,
|
||||
@@ -841,7 +841,7 @@
|
||||
},
|
||||
"https://www.toraytac.com/media/c3feb206-1398-4e0e-bca6-df7780f11745/tcCurg/TenCate%2520Advanced%2520Composites/Documents/Technical%2520papers/TenCate_chopped_fiber_thermoplastics_compression_molding_technical_paper.pdf": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743403495719
|
||||
"timestamp": 1743432447076
|
||||
},
|
||||
"https://youtu.be/qtZv96cifIU": {
|
||||
"isValid": true,
|
||||
@@ -1397,7 +1397,7 @@
|
||||
},
|
||||
"https://www.amazon.it/s?k=cnc+CNC%20Router": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743403496755,
|
||||
"timestamp": 1743432448294,
|
||||
"meta": {
|
||||
"title": "Ci dispiace",
|
||||
"image": "https://images-eu.ssl-images-amazon.com/images/G/29/x-locale/communities/people/logo.gif",
|
||||
@@ -1897,7 +1897,7 @@
|
||||
},
|
||||
"https://digitalcommons.calpoly.edu/cgi/viewcontent.cgi?article=1288%5C&context=eesp": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743403498128
|
||||
"timestamp": 1743432449580
|
||||
},
|
||||
"*": {
|
||||
"isValid": false,
|
||||
@@ -1905,7 +1905,7 @@
|
||||
},
|
||||
"https://partners.noplasticsunday.com/NPSblog/?bmode=view%5C&idx=11164797": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743403501467,
|
||||
"timestamp": 1743432453913,
|
||||
"meta": {
|
||||
"title": "노플라스틱선데이",
|
||||
"description": "지속가능한 제조 서비스 NPS Partners",
|
||||
@@ -2062,7 +2062,7 @@
|
||||
},
|
||||
"https://www.youtube.com/watch?v=Eq9IbetsLB4%5C&t=2s": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743403502696,
|
||||
"timestamp": 1743432455511,
|
||||
"meta": {
|
||||
"title": "Injection molding machine for recycling plastic",
|
||||
"description": "Injection molding machine for recycling plastic (called \"Smart Injector\"). The design is low-cost and uses easy componentsIMPORTANT! The machine is still wor...",
|
||||
@@ -2647,7 +2647,7 @@
|
||||
},
|
||||
"https://www.youtube.com/watch?time_continue=163%5C&v=95aPYlXShTY%5C&feature=emb_logo": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743403503894,
|
||||
"timestamp": 1743432456863,
|
||||
"meta": {
|
||||
"title": "Hands-Free Door Opener: Technical Information",
|
||||
"description": "Discover our available models, printing and mounting instructions, and informational sticker for our 3D-printed hands-free door opener to avoid passing on CO...",
|
||||
@@ -2895,7 +2895,7 @@
|
||||
},
|
||||
"https://crescent.education/wp-content/uploads/2019/02/MODULE-II-%25E2%2580%2593-FUNDAMENTALS-OF-EXTRUSION-MOULDING.pdf": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743403505168
|
||||
"timestamp": 1743432458170
|
||||
},
|
||||
"https://rjginc.com/essential-injection-molding-safety-standards-and-practices/": {
|
||||
"isValid": true,
|
||||
@@ -2920,7 +2920,7 @@
|
||||
},
|
||||
"https://www.oldergeeks.com/downloads/search.php?limit=100%5C&string=Power+Software+Ltd.%5C&sort=file_name%5C&order=asc%5C&id=0%5C&page=9": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743403506463,
|
||||
"timestamp": 1743432459619,
|
||||
"meta": {
|
||||
"favicon": "https://www.oldergeeks.com/favicon.ico"
|
||||
}
|
||||
@@ -3131,7 +3131,7 @@
|
||||
},
|
||||
"https://papers.ssrn.com/sol3/Delivery.cfm/733008ad-9620-43bf-896c-aa4a2e9931e5-MECA.pdf?abstractid=4611811%5C&mirid=1": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743403515712,
|
||||
"timestamp": 1743432463401,
|
||||
"meta": {
|
||||
"title": "Page Cannot be Found",
|
||||
"favicon": "https://papers.ssrn.com/favicon.ico"
|
||||
@@ -3231,7 +3231,7 @@
|
||||
},
|
||||
"https://en.wikipedia.org/wiki/Jigsaw_%5C(power_tool%5C": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743403516509
|
||||
"timestamp": 1743432463777
|
||||
},
|
||||
"https://www.amazon.de/-/en/Stanley-10-099-Classic/dp/B001FWP58U": {
|
||||
"isValid": false,
|
||||
@@ -3819,7 +3819,7 @@
|
||||
},
|
||||
"https://scibizsw.com/20_THE%2520OFFICIAL%2520RASPBERRY%2520PI%2520PROJECTS%2520BOOK%2520v3.pdf": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743403536952
|
||||
"timestamp": 1743432498461
|
||||
},
|
||||
"https://archive.org/stream/MagPi/Projects_Book_v3_djvu.txt": {
|
||||
"isValid": true,
|
||||
@@ -5834,7 +5834,7 @@
|
||||
},
|
||||
"https://www.rainbow-pkg.com/news/youpinzhiku%25E4%25B8%25A8hot-stamping-and-cold-stamping-technology-which-one-is-more-suitable-for-your-packaging-products/": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743403520270
|
||||
"timestamp": 1743432467154
|
||||
},
|
||||
"https://ch-wauters.com/en/cold-foil-stamping-by-wauters/": {
|
||||
"isValid": true,
|
||||
@@ -6091,7 +6091,7 @@
|
||||
},
|
||||
"https://%5Bfiltered%5D.github.io/academy/build/compression": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743403520651
|
||||
"timestamp": 1743432467852
|
||||
},
|
||||
"https://davehakkens.nl/community/forums/topic/v4-sheet-press-mould-development/index.html": {
|
||||
"isValid": true,
|
||||
@@ -7218,7 +7218,7 @@
|
||||
},
|
||||
"https://guides.lib.virginia.edu/c.php?g=1164312%5C&p=8718414": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743403522934,
|
||||
"timestamp": 1743432470649,
|
||||
"meta": {
|
||||
"title": "LibGuides: COVID-19 Pandemic Children's Book Collection: Normalizing Face Masks",
|
||||
"description": "LibGuides: COVID-19 Pandemic Children's Book Collection: Normalizing Face Masks",
|
||||
@@ -7462,7 +7462,7 @@
|
||||
},
|
||||
"https://forum.freecad.org/viewtopic.php?style=1%5C&t=62057": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743403523769,
|
||||
"timestamp": 1743432472062,
|
||||
"meta": {
|
||||
"title": "Step by step tutorial on injection mold design - FreeCAD Forum",
|
||||
"image": "https://forum.freecad.org/styles/elegance/theme/images/logo.png",
|
||||
@@ -7664,7 +7664,7 @@
|
||||
},
|
||||
"https://www.youtube.com/watch?v=YzjTm3FRLVY%5C&t=5s": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743403524814,
|
||||
"timestamp": 1743432473607,
|
||||
"meta": {
|
||||
"title": "Recycling plastic waste on the beaches of Panama",
|
||||
"description": "Precious Plastic community submission! Thanks Thomas, check him out in our forums:https://davehakkens.nl/community/members/thomasthefirst/More information: h...",
|
||||
@@ -7880,11 +7880,8 @@
|
||||
}
|
||||
},
|
||||
"https://seafood.media/fis/worldnEws/worldnews.asp?monthyear=9-2024%5C&day=18%5C&id=131886%5C&l=e%5C&country=%5C&special=%5C&ndb=1%5C&df=1": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743403535866,
|
||||
"meta": {
|
||||
"error": "This operation was aborted"
|
||||
}
|
||||
"isValid": false,
|
||||
"timestamp": 1743432496762
|
||||
},
|
||||
"https://theoceancleanup.com/oceans/": {
|
||||
"isValid": true,
|
||||
@@ -8031,7 +8028,7 @@
|
||||
},
|
||||
"https://%5Bfiltered%5D.github.io/academy/build/sheetpressbuild": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743403536110
|
||||
"timestamp": 1743432497586
|
||||
},
|
||||
"https://www.singhalglobal.com/blog/sheets-of-hdpe-manufacturing-processes-and-various-use": {
|
||||
"isValid": true,
|
||||
@@ -8502,7 +8499,7 @@
|
||||
},
|
||||
"https://www.youtube.com/watch?v=gxkcffQD3eQ%5C&t=131s": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743403537908,
|
||||
"timestamp": 1743432499785,
|
||||
"meta": {
|
||||
"title": "🎄⭐🎅Como hacer figuras de plástico- Figuras Navideñas de Plástico Reciclado🎄⭐🎅",
|
||||
"description": "En este tutorial reciclamos tapas de botellas y las convertimos en figuras navideñas usando la dremel motosaw y un horno de pizza",
|
||||
@@ -9407,7 +9404,7 @@
|
||||
},
|
||||
"https://scholarworks.uark.edu/cgi/viewcontent.cgi?article=1066%5C&context=inquiry": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743403541808
|
||||
"timestamp": 1743432502586
|
||||
},
|
||||
"https://www.youtube.com/watch?v=1OZVCOYlYy8": {
|
||||
"isValid": true,
|
||||
@@ -9433,7 +9430,7 @@
|
||||
},
|
||||
"https://www.forum.linuxcnc.org/30-cnc-machines/53486-the-linuxcnc-rigid-CNC%20Router-an-open-source-dual-z-axis-gantry-machine": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743403543700,
|
||||
"timestamp": 1743432504563,
|
||||
"meta": {
|
||||
"title": "The LinuxCNC "Rigid Router" an open-source dual z-axis gantry machine",
|
||||
"description": "Hi all, I recently designed an open-source CNC router. My goal was to make a rigid, medium-format CNC router that can self-manufacture new machines and not...",
|
||||
@@ -9520,7 +9517,7 @@
|
||||
},
|
||||
"https://www.bunnings.com.au/search/products?q=fiber%2520cement": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743403543908
|
||||
"timestamp": 1743432504937
|
||||
},
|
||||
"https://safeworkwear.com.au/electrical-gloves": {
|
||||
"isValid": false,
|
||||
@@ -10097,7 +10094,7 @@
|
||||
},
|
||||
"https://citeseerx.ist.psu.edu/document?repid=rep1%5C&type=pdf%5C&doi=2d21d208bf921ec8278814cfbee00e60e54acfb4": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743403544916
|
||||
"timestamp": 1743432505743
|
||||
},
|
||||
"https://www.youtube.com/watch?v=viwbxM6F7zc": {
|
||||
"isValid": true,
|
||||
@@ -10302,7 +10299,7 @@
|
||||
},
|
||||
"https://dspace.mit.edu/bitstream/handle/1721.1/127868/1196826370-MIT.pdf?sequence=1%5C&isAllowed=y": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743403549102,
|
||||
"timestamp": 1743432509633,
|
||||
"meta": {
|
||||
"favicon": "https://dspace.mit.edu/favicon.ico"
|
||||
}
|
||||
@@ -10398,7 +10395,7 @@
|
||||
},
|
||||
"*No%20link%20provided%20in%20source%20text*": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743403549224
|
||||
"timestamp": 1743432510345
|
||||
},
|
||||
"https://www.instructables.com/Bottle-Cap-Table-with-Poured-Resin-Surface/": {
|
||||
"isValid": true,
|
||||
|
||||
@@ -14,7 +14,7 @@ const {
|
||||
title = "Tutorials",
|
||||
description = "100+ Step by step tutorials",
|
||||
buttonText = "Tutorials",
|
||||
buttonLink = "/howtos",
|
||||
buttonLink = "/en/howtos",
|
||||
imageSrc = "/images/home/icon-tutorials-2.png",
|
||||
imageAlt = ""
|
||||
} = Astro.props;
|
||||
|
||||
@@ -113,12 +113,12 @@ const EditLink = () => {
|
||||
<BaseLayout class="markdown-content bg-gray-100" frontmatter={howto}>
|
||||
<Wrapper>
|
||||
<article class="bg-white shadow-lg rounded-lg overflow-hidden">
|
||||
<header class="p-8 ">
|
||||
<header class="p-4 ">
|
||||
<h1 class="text-4xl font-bold text-gray-800 mb-4">
|
||||
<Translate>{howto.title}</Translate>
|
||||
</h1>
|
||||
<GalleryK images={[{ src: howto.cover_image.src, alt: "" }]} />
|
||||
<div class="flex gap-2 mb-4">
|
||||
<div class="flex flex-wrap gap-2 mb-4">
|
||||
{
|
||||
howto.tags.map((tag) => (
|
||||
<span class="bg-orange-500 text-white text-xs px-3 py-1 rounded-full">
|
||||
@@ -130,8 +130,8 @@ const EditLink = () => {
|
||||
</header>
|
||||
</article>
|
||||
|
||||
<section class="meta-view bg-white rounded-lg p-4 mt-4">
|
||||
<ul class="grid grid-cols-2 sm:grid-cols-3 gap-4 mt-8 mb-8">
|
||||
<section class="meta-view bg-white rounded-lg p-4 mt-4 truncate">
|
||||
<ul class="grid md:grid-cols-1 lg:grid-cols-2 gap-4 mt-8 mb-8">
|
||||
<li>
|
||||
<strong><Translate>Difficulty:</Translate></strong>
|
||||
<Translate>{howto.difficulty_level}</Translate>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
import { default_image } from "config/config.js";
|
||||
import { default_image, IMAGE_SETTINGS } from "config/config.js";
|
||||
import Translate from "@/components/polymech/i18n.astro";
|
||||
import { Img } from "imagetools/components";
|
||||
import Sidebar from "@/components/howtos/sidebar2.astro";
|
||||
@@ -9,6 +9,13 @@ const item: IHowto = model.item;
|
||||
const classes = `group relative bg-white overflow-hidden group rounded-xl ${selected ? "ring-2 ring-orange-500" : ""}`;
|
||||
const coverLocaleRel = await asset_local_rel(item, item.cover_image);
|
||||
|
||||
const { images, gallerySettings = {}, lightboxSettings = {} } = Astro.props;
|
||||
const mergedGallerySettings = {
|
||||
SIZES_REGULAR: gallerySettings.SIZES_REGULAR || IMAGE_SETTINGS.GALLERY.SIZES_REGULAR,
|
||||
SIZES_THUMB: gallerySettings.SIZES_THUMB || IMAGE_SETTINGS.GALLERY.SIZES_THUMB,
|
||||
SHOW_TITLE: gallerySettings.SHOW_TITLE ?? IMAGE_SETTINGS.GALLERY.SHOW_TITLE,
|
||||
SHOW_DESCRIPTION: gallerySettings.SHOW_DESCRIPTION ?? IMAGE_SETTINGS.GALLERY.SHOW_DESCRIPTION,
|
||||
}
|
||||
---
|
||||
<div class={classes}>
|
||||
<div
|
||||
@@ -22,8 +29,15 @@ const coverLocaleRel = await asset_local_rel(item, item.cover_image);
|
||||
objectFit="cover"
|
||||
loading="lazy"
|
||||
placeholder="blurred"
|
||||
sizes="(min-width: 220px) 220px"
|
||||
breakpoints={{ count: 2, minWidth: 120, maxWidth: 430 }}
|
||||
sizes={mergedGallerySettings.SIZES_REGULAR}
|
||||
breakpoints={{ count: 2, minWidth: 180, maxWidth: 450 }}
|
||||
attributes={
|
||||
{
|
||||
img: {
|
||||
class: "w-32 h-32 rounded hover:ring-2 aspect-square thumbnail-img"
|
||||
}
|
||||
}
|
||||
}
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -34,7 +34,7 @@ export const HOWTO_ADD_REFERENCES = true
|
||||
export const HOWTO_COMPLETE_SKILLS = false
|
||||
export const HOWTO_LOCAL_RESOURCES = false
|
||||
export const HOWTO_SEO_LLM = true
|
||||
export const HOWTO_MAX_ITEMS = 150
|
||||
export const HOWTO_MAX_ITEMS = 5
|
||||
|
||||
export const HOWTO_MIGRATION = () => path.resolve(resolve("./data/last.json"))
|
||||
export const HOWTO_ROOT_INTERN = () => path.resolve(resolve("./public/resources/howtos"))
|
||||
|
||||
@@ -36,7 +36,7 @@ export const IMAGE_PRESET: Images =
|
||||
{
|
||||
// For 3g connections: a moderate size image for a balance of quality and speed.
|
||||
sizes_medium: "(min-width: 400px) 400px, 400vw",
|
||||
sizes_thumbs: "(min-width: 120px) 120px, 120vw",
|
||||
sizes_thumbs: "(min-width: 180px) 180px, 180vw",
|
||||
sizes_large: "(min-width: 1024px) 1024px, 1024vw",
|
||||
},
|
||||
[E_BROADBAND_SPEED.FAST]:
|
||||
|
||||
+45
-1
@@ -56,6 +56,13 @@ import { env, logger } from '@/base/index.js'
|
||||
import { applyFilters, default_filters_plain, FilterFunction } from '../base/filters.js'
|
||||
import { TemplateContext, buildPrompt, LLMConfig, createTemplates } from '@/base/kbot-templates.js';
|
||||
import { template_filter } from '@/base/kbot.js'
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Assets
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
export const item_path = (item: IHowto) => `${HOWTO_ROOT()}/${item.slug}`
|
||||
export const asset_local_abs = async (item: IHowto, asset: IImage) => {
|
||||
const sanitizedFilename = sanitizeFilename(asset.name)
|
||||
@@ -124,6 +131,12 @@ export const asset_local_rel = async (item: IHowto, asset: IImage) => {
|
||||
}
|
||||
return default_image().src
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Data
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
export const raw = async () => {
|
||||
const src = HOWTO_MIGRATION()
|
||||
const data = read(src, 'json') as any;
|
||||
@@ -162,6 +175,13 @@ export const defaults = async (data: any, cwd: string, root: string) => {
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Content filters & conversions
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const commons = async (text: string): Promise<string> => {
|
||||
return await template_filter(text, 'simple', TemplateContext.COMMONS);
|
||||
}
|
||||
@@ -296,6 +316,12 @@ const to_astro = async (item: IHowto) => {
|
||||
write(path.join(itemDir, 'index.astro'), astroContent)
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Store
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const complete = async (item: IHowto) => {
|
||||
const configPath = path.join(item_path(item), 'config.json')
|
||||
const config = read(configPath, 'json') as IHowto || {}
|
||||
@@ -362,7 +388,6 @@ const complete = async (item: IHowto) => {
|
||||
|
||||
return item
|
||||
}
|
||||
|
||||
const onStoreItem = async (store: any) => {
|
||||
let item = store.data.item as IHowto
|
||||
|
||||
@@ -437,3 +462,22 @@ export function loader(): Loader {
|
||||
load
|
||||
};
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Taxonomy
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
export const group_by_cat = (items: IHowto[]) => {
|
||||
return items.reduce((acc: Record<string, IHowto[]>, item: IHowto) => {
|
||||
const category = item?.category?.label || 'uncategorized'
|
||||
if (category === 'uncategorized') {
|
||||
return acc
|
||||
}
|
||||
if (!acc[category]) {
|
||||
acc[category] = []
|
||||
}
|
||||
acc[category].push(item)
|
||||
return acc
|
||||
}, {})
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
import { group_by_cat } from "@/model/howto.js";
|
||||
import { getCollection } from "astro:content";
|
||||
import BaseLayout from "@/layouts/BaseLayout.astro";
|
||||
import Wrapper from "@/components/containers/Wrapper.astro";
|
||||
import ListItem from "@/components/howtos/ListItem.astro";
|
||||
import Translate from "@/components/polymech/i18n.astro";
|
||||
import { LANGUAGES_PROD as LANGUAGES } from "config/config.js";
|
||||
|
||||
const view = "howtos";
|
||||
|
||||
const items = (await getCollection(view)).map(
|
||||
(storeItem) => storeItem.data.item,
|
||||
);
|
||||
const groups = group_by_cat(items as any);
|
||||
const locale = Astro.currentLocale;
|
||||
const test = {};
|
||||
|
||||
export async function getStaticPaths() {
|
||||
return LANGUAGES.map((lang) => ({
|
||||
params: { locale: lang },
|
||||
}));
|
||||
}
|
||||
---
|
||||
|
||||
<BaseLayout frontmatter={test}>
|
||||
<Wrapper variant="standard" class="py-4 markdown-content2">
|
||||
<section>
|
||||
<div class="py-2 space-y-2">
|
||||
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-4"></div>
|
||||
</div>
|
||||
</section>
|
||||
{
|
||||
Object.keys(groups).map((group) => (
|
||||
<section>
|
||||
<h1
|
||||
id={group.toLowerCase().replace(/\s+/g, '-')}
|
||||
aria-hidden="true"
|
||||
class="bg-orange-400 shadow rounded-lg -space-x-8 text-xl p-6 text-white mt-4 mb-4 cursor-pointer hover:bg-orange-500 transition-colors"
|
||||
onclick={`window.location.hash = '${group.toLowerCase().replace(/\s+/g, '-')}'`}
|
||||
>
|
||||
<Translate>{group}</Translate>
|
||||
</h1>
|
||||
<div class="grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4">
|
||||
{groups[group].map((item) => (
|
||||
<ListItem
|
||||
url={`/${locale}/howtos/${item.slug}`}
|
||||
title={item.title}
|
||||
price={item.price}
|
||||
type={item.type}
|
||||
alt={item.title}
|
||||
model={{item:item}}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
))
|
||||
}
|
||||
</Wrapper>
|
||||
</BaseLayout>
|
||||
@@ -54,7 +54,7 @@
|
||||
.astro-imagetools-img {
|
||||
@apply min-w-full border-collapse rounded-lg overflow-hidden;
|
||||
background-image: none !important;
|
||||
object-fit: contain;
|
||||
object-fit: cover;
|
||||
}
|
||||
.lightbox-main{
|
||||
background-image: none !important;
|
||||
|
||||
Reference in New Issue
Block a user