Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dark theme switch #18

Merged
merged 7 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: main
branches: [main, dev]
pull_request:
branches: main
branches: [main, dev]
release:
types: [published]
workflow_dispatch:
Expand Down Expand Up @@ -40,9 +40,18 @@ jobs:
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && github.ref_name == 'main'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request' && github.ref_name == 'dev'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
target-folder: dev
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Authors@R:
person("Hugo", "Gruson", , "[email protected]", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0002-4094-1476"))
Description: What the package does (one paragraph).
Imports:
pkgdown (>= 2.1.0)
License: MIT
Config/testthat/edition: 3
Encoding: UTF-8
Expand Down
4 changes: 1 addition & 3 deletions inst/pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ template:
base_font: "DM Sans"
code_font: "Roboto Mono"
danger: "#F04A4C"

navbar:
bg: dark
light-switch: true

figures:
# fig.retina: 1 # required by the showtext package
Expand Down
7 changes: 4 additions & 3 deletions inst/pkgdown/extra.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import 'https://fonts.googleapis.com/css2?family=DM+Sans:opsz,[email protected],400;9..40,700&family=Roboto+Mono&display=swap';

.bg-dark {
background-color: #071E2D !important;
.navbar {
background-color: #071E2D;
}

.navbar-nav .nav-item > .nav-link, .navbar-brand, .navbar-brand:hover, .navbar-brand:focus {
Expand All @@ -17,7 +17,8 @@
color: #555;
}

.version-number {
// Version number colour for releases
.nav-text.text-muted {
color: #888 !important;
}

Expand Down
Loading