mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17:22 +00:00
Themes: add Monkeytype themes
This commit is contained in:
parent
34991f1085
commit
07c0ce0625
5 changed files with 1353 additions and 24 deletions
27
src/themes/_generator.js
Normal file
27
src/themes/_generator.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/* @see https://github.com/monkeytypegame/monkeytype/blob/master/frontend/static/themes/_list.json */
|
||||
const monkeyTypesThemes = [
|
||||
/* Paste json here! */
|
||||
].map((theme) => theme)
|
||||
.filter((theme) => ![
|
||||
'dark', 'solarized_dark', 'solarized_light',
|
||||
].includes(theme.name))
|
||||
.sort((a, b) => a.name.localeCompare(b.name))
|
||||
|
||||
const names = monkeyTypesThemes
|
||||
.map(({name}) => `'${name}',`).join('\n')
|
||||
|
||||
const css = monkeyTypesThemes
|
||||
.map((theme) => [
|
||||
`.${theme.name} {`,
|
||||
` --bg-color: ${theme.bgColor};`,
|
||||
` --main-color: ${theme.textColor};`,
|
||||
` --accent-color: ${theme.mainColor};`,
|
||||
` --input-color: ${theme.subColor};`,
|
||||
'}\n'].join('\n'))
|
||||
.join('\n')
|
||||
|
||||
console.log('/* List*/')
|
||||
console.log(names)
|
||||
|
||||
console.log('/* CSS */')
|
||||
console.log(css)
|
||||
Loading…
Add table
Add a link
Reference in a new issue