R/block_articles.R
block_articles.Rd
With block_articles()
, we can create a single- or multi-column layout of
articles. The articles are responsive to the screen width, so side-by-side
articles will collapse and any of the optional images will resize
accordingly. The function can accept one to three article()
calls, each
with varying amounts of text and imagery. Like all block_*()
functions,
block_articles()
must be placed inside of blocks()
and the resultant
blocks
object can be provided to the body
, header
, or footer
arguments of compose_email()
.
block_articles(...)
One, two, or three calls to article()
.
# Create a block of three, side-by-side
# articles with three `article()`
# calls inside of `block_articles()`,
# itself placed in `blocks()`
email <-
compose_email(
body =
blocks(
block_articles(
article(
image = "https://i.imgur.com/XMU8yJa.jpg",
title = "Taiwan",
content =
"It is a thriving mosaic of tradition,
culture, and high-tech development,
merging Eastern and Western influences."
),
article(
image = "https://i.imgur.com/aYOm3Tk.jpg",
title = "Japan",
content =
"Japan is an archipelago consisting
of 6,852 islands along East Asia's
Pacific Coast."
),
article(
image = "https://i.imgur.com/ekjFVOL.jpg",
title = "Singapore",
content =
"Singapore is an island city-state
in Southeast Asia. It's lies at the
southern tip of the Malay Peninsula."
)
)
)
)
if (interactive()) email