generated from dracula/template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from dracula/26-add-a-dracula-themed-_brandyaml
Add `dracula_brand`
- Loading branch information
Showing
12 changed files
with
167 additions
and
1,271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
.Rproj.user | ||
.Rhistory | ||
.RData | ||
renv | ||
.Ruserdata | ||
.httr-oauth | ||
/.quarto/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#' @title Dracula Themed _brand.yaml File | ||
#' | ||
#' @description Add a Dracula-themed `_brand.yaml` to your project. | ||
#' | ||
#' @param path Character. The directory where `_brand.yaml` should be copied. Defaults to the working directory. | ||
#' | ||
#' @param force Boolean. If `TRUE`, overwrite existing `_brand.yaml` without prompting. Defaults to `FALSE`. | ||
#' | ||
#' @return Logical. Returns `TRUE` if the file was copied successfully, `FALSE` otherwise. | ||
#' | ||
#' @examples | ||
#' # Copy _brand.yaml to the current working directory | ||
#' dracula_brand() | ||
#' | ||
#' # Copy _brand.yaml to a specific directory | ||
#' dracula_brand(path = "my_project") | ||
#' | ||
#' # Force overwrite if _brand.yaml already exists | ||
#' dracula_brand(force = TRUE) | ||
#' | ||
#' @export | ||
dracula_brand <- function(path = ".", force = FALSE) { | ||
package_path <- system.file("_brand.yaml", package = "dRacula", mustWork = TRUE) | ||
target_path <- file.path(path, "_brand.yaml") | ||
|
||
if (file.exists(target_path)) { | ||
if (!force) { | ||
message("_brand.yaml already exists. Set `force = TRUE` to overwrite") | ||
return(invisible(FALSE)) | ||
} | ||
} | ||
|
||
file.copy(package_path, target_path, overwrite = TRUE) | ||
message("_brand.yaml copied to ", target_path) | ||
return(invisible(TRUE)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
meta: | ||
name: | ||
short: Dracula | ||
full: Dracula | ||
link: | ||
home: https://draculatheme.com/dRacula | ||
github: https://github.com/dracula/dRacula | ||
|
||
color: | ||
palette: | ||
black: "#282A36" | ||
white: "#F8F8F2" | ||
dark-grey: "#44475A" | ||
blue-grey: "#6272A4" | ||
red: "#FF5555" | ||
orange: "#FFB86C" | ||
yellow: "#F1FA8C" | ||
green: "#50FA7B" | ||
purple: "#BD93F9" | ||
cyan: "#8BE9FD" | ||
pink: "#FF79C6" | ||
background: "#282A36" | ||
foreground: "#F8F8F2" | ||
|
||
primary: purple | ||
secondary: cyan | ||
tertiary: blue-grey | ||
success: green | ||
info: blue-grey | ||
warning: orange | ||
danger: red | ||
light: white | ||
dark: black | ||
|
||
typography: | ||
fonts: | ||
- family: Fira Code | ||
source: google | ||
weight: [400, 500, 600] | ||
style: [normal, italic] | ||
- family: Inter | ||
source: google | ||
weight: [400, 600, 700] | ||
style: [normal, italic] | ||
|
||
base: | ||
family: Inter | ||
weight: 400 | ||
size: 16px | ||
line-height: 1.5 | ||
|
||
headings: | ||
family: Fira Code | ||
weight: 600 | ||
line-height: 1.2 | ||
color: primary | ||
|
||
monospace: | ||
family: Fira Code | ||
weight: 400 | ||
size: 0.9em | ||
|
||
link: | ||
weight: 600 | ||
color: pink | ||
decoration: underline | ||
|
||
defaults: | ||
bootstrap: | ||
defaults: | ||
navbar-hover-color: $brand-pink | ||
shiny: | ||
theme: | ||
preset: shiny | ||
rules: | | ||
.navbar-brand { color: $brand-pink } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.