diff --git a/hifi-src/src/components/PublicLayout.jsx b/hifi-src/src/components/PublicLayout.jsx index f497604..285bca1 100644 --- a/hifi-src/src/components/PublicLayout.jsx +++ b/hifi-src/src/components/PublicLayout.jsx @@ -47,6 +47,10 @@ const DEFAULT_SITE_SETTINGS = { package_card_theme: 'graphite', package_card_layout: 'strip', package_wheel_hint_interval: 8, + package_card_width: 210, + package_card_height: 480, + vehicle_tile_width: 240, + vehicle_tile_height: 180, gallery_card_text_x: 0, gallery_card_text_y: 100, site_font: null, diff --git a/hifi-src/src/context/SiteSettingsContext.jsx b/hifi-src/src/context/SiteSettingsContext.jsx index d39efd9..2f8b387 100644 --- a/hifi-src/src/context/SiteSettingsContext.jsx +++ b/hifi-src/src/context/SiteSettingsContext.jsx @@ -17,6 +17,10 @@ const SiteSettingsContext = createContext({ gallery_card_text_x: 0, gallery_card_text_y: 100, site_font: null, + package_card_width: 210, + package_card_height: 480, + vehicle_tile_width: 240, + vehicle_tile_height: 180, }); export const SiteSettingsProvider = SiteSettingsContext.Provider; diff --git a/hifi-src/src/pages/admin/settings/WebsiteSettings.jsx b/hifi-src/src/pages/admin/settings/WebsiteSettings.jsx index 9cc74e9..6514083 100644 --- a/hifi-src/src/pages/admin/settings/WebsiteSettings.jsx +++ b/hifi-src/src/pages/admin/settings/WebsiteSettings.jsx @@ -33,6 +33,10 @@ const emptyForm = { package_card_theme: 'graphite', package_card_layout: 'strip', package_wheel_hint_interval: 8, + package_card_width: 210, + package_card_height: 480, + vehicle_tile_width: 240, + vehicle_tile_height: 180, gallery_card_text_x: 0, gallery_card_text_y: 100, site_font: '', @@ -161,6 +165,10 @@ export default function WebsiteSettings() { package_card_theme: res.package_card_theme || 'graphite', package_card_layout: res.package_card_layout || 'strip', package_wheel_hint_interval: res.package_wheel_hint_interval || 8, + package_card_width: res.package_card_width || 210, + package_card_height: res.package_card_height || 480, + vehicle_tile_width: res.vehicle_tile_width || 240, + vehicle_tile_height: res.vehicle_tile_height || 180, gallery_card_text_x: res.gallery_card_text_x ?? 0, gallery_card_text_y: res.gallery_card_text_y ?? 100, site_font: res.site_font || '', @@ -568,6 +576,64 @@ export default function WebsiteSettings() { "mit dem Mausrad blättern"-Hinweis in diesem Abstand wiederholt.
++ Bei „Raster" bestimmt die Breite stattdessen, wie viele Kacheln pro Zeile passen. +
++ Größe der Kacheln unter „Fahrzeuge wählen" und auf der Marken-Detailseite. +
+{t('brandPage.empty')}
)} -{t('vehicleSelect.empty')}
)} -this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(MC.current||z4(),this.shouldReduceMotion=Cm.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),hn(this.notifyUpdate),hn(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&cC.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:d}=n.accelerate,h=new aC({element:this.current,name:e,keyframes:a,times:l,ease:u,duration:Ht(d)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const r=Eo.has(e);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&le.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in zu){const n=zu[e];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[e]&&s&&r(this.props)&&(this.features[e]=new s(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):He()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rLb&&(e.x=1),e.yx&&C,E=!1;const D=Array.isArray(w)?w:[w];let H=D.reduce(i(g),{});j===!1&&(H={});const{prevResolvedValues:_={}}=k,z={..._,...H},I=R=>{T=!0,p.has(R)&&(E=!0,p.delete(R)),k.needsAnimating[R]=!0;const L=t.getValue(R);L&&(L.liveStyle=!1)};for(const R in z){const L=H[R],$=_[R];if(m.hasOwnProperty(R))continue;let te=!1;ym(L)&&ym($)?te=!HC(L,$)||N:te=L!==$,te?L!=null?I(R):p.add(R):L!==void 0&&p.has(R)?I(R):k.protectedKeys[R]=!0}k.prevProp=w,k.prevResolvedValues=H,k.isActive&&(m={...m,...H}),(r||s)&&t.blockInitialAnimation&&(T=!1);const O=S&&N;T&&(!O||E)&&f.push(...D.map(R=>{const L={type:g};if(typeof R=="string"&&(r||s)&&!O&&t.manuallyAnimateOnMount&&t.parent){const{parent:$}=t,te=Vs($,R);if($.enteringChildren&&te){const{delayChildren:ae}=te.transition||{};L.delay=uC($.enteringChildren,t,ae)}}return{animation:R,options:L}}))}if(p.size){const b={};if(typeof d.initial!="boolean"){const g=Vs(t,Array.isArray(d.initial)?d.initial[0]:d.initial);g&&g.transition&&(b.transition=g.transition)}p.forEach(g=>{const k=t.getBaseTarget(g),w=t.getValue(g);w&&(w.liveStyle=!0),b[g]=k??null}),f.push({animation:b})}let y=!!f.length;return r&&(d.initial===!1||d.initial===d.animate)&&!t.manuallyAnimateOnMount&&(y=!1),r=!1,s=!1,y?e(f):Promise.resolve()}function l(u,d){var f;if(n[u].isActive===d)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(p=>{var m;return(m=p.animationState)==null?void 0:m.setActive(u,d)}),n[u].isActive=d;const h=a(u);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=zb(),s=!0}}}function cL(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!HC(e,t):!1}function vs(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zb(){return{animate:vs(!0),whileInView:vs(),whileHover:vs(),whileTap:vs(),whileDrag:vs(),whileFocus:vs(),exit:vs()}}function Mm(t,e){t.min=e.min,t.max=e.max}function yn(t,e){Mm(t.x,e.x),Mm(t.y,e.y)}function Fb(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const WC=1e-4,uL=1-WC,dL=1+WC,UC=.01,hL=0-UC,fL=0+UC;function St(t){return t.max-t.min}function pL(t,e,n){return Math.abs(t-e)<=n}function Vb(t,e,n,r=.5){t.origin=r,t.originPoint=ge(e.min,e.max,t.origin),t.scale=St(n)/St(e),t.translate=ge(n.min,n.max,t.origin)-t.originPoint,(t.scale>=uL&&t.scale<=dL||isNaN(t.scale))&&(t.scale=1),(t.translate>=hL&&t.translate<=fL||isNaN(t.translate))&&(t.translate=0)}function ya(t,e,n,r){Vb(t.x,e.x,n.x,r?r.originX:void 0),Vb(t.y,e.y,n.y,r?r.originY:void 0)}function $b(t,e,n,r=0){const s=r?ge(n.min,n.max,r):n.min;t.min=s+e.min,t.max=t.min+St(e)}function mL(t,e,n,r){$b(t.x,e.x,n.x,r==null?void 0:r.x),$b(t.y,e.y,n.y,r==null?void 0:r.y)}function Hb(t,e,n,r=0){const s=r?ge(n.min,n.max,r):n.min;t.min=e.min-s,t.max=t.min+St(e)}function Vu(t,e,n,r){Hb(t.x,e.x,n.x,r==null?void 0:r.x),Hb(t.y,e.y,n.y,r==null?void 0:r.y)}function Wb(t,e,n,r,s){return t-=e,t=Fu(t,1/n,r),s!==void 0&&(t=Fu(t,1/s,r)),t}function gL(t,e=0,n=1,r=.5,s,i=t,o=t){if(Kn.test(e)&&(e=parseFloat(e),e=ge(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=ge(i.min,i.max,r);t===i&&(a-=e),t.min=Wb(t.min,e,n,a,s),t.max=Wb(t.max,e,n,a,s)}function Ub(t,e,[n,r,s],i,o){gL(t,e[n],e[r],e[s],e.scale,i,o)}const xL=["x","scaleX","originX"],yL=["y","scaleY","originY"];function Kb(t,e,n,r){Ub(t.x,e,xL,n?n.x:void 0,r?r.x:void 0),Ub(t.y,e,yL,n?n.y:void 0,r?r.y:void 0)}function Gb(t){return t.translate===0&&t.scale===1}function KC(t){return Gb(t.x)&&Gb(t.y)}function qb(t,e){return t.min===e.min&&t.max===e.max}function bL(t,e){return qb(t.x,e.x)&&qb(t.y,e.y)}function Jb(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function GC(t,e){return Jb(t.x,e.x)&&Jb(t.y,e.y)}function Yb(t){return St(t.x)/St(t.y)}function Xb(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Bn(t){return[t("x"),t("y")]}function vL(t,e,n){let r="";const s=t.x.translate/e.x,i=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:d,pathRotation:h,rotateX:f,rotateY:p,skewX:m,skewY:x}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotate(${h}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),m&&(r+=`skewX(${m}deg) `),x&&(r+=`skewY(${x}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const kL=B0.length,Zb=t=>typeof t=="string"?parseFloat(t):t,Qb=t=>typeof t=="number"||G.test(t);function wL(t,e,n,r,s,i){s?(t.opacity=ge(0,n.opacity??1,SL(r)),t.opacityExit=ge(e.opacity??1,0,NL(r))):i&&(t.opacity=ge(e.opacity??1,n.opacity??1,r));for(let o=0;o