From 8afa9dc1f06276d7321384707c96a5c11467fa7e Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Fri, 12 Jan 2024 15:55:52 -0500 Subject: [PATCH] Make `shiny-mode-tab` and `shinylive` links in code block site-wide features --- components/_partials/components.css | 44 ++------------------- components/_partials/componentsjs.html | 47 ---------------------- include-before-body.html | 4 +- include-in-header.html | 54 +++++++++++++++++++++++++- quarto-style.scss | 41 +++++++++++++++++++ 5 files changed, 99 insertions(+), 91 deletions(-) diff --git a/components/_partials/components.css b/components/_partials/components.css index 5e018114..b9aab7f9 100644 --- a/components/_partials/components.css +++ b/components/_partials/components.css @@ -202,9 +202,9 @@ pre.console code { /* Tab styling */ .panel-tabset .nav-tabs { - display: flex !important; - align-items: flex-end !important; - justify-content: flex-end !important; + display: flex; + align-items: flex-end; + justify-content: flex-end; border-bottom: 1px solid #E9ECEF; border-top: none; border-left: none; @@ -256,41 +256,3 @@ main a.nav-link:hover { border: 1px solid #E9ECEF; border-radius: 10px; } - -/* Shiny App Mode Tabset (Express/Core) */ - -.shiny-mode-tabset > .nav-tabs { - padding-inline: 0.5rem; - border-start-end-radius: 0.5rem; - border-start-start-radius: 0.5rem; - border-bottom: 2px solid var(--bs-blue); - justify-content: flex-start !important; - font-size: 0.95em; - line-height: 1.5; -} - -.shiny-mode-tabset > .nav-tabs, -.shiny-mode-tabset > .nav-tabs > .nav-item > .nav-link, -.shiny-mode-tabset > .nav-tabs > .nav-item > .nav-link.active { - background-color: var(--bs-blue); - color: var(--bs-white); -} - -.shiny-mode-tabset > .nav-tabs > .nav-item > .nav-link:hover { - border-bottom-color: transparent !important; -} - -.shiny-mode-tabset > .nav-tabs > .nav-item > .nav-link.active { - font-weight: 600; - border-bottom-color: var(--bs-white) !important; -} - -.shiny-mode-tabset > .tab-content { - padding-top: 0; -} - -.shiny-mode-tabset > .tab-content .sourceCode { - border-start-start-radius: 0; - border-start-end-radius: 0; - border-block-start-width: 0; -} diff --git a/components/_partials/componentsjs.html b/components/_partials/componentsjs.html index d282a6bf..3881fa48 100644 --- a/components/_partials/componentsjs.html +++ b/components/_partials/componentsjs.html @@ -1,53 +1,6 @@ diff --git a/include-before-body.html b/include-before-body.html index 8e885ea4..20a92b66 100644 --- a/include-before-body.html +++ b/include-before-body.html @@ -1,3 +1,3 @@ - - \ No newline at end of file + + diff --git a/include-in-header.html b/include-in-header.html index 5e3d8c80..687541a6 100644 --- a/include-in-header.html +++ b/include-in-header.html @@ -24,4 +24,56 @@ .forEach(lnk => lnk.setAttribute("rel", "noopener noreferrer")) ); - \ No newline at end of file + + + diff --git a/quarto-style.scss b/quarto-style.scss index 9f136ee1..beddf97a 100644 --- a/quarto-style.scss +++ b/quarto-style.scss @@ -1657,3 +1657,44 @@ btn.action-button:hover { .border-bottom.blue { border-bottom: 1px solid #007BB7 !important; } + +// Shiny Mode Tabset Code Window +.shiny-mode-tabset { + > .nav-tabs, + > .nav-tabs > .nav-item > .nav-link, + > .nav-tabs > .nav-item > .nav-link.active { + background-color: var(--bs-blue); + color: var(--bs-white); + } + + > .nav-tabs { + padding-inline: 0.5rem; + border-start-end-radius: 0.5rem; + border-start-start-radius: 0.5rem; + border-bottom: 2px solid var(--bs-blue); + justify-content: flex-start !important; + font-size: 0.95em; + line-height: 1.5; + + > .nav-item { + > .nav-link { + &:hover { + border-bottom-color: transparent !important; + } + &.active { + font-weight: 600; + border-bottom-color: var(--bs-white) !important; + } + } + } + } + + > .tab-content { + padding-top: 0; + .sourceCode { + border-start-start-radius: 0; + border-start-end-radius: 0; + border-block-start-width: 0; + } + } +}