Skip to content

Commit

Permalink
fix(extras): move to a more usable version of delivering MonkeyType t…
Browse files Browse the repository at this point in the history
…hemes
  • Loading branch information
mehalter committed Aug 13, 2024
1 parent fb86b47 commit f1e8bb6
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 69 deletions.
16 changes: 0 additions & 16 deletions extras/monkeytype/astrodark.css

This file was deleted.

16 changes: 0 additions & 16 deletions extras/monkeytype/astrojupiter.css

This file was deleted.

16 changes: 0 additions & 16 deletions extras/monkeytype/astrolight.css

This file was deleted.

16 changes: 0 additions & 16 deletions extras/monkeytype/astromars.css

This file was deleted.

2 changes: 1 addition & 1 deletion lua/astrotheme/extras/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ M.extras = {
kitty = { ext = "conf", url = "https://sw.kovidgoyal.net/kitty/conf.html", label = "Kitty" },
lazygit = { ext = "yml", url = "https://github.com/jesseduffield/lazygit", label = "Lazygit" },
lua = { ext = "lua", url = "https://www.lua.org", label = "Lua Table for testing" },
monkeytype = { ext = "css", url = "https://monkeytype.com", label = "MonkeyType" },
monkeytype = { ext = "md", url = "https://monkeytype.com", label = "MonkeyType" },
prism = { ext = "js", url = "https://prismjs.com", label = "Prism" },
process_compose = { ext = "yaml", url = "https://f1bonacc1.github.io/process-compose/", label = "process-compose" },
slack = {ext = "txt", url = "https://slack.com", label = "Slack"},
Expand Down
13 changes: 9 additions & 4 deletions lua/astrotheme/extras/monkeytype.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ local M = {}
function M.generate(colors)
-- build the color palette
local monkeytype_colors = {
name = colors._style_name,
bg = colors.ui.base,
main = colors.ui.accent,
caret = colors.ui.text,
Expand Down Expand Up @@ -34,10 +35,13 @@ function M.generate(colors)
})
return util.template(
[=[
/* ${_style_name} MonkeyType Colors */
/* Apply the theme easily with the link below
* https://monkeytype.com?customTheme=${encoded}
*/
# ${name} MonkeyType Theme
[Click here to apply ${name} in MonkeyType](https://monkeytype.com?customTheme=${encoded})
Here is the CSS that gets applied when clicking the link above:
```css
:root {
--bg-color: ${bg};
--main-color: ${main};
Expand All @@ -50,6 +54,7 @@ function M.generate(colors)
--colorful-error-color: ${colorful_error};
--colorful-error-extra-color: ${colorful_error_extra};
}
```
]=],
monkeytype_colors
)
Expand Down

0 comments on commit f1e8bb6

Please sign in to comment.