block_articles: A block of one, two, or three articles with a multicolumn...

Description Usage Arguments Examples

View source: R/block_articles.R

Description

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().

Usage

1

Arguments

...

One, two, or three calls to article().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# 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

rich-iannone/blastula documentation built on Oct. 17, 2020, 8:59 p.m.