Skip to content

Commit

Permalink
updating docs theme for new bslib vars
Browse files Browse the repository at this point in the history
  • Loading branch information
dgkf committed Mar 30, 2024
1 parent cf059fc commit 41da06f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 13 deletions.
8 changes: 8 additions & 0 deletions pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
development:
mode: auto

url: ~
template:
bootstrap: 5
Expand All @@ -6,6 +9,11 @@ template:
fg: "#404040"
bg: "#F4F4F4"
primary: "#fa3939"
navbar-dark-active-color: var(--bs-fg)
navbar-dark-color: var(--bs-fg)
navbar-dark-brand-color: var(--bs-fg)
navbar-dark-brand-hover-color: white
navbar-dark-hover-color: white

navbar:
bg: primary
Expand Down
38 changes: 25 additions & 13 deletions pkgdown/extra.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

body {
--bs-code-color: rgba(var(--bs-primary-rgb), 0.8);
}
Expand All @@ -19,26 +20,37 @@ pre {
border-width: 0.2em;
}

.btn-copy-ex {
padding: 0.5em 1em;
}

// for dev version tag, which can be hard to read with bright navbars
.nav-text.text-danger {
background-color: rgba(255, 255, 255, 0.8);
padding: 0.2em 0.8em;
border-radius: 1em;
}

.navbar-dark {
--bs-navbar-color: rgba(var(--bs-body-bg-rgb), 0.8);
--bs-navbar-hover-color: rgba(var(--bs-body-bg-rgb), 1.0);
}
font-weight: bolder;

.navbar-dark .navbar-nav .active > .nav-link {
background: rgba(255, 255, 255, 0.2);
}
.navbar-nav {
.active > .nav-link {
background: rgba(255, 255, 255, 0.2);
}
}

.navbar-dark .navbar-nav .active > .nav-link:hover {
background: rgba(255, 255, 255, 0.3);
input[type="search"] {
border: none;
border-radius: 0.1em;
background-color: rgba(var(--bs-body-bg-rgb), 0.8);
color: rgba(var(--bs-primary-rgb), 0.6);
&:focus { background-color: rgba(var(--bs-body-bg-rgb), 0.90); }
}
}

.text-muted {
color: rgba(var(--bs-body-bg-rgb), 0.6) !important;
}

.navbar-dark input[type="search"] {
border: none;
border-radius: 0.1em;
background-color: rgba(var(--bs-body-bg-rgb), 0.8);
color: rgba(var(--bs-primary-rgb), 0.6);
}

0 comments on commit 41da06f

Please sign in to comment.