From 018e6ff654c75ee402056eebacee7ee2511ce888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Bj=C3=A4reholt?= Date: Thu, 10 Oct 2024 11:49:39 +0200 Subject: [PATCH] docs: improved styling of demos --- docs/_static/custom.css | 10 ++++++++++ docs/demos.rst | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/docs/_static/custom.css b/docs/_static/custom.css index 71e8cf49..10e9b8a0 100644 --- a/docs/_static/custom.css +++ b/docs/_static/custom.css @@ -6,3 +6,13 @@ dl.py.attribute { dl.py.attribute + dl.py.method { margin-top: 3rem; } + +/* Remove "Recorded with asciinema" and remove margin to make it more compact */ +.asciicast { + margin-bottom: 0 !important; +} + +/* Doesn't work reliable, since size is variable */ +.asciicast iframe { + height: 470px !important; +} diff --git a/docs/demos.rst b/docs/demos.rst index dc90e249..f02dd13a 100644 --- a/docs/demos.rst +++ b/docs/demos.rst @@ -17,6 +17,7 @@ Generate a snake game that runs in the terminal using curses, and then modify it .. asciinema:: 621992 :autoplay: true + :idle-time-limit: 1 Steps @@ -33,6 +34,7 @@ Generate a program that renders mandelbrot with curses, and then modify it to ad .. asciinema:: 621991 :autoplay: true + :idle-time-limit: 1 Steps @@ -47,6 +49,7 @@ An old demo showing off basic code execution and shell interaction. .. asciinema:: 606375 :autoplay: true + :idle-time-limit: 1 Steps @@ -61,6 +64,7 @@ Showing off basic URL loading from the prompt, and answering questions based on .. asciinema:: 621997 :autoplay: true + :idle-time-limit: 1 Steps