titlepage: Generate a title page

Description Usage Arguments Value Examples

View source: R/titlepage.R

Description

In case you would like to show off with a huge show, use this function to generate a title page that plays some intro music, before you open the actual quiz.

Usage

1
2
titlepage(..., quizfile, file = NULL, title = "iRcotofun", sound = NULL,
  css = NULL, overwrite = FALSE)

Arguments

...

Objects of class XiMpLe.node, the page content.

quizfile

Character string, full path to the actual quiz file. The resulting title page will use a relative link if both files are in the same directory, so it's easy to move both afterwards.

file

Character string, path to a file to write to.

title

Character string, used as the window title.

sound

Character string, name of the sound file to use for automatic background (if available).

css

Character string, path to a custom CSS file if you don't want to use the default.

overwrite

Logical, whether existing files should be overwritten. Otherwise an error is thrown.

Value

An object of class XiMpLe.doc, or (if file is specified) no visible return value.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
# for a logo you'll probably get best results with scalable SVG
logo <- div(
  img(
    attrs=list(
      src=file.path("path", "to", "myQuiz.svg"),
      class="image",
      style="margin-top: 10%;"
    )
  ),
  attrs=list(class="imagediv")
)

# finally, write the title page
titlepage(
  logo,
  quizfile=file.path("path", "to", "myQuiz.html"),
  file=file.path("path", "to", "index.html"),
  sound=file.path("path", "to", "myQuiz_main_title.ogg"),
  overwrite=TRUE
)

## End(Not run)

unDocUMeantIt/iRcotofun documentation built on May 3, 2019, 2:24 p.m.