Skip to content

Commit 63f964a

Browse files
committed
Update publish date. Add more context to specs
1 parent 5f79b06 commit 63f964a

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

website/blog/2022-03-04-modifying-blocks.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Modifying blocks - Color Theme
33
description: Step-by-step guide on how to modify and expand the functionality of existing blocks.
44
slug: modifying-blocks-color-theme
55
authors: iobrado
6-
date: 2022-03-21
6+
date: 2022-03-22
77
tags: [eightshift, boilerplate, components, blocks]
88
hide_table_of_contents: false
99
---
@@ -20,12 +20,15 @@ If you compare **_components/quote/quote.php_** (component) and **_custom/quote/
2020

2121
### What will we do?
2222

23-
We want to add one new feature to this block. An option to choose a color theme for the Quote block. These are the specs:
24-
- background with rounded corners
25-
- three color themes: blue, green, yellow
23+
We want to style the block and add a new feature. An option to choose a color theme for the Quote block. These are the specs:
24+
- each Quote block has a background with rounded corners
25+
- option for three color themes: blue, green, yellow
2626
- the background has a lighter shade of the selected color
2727
- quote icon has a stronger shade of the selected color
2828

29+
To better help you visualize, this is how the Quote block should look like after making these changes, showcasing all three color theme variations:
30+
![Color Theme Examples](/img/blog/color-theme-examples.png)
31+
2932
### Adding background
3033

3134
Initial background styling is fairly straightforward. Navigate to **_src/Blocks/components/quote/quote-style.scss_** and paste the following code inside `.quote` class:
@@ -44,7 +47,7 @@ You'll notice that the changes are visible both in the editor and on the fronten
4447

4548
### Adding new colors to your project
4649

47-
Because the theme currently doesn't have all the colors, we need to implement the color theme feature for our block. We will use the colors already defined in the manifest for icon color, but we need to add lighter variations of those colors to use them for the background. Navigate to your global manifest, which is located inside **_src/Blocks/manifest.json_** and add the following values inside `colors`:
50+
Because the theme currently doesn't have all the required colors, we need to add additional colors which will be used for the color theme feature. We will use the colors already defined in the manifest for icon color, but we need to add lighter variations of those colors to use them for the background. Navigate to your global manifest, which is located inside **_src/Blocks/manifest.json_** and add the following values inside `colors`:
4851
```json
4952
{
5053
"name": "Light Blue",
108 KB
Loading

0 commit comments

Comments
 (0)