Skip to content

Commit

Permalink
See pewresearch/pewresearch-org@fd3ead3 from refs/heads/release/5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
prcdevgitbot committed Mar 5, 2024
1 parent 360d8a3 commit c8a2e75
Show file tree
Hide file tree
Showing 36 changed files with 19,869 additions and 50 deletions.
2 changes: 1 addition & 1 deletion blocks/core-navigation/build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('wp-blocks', 'wp-dom-ready', 'wp-hooks'), 'version' => '56c83ed099664c81616b');
<?php return array('dependencies' => array('wp-blocks', 'wp-dom-ready'), 'version' => 'd2f8f6f34180ea92f25c');
2 changes: 1 addition & 1 deletion blocks/core-navigation/build/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion blocks/core-navigation/build/style-index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 0 additions & 20 deletions blocks/core-navigation/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* WordPress Dependencies
*/
import { addFilter } from '@wordpress/hooks';
import domReady from '@wordpress/dom-ready';
import { registerBlockStyle, unregisterBlockStyle } from '@wordpress/blocks';

Expand Down Expand Up @@ -30,22 +29,3 @@ domReady(() => {
label: 'Divided Links',
});
});

addFilter(
'blocks.registerBlockType',
'prc-core-navigation-allowedblocks',
(settings, name) => {
if (name === 'core/navigation') {
return {
...settings,
allowedBlocks: [
...(settings.allowedBlocks ?? []),
'prc-user-accounts/login-logout',
'prc-block/logo',
'prc-block/navigation-mega-menu',
],
};
}
return settings;
}
);
26 changes: 3 additions & 23 deletions blocks/core-navigation/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@


.wp-block-navigation.is-style-mega-menu {
margin-left: -1em!important;
margin-right: -1em!important;
max-width: calc(var(--wp--style--global--wide-size) + 2em)!important;
// margin-left: -1em!important;
// margin-right: -1em!important;
// max-width: calc(var(--wp--style--global--wide-size) + 2em)!important;
width: 100%;
position: relative;
.wp-block-navigation-item {
Expand All @@ -72,23 +72,3 @@
display: flex;
justify-content: center;
}




// Main Mobile Menu Styling

.wp-block-navigation.is-style-mega-mobile-menu:has(.wp-block-navigation__responsive-container.is-menu-open) {
// .wp-block-navigation__responsive-container-open {
// &:after {
// content: "X"
// }
// svg {
// display: none;
// }
// }
.wp-block-navigation__responsive-container {
top: 50px;
}
}

2 changes: 1 addition & 1 deletion blocks/logo/build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('classnames', 'react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => 'e14eaee38624a24afc15');
<?php return array('dependencies' => array('classnames', 'react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-polyfill'), 'version' => '70e46b6d760fb4aae6bb');
2 changes: 1 addition & 1 deletion blocks/logo/build/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion blocks/logo/build/index.js.map

Large diffs are not rendered by default.

21 changes: 20 additions & 1 deletion blocks/logo/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* WordPress Dependencies
*/
import { registerBlockType } from '@wordpress/blocks';
import { addFilter } from '@wordpress/hooks';

/**
* Internal Dependencies
Expand Down Expand Up @@ -45,4 +46,22 @@ const settings = {
*/
registerBlockType(name, { ...metadata, ...settings });

// registerDashboardIcon();
/**
* Make mega menu available to core/navigation block
*/
addFilter(
'blocks.registerBlockType',
'prc-block-logo-add-to-navigation',
(blockSettings, blockName) => {
if (blockName === 'core/navigation') {
return {
...blockSettings,
allowedBlocks: [
...(blockSettings.allowedBlocks ?? []),
'prc-block/logo',
],
};
}
return blockSettings;
}
);
3 changes: 3 additions & 0 deletions blocks/navigation-mega-menu/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Mega Menu Block

This is a fork of https://github.com/ndiego/mega-menu-block
63 changes: 63 additions & 0 deletions blocks/navigation-mega-menu/build/block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "prc-block/navigation-mega-menu",
"version": "0.1.0",
"title": "Navigation Mega Menu",
"category": "design",
"description": "Mega menu that supports multiple overlay types and animations.",
"parent": [
"core/navigation"
],
"example": {},
"attributes": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"title": {
"type": "string"
},
"url": {
"type": "string"
},
"menuSlug": {
"type": "string"
},
"animation": {
"type": "string",
"enum": [
"fade",
"slide"
]
}
},
"supports": {
"html": false,
"interactivity": true,
"renaming": true,
"reusable": false,
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"__experimentalSlashInserter": true
},
"textdomain": "prc-navigation-mega-menu-block",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"render": "file:./render.php",
"viewScriptModule": "file:./view.js"
}
1 change: 1 addition & 0 deletions blocks/navigation-mega-menu/build/index.asset.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php return array('dependencies' => array('prc-components', 'react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => 'e0d6b0d93b9624c795fe');
1 change: 1 addition & 0 deletions blocks/navigation-mega-menu/build/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.wp-block-prc-block-navigation-mega-menu__container{z-index:11}
2 changes: 2 additions & 0 deletions blocks/navigation-mega-menu/build/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions blocks/navigation-mega-menu/build/index.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit c8a2e75

Please sign in to comment.