docs: remove unused asciinema player

This commit is contained in:
Johannes Kirschbauer
2025-10-08 13:01:26 +02:00
parent 4de052e58b
commit 57f14827c2
4 changed files with 0 additions and 63 deletions

View File

@@ -1,41 +0,0 @@
from typing import Any
def define_env(env: Any) -> None:
static_dir = "/static/"
video_dir = "https://clan.lol/" + "videos/"
asciinema_dir = static_dir + "asciinema-player/"
@env.macro
def video(name: str) -> str:
return f"""<video loop muted autoplay id="{name}">
<source src={video_dir + name} type="video/webm">
Your browser does not support the video tag.
</video>"""
@env.macro
def asciinema(name: str) -> str:
return f"""<div id="{name}">
<script>
// Function to load the script and then create the Asciinema player
function loadAsciinemaPlayer() {{
var script = document.createElement('script');
script.src = "{asciinema_dir}/asciinema-player.min.js";
script.onload = function() {{
AsciinemaPlayer.create('{video_dir + name}', document.getElementById("{name}"), {{
loop: true,
autoPlay: true,
controls: false,
speed: 1.5,
theme: "solarized-light"
}});
}};
document.head.appendChild(script);
}}
// Load the Asciinema player script
loadAsciinemaPlayer();
</script>
<link rel="stylesheet" type="text/css" href="{asciinema_dir}/asciinema-player.css" />
</div>"""

View File

@@ -3,8 +3,6 @@
module-docs, module-docs,
clan-cli-docs, clan-cli-docs,
clan-lib-openapi, clan-lib-openapi,
asciinema-player-js,
asciinema-player-css,
roboto, roboto,
fira-code, fira-code,
docs-options, docs-options,
@@ -57,10 +55,6 @@ pkgs.stdenv.mkDerivation {
cp -r ${docs-options} ./site/options cp -r ${docs-options} ./site/options
chmod -R +w ./site/options chmod -R +w ./site/options
mkdir -p ./site/static/asciinema-player
ln -snf ${asciinema-player-js} ./site/static/asciinema-player/asciinema-player.min.js
ln -snf ${asciinema-player-css} ./site/static/asciinema-player/asciinema-player.css
# Link to fonts # Link to fonts
ln -snf ${roboto}/share/fonts/truetype/Roboto-Regular.ttf ./site/static/ ln -snf ${roboto}/share/fonts/truetype/Roboto-Regular.ttf ./site/static/
ln -snf ${fira-code}/share/fonts/truetype/FiraCode-VF.ttf ./site/static/ ln -snf ${fira-code}/share/fonts/truetype/FiraCode-VF.ttf ./site/static/

View File

@@ -43,15 +43,6 @@
mypy --strict $out/bin/render-options mypy --strict $out/bin/render-options
''; '';
asciinema-player-js = pkgs.fetchurl {
url = "https://github.com/asciinema/asciinema-player/releases/download/v3.7.0/asciinema-player.min.js";
sha256 = "sha256-Ymco/+FinDr5YOrV72ehclpp4amrczjo5EU3jfr/zxs=";
};
asciinema-player-css = pkgs.fetchurl {
url = "https://github.com/asciinema/asciinema-player/releases/download/v3.7.0/asciinema-player.css";
sha256 = "sha256-GZMeZFFGvP5GMqqh516mjJKfQaiJ6bL38bSYOXkaohc=";
};
module-docs = module-docs =
pkgs.runCommand "rendered" pkgs.runCommand "rendered"
{ {
@@ -111,8 +102,6 @@
; ;
inherit (inputs) nixpkgs; inherit (inputs) nixpkgs;
inherit module-docs; inherit module-docs;
inherit asciinema-player-js;
inherit asciinema-player-css;
}; };
deploy-docs = pkgs.callPackage ./deploy-docs.nix { inherit (config.packages) docs; }; deploy-docs = pkgs.callPackage ./deploy-docs.nix { inherit (config.packages) docs; };
inherit module-docs; inherit module-docs;

View File

@@ -52,8 +52,6 @@
"checks/secrets/sops/groups/group/machines/machine" "checks/secrets/sops/groups/group/machines/machine"
"checks/syncthing/introducer/introducer_device_id" "checks/syncthing/introducer/introducer_device_id"
"checks/syncthing/introducer/introducer_test_api" "checks/syncthing/introducer/introducer_test_api"
"docs/site/static/asciinema-player/asciinema-player.css"
"docs/site/static/asciinema-player/asciinema-player.min.js"
"nixosModules/clanCore/vars/secret/sops/eval-tests/populated/vars/my_machine/my_generator/my_secret" "nixosModules/clanCore/vars/secret/sops/eval-tests/populated/vars/my_machine/my_generator/my_secret"
"pkgs/clan-cli/clan_cli/tests/data/gnupg.conf" "pkgs/clan-cli/clan_cli/tests/data/gnupg.conf"
"pkgs/clan-cli/clan_cli/tests/data/password-store/.gpg-id" "pkgs/clan-cli/clan_cli/tests/data/password-store/.gpg-id"
@@ -94,9 +92,6 @@
"*.yaml" "*.yaml"
"*.yml" "*.yml"
]; ];
excludes = [
"*/asciinema-player/*"
];
}; };
treefmt.programs.mypy.directories = { treefmt.programs.mypy.directories = {
"clan-cli" = { "clan-cli" = {