From 1f374274aacda2c1d15c34c376bcde50fb5b6c60 Mon Sep 17 00:00:00 2001 From: Christopher Kenny Date: Tue, 30 Jul 2024 21:36:35 -0400 Subject: [PATCH] scroll --- _quarto.yml | 1 - cards.qmd | 10 +++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/_quarto.yml b/_quarto.yml index 74d0a94..d966f76 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -22,7 +22,6 @@ website: text: "Events" - about.qmd - format: html: theme: diff --git a/cards.qmd b/cards.qmd index 86856c0..fcf9f7b 100644 --- a/cards.qmd +++ b/cards.qmd @@ -23,7 +23,7 @@ cards <- read_csv(here('data/cards.csv'), ```{r} cards |> - gt() |> + gt(id = 'cards') |> text_transform( locations = cells_body(rows = 1), fn = function(x) if (!is.na(x)) web_image(x) else '' @@ -35,6 +35,14 @@ cards |> use_compact_mode = TRUE, use_highlight = TRUE, page_size_default = 51 + ) |> + opt_css( + css = ' + #cards .gt_stub { + position: sticky; + left: 0; + } + ' ) ```