display_options: Display options

View source: R/options.R

display_optionsR Documentation

Display options

Description

Creates a list of display options that may be passed to test_options.

Usage

display_options(
  full_screen = FALSE,
  content_background_colour = "white",
  content_border = "1px solid #e8e8e8",
  show_header = TRUE,
  show_footer = TRUE,
  left_margin = 2L,
  right_margin = 2L,
  css = character(),
  admin_panel = TRUE
)

Arguments

full_screen

(Logical scalar) Whether the display element for the primary test content (corresponding to the ui slot of psychTestR pages) should be expanded to fill the whole screen. This is a convenience argument that works by overriding the following arguments:

  • content_border (set to "0px")

  • show_header (set to FALSE)

  • show_footer (set to FALSE)

  • left_margin (set to 0L)

  • right_margin (set to 0L)

Note that this will hide the admin panel. See show_footer for further information.

content_background_colour

(Character scalar) Background colour for the display element for the primary test content; interpreted as a CSS expression.

content_border

(Character scalar) Border format parameters for the display element for the primary test content; interpreted as a CSS expression.

show_header

(Logical scalar) Whether the header should be shown (typically contains the title and optionally a logo).

show_footer

(Logical scalar) Whether the footer should be shown (typically contains a link to the admin panel). To show the admin panel manually, enter the Javascript console once the app is running (you'll need to be using a proper web browser, rather than RStudio) and enter the command show_admin_panel(). To hide it again, log out and then enter hide_admin_panel().

left_margin

(Integerish scalar) Width of the left margin, with 0 corresponding to no margin and 12 corresponding to the full screen width.

right_margin

(Integerish scalar) Width of the right margin, with 0 corresponding to no margin and 12 corresponding to the full screen width.

css

Character vector of file paths to CSS files for inclusion within the psychTestR test. CSS files are used for styling HTML. These file paths should be expressed relative to R's working directory

admin_panel

(Logical scalar) Whether to display a link for logging in to the admin panel (defaults to TRUE). Note that this admin panel will by default be invisible if show_footer = FALSE, but this can be changed by calling the Javascript function show_admin_panel().

Value

A list for passing to the display argument of test_options.


pmcharrison/psychTestR documentation built on Nov. 10, 2024, 9:03 p.m.