Skip to content

Commit

Permalink
Refs #140454 changed the following to volto-eea-design-system:
Browse files Browse the repository at this point in the history
- added eea theme based on the default theme from semantic for now, to be customized
  or totally removed in the future
- added razzle.extend.js which aliases *eea-volto-themes* to be used by other theme.config
  • Loading branch information
ichim-david committed Oct 20, 2021
1 parent 2934b91 commit 40d2af6
Show file tree
Hide file tree
Showing 105 changed files with 11,058 additions and 0 deletions.
21 changes: 21 additions & 0 deletions razzle.extend.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const path = require('path');
const plugins = (defaultPlugins) => {
return defaultPlugins;
};
const modify = (config, { target, dev }, webpack) => {
const themeConfigPath = `${__dirname}/theme/theme.config`;
config.resolve.alias['../../theme.config$'] = themeConfigPath;
config.resolve.alias['../../theme.config'] = themeConfigPath;

const projectRootPath = path.resolve('.');
const themesPath = `${projectRootPath}/node_modules/@eeacms/volto-eea-design-system/theme/themes`;

config.resolve.alias['eea-volto-themes'] = themesPath;

return config;
};

module.exports = {
plugins,
modify,
};
105 changes: 105 additions & 0 deletions theme/theme.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/*

████████╗██╗ ██╗███████╗███╗ ███╗███████╗███████╗
╚══██╔══╝██║ ██║██╔════╝████╗ ████║██╔════╝██╔════╝
██║ ███████║█████╗ ██╔████╔██║█████╗ ███████╗
██║ ██╔══██║██╔══╝ ██║╚██╔╝██║██╔══╝ ╚════██║
██║ ██║ ██║███████╗██║ ╚═╝ ██║███████╗███████║
╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝

*/

/*******************************
Theme Selection
*******************************/

/* To override a theme for an individual element
specify theme name below
*/

/* Global */
@site : 'pastanaga';
@reset : 'eea';

/* Elements */
@button : 'pastanaga';
@container : 'pastanaga';
@divider : 'eea';
@flag : 'eea';
@header : 'eea';
@icon : 'eea';
@image : 'eea';
@input : 'pastanaga';
@label : 'eea';
@list : 'eea';
@loader : 'eea';
@placeholder : 'eea';
@rail : 'eea';
@reveal : 'eea';
@segment : 'eea';
@step : 'eea';

/* Collections */
@breadcrumb : 'eea';
@form : 'pastanaga';
@grid : 'pastanaga';
@menu : 'pastanaga';
@message : 'eea';
@table : 'eea';

/* Modules */
@accordion : 'eea';
@checkbox : 'eea';
@dimmer : 'eea';
@dropdown : 'eea';
@embed : 'eea';
@modal : 'eea';
@nag : 'eea';
@popup : 'eea';
@progress : 'eea';
@rating : 'eea';
@search : 'eea';
@shape : 'eea';
@sidebar : 'eea';
@sticky : 'eea';
@tab : 'eea';
@transition : 'eea';

/* Views */
@ad : 'eea';
@card : 'eea';
@comment : 'eea';
@feed : 'eea';
@item : 'eea';
@statistic : 'eea';

/* Extras */
@main : 'eea';
@custom : 'eea';

/*******************************
Folders
*******************************/

/* Path to theme packages */

@themesFolder : '~volto-themes';

/* Path to site override folder */

@siteFolder : '../../theme';

/*******************************
Import Theme
*******************************/

@import (multiple) "theme.less";

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

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


/* End Config */
64 changes: 64 additions & 0 deletions theme/theme.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*******************************
Import Directives
*******************************/

/*------------------
Theme
-------------------*/

@theme: @@element;

@themesFolderEEA: '~eea-volto-themes';

/*--------------------
Site Variables
---------------------*/

/* Default site.variables */
@import "@{themesFolder}/default/globals/site.variables";

/* Packaged site.variables */
@import "@{themesFolder}/@{site}/globals/site.variables";

/* Component's site.variables */
@import (optional) "@{themesFolder}/@{theme}/globals/site.variables";

/* Site theme site.variables */
@import (optional) "@{siteFolder}/globals/site.variables";


/*-------------------
Component Variables
---------------------*/

/* Default */
@import "@{themesFolder}/default/@{type}s/@{element}.variables";

/* Packaged Theme */
@import (optional) "@{themesFolder}/@{theme}/@{type}s/@{element}.variables";
@import (optional) "@{themesFolderEEA}/@{theme}/@{type}s/@{element}.variables";
/* Site Theme */
@import (optional) "@{siteFolder}/@{type}s/@{element}.variables";


/*******************************
Mix-ins
*******************************/

/*------------------
Fonts
-------------------*/

.loadFonts() when (@importGoogleFonts) {
@import (css) url('@{googleProtocol}fonts.googleapis.com/css?family=@{googleFontRequest}');
}

/*------------------
Overrides
-------------------*/

.loadUIOverrides() {
@import (optional) "@{themesFolder}/@{theme}/@{type}s/@{element}.overrides";
@import (optional) "@{themesFolderEEA}/@{theme}/@{type}s/@{element}.overrides";
@import (optional) "@{siteFolder}/@{type}s/@{element}.overrides";
}
3 changes: 3 additions & 0 deletions theme/themes/eea/collections/breadcrumb.overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/*******************************
Theme Overrides
*******************************/
33 changes: 33 additions & 0 deletions theme/themes/eea/collections/breadcrumb.variables
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*******************************
Breadcrumb
*******************************/

/*-------------------
Breadcrumb
--------------------*/

@verticalMargin: 0em;
@display: inline-block;
@verticalAlign: middle;

@dividerSpacing: @3px;
@dividerOpacity: 0.7;
@dividerColor: @lightTextColor;

@dividerSize: @relativeSmall;
@dividerVerticalAlign: baseline;

@iconDividerSize: @relativeTiny;
@iconDividerVerticalAlign: baseline;

@sectionMargin: 0em;
@sectionPadding: 0em;

/* Coupling */
@segmentPadding: @relativeMini @relativeMedium;

/*-------------------
States
--------------------*/

@activeFontWeight: @bold;
3 changes: 3 additions & 0 deletions theme/themes/eea/collections/form.overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/*******************************
Theme Overrides
*******************************/

0 comments on commit 40d2af6

Please sign in to comment.