From e7f7801c283346ebe5e259de3b2f4e34096c57e5 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Mon, 4 Sep 2023 16:31:33 +0200 Subject: [PATCH 01/28] Upgrade player to latest version --- assets/package-lock.json | 8 ++++---- assets/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/package-lock.json b/assets/package-lock.json index de57ccb11..f3775fbe3 100644 --- a/assets/package-lock.json +++ b/assets/package-lock.json @@ -8,7 +8,7 @@ "devDependencies": { "@babel/core": "^7.21.0", "@babel/preset-env": "^7.20.2", - "asciinema-player": "next", + "asciinema-player": "3.6.1", "babel-loader": "^8.3.0", "bootstrap": "^4.5.0", "copy-webpack-plugin": "^11.0.0", @@ -2298,9 +2298,9 @@ } }, "node_modules/asciinema-player": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/asciinema-player/-/asciinema-player-3.6.0.tgz", - "integrity": "sha512-+cScxWtyam4PBS3qv2o9n6MmF1qY8mbCMZScw3y8oEIZiyaa2busEPdUxcsI562+yyJSzzl8hnnNccna1HPhKw==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/asciinema-player/-/asciinema-player-3.6.1.tgz", + "integrity": "sha512-FfTABH/N6pjG74A6cCfsrirTSM4UAOLMzcFXb0zS34T5czvg3CyUy2TAqa3WEs5owUFHcuN1Y2y8o0n2yjeMvQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.21.0", diff --git a/assets/package.json b/assets/package.json index 6883d628e..4ca07a946 100644 --- a/assets/package.json +++ b/assets/package.json @@ -12,7 +12,7 @@ "devDependencies": { "@babel/core": "^7.21.0", "@babel/preset-env": "^7.20.2", - "asciinema-player": "next", + "asciinema-player": "3.6.1", "babel-loader": "^8.3.0", "bootstrap": "^4.5.0", "copy-webpack-plugin": "^11.0.0", From 1486e3c7e7106a3e9d751fa4edd4c0520fd772fa Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Mon, 4 Sep 2023 16:38:09 +0200 Subject: [PATCH 02/28] Enable Dracula theme --- .../templates/doc/embedding.html.md | 1 + .../recording/_svg_theme_dracula.css.eex | 22 +++++++++++++++++++ lib/asciinema_web/views/player_view.ex | 1 + lib/media.ex | 1 + 4 files changed, 25 insertions(+) create mode 100644 lib/asciinema_web/templates/recording/_svg_theme_dracula.css.eex 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", From 0ffc7b95a31871a3089035382fc5337d4fb31766 Mon Sep 17 00:00:00 2001 From: Marcin Kulik <17589+ku1ik@users.noreply.github.com> Date: Tue, 19 Sep 2023 10:09:47 +0200 Subject: [PATCH 03/28] Add sponsors to the README --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index a01d211d5..4c581598f 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,12 @@ If you find anything that looks like a potential vulnerability please read on [how to report a security issue](https://github.com/asciinema/asciinema-server/blob/main/CONTRIBUTING.md#reporting-security-issues). +## Sponsors + +asciinema is sponsored by: + +- [Brightbox](https://www.brightbox.com/) + ## Consulting I offer consulting services for asciinema project. See https://asciinema.org/consulting for more information. From e426624229ca66e97688643799a98a4b95f80201 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Tue, 19 Sep 2023 11:51:24 +0200 Subject: [PATCH 04/28] Add Donate link to the footer --- lib/asciinema_web/templates/layout/_footer.html.heex | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/asciinema_web/templates/layout/_footer.html.heex b/lib/asciinema_web/templates/layout/_footer.html.heex index 619778ce4..d22d79c53 100644 --- a/lib/asciinema_web/templates/layout/_footer.html.heex +++ b/lib/asciinema_web/templates/layout/_footer.html.heex @@ -1,8 +1,10 @@