Skip to content

Commit

Permalink
Merge pull request #59 from eea/develop
Browse files Browse the repository at this point in the history
Use colors from available_colors
  • Loading branch information
razvanMiu committed Aug 4, 2022
2 parents 01b13b1 + 0a4a9c6 commit 139892e
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 42 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [3.6.3](https://github.com/eea/volto-block-style/compare/3.6.2...3.6.3)

- Use volto 16.0.0-alpha.14 in cypress tests [`492fa3e`](https://github.com/eea/volto-block-style/commit/492fa3ec785ea19c56adea1fe0ea89973e30b6fc)
- Use colors from available_colors [`f27b69d`](https://github.com/eea/volto-block-style/commit/f27b69d8f9687b212403b7d49173edb8c2bfac69)

#### [3.6.2](https://github.com/eea/volto-block-style/compare/3.6.1...3.6.2)

> 30 June 2022

#### [3.6.1](https://github.com/eea/volto-block-style/compare/3.6.0...3.6.1)

Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pipeline {
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,forest.eea.europa.eu,clms.land.copernicus.eu,biodiversity.europa.eu,www.eea.europa.eu-ims,sustainability.eionet.europa.eu,industry.eea.europa.eu,water.europa.eu-freshwater,demo-www.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu,circularity.eea.europa.eu"
DEPENDENCIES = ""
VOLTO = "alpha"
VOLTO = "16.0.0-alpha.14"
}

stages {
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": "@eeacms/volto-block-style",
"version": "3.6.2",
"version": "3.6.3",
"description": "volto-block-style: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
36 changes: 0 additions & 36 deletions src/StyleWrapper/EEAColorscheme.js

This file was deleted.

8 changes: 4 additions & 4 deletions src/StyleWrapper/schema.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import colorscheme from './EEAColorscheme';
import config from '@plone/volto/registry';

export const StyleSchema = () => {
return {
Expand Down Expand Up @@ -138,13 +138,13 @@ export const StyleSchema = () => {
title: 'Background color',
type: 'color',
widget: 'style_simple_color',
available_colors: colorscheme,
available_colors: config.settings.available_colors,
},
textColor: {
title: 'Text color',
type: 'color',
widget: 'style_simple_color',
available_colors: colorscheme,
available_colors: config.settings.available_colors,
},
customClass: {
title: 'Custom CSS Class',
Expand Down Expand Up @@ -178,7 +178,7 @@ export const StyleSchema = () => {
title: 'Shadow color',
type: 'color',
widget: 'style_simple_color',
available_colors: colorscheme,
available_colors: config.settings.available_colors,
},
borderRadius: {
widget: 'slider',
Expand Down
35 changes: 35 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,41 @@ const applyConfig = (config) => {
config.settings.layoutOnlyBlockStyles = false;
}

config.settings.available_colors = [
'#bbdbec',
'#9dc6d4',
'#5a93aa',
'#005d7b',
'#003d53',
'#ebefc6',
'#bdd494',
'#6bb535',
'#1e8339',
'#025e37',
'#464b0b',
'#b5c234',
'#777b1a',
'#f4f1bc',
'#e1e070',
'#0070ae',
'#fce6dc',
'#f39a86',
'#e73d5c',
'#b92f47',
'#8e1206',
'#fff6a6',
'#ffe525',
'#f7a600',
'#b94b19',
'#8d4107',
'#000000',
'#6f6f6e',
'#929291',
'#bcbcbc',
'#e3e3e3',
'#ffffff',
];

return config;
};

Expand Down

0 comments on commit 139892e

Please sign in to comment.