1 line
No EOL
6.5 KiB
JavaScript
1 line
No EOL
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 hover:bg-accent hover:text-background transition-colors",children:e},r)):(0,t.jsx)("span",{className:"jsx-842e166d070263b text-xs text-muted-foreground",children:"No tags"})}),r.body?(0,t.jsx)("div",{className:"jsx-842e166d070263b prose dark:prose-invert mt-6",children:(0,t.jsx)(p.oz,{children:r.body})}):null]})]})]})}},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64380:(e,r,s)=>{"use strict";s.r(r),s.d(r,{GlobalError:()=>n.a,__next_app__:()=>p,pages:()=>c,routeModule:()=>x,tree:()=>l});var t=s(65239),o=s(48088),a=s(88170),n=s.n(a),i=s(30893),d={};for(let e in i)0>["default","tree","pages","GlobalError","__next_app__","routeModule"].indexOf(e)&&(d[e]=()=>i[e]);s.d(r,d);let l={children:["",{children:["projects",{children:["[id]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(s.bind(s,65950)),"/app/app/projects/[id]/page.tsx"]}]},{}]},{layout:[()=>Promise.resolve().then(s.bind(s,79437)),"/app/app/projects/layout.tsx"]}]},{layout:[()=>Promise.resolve().then(s.bind(s,58014)),"/app/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(s.t.bind(s,57398,23)),"next/dist/client/components/not-found-error"],forbidden:[()=>Promise.resolve().then(s.t.bind(s,89999,23)),"next/dist/client/components/forbidden-error"],unauthorized:[()=>Promise.resolve().then(s.t.bind(s,65284,23)),"next/dist/client/components/unauthorized-error"]}]}.children,c=["/app/app/projects/[id]/page.tsx"],p={require:s,loadChunk:()=>Promise.resolve()},x=new t.AppPageRouteModule({definition:{kind:o.RouteKind.APP_PAGE,page:"/projects/[id]/page",pathname:"/projects/[id]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:l}})},65950:(e,r,s)=>{"use strict";s.r(r),s.d(r,{default:()=>t});let t=(0,s(12907).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/app/app/projects/[id]/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/app/app/projects/[id]/page.tsx","default")},73136:e=>{"use strict";e.exports=require("node:url")},76760:e=>{"use strict";e.exports=require("node:path")},79437:(e,r,s)=>{"use strict";s.r(r),s.d(r,{default:()=>a});var t=s(37413),o=s(61120);function a({children:e}){return(0,t.jsx)(o.Suspense,{fallback:null,children:e})}}};var r=require("../../../webpack-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[7719,4825,5814,598,4127,1661],()=>s(64380));module.exports=t})(); |