parent
3ebfbf0bd7
commit
e64d700040
20
_common.R
20
_common.R
|
@ -13,13 +13,10 @@ knitr::opts_chunk$set(
|
|||
options(
|
||||
dplyr.print_min = 6,
|
||||
dplyr.print_max = 6,
|
||||
stringr.view_n = 10
|
||||
)
|
||||
|
||||
# Activate crayon output
|
||||
options(
|
||||
#crayon.enabled = TRUE,
|
||||
pillar.bold = TRUE,
|
||||
stringr.view_n = 10,
|
||||
# Activate crayon output - temporarily disabled for quarto
|
||||
# crayon.enabled = TRUE,
|
||||
pillar.bold = TRUE
|
||||
)
|
||||
|
||||
ggplot2::theme_set(ggplot2::theme_gray(12))
|
||||
|
@ -33,8 +30,15 @@ status <- function(type) {
|
|||
stop("Invalid `type`", call. = FALSE)
|
||||
)
|
||||
|
||||
class <- switch(type,
|
||||
polishing = "note",
|
||||
restructuring = "important",
|
||||
drafting = "important",
|
||||
complete = "note"
|
||||
)
|
||||
|
||||
cat(paste0(
|
||||
"::: status\n",
|
||||
"::: callout-", class, "\n",
|
||||
"You are reading the work-in-progress second edition of R for Data Science. ",
|
||||
"This chapter ", status, ". ",
|
||||
"You can find the complete first edition at <https://r4ds.had.co.nz>.\n",
|
||||
|
|
12
r4ds.scss
12
r4ds.scss
|
@ -12,18 +12,6 @@ img.quarto-cover-image {
|
|||
box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
|
||||
}
|
||||
|
||||
/* status box styling */
|
||||
|
||||
.status {
|
||||
border: 2px solid #637238;
|
||||
padding: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.status p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* Headings ------------------------------------------------------ */
|
||||
|
||||
h2 {
|
||||
|
|
Loading…
Reference in New Issue