1 line
6.5 KiB
JavaScript
1 line
6.5 KiB
JavaScript
|
|
(()=>{var e={};e.id=6801,e.ids=[6801],e.modules={1708:e=>{"use strict";e.exports=require("node:process")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3958:(e,r,s)=>{Promise.resolve().then(s.bind(s,43512))},10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:e=>{"use strict";e.exports=require("next/dist/server/app-render/action-async-storage.external.js")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:e=>{"use strict";e.exports=require("path")},40910:(e,r,s)=>{Promise.resolve().then(s.bind(s,65950))},43512:(e,r,s)=>{"use strict";s.r(r),s.d(r,{default:()=>x});var t=s(60687),o=s(76180),a=s.n(o),n=s(43210),i=s(16189),d=s(30474),l=s(85814),c=s.n(l),p=s(4127);function x(){let{id:e}=(0,i.useParams)(),[r,s]=(0,n.useState)(null);if(!r)return(0,t.jsxs)("div",{className:"p-6 max-w-5xl mx-auto",children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(c(),{href:"/projects",className:"text-accent underline",children:"← Back to Projects"})}),(0,t.jsx)("p",{className:"text-muted-foreground",children:"Loading project…"})]});let o=r.p_image?.filename_disk?`${process.env.NEXT_PUBLIC_ASSET_URL||"https://forms.lasereverything.net"}/assets/${r.p_image.filename_disk}`:null,l=Array.isArray(r.p_files)?r.p_files.map(e=>e?.directus_files_id?.filename_disk).filter(Boolean):[];return(0,t.jsxs)("div",{className:"jsx-842e166d070263b p-6 max-w-5xl mx-auto",children:[(0,t.jsx)(a(),{id:"842e166d070263b",children:".file-pill{display:inline-block;font-size:.8rem;padding:.25rem .5rem;background-color:var(--muted);color:var(--foreground);-webkit-border-radius:.25rem;-moz-border-radius:.25rem;border-radius:.25rem;margin-right:.25rem;margin-bottom:.25rem;-webkit-transition:background-color.2s ease;-moz-transition:background-color.2s ease;-o-transition:background-color.2s ease;transition:background-color.2s ease}.file-pill:hover{background-color:#ffde59;color:#000}"}),(0,t.jsx)("div",{className:"jsx-842e166d070263b mb-4",children:(0,t.jsx)(c(),{href:"/projects",className:"text-accent underline",children:"← Back to Projects"})}),(0,t.jsxs)("div",{className:"jsx-842e166d070263b grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,t.jsxs)("div",{className:"jsx-842e166d070263b md:col-span-1",children:[(0,t.jsx)("div",{className:"jsx-842e166d070263b border rounded overflow-hidden bg-card",children:o?(0,t.jsx)(d.default,{src:o,alt:r.p_image?.title||"Project image",width:800,height:800,className:"w-full h-auto object-cover"}):(0,t.jsx)("div",{className:"jsx-842e166d070263b p-6 text-sm text-muted-foreground",children:"No preview image"})}),(0,t.jsxs)("div",{className:"jsx-842e166d070263b mt-4",children:[(0,t.jsx)("h3",{className:"jsx-842e166d070263b text-sm font-semibold mb-2",children:"Files"}),l.length>0?(0,t.jsx)("div",{className:"jsx-842e166d070263b flex flex-wrap",children:l.map((e,r)=>(0,t.jsx)("a",{href:`${process.env.NEXT_PUBLIC_ASSET_URL||"https://forms.lasereverything.net"}/assets/${e}`,target:"_blank",rel:"noopener noreferrer",title:e,className:"jsx-842e166d070263b file-pill",children:e},r))}):(0,t.jsx)("p",{className:"jsx-842e166d070263b text-xs text-muted-foreground",children:"No files attached."})]})]}),(0,t.jsxs)("div",{className:"jsx-842e166d070263b md:col-span-2",children:[(0,t.jsx)("h1",{className:"jsx-842e166d070263b text-2xl font-bold mb-2",children:r.title}),(0,t.jsxs)("p",{className:"jsx-842e166d070263b text-sm text-muted-foreground mb-1",children:["Uploaded by: ",r.uploader||"—"]}),(0,t.jsxs)("p",{className:"jsx-842e166d070263b text-sm text-muted-foreground mb-2",children:["Category: ",r.category||"—"]}),(0,t.jsx)("div",{className:"jsx-842e166d070263b flex flex-wrap gap-1",children:Array.isArray(r.tags)&&r.tags.length>0?r.tags.map((e,r)=>(0,t.jsx)("a",{href:`/projects?query=${encodeURIComponent(e)}`,target:"_blank",rel:"noopener noreferrer",title:`Search for ${e}`,className:"jsx-842e166d070263b text-xs bg-muted text-foreground rounded px-2 py-0.5 hov
|