Skip to content

Commit

Permalink
chore: change the theme and alias to volto-spotlight and add volto-sp…
Browse files Browse the repository at this point in the history
…otlight to package.json - refs #259794
  • Loading branch information
ana-oprea committed Nov 22, 2023
1 parent c2d08ea commit 52732a1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 22 deletions.
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"@eeacms/volto-datablocks",
"@eeacms/volto-block-toc",
"@eeacms/volto-eea-design-system",
"@eeacms/volto-eea-website-theme"
"@eeacms/volto-eea-website-theme",
"@eeacms/volto-spotlight"
],
"repository": {
"type": "git",
Expand All @@ -27,17 +28,18 @@
"@eeacms/volto-datablocks": "*",
"@eeacms/volto-eea-design-system": "*",
"@eeacms/volto-eea-website-theme": "*",
"@eeacms/volto-spotlight": "*",
"esri-loader": "3.7.0"
},
"devDependencies": {
"@cypress/code-coverage": "^3.10.0",
"@plone/scripts": "*",
"babel-plugin-transform-class-properties": "^6.24.1",
"cypress-fail-fast": "^5.0.1",
"md5": "^2.3.0",
"react-plotly.js": "2.5.1",
"husky": "^8.0.3",
"lint-staged": "^14.0.1"
"lint-staged": "^14.0.1",
"md5": "^2.3.0",
"react-plotly.js": "2.5.1"
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx,json}": [
Expand Down
16 changes: 8 additions & 8 deletions razzle.extend.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ const modify = (config, { target, dev }, webpack) => {
config.resolve.alias['../../theme.config'] = themeConfigPath;
config.resolve.alias['../../theme'] = `${__dirname}/theme`;
const projectRootPath = path.resolve('.');
const themeLessPath = `${projectRootPath}/node_modules/@eeacms/volto-eea-design-system/theme`;
const themeLessPath = `${projectRootPath}/node_modules/@eeacms/volto-spotlight/theme`;

config.resolve.alias['eea-design-system-theme'] = dev
? `${projectRootPath}/src/addons/volto-eea-design-system/theme/themes/eea`
: `${themeLessPath}/themes/eea`;
config.resolve.alias['volto-spotlight-theme'] = dev
? `${projectRootPath}/src/addons/volto-spotlight/theme/themes/spotlight`
: `${themeLessPath}/themes/spotlight`;

const semanticLessPath = `${projectRootPath}/node_modules/semantic-ui-less`;
const hasDesignSystemInstalled = config.resolve.alias['eea-volto-themes'];
config.resolve.alias['eea-volto-theme-folder'] = hasDesignSystemInstalled
? themeLessPath
: semanticLessPath;
const hasDesignSystemInstalled =
config.resolve.alias['volto-spotlight-themes'];
config.resolve.alias['volto-spotlight-theme-folder'] =
hasDesignSystemInstalled ? themeLessPath : semanticLessPath;

return config;
};
Expand Down
20 changes: 10 additions & 10 deletions theme/theme.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
*/

/* Global */
@site : 'eea';
@site : 'mirage';
@reset : 'eea';
@mixins : 'eea';
@mixins : 'mirage';

/* Elements */
@button : 'eea';
@container : 'eea';
@container : 'mirage';
@divider : 'eea';
@flag : 'eea';
@header : 'eea';
Expand Down Expand Up @@ -83,7 +83,7 @@
@banner : 'eea';
@timeline : 'eea';
@footer : 'eea';
@header : 'eea';
@header : 'mirage';
@tag : 'eea';
@tags : 'eea';
@tagList : 'eea';
Expand All @@ -95,7 +95,7 @@
@avatarGrid : 'eea';
@keyContent : 'eea';
@publicationCard : 'eea';
@contentBox : 'eea';
@contentBox : 'mirage';
@reverseCardGrid : 'eea';
@relatedContent : 'eea';
@share : 'eea';
Expand All @@ -109,10 +109,10 @@
@languageLabeledIcon : 'eea';
@callout : 'eea';
@quote : 'eea';
@hero : 'eea';
@hero : 'mirage';
@copyright : 'eea';
@columns : 'eea';
@spotlight : 'eea';
@columns : 'mirage';
@spotlight : 'mirage';

/*******************************
Folders
Expand All @@ -127,12 +127,12 @@
/*******************************
Import Theme
*******************************/
@import (multiple) "~eea-volto-theme-folder/theme.less";
@import (multiple) "~volto-spotlight-theme-folder/theme.less";

@fontPath: "~volto-themes/default/assets/fonts";

.loadAddonOverrides() {
@import (optional) "@{siteFolder}/@{addon}/@{addontype}s/@{addonelement}.overrides";
}

/* End Config */
/* End Config */

0 comments on commit 52732a1

Please sign in to comment.