Skip to content

Commit

Permalink
Merge branch 'nav' of https://github.com/stellarwp/kadence-blocks int…
Browse files Browse the repository at this point in the history
…o nav
  • Loading branch information
kadencewp committed Sep 26, 2024
2 parents 3c8b9f0 + 262c368 commit 9b4231b
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 9 deletions.
2 changes: 1 addition & 1 deletion includes/navigation/class-kadence-navigation-cpt.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function register_post_type() {
'public' => false,
'has_archive' => false,
'show_ui' => true,
'show_in_menu' => false,
'show_in_menu' => 'kadence-blocks',
'show_in_admin_bar' => false,
'show_in_rest' => true,
'rewrite' => false,
Expand Down
17 changes: 15 additions & 2 deletions src/blocks/header/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,14 @@ function CreateNewOnly({ clientId, setJustCompletedOnboarding, postId }) {
};

const steps = [
{ key: 'name', name: 'Header Name', visualNumber: 1, component: HeaderName, componentData: { postId } },
{
key: 'name',
name: 'Header Name',
visualNumber: 1,
component: HeaderName,
componentData: { postId },
containerData: { headerStyle: { position: 'unset' } },
},
{ key: 'desktop', name: 'Desktop Layout', visualNumber: 2, component: HeaderDesktop },
{ key: 'mobile', name: 'Mobile Layout', visualNumber: 3, component: HeaderMobile },
];
Expand Down Expand Up @@ -426,7 +433,13 @@ function Chooser({ commit, clientId, setJustCompletedOnboarding, formData, setFo

const steps = [
{ key: 'select-existing', name: 'Header Selection', hideSteps: true, component: HeaderExisting },
{ key: 'name', name: 'Header Name', visualNumber: 1, component: HeaderName },
{
key: 'name',
name: 'Header Name',
visualNumber: 1,
component: HeaderName,
containerData: { headerStyle: { position: 'unset' } },
},
{ key: 'desktop', name: 'Desktop Layout', visualNumber: 2, component: HeaderDesktop },
{ key: 'mobile', name: 'Mobile Layout', visualNumber: 3, component: HeaderMobile },
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,14 @@ export default function SelectOrCreatePlaceholder({
},
];

const groupedOptionsHTML = groupedOptions.map((group) => (
const groupedOptionsHTML = groupedOptions.map((group, index) => (
<>
<option value="0" disabled>
{__('Make selection…', 'kadence-blocks')}
</option>
{index === 0 ||
(index > 0 && group.options?.length !== 0 && (
<option value="0" disabled>
{__('Make selection…', 'kadence-blocks')}
</option>
))}
{group.options?.length && (
<optgroup label={group.label}>
{group.options.map((options) => (
Expand Down
6 changes: 5 additions & 1 deletion src/packages/components/src/onboarding-modal/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
display: flex;
justify-content: space-between;
padding: 20px;
top: 0;
position: sticky;
z-index: 100;
background: #FFF;

img {
width: 40px;
Expand Down Expand Up @@ -87,7 +91,7 @@
height: calc(100vh - 80px); /* Adjust height to span to footer */

display: flex;
align-items: baseline;
align-items: center;
justify-content: center;

img {
Expand Down
2 changes: 1 addition & 1 deletion src/packages/components/src/onboarding-modal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const OnboardingModal = ({ steps, isOpen, onRequestClose, onSubmit }) => {
size={'fill'}
onRequestClose={onRequestClose}
>
<div className={'header'}>
<div className={'header'} style={ steps[currentStep]?.containerData?.headerStyle }>
<img
src={kadence_blocks_params.kadenceBlocksUrl + '/includes/settings/img/kadence-logo.png'}
alt={'Kadence Blocks'}
Expand Down

0 comments on commit 9b4231b

Please sign in to comment.