From 11e1a8fe0fff6b1981721f50f18a958635177919 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Thu, 30 May 2024 12:06:11 -0500 Subject: [PATCH] CSS heading/dl tweaks for the reference index (#2608) Attempting to make the each section feel more like a cohesive "block" --- inst/BS5/assets/pkgdown.scss | 13 ++++++++++--- pkgdown/_pkgdown.yml | 32 ++++++++++++++++++++------------ 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/inst/BS5/assets/pkgdown.scss b/inst/BS5/assets/pkgdown.scss index b3eafcefc..f3431521b 100644 --- a/inst/BS5/assets/pkgdown.scss +++ b/inst/BS5/assets/pkgdown.scss @@ -244,9 +244,16 @@ body { } // spacing tweaks -dd { - padding-left: 1.5rem; -} + +// Use an indent for defintions rather than horitzonal space +dl {margin-bottom: 0;} +dd {padding-left: 1.5rem; margin-bottom: 0.25rem} + +// Use margins rather than size to distinguish headings +h2, .h2 { font-size: 1.75rem; margin-top: 1.5rem;} +h3, .h3 { font-size: 1.25rem; margin-top: 1rem; font-weight: bold;} +h4, .h4 { font-size: 1.1rem; font-weight: bold;} +h5, .h5 { font-size: 1rem; font-weight: bold;} summary { margin-bottom: 0.5rem; diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index cc3a5f52e..df3d9f059 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -52,32 +52,40 @@ articles: reference: - title: Build - desc: Build a complete site or one of its components. + +- subtitle: Build the complete site contents: - build_site + - clean_site + - preview_site + - pkgdown_sitrep + +- subtitle: Build part of a site + desc: These functions are useful for rapid iteration when you're working on a + specific part of your site. + contents: - starts_with("build_") + - -build_site - -build_site_github_pages - init_site - - preview_site - - pkgdown_sitrep -- title: Deployment +- subtitle: Customisation contents: - - starts_with("deploy_") - - build_site_github_pages - - check_pkgdown + - template_navbar + +- title: For expert use -- title: Templates +- subtitle: Deployment contents: - - template_navbar - - render_page + - starts_with("deploy_") + - build_site_github_pages -- title: Helpers +- subtitle: Other helpers contents: - - clean_site - rd2html - as_pkgdown - in_pkgdown + - render_page - title: Regression tests contents: