Skip to content

Commit

Permalink
v1.2.0 (#394)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymcp authored Sep 12, 2024
2 parents e757787 + 54f3c75 commit 83023c3
Show file tree
Hide file tree
Showing 53 changed files with 392 additions and 127 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
### v1.2.0
Features:
- Add Call to Action block patterns
- Add Audio/Quote block patterns

Fixes:
- Rendering issue in README.md
- Missing spacing above Blockquote block
- Layout of Latest Posts block in Sidebars
- Erroneous whitespace below Hero block

Chores:
- Move deprecated blocks to correct directory
- Bump Webpack version
- Bump Micromatch version

### v1.1.2
Fixes:
- Add missing viewport meta tags
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The [Media Copyright](https://github.com/amnestywebsite/media-copyright) plugin
The quickest way to get started using the theme is to download the zip of the [latest release](https://github.com/amnestywebsite/humanity-theme/releases/latest), and install it via upload directly within WP Admin -> Themes.
We recommend your site be configured as a [multisite](https://wordpress.org/support/article/create-a-network/), both for future-proofing, and for more granular user permissions control. Many of the theme's customisation options make more sense at the network-level, too.

## ## Governance
## Governance
See [GOVERNANCE.md](GOVERNANCE.md) for project governance information.

## Changelog
Expand Down
2 changes: 1 addition & 1 deletion private/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"stylelint-scss": "^5.3.1",
"stylelint-webpack-plugin": "^4.1.1",
"typescript": "^5.3.2",
"webpack": "^5.76.0",
"webpack": "^5.94.0",
"webpack-cli": "^5.0.0"
},
"dependencies": {
Expand Down
23 changes: 12 additions & 11 deletions private/src/scripts/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,10 @@ import './editor/block-styles';
import './editor/plugins/appearance-options/index.jsx';
import './editor/plugins/pop-in/index.jsx';

import './editor/blocks-deprecated/banner/index.jsx';
import './editor/blocks-deprecated/header/index.jsx';

import './editor/blocks/action/index.jsx';
import './editor/blocks/background-media/index.jsx';
import './editor/blocks/blockquote/index.jsx';
import './editor/blocks/button/index.jsx';
import './editor/blocks/call-to-action/index.jsx';
import './editor/blocks/collapsable/index.jsx';
import './editor/blocks/columns/index.jsx';
import './editor/blocks/core-mods';
import './editor/blocks/countdown-timer/index.jsx';
import './editor/blocks/custom-card/index.jsx';
import './editor/blocks/download/index.jsx';
import './editor/blocks/embed-flourish/index.jsx';
import './editor/blocks/embed-infogram/index.jsx';
Expand All @@ -37,10 +28,8 @@ import './editor/blocks/hero/index.jsx';
import './editor/blocks/hero/replaceHeaders';
import './editor/blocks/iframe-button/index.jsx';
import './editor/blocks/iframe/index.jsx';
import './editor/blocks/image/index.jsx';
import './editor/blocks/key-facts/index.jsx';
import './editor/blocks/link-group/index.jsx';
import './editor/blocks/links-with-icons/index.jsx';
import './editor/blocks/menu/index.jsx';
import './editor/blocks/petition-list/index.jsx';
import './editor/blocks/post-list/index.jsx';
Expand All @@ -55,3 +44,15 @@ import './editor/blocks/tweet/index.jsx';

import './editor/fse-blocks/pop-in/index.jsx';
import './editor/fse-blocks/site-header/index.jsx';

// To remove in v2.0.0
import './editor/blocks-deprecated/background-media/index.jsx';
import './editor/blocks-deprecated/banner/index.jsx';
import './editor/blocks-deprecated/button/index.jsx';
import './editor/blocks-deprecated/call-to-action/index.jsx';
import './editor/blocks-deprecated/collapsable/index.jsx';
import './editor/blocks-deprecated/columns/index.jsx';
import './editor/blocks-deprecated/custom-card/index.jsx';
import './editor/blocks-deprecated/header/index.jsx';
import './editor/blocks-deprecated/image/index.jsx';
import './editor/blocks-deprecated/links-with-icons/index.jsx';
18 changes: 18 additions & 0 deletions private/src/scripts/editor/block-styles/group-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,21 @@ registerBlockStyle('core/group', {
// translators: [admin]
label: _x('Square Border', 'block style', 'amnesty'),
});

registerBlockStyle('core/group', {
name: 'light',
// translators: [admin]
label: _x('Light Background', 'block style', 'amnesty'),
});

registerBlockStyle('core/group', {
name: 'dark',
// translators: [admin]
label: _x('Dark Background', 'block style', 'amnesty'),
});

registerBlockStyle('core/group', {
name: 'top-and-bottom-border',
// translators: [admin]
label: _x('Top and Bottom Border', 'block style', 'amnesty'),
});
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ registerBlockType('amnesty-core/block-call-to-action', {
keywords: [__('Call To Action', 'amnesty')],
supports: {
className: false,
inserter: false,
multiple: true,
},
attributes: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ registerBlockType('amnesty-core/custom-card', {
icon: 'megaphone',
category: 'amnesty-core',
supports: {
className: false,
align: true,
className: false,
inserter: false,
},
attributes: blockAttributes,
styles: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ registerBlockType('amnesty-core/image-block', {
category: 'amnesty-core',
supports: {
className: false,
inserter: false,
},
attributes: blockAttributes,

Expand Down
1 change: 1 addition & 0 deletions private/src/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@

// Block patterns
@import "block-patterns/social-share";
@import "block-patterns/group";

// Pages
@import "pages/404";
Expand Down
62 changes: 62 additions & 0 deletions private/src/styles/block-patterns/_group.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
.wp-block-group.custom-card {
max-width: 350px !important;

.wp-block-buttons {
padding-left: 8px;
padding-right: 8px;
}

.wp-block-buttons,
.wp-block-button,
.wp-block-button__link {
width: 100%;
}

.wp-block-heading {
text-transform: uppercase;
font-size: 1.5rem;
}

p {
font-size: 1rem;
padding: 10px 10px 0 10px;
}

.wp-element-caption {
padding: 0 10px;
}
}

.wp-block-group.custom-card.alignfull {
max-width: 480px !important;
}

.wp-block-group.is-style-light {
background-color: var(--wp--preset--color--amnesty-grey-x-light);
color: var(--wp--preset--color--black);
}

.wp-block-group.is-style-dark {
background-color: var(--wp--preset--color--amnesty-grey-mid-dark);
color: var(--wp--preset--color--white);

.wp-block-heading,
.wp-element-caption {
color: var(--wp--preset--color--white);
}
}

.wp-block-group.call-to-action {
margin-top: 40px;
padding: 20px;
text-align: center;

@include mq(small) {
padding: 36px 32px;
}
}

.wp-block-group.is-style-top-and-bottom-border {
border-top: 7px solid var(--wp--preset--color--black);
border-bottom: 7px solid var(--wp--preset--color--black);
}
2 changes: 1 addition & 1 deletion private/src/styles/blocks/core-blocks/_blockquote.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
blockquote,
.blockquote {
position: relative;
margin: 70px auto 24px;
margin: 70px auto 24px !important;
font-family: var(--wp--preset--font-family--secondary);
text-align: center;

Expand Down
2 changes: 1 addition & 1 deletion private/src/styles/blocks/core-blocks/_latest-posts.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.wp-block-latest-posts.wp-block-latest-posts__list {
background-color: $color-grey-light;
margin-left: 0;
padding: 24px;
padding: 24px !important;
width: 100%;
}

Expand Down
1 change: 1 addition & 0 deletions private/src/styles/gutenberg.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@

// Block Patterns
@import "block-patterns/social-share";
@import "block-patterns/group";

:root {
--ms-base: 16;
Expand Down
Loading

0 comments on commit 83023c3

Please # to comment.