| 1 |
(()=>{"use strict";const e=window.wp.blocks,t=window.wp.blockEditor,l=window.wp.i18n,n=window.wp.components,o=(window.wp.serverSideRender,window.ReactJSXRuntime);(0,e.registerBlockType)("fluent-community/page-layout",{title:(0,l.__)("FluentCommunity Page Layout"),icon:"layout",category:"layout",apiVersion:3,attributes:{showPageHeader:{type:"boolean",default:!0},useFullWidth:{type:"boolean",default:!1},hideCommunityHeader:{type:"boolean",default:!1},disableDarkMode:{type:"boolean",default:!1},useBuildInTheme:{type:"boolean",default:!0}},edit:function(e){const{attributes:a,setAttributes:s}=e,i=(0,t.useBlockProps)();return(0,o.jsxs)("div",{...i,children:[(0,o.jsx)(t.InspectorControls,{children:(0,o.jsxs)(n.PanelBody,{title:(0,l.__)("Layout Settings"),children:[(0,o.jsx)(n.RadioControl,{label:(0,l.__)("Width Setting"),selected:a.useFullWidth?"full":"default",options:[{label:"Default Width",value:"default"},{label:"Full Width",value:"full"}],onChange:e=>s({useFullWidth:"full"===e})}),(0,o.jsx)(n.ToggleControl,{label:(0,l.__)("Disable Dark Mode"),checked:a.disableDarkMode,onChange:e=>s({disableDarkMode:e})})]})}),(0,o.jsx)("div",{className:"fluent-content-frame",children:(0,o.jsxs)("div",{className:"fluent-content-frame__inner",children:[(0,o.jsx)("div",{className:"fluent-content-frame__header"}),(0,o.jsxs)("div",{className:"fluent-content-frame-body",children:[(0,o.jsx)("div",{className:"fluent-content-frame-sidebar"}),(0,o.jsx)("div",{className:"fluent-content-frame__content",children:(0,o.jsx)(t.InnerBlocks,{templateLock:!1,template:[["core/post-title"],["core/post-content"]]})})]})]})})]})},save:function(){return(0,o.jsx)(t.InnerBlocks.Content,{})}})})(); |