mirror of
https://github.com/gramps-project/gramps-web.git
synced 2026-10-16 21:01:38 +08:00
280c212162
* Add theme select to settings view * WIP: dark mode colors * Use system theme by default * Fix eslint error * Move variables unrelated to theme back to SharedStyles.js * Move theme css variables to separate file * Revert light theme colors * WIP: replace hardcoded colors with variables * Add commas to rgb values for vs code to show color decorators * Fix invalid color code * Remove unused css * WIP: replace hardcoded colors with variables * WIP: replace hardcoded colors with variables * WIP: replace hardcoded colors with variables * WIP: replace hardcoded colors with variables * WIP: replace hardcoded colors with variables * WIP: replace hardcoded colors with variables * Set dark theme colors for legacy material components * Set dark theme colors for legacy checkbox component * Change primary color for dark theme * Imrove fan chart text colors for dark mode * Set dark theme outline colors for legacy button component * Fix light mode background colors when dialog is open * Change primary color for dark theme * Sync map theme with gramps theme * Make theme selector translatable * Improve contrast for mwc-dialog in dark theme * Replace hardcoded colors with variables * Fix contrast for broken image in dark theme
52 lines
1.5 KiB
JavaScript
52 lines
1.5 KiB
JavaScript
import {createSpaConfig} from '@open-wc/building-rollup'
|
|
import replace from '@rollup/plugin-replace'
|
|
import merge from 'deepmerge'
|
|
import copy from 'rollup-plugin-copy'
|
|
import versionInjector from 'rollup-plugin-version-injector'
|
|
|
|
const API_URL = process.env.API_URL === undefined ? '' : process.env.API_URL
|
|
|
|
const BASE_DIR = process.env.BASE_DIR === undefined ? '' : process.env.BASE_DIR
|
|
|
|
const baseConfig = createSpaConfig({
|
|
developmentMode: process.env.ROLLUP_WATCH === 'true',
|
|
injectServiceWorker: true,
|
|
workbox: {
|
|
globIgnores: ['index.html'],
|
|
navigateFallbackDenylist: [/^\/api.*/],
|
|
skipWaiting: false,
|
|
clientsClaim: false,
|
|
},
|
|
html: {
|
|
transform: [
|
|
html => html.replace('<base href="/">', `<base href="${BASE_DIR}/">`),
|
|
],
|
|
},
|
|
})
|
|
|
|
export default merge(baseConfig, {
|
|
input: './index.html',
|
|
external: './config.js',
|
|
plugins: [
|
|
copy({
|
|
targets: [
|
|
{src: './maplibre-gl.css', dest: 'dist/'},
|
|
{src: './global.css', dest: 'dist/'},
|
|
{src: './tippy.css', dest: 'dist/'},
|
|
{src: './src/config.js', dest: 'dist/'},
|
|
{src: './manifest.json', dest: 'dist/'},
|
|
{src: './images/**/*', dest: 'dist/images'},
|
|
{src: './fonts/**/*', dest: 'dist/fonts'},
|
|
{src: './lang/*', dest: 'dist/lang'},
|
|
],
|
|
}),
|
|
replace({
|
|
'http://localhost:5555': API_URL,
|
|
BASE_DIR: JSON.stringify(BASE_DIR),
|
|
preventAssignment: true,
|
|
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
}),
|
|
versionInjector(),
|
|
],
|
|
})
|