Skip to content

Commit

Permalink
Update editor palette
Browse files Browse the repository at this point in the history
  • Loading branch information
etrepum committed Nov 8, 2022
1 parent fc8c671 commit 4293aee
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.5.3

- Update editor palette

## 1.5.2

- Update editor-styles.css
Expand Down
26 changes: 12 additions & 14 deletions inc/tweaks.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,24 +199,22 @@ function show_post_thumbnail_column($columns, $id) {

// Add custom colors to wysiwygs
function custom_editor_colors($init) {
$custom_colors = '
"FFC6B5", "Peach",
"CCB6FC", "Lavender",
"B6D8FC", "Sky",
"F1563E", "Red",
"3E4786", "Navy",
"7BEFD3", "Teal",
"212121", "Black",
"707070", "Steel",
"FFFFFF", "White",
';

// build colour grid default+custom colors
$init['textcolor_map'] = '['.$custom_colors.']';
$custom_colors = [
"F77D2B", "Orange",
"4949B4", "Purple",
"7BEFD3", "Teal",
"000000", "Black",
"393940", "Dark Grey",
"EAEAEB", "Medium Grey",
"F7F7F7", "Light Grey",
"FFFFFF", "White",
];
$init['textcolor_map'] = json_encode($custom_colors);

// change the number of rows in the grid if the number of colors changes
// 8 swatches per row
$init['textcolor_rows'] = 2;
$init['textcolor_rows'] = floor(count($custom_colors) / (8 * 2));

return $init;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "f1-mission-bit",
"version": "1.5.2",
"version": "1.5.3",
"scripts": {
"build": "yarn test && yarn format && NODE_ENV=production gulp build && yarn build-js && yarn build-scss",
"build-js": "parcel build ./assets/js/theme.js --out-dir ./dist/ --no-content-hash --log-level 4 --public-url ./ --no-cache",
Expand Down
Binary file modified screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: https://github.com/missionbit/f1-mission-bit
Author: Factor1 Studios
Author URI: https://factor1studios.com
Description: A custom WordPress theme for Mission Bit developed by Factor1
Version: 1.5.2
Version: 1.5.3
License: GPL-3.0
License URI:
Text Domain:
Expand Down

0 comments on commit 4293aee

Please sign in to comment.