diff --git a/lib/asciinema_web/templates/doc/embedding.html.md b/lib/asciinema_web/templates/doc/embedding.html.md index aea9e2bf4..272c3e74f 100644 --- a/lib/asciinema_web/templates/doc/embedding.html.md +++ b/lib/asciinema_web/templates/doc/embedding.html.md @@ -148,6 +148,7 @@ to a theme set by the asciicast author (or to "asciinema" if not set by the author). The available themes are: * asciinema +* dracula * monokai * nord * solarized-dark diff --git a/lib/asciinema_web/templates/recording/_svg_theme_dracula.css.eex b/lib/asciinema_web/templates/recording/_svg_theme_dracula.css.eex new file mode 100644 index 000000000..8a6a7961b --- /dev/null +++ b/lib/asciinema_web/templates/recording/_svg_theme_dracula.css.eex @@ -0,0 +1,22 @@ + + +.default-text-fill {fill: #f8f8f2} +.default-bg-fill {fill: #282a36} + +.c-0 {fill: #21222c} +.c-1 {fill: #ff5555} +.c-2 {fill: #50fa7b} +.c-3 {fill: #f1fa8c} +.c-4 {fill: #bd93f9} +.c-5 {fill: #ff79c6} +.c-6 {fill: #8be9fd} +.c-7 {fill: #f8f8f2} +.c-8 {fill: #6272a4} +.c-9 {fill: #ff6e6e} +.c-10 {fill: #69ff94} +.c-11 {fill: #ffffa5} +.c-12 {fill: #d6acff} +.c-13 {fill: #ff92df} +.c-14 {fill: #a4ffff} +.c-15 {fill: #ffffff} +.c-8, .c-9, .c-10, .c-11, .c-12, .c-13, .c-14, .c-15 {font-weight: bold} diff --git a/lib/asciinema_web/views/player_view.ex b/lib/asciinema_web/views/player_view.ex index 58749c3f7..0f5d69ea0 100644 --- a/lib/asciinema_web/views/player_view.ex +++ b/lib/asciinema_web/views/player_view.ex @@ -31,6 +31,7 @@ defmodule AsciinemaWeb.PlayerView do def theme_options do [ {"asciinema", "asciinema"}, + {"Dracula", "dracula"}, {"Monokai", "monokai"}, {"Nord", "nord"}, {"Tango", "tango"}, diff --git a/lib/media.ex b/lib/media.ex index 6888e1ff0..06073e5e2 100644 --- a/lib/media.ex +++ b/lib/media.ex @@ -6,6 +6,7 @@ defmodule Asciinema.Media do @themes [ "asciinema", + "dracula", "monokai", "nord", "solarized-dark",