generated from polymech/site-template
refactor models
This commit is contained in:
parent
1d611691de
commit
8d4e880a3a
@ -23,7 +23,7 @@
|
||||
"format": "unix-time"
|
||||
}
|
||||
],
|
||||
"default": "2025-03-31T16:46:08.017Z"
|
||||
"default": "2025-03-31T18:28:08.800Z"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
|
||||
export default new Map([
|
||||
["src/content/resources/workflow.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fresources%2Fworkflow.mdx&astroContentModuleFlag=true")],
|
||||
["src/content/infopages/contact.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Finfopages%2Fcontact.mdx&astroContentModuleFlag=true")]]);
|
||||
["src/content/infopages/contact.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Finfopages%2Fcontact.mdx&astroContentModuleFlag=true")],
|
||||
["src/content/resources/workflow.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fresources%2Fworkflow.mdx&astroContentModuleFlag=true")]]);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -552,7 +552,7 @@
|
||||
},
|
||||
"https://github.com/%5Bfiltered%5D": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743438511052
|
||||
"timestamp": 1743445732144
|
||||
},
|
||||
"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": 1743439569423
|
||||
"timestamp": 1743445690980
|
||||
},
|
||||
"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": 1743439569937
|
||||
"timestamp": 1743445696843
|
||||
},
|
||||
"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": 1743439570252
|
||||
"timestamp": 1743445691831
|
||||
},
|
||||
"https://youtu.be/qtZv96cifIU": {
|
||||
"isValid": true,
|
||||
@ -1397,7 +1397,7 @@
|
||||
},
|
||||
"https://www.amazon.it/s?k=cnc+CNC%20Router": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743438471848,
|
||||
"timestamp": 1743445692320,
|
||||
"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": 1743438473088
|
||||
"timestamp": 1743445693492
|
||||
},
|
||||
"*": {
|
||||
"isValid": false,
|
||||
@ -1905,7 +1905,7 @@
|
||||
},
|
||||
"https://partners.noplasticsunday.com/NPSblog/?bmode=view%5C&idx=11164797": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743438477203,
|
||||
"timestamp": 1743445694627,
|
||||
"meta": {
|
||||
"title": "노플라스틱선데이",
|
||||
"description": "지속가능한 제조 서비스 NPS Partners",
|
||||
@ -2062,12 +2062,12 @@
|
||||
},
|
||||
"https://www.youtube.com/watch?v=Eq9IbetsLB4%5C&t=2s": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743438478597,
|
||||
"timestamp": 1743445695078,
|
||||
"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...",
|
||||
"image": "https://i.ytimg.com/vi/Eq9IbetsLB4/hqdefault.jpg",
|
||||
"favicon": "https://www.youtube.com/s/desktop/247b1e86/img/logos/favicon_32x32.png",
|
||||
"favicon": "https://www.youtube.com/s/desktop/fc387bff/img/logos/favicon_32x32.png",
|
||||
"siteName": "YouTube"
|
||||
}
|
||||
},
|
||||
@ -2647,12 +2647,12 @@
|
||||
},
|
||||
"https://www.youtube.com/watch?time_continue=163%5C&v=95aPYlXShTY%5C&feature=emb_logo": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743438479931,
|
||||
"timestamp": 1743445695576,
|
||||
"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...",
|
||||
"image": "https://i.ytimg.com/vi/95aPYlXShTY/maxresdefault.jpg",
|
||||
"favicon": "https://www.youtube.com/s/desktop/247b1e86/img/logos/favicon_32x32.png",
|
||||
"favicon": "https://www.youtube.com/s/desktop/fc387bff/img/logos/favicon_32x32.png",
|
||||
"siteName": "YouTube"
|
||||
}
|
||||
},
|
||||
@ -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": 1743438481165
|
||||
"timestamp": 1743445696698
|
||||
},
|
||||
"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": 1743438483775,
|
||||
"timestamp": 1743445697371,
|
||||
"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": 1743438487440,
|
||||
"timestamp": 1743445698706,
|
||||
"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": 1743438488993
|
||||
"timestamp": 1743445699826
|
||||
},
|
||||
"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": 1743438509151
|
||||
"timestamp": 1743445730383
|
||||
},
|
||||
"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": 1743438492438
|
||||
"timestamp": 1743445703799
|
||||
},
|
||||
"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": 1743438492739
|
||||
"timestamp": 1743445704158
|
||||
},
|
||||
"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": 1743438494743,
|
||||
"timestamp": 1743445705612,
|
||||
"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": 1743438495434,
|
||||
"timestamp": 1743445706338,
|
||||
"meta": {
|
||||
"title": "Step by step tutorial on injection mold design - FreeCAD Forum",
|
||||
"image": "https://forum.freecad.org/styles/elegance/theme/images/logo.png",
|
||||
@ -7664,12 +7664,12 @@
|
||||
},
|
||||
"https://www.youtube.com/watch?v=YzjTm3FRLVY%5C&t=5s": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743438496853,
|
||||
"timestamp": 1743445706630,
|
||||
"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...",
|
||||
"image": "https://i.ytimg.com/vi/YzjTm3FRLVY/maxresdefault.jpg",
|
||||
"favicon": "https://www.youtube.com/s/desktop/247b1e86/img/logos/favicon_32x32.png",
|
||||
"favicon": "https://www.youtube.com/s/desktop/fc387bff/img/logos/favicon_32x32.png",
|
||||
"siteName": "YouTube"
|
||||
}
|
||||
},
|
||||
@ -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": 1743438508413,
|
||||
"meta": {
|
||||
"error": "This operation was aborted"
|
||||
}
|
||||
"isValid": false,
|
||||
"timestamp": 1743445729274
|
||||
},
|
||||
"https://theoceancleanup.com/oceans/": {
|
||||
"isValid": true,
|
||||
@ -8031,7 +8028,7 @@
|
||||
},
|
||||
"https://%5Bfiltered%5D.github.io/academy/build/sheetpressbuild": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743438508584
|
||||
"timestamp": 1743445729461
|
||||
},
|
||||
"https://www.singhalglobal.com/blog/sheets-of-hdpe-manufacturing-processes-and-various-use": {
|
||||
"isValid": true,
|
||||
@ -8502,12 +8499,12 @@
|
||||
},
|
||||
"https://www.youtube.com/watch?v=gxkcffQD3eQ%5C&t=131s": {
|
||||
"isValid": true,
|
||||
"timestamp": 1743438510312,
|
||||
"timestamp": 1743445730780,
|
||||
"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",
|
||||
"image": "https://i.ytimg.com/vi/gxkcffQD3eQ/maxresdefault.jpg",
|
||||
"favicon": "https://www.youtube.com/s/desktop/247b1e86/img/logos/favicon_32x32.png",
|
||||
"favicon": "https://www.youtube.com/s/desktop/fc387bff/img/logos/favicon_32x32.png",
|
||||
"siteName": "YouTube"
|
||||
}
|
||||
},
|
||||
@ -9407,7 +9404,7 @@
|
||||
},
|
||||
"https://scholarworks.uark.edu/cgi/viewcontent.cgi?article=1066%5C&context=inquiry": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743438513603
|
||||
"timestamp": 1743445733821
|
||||
},
|
||||
"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": 1743438515234,
|
||||
"timestamp": 1743445734477,
|
||||
"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": 1743438515561
|
||||
"timestamp": 1743445734754
|
||||
},
|
||||
"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": 1743438516784
|
||||
"timestamp": 1743445735783
|
||||
},
|
||||
"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": 1743438520729,
|
||||
"timestamp": 1743445737987,
|
||||
"meta": {
|
||||
"favicon": "https://dspace.mit.edu/favicon.ico"
|
||||
}
|
||||
@ -10398,7 +10395,7 @@
|
||||
},
|
||||
"*No%20link%20provided%20in%20source%20text*": {
|
||||
"isValid": false,
|
||||
"timestamp": 1743438520816
|
||||
"timestamp": 1743445738440
|
||||
},
|
||||
"https://www.instructables.com/Bottle-Cap-Table-with-Poured-Resin-Surface/": {
|
||||
"isValid": true,
|
||||
|
||||
BIN
public/images/home/shop.png
Normal file
BIN
public/images/home/shop.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
BIN
public/images/home/world.png
Normal file
BIN
public/images/home/world.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
@ -11,7 +11,7 @@ import {
|
||||
validateLinks
|
||||
} from './filters.js';
|
||||
|
||||
import { item_path } from '../model/howto.js';
|
||||
import { item_path } from '../model/howto/howto.js';
|
||||
|
||||
describe('filters', () => {
|
||||
describe('item_path', () => {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
---
|
||||
import Translate from "@/components/polymech/i18n.astro"
|
||||
import { Img } from "imagetools/components"
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
@ -15,7 +16,7 @@ const {
|
||||
description = "",
|
||||
buttonText = "Directory",
|
||||
buttonLink = "/howtos",
|
||||
imageSrc = "/images/home/cta-world.png",
|
||||
imageSrc = "/images/home/world.png",
|
||||
imageAlt = ""
|
||||
} = Astro.props;
|
||||
---
|
||||
@ -25,10 +26,14 @@ const {
|
||||
|
||||
<!-- Image takes 50% -->
|
||||
<div class="w-full md:w-1/2">
|
||||
<img
|
||||
class="w-full max-w-100 rounded-lg hover:ring-2 hover:ring-blue-500 aspect-square object-contain"
|
||||
<Img
|
||||
src={imageSrc}
|
||||
alt={imageAlt}
|
||||
attributes={{
|
||||
img: {
|
||||
class: "w-full max-w-100 rounded-lg hover:ring-2 hover:ring-blue-500 aspect-square object-contain"
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
import Translate from "@/components/polymech/i18n.astro"
|
||||
|
||||
import { Img } from "imagetools/components"
|
||||
interface Props {
|
||||
title: string;
|
||||
description: string;
|
||||
@ -25,10 +25,14 @@ const {
|
||||
|
||||
<!-- Image takes 50% -->
|
||||
<div class="w-full md:w-1/2">
|
||||
<img
|
||||
class="w-full max-w-100 rounded-lg hover:ring-2 hover:ring-blue-500 aspect-square object-contain"
|
||||
<Img
|
||||
src={imageSrc}
|
||||
alt={imageAlt}
|
||||
alt={imageAlt},
|
||||
attributes={{
|
||||
img: {
|
||||
class: "w-full max-w-100 rounded-lg hover:ring-2 hover:ring-blue-500 aspect-square object-contain"
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
import Translate from "@/components/polymech/i18n.astro"
|
||||
|
||||
import { Img } from "imagetools/components"
|
||||
interface Props {
|
||||
title: string;
|
||||
description: string;
|
||||
@ -25,10 +25,14 @@ const {
|
||||
|
||||
<!-- Image takes 50% -->
|
||||
<div class="w-full md:w-1/2">
|
||||
<img
|
||||
class="w-full max-w-100 rounded-lg hover:ring-2 hover:ring-blue-500 aspect-square object-contain"
|
||||
<Img
|
||||
src={imageSrc}
|
||||
alt={imageAlt}
|
||||
attributes={{
|
||||
img: {
|
||||
class: "w-full max-w-100 rounded-lg hover:ring-2 hover:ring-blue-500 aspect-square object-contain"
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
80
src/components/cta/CtaShop.astro
Normal file
80
src/components/cta/CtaShop.astro
Normal file
@ -0,0 +1,80 @@
|
||||
---
|
||||
import Translate from "@/components/polymech/i18n.astro"
|
||||
import { Img } from "imagetools/components"
|
||||
interface Props {
|
||||
title: string;
|
||||
description: string;
|
||||
buttonText: string;
|
||||
buttonLink: string;
|
||||
imageSrc: string;
|
||||
imageAlt?: string;
|
||||
}
|
||||
|
||||
const {
|
||||
title = "Marketplace",
|
||||
description = "",
|
||||
buttonText = "Shop",
|
||||
buttonLink = "/en/shop",
|
||||
imageSrc = "/images/home/shop.png",
|
||||
imageAlt = ""
|
||||
} = Astro.props;
|
||||
---
|
||||
<section>
|
||||
<div class="py-2">
|
||||
<div class="flex flex-col md:flex-row gap-6 p-4 bg-white rounded-xl overflow-hidden relative">
|
||||
|
||||
<!-- Image takes 50% -->
|
||||
<div class="w-full md:w-1/2">
|
||||
<Img
|
||||
src={imageSrc}
|
||||
alt={imageAlt}
|
||||
attributes={{
|
||||
img: {
|
||||
class: "w-full max-w-100 rounded-lg hover:ring-2 hover:ring-blue-500 aspect-square object-contain"
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Text content takes the other 50% -->
|
||||
<div class="w-full md:w-1/2 flex flex-col justify-start">
|
||||
<h1 class="text-lg text-neutral-600 font-mono tracking-tight uppercase">
|
||||
<Translate>{title}</Translate>
|
||||
</h1>
|
||||
<p class="text-sm text-neutral-500">
|
||||
<Translate>{description}</Translate>
|
||||
</p>
|
||||
<div class="flex mt-6">
|
||||
<a
|
||||
href={buttonLink}
|
||||
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 justify-between"
|
||||
>
|
||||
<span class="relative uppercase text-xs text-white"><Translate>{buttonText}</Translate></span>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="w-12 text-white transition duration-300 -translate-y-7 group-hover:translate-y-7"
|
||||
>
|
||||
<div class="h-14 flex">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="currentColor" class="size-6 m-auto fill-white">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3" />
|
||||
</svg>
|
||||
</div>
|
||||
<div class="h-14 flex">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="currentColor" class="size-6 m-auto fill-white">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@ -2,7 +2,7 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { decode } from "html-entities";
|
||||
import { IHowto, asset_local_rel } from "@/model/howto.js";
|
||||
import { IHowto, asset_local_rel } from "@/model/howto/howto.jswto.js";
|
||||
import { Img } from "imagetools/components";
|
||||
import { i18n as Translate } from "@polymech/astro-base";
|
||||
import BaseLayout from "@/layouts/BaseLayout.astro";
|
||||
|
||||
@ -3,7 +3,7 @@ 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";
|
||||
import { asset_local_abs,asset_local_rel, IHowto } from "@/model/howto.js";
|
||||
import { asset_local_abs,asset_local_rel, IHowto } from "@/model/howto/howto.jswto.js";
|
||||
const { title, url, model, selected = false } = Astro.props;
|
||||
const item: IHowto = model.item;
|
||||
const classes = `group relative bg-white overflow-hidden group rounded-xl ${selected ? "ring-2 ring-orange-500" : ""}`;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
// Import the required interfaces and utilities
|
||||
import { IHowto } from "@/model/howto.js";
|
||||
import { IHowto } from "@/model/howto/howto.jswto.js";
|
||||
import { i18n as Translate } from "@polymech/astro-base";
|
||||
import { getCollection } from 'astro:content';
|
||||
const items = await getCollection('howtos');
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
import { getCollection } from 'astro:content';
|
||||
import { IHowto } from "@/model/howto.js";
|
||||
import { IHowto } from "@/model/howto/howto.jswto.js";
|
||||
import { i18n as Translate } from "@polymech/astro-base";
|
||||
const locale = Astro.currentLocale;
|
||||
const items = await getCollection('howtos')
|
||||
|
||||
@ -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 = 5
|
||||
export const HOWTO_MAX_ITEMS = 200
|
||||
|
||||
export const HOWTO_MIGRATION = () => path.resolve(resolve("./data/last.json"))
|
||||
export const HOWTO_ROOT_INTERN = () => path.resolve(resolve("./public/resources/howtos"))
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { defineCollection, z } from "astro:content"
|
||||
import { loader } from './model/component.js'
|
||||
import { loader } from './model/component/component.js'
|
||||
import { ComponentConfigSchema } from '@polymech/commons/component'
|
||||
|
||||
import { loader as howtoLoader } from './model/howto.js'
|
||||
import { loader as howtoLoader } from './model/howto/howto.js'
|
||||
|
||||
import { RETAIL_PRODUCT_BRANCH, PROJECTS_BRANCH } from 'config/config.js'
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { IHowto,asset_local_rel } from "@/model/howto";
|
||||
import { IHowto,asset_local_rel } from "@/model/howto/howto/howto";
|
||||
import { Img } from 'imagetools/components';
|
||||
import { i18n as Translate } from "@polymech/astro-base";
|
||||
import { files,forward_slash } from "@polymech/commons"
|
||||
|
||||
@ -18,7 +18,7 @@ import {
|
||||
IComponentConfigEx,
|
||||
group_by_path,
|
||||
group_path,
|
||||
} from "@/model/component.js";
|
||||
} from "@/model/component/component.jsmponent.js";
|
||||
|
||||
import "flowbite";
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import {
|
||||
createStepAnnotationByTitle,
|
||||
generateAnnotationCacheKey
|
||||
} from './annotation.js';
|
||||
import { IHowto } from './howto-model.js';
|
||||
import { IHowto } from '../howto/howto-model.js';
|
||||
import { get_cached, set_cached_object } from '@polymech/cache';
|
||||
|
||||
/**
|
||||
@ -1,7 +1,7 @@
|
||||
import { JSONPath } from 'jsonpath-plus';
|
||||
import { readFile, readdirSync } from 'fs';
|
||||
import { resolve, extname, join } from 'path';
|
||||
import { IHowto } from './howto-model.js';
|
||||
import { IHowto } from '../howto/howto-model.js';
|
||||
import { IAnnotation, AnnotationMode, generateCacheKey, cacheAnnotation, getCachedAnnotation } from './annotation.js';
|
||||
import { promisify } from 'util';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { IHowto } from './howto-model.js';
|
||||
import { IHowto } from '../howto/howto-model.js';
|
||||
import { file_hash,
|
||||
file_name_hash,
|
||||
fileAsBuffer,
|
||||
@ -1,12 +1,5 @@
|
||||
import * as path from 'path'
|
||||
import { z } from "zod"
|
||||
import normalizeUrl from 'normalize-url'
|
||||
import { PFilterValid } from '@polymech/commons/filter'
|
||||
|
||||
import { forward_slash, pathInfoEx, resolve, readOSRConfig, } from '@polymech/commons'
|
||||
|
||||
|
||||
|
||||
export const find_items = (nodes: string[], options) => {
|
||||
nodes = nodes.filter(options.filter)
|
||||
return nodes.map((c) => {
|
||||
@ -18,8 +11,6 @@ export const find_items = (nodes: string[], options) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export const get = (src, root, type) => {
|
||||
const srcInfo = pathInfoEx(src, false, { absolute: true})
|
||||
return srcInfo
|
||||
|
||||
@ -13,13 +13,11 @@ import {
|
||||
PRODUCT_ROOT
|
||||
} from 'config/config.js'
|
||||
|
||||
import { env } from '../base/index.js'
|
||||
|
||||
import { gallery } from '../base/media.js';
|
||||
import { env } from '../../base/index.js'
|
||||
|
||||
import { gallery } from '../../base/media.js';
|
||||
import { get } from '@polymech/commons/component'
|
||||
import { PFilterValid } from '@polymech/commons/filter'
|
||||
|
||||
import { translate } from "@/base/i18n.js"
|
||||
import { I18N_SOURCE_LANGUAGE } from "config/config.js"
|
||||
import { slugify } from "@/base/strings.js"
|
||||
@ -128,5 +126,4 @@ const group = async (items, locale) => {
|
||||
return acc
|
||||
}, {})
|
||||
}
|
||||
|
||||
export const group_by_path = async (items, locale): Promise<I_User[]> => await group(items, locale)
|
||||
@ -12,22 +12,17 @@ import { sync as write } from '@polymech/fs/write'
|
||||
import type { Loader, LoaderContext } from 'astro/loaders'
|
||||
import { resolveVariables } from "@polymech/commons/variables"
|
||||
export * from './howto-model.js'
|
||||
export * from '../base/filters.js'
|
||||
export * from '@/base/filters.js'
|
||||
|
||||
import { IHowto, IImage, ITag, ITEM_TYPE } from './howto-model.js'
|
||||
import { blacklist, default_filters_markdown, validateLinks } from '../base/filters.js'
|
||||
import { download } from './download.js'
|
||||
import { blacklist, default_filters_markdown, validateLinks } from '../../base/filters.js'
|
||||
import { download } from '../download.js'
|
||||
|
||||
import { filter } from "@/base/kbot.js"
|
||||
import { slugify } from "@/base/strings.js"
|
||||
import type { IAnnotation } from "./annotation.js"
|
||||
import { AnnotationMode, generateCacheKey, cacheAnnotation, getCachedAnnotation } from './annotation.js'
|
||||
|
||||
import { urlCache } from '../base/url-cache.js';
|
||||
|
||||
import { urlCache } from '../../base/url-cache.js';
|
||||
|
||||
const expandUrls = true
|
||||
|
||||
import {
|
||||
HOWTO_FILES_WEB,
|
||||
HOWTO_FILES_ABS,
|
||||
@ -53,7 +48,7 @@ import {
|
||||
|
||||
import { env, logger } from '@/base/index.js'
|
||||
|
||||
import { applyFilters, default_filters_plain, FilterFunction } from '../base/filters.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'
|
||||
|
||||
@ -3,7 +3,6 @@ import { findUp } from 'find-up'
|
||||
|
||||
import pMap from 'p-map'
|
||||
import { sanitizeFilename } from "@polymech/fs/utils"
|
||||
import { execFileSync, execFile } from "child_process";
|
||||
import { sync as read } from '@polymech/fs/read'
|
||||
import { sync as exists } from '@polymech/fs/exists'
|
||||
import { sync as mkdir } from '@polymech/fs/dir'
|
||||
@ -13,10 +12,10 @@ import type { Loader, LoaderContext } from 'astro/loaders'
|
||||
import { resolveVariables } from "@polymech/commons/variables"
|
||||
|
||||
import { env, logger } from '@/base/index.js'
|
||||
import { download } from './download.js'
|
||||
import { download } from '../download.js'
|
||||
import { default_image } from 'config/config.js'
|
||||
|
||||
import { applyFilters, default_filters_plain, FilterFunction } from '../base/filters.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'
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
//import { get as handleRSS } from './rss.js'
|
||||
import { get as handleMerchant } from './merchant.js'
|
||||
import { get as handleJsonLd } from './json-ld.js'
|
||||
import { get as handleJsonLdHowto } from './json-ld-howto.js'
|
||||
import { get as handleMerchant } from './product/merchant.js'
|
||||
import { get as handleJsonLd } from './product/json-ld.js'
|
||||
import { get as handleJsonLdHowto } from './howto/json-ld-howto.js'
|
||||
import type { IComponentNode, IComponentConfig } from '@polymech/commons/'
|
||||
|
||||
export type Handler = (node: IComponentNode, config: IComponentConfig, opts: { url?: string }) => Promise<any>
|
||||
|
||||
@ -1,34 +0,0 @@
|
||||
|
||||
<button data-drawer-target="default-sidebar" data-drawer-toggle="default-sidebar" aria-controls="default-sidebar" type="button" class="inline-flex items-center p-2 mt-2 ms-3 text-sm text-gray-500 rounded-lg sm:hidden hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600">
|
||||
<span class="sr-only">Open sidebar</span>
|
||||
<svg class="w-6 h-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
||||
<path clip-rule="evenodd" fill-rule="evenodd" d="M2 4.75A.75.75 0 012.75 4h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 4.75zm0 10.5a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5h-7.5a.75.75 0 01-.75-.75zM2 10a.75.75 0 01.75-.75h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 10z"></path>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<aside id="default-sidebar" class="fixed top-0 left-0 z-40 w-64 h-screen transition-transform -translate-x-full sm:translate-x-0" aria-label="Sidebar">
|
||||
<div class="h-full px-3 py-4 overflow-y-auto bg-gray-50 dark:bg-gray-800">
|
||||
<ul class="space-y-2 font-medium">
|
||||
<li>
|
||||
<a href="#" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700 group">
|
||||
<svg class="w-5 h-5 text-gray-500 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 22 21">
|
||||
<path d="M16.975 11H10V4.025a1 1 0 0 0-1.066-.998 8.5 8.5 0 1 0 9.039 9.039.999.999 0 0 0-1-1.066h.002Z"/>
|
||||
<path d="M12.5 0c-.157 0-.311.01-.565.027A1 1 0 0 0 11 1.02V10h8.975a1 1 0 0 0 1-.935c.013-.188.028-.374.028-.565A8.51 8.51 0 0 0 12.5 0Z"/>
|
||||
</svg>
|
||||
<span class="ms-3">Dashboard</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700 group">
|
||||
<svg class="shrink-0 w-5 h-5 text-gray-500 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 18 18">
|
||||
<path d="M6.143 0H1.857A1.857 1.857 0 0 0 0 1.857v4.286C0 7.169.831 8 1.857 8h4.286A1.857 1.857 0 0 0 8 6.143V1.857A1.857 1.857 0 0 0 6.143 0Zm10 0h-4.286A1.857 1.857 0 0 0 10 1.857v4.286C10 7.169 10.831 8 11.857 8h4.286A1.857 1.857 0 0 0 18 6.143V1.857A1.857 1.857 0 0 0 16.143 0Zm-10 10H1.857A1.857 1.857 0 0 0 0 11.857v4.286C0 17.169.831 18 1.857 18h4.286A1.857 1.857 0 0 0 8 16.143v-4.286A1.857 1.857 0 0 0 6.143 10Zm10 0h-4.286A1.857 1.857 0 0 0 10 11.857v4.286c0 1.026.831 1.857 1.857 1.857h4.286A1.857 1.857 0 0 0 18 16.143v-4.286A1.857 1.857 0 0 0 16.143 10Z"/>
|
||||
</svg>
|
||||
<span class="flex-1 ms-3 whitespace-nowrap">Kanban</span>
|
||||
<span class="inline-flex items-center justify-center px-2 ms-3 text-sm font-medium text-gray-800 bg-gray-100 rounded-full dark:bg-gray-700 dark:text-gray-300">Pro</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
@ -1,6 +0,0 @@
|
||||
## Goal
|
||||
|
||||
- [ ] Extend howtos for alternative steps, also, add a field : 'enabled'
|
||||
|
||||
- integrate changes in `./howto-ex.ts`
|
||||
- Do **not** implement or design any storage logic.
|
||||
@ -7,7 +7,7 @@ import config from "config/config.json";
|
||||
import { getCollection } from "astro:content";
|
||||
import StoreEntries from "@/components/store/StoreEntries.astro";
|
||||
import CtaOne from "@/components/cta/CtaOne.astro";
|
||||
import { group_by_path } from "@/model/component.js";
|
||||
import { group_by_path } from "@/model/component/component.jsmponent.js";
|
||||
|
||||
const view = "store"
|
||||
const items = await getCollection(view)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
import { IHowto } from "@/model/howto.js";
|
||||
import { IHowto } from "@/model/howto/howto.jswto.js";
|
||||
import { getCollection } from "astro:content";
|
||||
import List from "@/components/howtos/List.astro";
|
||||
import { LANGUAGES_PROD as LANGUAGES } from "config/config.js";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
import { group_by_cat } from "@/model/howto.js";
|
||||
import { group_by_cat } from "@/model/howto/howto.jswto.js";
|
||||
import { getCollection } from "astro:content";
|
||||
import BaseLayout from "@/layouts/BaseLayout.astro";
|
||||
import Wrapper from "@/components/containers/Wrapper.astro";
|
||||
|
||||
@ -6,11 +6,9 @@ import StoreEntries from "@/components/store/StoreEntries.astro"
|
||||
import Howtos from "@/components/cta/CtaHowtos.astro"
|
||||
import KB from "@/components/cta/CtaKB.astro"
|
||||
|
||||
import Library from "@/components/cta/CtaLibrary.astro"
|
||||
import Cta1 from "@/components/cta/CtaOne.astro"
|
||||
|
||||
import Directory from "@/components/cta/CtaDirectory.astro"
|
||||
import Cta2 from "@/components/cta/CtaTwo.astro"
|
||||
import Shop from "@/components/cta/CtaShop.astro"
|
||||
|
||||
const allProducts = await getCollection("store")
|
||||
const locale = Astro.currentLocale || "en"
|
||||
---
|
||||
@ -18,6 +16,7 @@ const locale = Astro.currentLocale || "en"
|
||||
<Howtos />
|
||||
<KB />
|
||||
<Directory />
|
||||
<Shop />
|
||||
<section>
|
||||
<div class="py-2 space-y-2">
|
||||
<div class="grid md:grid-cols-2 lg:grid-cols-2 gap-2 ">
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
import { foo, i18n as Translate } from "@polymech/astro-base"
|
||||
import test from "@/model/howto.json"
|
||||
import test from "@/model/howto/howto.json"
|
||||
---
|
||||
<Translate language="es">Hellau</Translate>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user