File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,12 @@ server <- function(input, output) {
1313 # # as there's no external dependency triggering changes here (e.g. an input change)
1414 # # that would automatically update this object to reactive
1515 invalidateLater(250 )
16- as.character(round(as.period(schedule - Sys.time())))
16+ color <- ifelse(schedule > Sys.time(), ' black' , ' red' )
17+ as.character(span(
18+ round(as.period(abs(schedule - Sys.time()))),
19+ style = paste(' color' , color , sep = ' :' )))
20+ })
21+ output $ start <- renderText({
22+ paste(' at' , schedule , Sys.timezone())
1723 })
1824}
Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ ui <- basicPage(
1111 div(
1212 h1(uiOutput(' title' )),
1313 h2(uiOutput(' subtitle' )),
14+ h3(' starts in' ),
1415 h1(uiOutput(' countdown' )),
16+ h4(uiOutput(' start' )),
1517 class = ' center' )
1618
1719)
You can’t perform that action at this time.
0 commit comments