contactinfo: Add contact information widget

Description Usage Arguments Details Value Examples

Description

Add a contact information section that includes author name, role, a thumbnail photo and optional logos and links.

Usage

1
2
3
4
contactinfo(name, role, photo, logo = NULL, href = NULL,
  links = NULL, heading = "Contact information", heading_size = "h2",
  footnote = NULL, logo_height = 170, photo_width = 128,
  photo_height = 128)

Arguments

name

author.

role

i.e., job title.

photo

author image url.

logo

vector of additional image urls, i.e., funders.

href

optional links to logos.

links

separate list of text author-related links. See details.

heading

optional heading.

heading_size

character, defaults to "h2".

footnote

additional text.

logo_height

numeric, set a fixed height in pixels for any logos.

photo_width

numeric, author photo width in pixels.

photo_height

numeric, author photo height in pixels.

Details

A name, role and photo are required. The recommended photo size is 128 x 128 pixels. For logos (multiple), width is full but height is forced constant. logo may be a vector. href may be an equal-length vector if logos are image links.

links is a separate named or unnamed list of author-related links. For example, links = list("GitHub pages" = "https://leonawicz.github.io", Twitter = "https://twitter.com/leonawicz") will appear as Github pages | Twitter in the output. If links is unnamed, each element must be a string and will be wrapped in shiny::HTML. This is useful for something like small icon links with no text, e.g.:

links = list('<a href="https://leonawicz.github.io" target="_blank"><i class="fa fa-github fa-lg"></i></a>')

heading = NULL will drop the heading. footnote is optional arbitrary text that will appear at the bottom of the widget in a paragraph tag. Everything but logos remains tightly integrated on the left and is intended to be specific to the author. Logos are floated to the right and are commonly used for branding. The default photo and image heights help keep elements nicely aligned for typical sized web pages. The footnote should be short to keep the widget small, such as "For questions about this app, email...", rather than an author bio. If footnote is a vector, note that each element will become a separate paragraph tag and will stack vertically with vertical white space as well.

Value

a shiny taglist.

Examples

1
#not run

leonawicz/apputils documentation built on May 13, 2019, 1:38 a.m.