Commit graph

50 commits

Author SHA1 Message Date
Ben Dwyer
02c2556875
Blockbase: Simplify the approach to font customization (#4980)
* Blockbase: Simplify our approach to font customization

* remove commented code

* Handle fonts that are customized the old way

* add comments

* update all child themes to use the new font customization settings

* Add a comment about this being a breaking change

* Add a notice when a user has an old version of blockbase
2021-11-24 11:38:08 +00:00
Matias Benedetto
6051e0f592
Adding static keyword to avoid error in PHP 8 (#5082)
Declaring class properties or methods as static makes them accessible without needing an instantiation of the class.
2021-11-24 11:35:22 +00:00
Jason Crist
8cfaa36188
Paternize 404 Page (#5039)
* Refactor Blockbase 404 page to block pattern instead of PHP page

* Adjustments to get 404 to render in child themes.

* Adjustments to style Skatepark's 404 based on original PHP file.

* corrected 404 page layout styles

* Refactored videomaker 404 to use Blockbase pattern but match original PHP file styling.

* Refactored videomaker 404 to use Blockbase pattern but match original PHP file styling.

* Added 'blank' message to index.php

* formatted PHP comment

* Hide the pattern in the inserter

* Only use the copy in the block

* adding 404 templates

* Removed unused class

* rename the prompt

* added spacer to align with what other child themes are doing

Co-authored-by: Ben Dwyer <ben@scruffian.com>
Co-authored-by: Maggie <maggie.cabrera@automattic.com>
2021-11-22 13:21:35 +00:00
Ben Dwyer
d160d45d37
Make it possible to configure the color of the social icons (#4984)
* Make it possible to configure the color of the social icons

* Update the name of the custom variable
2021-11-18 10:30:56 +00:00
Jason Crist
e463147f1d
Fixed null-ref error when previewing colors for any theme but Skatepark (#5014) 2021-11-12 08:44:51 -05:00
Ben Dwyer
6af64054ee
Blockbase: Fix warning when we try to set properties on arrays (#4972) 2021-11-03 16:06:06 +00:00
Maggie
f1a3133076
Skatepark: dynamic duotone support (#4740)
* added duotone support for blocks, removed it from the patterns markup

* Add duotone to site logo too

* If the user changes colors via the customizer also update the default Duotone filter

* created a new filter for the custom duotone

Co-authored-by: Sarah Norris <sarah@sekai.co.uk>

* delete new transient

* fix customizer preview and invert darker palettes

* check luminescence on php to see if we need to invert before saving

* Refactoring the code to make it easier to understand

* Remove closure

* refactor for readability

* merge user filter with theme ones

* Whitespace

* Check the array keys exist properly

* remove var_dumps

* check for the correct values when we define the custom filter

* minified colord file

* updated changelog and credited the colord library

* minified version of colord.js

* removed filter from logo

* Removed duplicated comment

Co-authored-by: Ben Dwyer <ben@scruffian.com>
Co-authored-by: Sarah Norris <sarah@sekai.co.uk>
2021-10-29 08:31:41 +01:00
Ben Dwyer
f11bd52520
Blockbase: Fix fatal error with social navigation (#4895) 2021-10-26 15:47:07 +01:00
Ben Dwyer
25bf57cbec
Blockbase: Add a mixin for post meta (#4897) 2021-10-25 10:57:46 +01:00
Maggie
a025027975
Blockbase: make post meta icons optional (#4891)
* move blockbase post meta icons to block styles

* refactored geologist, removed unneeded css coming from Quadrat

* added meta icons to russell

* seedlet, zoologist refactored like geologist

* refactored Quadrat

* more unnecesary css

* applied to Mayland

* removed CSS from videomaker

* built mayland

* refactored Skatepark

* correct icon and size for Skatepark
2021-10-21 16:30:06 +02:00
Jason Crist
0d08de6d60
Adjusted menu CSS to match recent changes in the block (#4822)
* Adjusted menu CSS to match recent changes in the block

* Adjusted mobile menu styling to fit recent changes to navigation block

* Style social nav on mobile only

* Made the same menu changes in Geologist as in Quadrat

* Corrected blockbase classes due to recent changes to navigation block

* Adjusted skatepark's navigation classes

* corrected videomaker classes

* Improved mobile navigation alignment for Seedlet Blocks

* Further addressed Seedlet's mobile stylings.  Better addressed Blockbase mobile submenu spacing.

* Remove the margins on the social links block when in the nav

* Add a block style for 'clean mobile navigation block' and cleaned up base navigation block styles polyfill

* moved social menu location of styled mobile menu

* Renamed block style to improved responsive navigation

Co-authored-by: Ben Dwyer <ben@scruffian.com>
2021-10-15 08:27:27 +01:00
Ben Dwyer
c23cac3067
Blockbase: Add social navigation to blockbase themes (#4482)
* Blockbase: Add social navigation to blockbase themes

* Add social navigation links to primary navigation

* move to a different file

* add missing file

* suppress warnings for HTML5 elements

* only append social links to a navigation block if the block opts in

* Fix fatal

* Removed requirement to have social parent container be primary menu (or even have content)

* Fix layout for social nav

* Update the structure of the social links when appended to match the way that the navigation block works

Co-authored-by: Jason Crist <jcrist@pbking.com>
2021-10-12 14:58:21 +01:00
Ben Dwyer
ab8eb70b1b
Blockbase: Add menu previews (#4717)
* Blockbase: Add menu previews

* Also reload the preview when items are removed
2021-09-28 15:26:21 +01:00
Ben Dwyer
bc246fe5b6
Blockbase: Don't reset the settings array if it doesn't exist (#4713) 2021-09-28 15:26:10 +01:00
Rolf Allard van Hagen
98e800c43f
Drop "fontsToLoadFromGoogle" for child themes (#4633)
* Drop "fontsToLoadFromGoogle" for child themes

Drop "fontsToLoadFromGoogle" in favor of  the common "google" parameter. Child themes can simply set a "google" key/value for any Google fonts they need, just as the Blockbase does everywhere else.

I see no need (anymore) to have this separate custom section in the child theme json. Or am I missing something?

It just needs to be communicated and coordinated with child theme devs that still use "fontsToLoadFromGoogle"...

This also fixes #4460 and #4621

* Remove fontsToLoadFromGoogle from theme.json

Co-authored-by: Ben Dwyer <ben@scruffian.com>
2021-09-28 15:25:59 +01:00
Daniel Dudzic
c963ed2033
An attempt to fix the theme check sanitization errors in Blockbase (#4601)
* Blockbase: Fix sanitization theme check errors

* Blockbase: Fix another sanitization theme check error
2021-09-16 22:02:04 +01:00
Ben Dwyer
280f2f8608
Blockbase: Remove wpcom hook (#4563)
* Blockbase: Remove wpcom hook

* Removed the two unused wpcom files

Co-authored-by: Jason Crist <jcrist@pbking.com>
2021-09-16 22:01:39 +01:00
Maggie
a8485fb5a9 Blockbase + Quadrat: remap quadrat colors, refactor selection to tertiary (#4570)
* remap quadrat colors, refactor selection to tertiary

* Refactored color customizations to exclusively use THEME provided values as the basis for colors to configure rather than optionally using USER provided values.

* Changed blockbase's tertiary color to match blank-canvas
* Changed seedlet-blocks tertiary color to match seedlet's

* Eliminated any text selection styling for Blockbase and children (with the exception of Skatepark)

Co-authored-by: Jason Crist <jcrist@pbking.com>
2021-09-13 17:21:42 -04:00
Ben Dwyer
9079668233
Blockbase: Remove wpcom CSS (#4564) 2021-09-10 09:07:37 +01:00
Ben Dwyer
d8948a3a9e
Revert "Blockbase: Remove wpcom specific CSS file (#4548)" (#4549)
This reverts commit 463aafcee7.
2021-09-08 13:50:59 +01:00
Ben Dwyer
463aafcee7
Blockbase: Remove wpcom specific CSS file (#4548) 2021-09-08 12:09:48 +01:00
Maggie
056a24a6d6 change google url for Fira 2021-09-08 09:53:20 +02:00
Ben Dwyer
e102fd0204
Blockbase: Remove wpcom specific code (#4540) 2021-09-07 17:06:04 +01:00
Jason Crist
763b67b6ab
Fix unchanged font setting reverting to default (#4510)
* Fix unchanged font setting reverting to default

These changes fix issue #4490

1. use current setting instead of default to fill in missing post data
2. remove unused $google_font_array
3 correct type-o `elemenets` in unset values

* Tweaked original fix and further corrected 'unset' logic

Co-authored-by: Rolf Allard van Hagen <ravanhagen@gmail.com>
2021-08-31 07:19:41 -04:00
Ben Dwyer
9a4a21d211
Blockbase: Update font customization approach (#4389)
* Blockbase: Set the fonts directly in settings not in custom

* fix the reset button

* update child themes

* remove unused variable

* add google font to theme.json default

* inherit font family from body

* Set pullquote to use the heading font in all themes
2021-08-12 12:17:10 +01:00
Ben Dwyer
db3a4ea765
Blockbase: Clear gutenberg transient (#4368) 2021-08-11 08:53:05 +01:00
Ben Dwyer
623bca1cd4
Blockbase: Add Red Hat Display to the list of supported fonts (#4375) 2021-08-10 09:46:16 +01:00
Jason Crist
c1caa60dca
Fix/blockbase customizer meta info (#4336)
* Add meta-info to theme user json.

* Added missing function documentation.

* Formatted function documentation.
2021-08-05 17:30:24 +01:00
Matt Wiebe
ddc1e1f392
Merge pull request #4340 from Automattic/revert/4154
Revert Blockbase's site editor toggle, but still allow the Customizer to be restored.
2021-08-03 15:43:35 -05:00
Maggie
0d27fe0c1d
Merge pull request #4353 from Automattic/add/skatepark-color-palettes
Skatepark: Add alternative color palettes
2021-08-02 20:11:50 +02:00
Maggie
b2bbc900ab tweaked palettes labels to look better on linebreaks 2021-08-02 19:44:46 +02:00
Jason Crist
f29e7cc08a Moved wpcom concerns to wpcom.php 2021-08-02 11:34:17 -04:00
Maggie
e74444efc8 check that the color is defined in the default palette 2021-08-02 15:49:39 +02:00
Matt Wiebe
7747ec4bd4 Revert Blockbase's site editor toggle
Being reverted in favour of a plugin-based solution
See https://github.com/Automattic/wp-calypso/pull/54620
Reverts #4154
2021-07-29 14:27:51 -05:00
Jason Crist
319b6620cf Minor change to return rather than set font value from function (and lint) 2021-07-28 11:31:04 -04:00
Maggie
e55d3d7fd0 include theme fonts to the list of selectable fonts if they are not available 2021-07-28 11:08:23 +02:00
Ben Dwyer
c1377632a4
Blockbase: Clear cache when changing global styles from the Customizer (#4181)
* Clear the global styles cache when changing the customizer settings

* Clear the global styles cache when changing the customizer settings

* delete file from merge conflict
2021-07-16 10:56:31 +01:00
Ben Dwyer
ae2d449610
Blockbase: Disable the Site Editor on WPCOM (#4206)
* Blockbase: Disable the Site Editor on WPCOM

* extract to a function

* Also hide the admin bar link to the Site Editor

* fix notice

* remove confusing references to disabling site editor

* move the condition to show the site editor links to the toggle file for simplicity and clarity

* Also hide the site editor from the API menu

* check has_blog_sticker exists before calling it
2021-07-15 12:13:04 +01:00
Ben Dwyer
e053133ef5
Blockbase: Update font weights (#4227) 2021-07-14 15:56:36 -04:00
Jason Crist
dd4f57dbfe
Fix/quadrat localization domain (#4228)
* Added missing localization domain strings

* Changed esc_attr to esc_html per theme-check warning

* refactored calls to _x to __
2021-07-14 14:19:23 -04:00
Jason Crist
7c0b389fbf
Refactor/bb customize (#4212)
* Refactored font/color customization to optimize storing setting logic
* Prevent persisting of color palette if it is the same as default
*  Prevent persisting of font data if it is the same as default
* Add 'reset' option to font customization
* moved customizer tools to folder in /inc
Co-authored-by: Ben Dwyer <ben@scruffian.com>
2021-07-14 11:25:05 -04:00
Ben Dwyer
b0ecd1084d
Blockbase: Switch logic for enabling Site Editor (#4219)
* Blockbase: Switch logic for enabling Site Editor

* Always add legacy admin links

Co-authored-by: Jason Crist <jcrist@pbking.com>
2021-07-14 10:04:45 +01:00
Jason Crist
486aa30fbe
Fixed null ref in font customizations (#4194)
When no fonts have been configured the utility was saving an improper
font value.  This change pulls the 'default' and stores that instead.
2021-07-09 10:44:12 +01:00
Ben Dwyer
2252e0d045
Blockbase: Fix color customizations (#4172)
* Blockbase: Fix color customizations

* remove unneeded changes

* remove unused variable
2021-07-07 16:37:52 +01:00
Ben Dwyer
3fae0ff359
Blockbase: Add font customization (#4116)
* Blockbase: Add font customization

* Add a preview for font customizations

* namespace the preview function

* Replace wp_localize_script with wp_add_inline_script
2021-07-07 11:18:07 +01:00
Ben Dwyer
0c061be791
Universal themes: Add a setting to disable the Site Editor (#4154)
* Universal themes: Add a setting to disable the Site Editor

* Check for index.html template before attempting to disable the FSE plugin (in the same way Gutenberg does)

* Only add a widgets menu item when there isn't one already

* Add an index template

Co-authored-by: Jason Crist <jcrist@pbking.com>
2021-07-05 12:39:40 +01:00
Jason Crist
dc863f8a9e
Fix Comments Styles for BB & Co. (#4109)
* Added and formatted comments for Blockbase refactoring font definitions for the block
* Fixed wp.com comment styles for Quadrat.  Removed unnecessary comment font stylings.
* Fixed Seedlet-blocks wp.com comment styles
* Moved .com specific fixes to appropriate space.

Co-authored-by: Ben Dwyer <ben@scruffian.com>
2021-07-01 16:06:35 -04:00
Daniel Dudzic
efd9b80774
Blockbase: Hide WP.com stats smiley (#4137)
* Blockbase: Hide WP.com stats smiley
Co-authored-by: Jason Crist <jcrist@pbking.com>
2021-06-30 14:17:16 -04:00
Maggie
9e49d27662
Blockbase: Add support for custom palettes customization (#4098)
* first pass at color palette controls without functionality

* made palettes look like color annotations plugin

* make color selection functional

* get palettes from theme.json

* rename file

* rename colors preview file

* rename files

* more file renaming for clarity

* simplify settings

* rebuilt mayland and seedlet with alternative palettes

* renamed default template, dynamic theme name

* remove space

* Added default Varia/Seedlet palettes to blockbase

* check if the custom palette array is empty

* Only render color palette picker controls if there are alternatives to default.

* Only render color palette picker controls if there are alternatives to default. (fix)

* Removed commented code

* change palettes to an array

* chagne props comment

* removed unnecesary credit

* undo last commit, brought back the credits

* readd the settings file

* rebuild children

Co-authored-by: Ben Dwyer <ben@scruffian.com>
Co-authored-by: Jason Crist <jcrist@pbking.com>
2021-06-28 14:39:57 +01:00
Jason Crist
e83203dbcc
Try/quadrat semantic color customizations (#4090)
* Refactored blockbase color configuration from 'descriptive' to 'semantic'

* Refactored Quadrat to support Semantic Colors

* WIP experiment to allow Customizer editing of semantic colors in Quadrat

* Update the settings in theme.json not styles

* remove class variable for simplicity

* allow users to set multiple colors

* move merged colors to a class property

* Refactored to simplify and integrate changes to save everything at once

* Refactored and implemented save-all-at-once

* Refactored color customization logic from Quadrat to Blockbase

* Refactored Mayland blocks to support semantic color customizations

* Refactored Seedlet for configurable semantic colors.  Refactored meaning of 'primary' in blockbase.

* Minor color cleanups

* Fixed quadrat background color override

* Change variables to camelCase

* remove slug class property

* rename a few variables and add some comments

* remove the noop.css

* don't assume properties exist

Co-authored-by: Ben Dwyer <ben@scruffian.com>
2021-06-25 11:22:53 +01:00