fix: add custom style to better match farmOS color scheme
This commit is contained in:
parent
87b97f53b8
commit
768859b6b9
9 changed files with 2511 additions and 1 deletions
2358
style/package-lock.json
generated
Normal file
2358
style/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
14
style/package.json
Normal file
14
style/package.json
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"main": "webpack.config.js",
|
||||
"scripts": {
|
||||
"build": "webpack --mode production"
|
||||
},
|
||||
"devDependencies": {
|
||||
"buefy": "^0.9.29",
|
||||
"css-loader": "^7.1.3",
|
||||
"mini-css-extract-plugin": "^2.10.0",
|
||||
"sass": "^1.97.3",
|
||||
"sass-loader": "^16.0.7",
|
||||
"webpack-cli": "^6.0.1"
|
||||
}
|
||||
}
|
||||
1
style/src/index.js
Normal file
1
style/src/index.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
require("./wuttafarm-buefy.scss");
|
||||
85
style/src/wuttafarm-buefy.scss
Normal file
85
style/src/wuttafarm-buefy.scss
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
// cf. https://v2.buefy.org/documentation/customization
|
||||
|
||||
// Import Bulma's core
|
||||
@import "~bulma/sass/utilities/_all";
|
||||
|
||||
// Set your colors
|
||||
// nb. primary color was stolen from gin theme in farmOS
|
||||
$primary: rgb(0, 135, 95);
|
||||
$primary-light: findLightColor($primary);
|
||||
$primary-dark: findDarkColor($primary);
|
||||
$primary-invert: findColorInvert($primary);
|
||||
$twitter: #4099FF;
|
||||
$twitter-invert: findColorInvert($twitter);
|
||||
|
||||
// Lists and maps
|
||||
$custom-colors: null !default;
|
||||
$custom-shades: null !default;
|
||||
|
||||
// Setup $colors to use as bulma classes (e.g. 'is-twitter')
|
||||
$colors: mergeColorMaps(
|
||||
(
|
||||
"white": (
|
||||
$white,
|
||||
$black,
|
||||
),
|
||||
"black": (
|
||||
$black,
|
||||
$white,
|
||||
),
|
||||
"light": (
|
||||
$light,
|
||||
$light-invert,
|
||||
),
|
||||
"dark": (
|
||||
$dark,
|
||||
$dark-invert,
|
||||
),
|
||||
"primary": (
|
||||
$primary,
|
||||
$primary-invert,
|
||||
$primary-light,
|
||||
$primary-dark,
|
||||
),
|
||||
"link": (
|
||||
$link,
|
||||
$link-invert,
|
||||
$link-light,
|
||||
$link-dark,
|
||||
),
|
||||
"info": (
|
||||
$info,
|
||||
$info-invert,
|
||||
$info-light,
|
||||
$info-dark,
|
||||
),
|
||||
"success": (
|
||||
$success,
|
||||
$success-invert,
|
||||
$success-light,
|
||||
$success-dark,
|
||||
),
|
||||
"warning": (
|
||||
$warning,
|
||||
$warning-invert,
|
||||
$warning-light,
|
||||
$warning-dark,
|
||||
),
|
||||
"danger": (
|
||||
$danger,
|
||||
$danger-invert,
|
||||
$danger-light,
|
||||
$danger-dark,
|
||||
),
|
||||
),
|
||||
$custom-colors
|
||||
);
|
||||
|
||||
// Links
|
||||
$link: $primary;
|
||||
$link-invert: $primary-invert;
|
||||
$link-focus-border: $primary;
|
||||
|
||||
// Import Bulma and Buefy styles
|
||||
@import "~bulma";
|
||||
@import "~buefy/src/scss/buefy";
|
||||
13
style/webpack.config.js
Normal file
13
style/webpack.config.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
|
||||
module.exports = {
|
||||
plugins: [new MiniCssExtractPlugin({
|
||||
filename: "css/wuttafarm-buefy.css",
|
||||
})],
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.scss$/,
|
||||
use: [MiniCssExtractPlugin.loader, "css-loader", "sass-loader"],
|
||||
}]
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue