Files
VITEC-website/public/_frontend/assets/vitec_herosection-CEdPd8Wl.js
o-rasche bb7c03235d Checkpoint: headless JSON architecture documented + cleanup (Stufe 1+2)
Restore point before Stufe 3 (central resolver-service refactoring).

Includes this session's work:
- Success Story (usecase) rebuild: new fields/tabs, UsecaseSerializer,
  thin List/Show renderers, MM relations, inline content elements.
- vitec_columns content block (two-column layout with per-item content)
  incl. unified header section; special-cased JSON resolution.
- Container per-column flex (items[].config align/justify) + gap on parent.
- Unified header section across CEs/plugins/containers; header fields in JSON.
- ISO-style architecture spec: Documentation/Headless-JSON-Architecture.md.
- Cleanup: removed local scratch + verified .bak backups.
- Fixes: B-6 (undefined thumbnail variable in Downloadcardcollection image
  resolver), B-7 (unsatisfiable legacy CType OR branch in Downloadcard/Datasheets).

Rollback: git reset --hard snapshot-2026-07-09-pre-stufe3

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 10:01:56 +02:00

1 line
3.4 KiB
JavaScript

import{C as e,D as t,S as n,Z as r,b as i,c as a,d as o,f as s,g as c,h as l,k as u,m as d,n as f,o as p,p as m,s as h,w as g}from"./index-7LYai_r-.js";var _=r();function v({element:r,className:v,nested:y,devInfoTags:b,uid:x,spaceBefore:S,spaceAfter:C}){let w=a(r),T=o(r),E=h(r),D=p(r.data?.background_variant),O=m(r.data?.cta),k=l(r.data?.cta),A=c(r.data?.button_style,`light`),j=r.data?.hero_layout_variant??`sm`,M=r.data?.hero_video??[],N=r.data?.hero_image??[],P=M.length>0,F=N.length>0,I=(P||F)&&j!==`xs`,L=P,R=P?M[0]?.publicUrl:N[0]?.publicUrl,z=!P&&N[0]?N[0].alt||N[0].title||w||`Hero image`:``,B=(P?r.data?.hero_video_alignment:r.data?.hero_image_alignment)??`right`,V=I&&(B===`left`||B===`right`),H=I&&(B===`center`||B===`fullwidth`),U=!!r.data?.hero_video_autoplay,W=!!r.data?.hero_video_loop,G=!!r.data?.hero_video_muted||U,K=s(r.data?.hero_bgimage);return j===`xs`?(0,_.jsx)(f,{className:v,devInfoTags:b,fullWidth:!0,nested:y,uid:x,spaceBefore:S,spaceAfter:C,children:(0,_.jsx)(`div`,{className:`vitec_herosection__inner vitec_herosection__inner--xs`})}):(0,_.jsx)(f,{className:v,devInfoTags:b,fullWidth:!0,nested:y,uid:x,spaceBefore:S,spaceAfter:C,children:(0,_.jsx)(`div`,{className:`vitec_herosection__inner vitec_herosection__inner--${j}`,children:(0,_.jsxs)(t,{sx:{...D,...K?{backgroundImage:`url(${K})`,backgroundSize:`cover`,backgroundPosition:`center`}:{},borderRadius:3,px:{xs:2.5,md:4},py:{xs:3,md:4},overflow:`hidden`,display:`flex`,alignItems:`center`},children:[(0,_.jsxs)(g,{container:!0,spacing:4,alignItems:`center`,sx:{width:`100%`},children:[(0,_.jsx)(g,{size:{xs:12,md:V?7:12},sx:V&&B===`left`?{order:{md:2}}:{},children:(0,_.jsxs)(e,{spacing:2,sx:{maxWidth:V?`100%`:680},children:[r.data?.eyebrow&&j!==`sm`&&(0,_.jsx)(u,{variant:`overline`,sx:{letterSpacing:`0.14em`,opacity:.8},children:r.data.eyebrow}),w&&(0,_.jsx)(u,{variant:`h2`,children:w}),T&&(0,_.jsx)(u,{variant:`h6`,sx:{opacity:.85,fontWeight:500},children:T}),E&&(0,_.jsx)(t,{sx:{...i,"& a":{color:`inherit`},"& mark":{backgroundColor:`rgba(var(--vitec-highlight), 0.85)`}},dangerouslySetInnerHTML:{__html:E}}),O&&(0,_.jsx)(n,{href:O,target:k??`_self`,variant:A,alignStart:!0,children:r.data?.cta_label||d(r.data?.cta,`Learn more`)}),!!r.data?.show_logo_wall&&(0,_.jsx)(t,{sx:{mt:1,border:`1px dashed rgba(var(--vitec-white), 0.35)`,borderRadius:2,px:2,py:1.5,width:`fit-content`},children:(0,_.jsx)(u,{variant:`caption`,sx:{opacity:.85},children:`Logo wall placeholder enabled`})})]})}),V&&R&&(0,_.jsx)(g,{size:{xs:12,md:5},sx:B===`left`?{order:{md:1}}:{},children:L?(0,_.jsx)(`video`,{src:R,autoPlay:U,loop:W,muted:G,playsInline:!0,controls:!U,style:{width:`100%`,height:`auto`,display:`block`,borderRadius:`12px`,boxShadow:`0 20px 40px rgba(var(--vitec-surface-dark), 0.25)`}}):(0,_.jsx)(t,{component:`img`,src:R,alt:z,sx:{width:`100%`,height:`auto`,display:`block`,borderRadius:3,boxShadow:`0 20px 40px rgba(var(--vitec-surface-dark), 0.25)`}})})]}),H&&R&&(0,_.jsx)(t,{sx:{mt:3,mx:B===`center`?`auto`:void 0,maxWidth:B===`center`?720:`100%`},children:L?(0,_.jsx)(`video`,{src:R,autoPlay:U,loop:W,muted:G,playsInline:!0,controls:!U,style:{width:`100%`,height:`auto`,display:`block`,borderRadius:`12px`,boxShadow:`0 20px 40px rgba(var(--vitec-surface-dark), 0.25)`}}):(0,_.jsx)(t,{component:`img`,src:R,alt:z,sx:{width:`100%`,height:`auto`,display:`block`,borderRadius:3,boxShadow:`0 20px 40px rgba(var(--vitec-surface-dark), 0.25)`}})})]})})})}export{v as VitecHeroSection};