timelineBlock: AdminLTE2 timeline block

Description Usage Arguments Author(s) Examples

View source: R/useful-items.R

Description

Create a timeline block

Usage

1
timelineBlock(..., reversed = TRUE)

Arguments

...

slot for timelineLabel or timelineItem.

reversed

Whether the timeline is reversed or not.

Author(s)

David Granjon, dgranjon@ymail.com

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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
if (interactive()) {
 library(shiny)
 library(shinydashboard)
 shinyApp(
  ui = dashboardPage(
    dashboardHeader(),
    dashboardSidebar(),
    dashboardBody(
     h3("When Reversed = TRUE, can be displayed inside a box"),
     box(
      title = "Timeline",
      status = "info",
      timelineBlock(
       timelineEnd(color = "danger"),
       timelineLabel(2018, color = "teal"),
       timelineItem(
        title = "Item 1",
        icon = "gears",
        color = "olive",
        time = "now",
        footer = "Here is the footer",
        "This is the body"
       ),
       timelineItem(
        title = "Item 2",
        border = FALSE
       ),
       timelineLabel(2015, color = "orange"),
       timelineItem(
        title = "Item 3",
        icon = "paint-brush",
        color = "maroon",
        timelineItemMedia(src = "https://placehold.it/150x100"),
        timelineItemMedia(src = "https://placehold.it/150x100")
       ),
       timelineStart(color = "gray")
      )
     ),
     
     column(
      width = 6,
      h3("When Reversed = FALSE, can be displayed out of a box"),
      timelineBlock(
       reversed = FALSE,
       timelineEnd(color = "danger"),
       timelineLabel(2018, color = "teal"),
       timelineItem(
        title = "Item 1",
        icon = "gears",
        color = "olive",
        time = "now",
        footer = "Here is the footer",
        "This is the body"
       ),
       timelineItem(
        title = "Item 2",
        border = FALSE
       ),
       timelineLabel(2015, color = "orange"),
       timelineItem(
        title = "Item 3",
        icon = "paint-brush",
        color = "maroon",
        timelineItemMedia(src = "https://placehold.it/150x100"),
        timelineItemMedia(src = "https://placehold.it/150x100")
       ),
       timelineStart(color = "gray")
      )
     )
    ),
    title = "timelineBlock"
  ),
  server = function(input, output) { }
 )
}

dsciencelabs/shinydashboardPlus documentation built on Dec. 20, 2021, 2:10 a.m.