Skip to content

Commit 85003b3

Browse files
committed
End navbars
1 parent 3ebde49 commit 85003b3

4 files changed

Lines changed: 40 additions & 753 deletions

File tree

data-raw/compress_css.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Compress with sass
2+
library(sass)
3+
4+
lns <- readLines("inst/pkgdown/assets/BS5/gitdevr.css")
5+
6+
sass(
7+
lns,
8+
"inst/pkgdown/assets/BS5/gitdevr.min.css",
9+
cache = NULL,
10+
options = sass_options(output_style = "compressed")
11+
)

inst/pkgdown/_pkgdown.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ template:
6969
navbar-light-hover-color: "#6a788a"
7070
navbar-light-active-color: "#d3d4d5"
7171
navbar-dark-bg: "#24292f"
72+
navbar-dark-color: "#ffffff"
7273
navbar-dark-brand-color: "#ffffff"
7374
navbar-dark-brand-hover-color: "#ffffff"
7475
navbar-dark-toggler-border-color: "#24292f"

inst/pkgdown/assets/BS5/gitdevr.css

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@
55
--bs-body-bg: #24292f;
66
--bs-body-bg-rgb: 36, 41, 47;
77
--bs-body-color: #fff;
8+
--bs-primary: #383d43;
9+
--bs-secondary: #6c757d;
10+
--bs-success: #2da44e;
11+
--bs-info: #9686be;
12+
--bs-warning: #d4a72c;
13+
--bs-danger: #d86f75;
14+
--bs-light: #f8f9fa;
15+
--bs-dark: #343a40;
16+
--bs-link: #2b8ffd;
17+
--bs-link-hover: #025cc0;
18+
819
--bs-body-color-rgb: 255, 255, 255;
920
--bs-primary-color: #383d43;
1021
--bs-primary-color-rgb: 56.1, 60.6, 66.9;
@@ -37,10 +48,13 @@
3748
--brand-code: #e75ca2;
3849
}
3950

40-
.navbar-dark,
41-
:where([data-bs-theme="dark"]) .navbar,
42-
.navbar[data-bs-theme="dark"] {
43-
--bs-navbar-color: var(--bs-white);
51+
.dropdown-menu {
52+
--bs-dropdown-bg: var(--brand-black);
53+
--bs-dropdown-link-color: var(--bs-navbar-color);
54+
--bs-dropdown-link-hover-color: #6a788a;
55+
--bs-dropdown-link-hover-bg: var(--bs-dropdown-bg);
56+
--bs-dropdown-header-color: var(--bs-dropdown-link-hover-color);
57+
--bs-dropdown-divider-bg: rgba(var(--bs-secondary-rgb), 0.5);
4458
}
4559

4660
/* ---Images and captions figure spacing--- */
@@ -51,7 +65,7 @@ main img {
5165

5266
.caption,
5367
.figure {
54-
color: var(--bs-secondary-color);
68+
color: var(--bs-secondary);
5569
margin-left: auto;
5670
margin-right: auto;
5771
margin-top: 0.5rem;
@@ -61,44 +75,32 @@ main img {
6175

6276
/* ---Navbar tweaks--- */
6377

64-
.navbar {
78+
.navbar-brand,
79+
#navbar,
80+
.navbar .dropdown-item {
6581
font-family: "Inter Tight", Roboto;
6682
font-weight: 800;
6783
}
6884

6985
.navbar .text-muted {
70-
color: #c6ced8 !important;
71-
}
72-
73-
#navbar .dropdown-menu {
74-
background-color: var(--brand-black);
75-
}
76-
77-
#navbar .dropdown-menu .dropdown-item {
78-
color: #fff;
79-
font-weight: 800;
86+
color: var(--bs-gray) !important;
8087
}
8188

89+
/* Hovers */
8290
#navbar .nav-link:hover,
8391
#navbar .nav-link:focus {
8492
color: #6a788a !important;
8593
}
8694

87-
#navbar .nav-link {
88-
color: var(--brand-white);
89-
}
90-
91-
#navbar .dropdown-menu .dropdown-item:hover,
92-
#navbar .dropdown-menu .dropdown-item:focus,
9395
#navbar .dropdown-menu .dropdown-item.active:hover,
9496
#navbar .dropdown-menu .dropdown-item.active:focus {
9597
color: #6a788a;
96-
background-color: #f8f9fa;
9798
}
9899

100+
/* Actives */
99101
#navbar .nav-item.active .nav-link,
100102
#navbar .dropdown-menu .dropdown-item.active {
101-
color: #d3d4d5;
103+
color: var(--bs-gray-200);
102104
}
103105

104106
#navbar .dropdown-menu .dropdown-item .fa {
@@ -111,13 +113,7 @@ main img {
111113
}
112114

113115
.algolia-autocomplete .aa-dropdown-menu {
114-
color: #22272e;
115-
}
116-
117-
[data-bs-theme="dark"] {
118-
.algolia-autocomplete .aa-dropdown-menu {
119-
color: rgba(255, 255, 255, 0.55);
120-
}
116+
color: var(--bs-navbar-color);
121117
}
122118

123119
/* ---Footer--- */

0 commit comments

Comments
 (0)