Skip to content

Commit

Permalink
Improvements and completion of the main colors
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh committed Oct 16, 2024
1 parent 0f42676 commit e7007a7
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 27 deletions.
32 changes: 16 additions & 16 deletions backend/src/kitconcept/intranet/behaviors/theming.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ class ITheming(model.Schema):
"theme_high_contrast_color",
"theme_font_color",
"theme_low_contrast_font_color",
"secondary_theme_color",
"secondary_theme_high_contrast_color",
"secondary_theme_font_color",
"secondary_theme_low_contrast_font_color",
"theme_color_secondary",
"theme_high_contrast_color_secondary",
"theme_font_color_secondary",
"theme_low_contrast_font_color_secondary",
],
)

Expand Down Expand Up @@ -63,36 +63,36 @@ class ITheming(model.Schema):
required=False,
)

directives.widget("secondary_theme_color", frontendOptions={"widget": "color"})
secondary_theme_color = TextLine(
title=_("label_secondary_theme_color", default="Secondary Theme Color"),
directives.widget("theme_color_secondary", frontendOptions={"widget": "color"})
theme_color_secondary = TextLine(
title=_("label_theme_color_secondary", default="Secondary Theme Color"),
required=False,
)

directives.widget(
"secondary_theme_high_contrast_color", frontendOptions={"widget": "color"}
"theme_high_contrast_color_secondary", frontendOptions={"widget": "color"}
)
secondary_theme_high_contrast_color = TextLine(
theme_high_contrast_color_secondary = TextLine(
title=_(
"label_secondary_theme_high_contrast_color",
"label_theme_high_contrast_color_secondary",
default="Secondary High Contrast Color",
),
required=False,
)

directives.widget("secondary_theme_font_color", frontendOptions={"widget": "color"})
secondary_theme_font_color = TextLine(
title=_("label_secondary_theme_font_color", default="Secondary Font Color"),
directives.widget("theme_font_color_secondary", frontendOptions={"widget": "color"})
theme_font_color_secondary = TextLine(
title=_("label_theme_font_color_secondary", default="Secondary Font Color"),
required=False,
)

directives.widget(
"secondary_theme_low_contrast_font_color",
"theme_low_contrast_font_color_secondary",
frontendOptions={"widget": "color"},
)
secondary_theme_low_contrast_font_color = TextLine(
theme_low_contrast_font_color_secondary = TextLine(
title=_(
"label_secondary_theme_low_contrast_font_color",
"label_theme_low_contrast_font_color_secondary",
default="Secondary Low Contrast Font Color",
),
required=False,
Expand Down
16 changes: 16 additions & 0 deletions frontend/packages/volto-intranet/src/config/settings.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { ConfigType } from '@plone/registry';

export default function install(config: ConfigType) {
config.settings = {
...config.settings,
isMultilingual: false,
supportedLanguages: ['en'],
defaultLanguage: 'en',
// Volto Light Theme Configuration
intranetHeader: true,
siteLabel: 'Intranet',
};
// config.views.contentTypeSearchResultViews.Person = PersonResultItem;

return config;
}
14 changes: 3 additions & 11 deletions frontend/packages/volto-intranet/src/index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
import installSettings from './config/settings';

const applyConfig = (config) => {
config.settings = {
...config.settings,
isMultilingual: false,
supportedLanguages: ['en'],
defaultLanguage: 'en',
// Volto Light Theme Configuration
intranetHeader: true,
siteLabel: 'Intranet',
};
installSettings(config);

// config.views.contentTypeSearchResultViews.Person = PersonResultItem;
console.log(config.widgets.widget);
return config;
};

Expand Down

0 comments on commit e7007a7

Please sign in to comment.