gadenbuie / countdown

⏲ countdown timer for R Markdown slides and HTML docs
https://pkg.garrickadenbuie.com/countdown
147 stars 15 forks source link

Standalone full screen timer #6

Closed hadley closed 5 years ago

hadley commented 5 years ago

It would be really useful to have a full screen timer (i.e. with the font automatically sized to be as big as possible) without using xaringan, or other presentation format.

gadenbuie commented 5 years ago

Thanks for the suggestions! This should be relatively easy to work out within the package. I think I'll add a new function countdown_fullscreen() that wraps countdown() and adds a bit of additional CSS.

For my reference, this seems to achieve the desired effect:

countdown(
  bottom = 0, top = 0, left = 0, right = 0, 
  padding = "0", margin = "2%", 
  font_size = "20vw"
)

with the additional css

.countdown {
  line-height: 96vh;
}
.countdown code {
  vertical-align: middle;
}
gadenbuie commented 5 years ago

@hadley I threw together a small shiny app for this use case that also demos full-screen timers (#8) and a warning state (#7). I thought I would share in case it's helpful to you.

hadley commented 5 years ago

I think the app would be a little easier to use with numericInput() rather than sliderInput(), or maybe even use textInput() and then parse mm:ss?

gadenbuie commented 5 years ago

Great idea, thanks. I went with textInput() and I definitely find the interface easier to use. https://gadenbuie.shinyapps.io/countdown/

hadley commented 5 years ago

Looks great! It would be great if you could include it as an exported function so it was even easier to use from the package.

gadenbuie commented 5 years ago

Thanks again @hadley for the suggestions! I added countdown_app() for launching the shiny app and I re-themed the app using dark colors to better match light levels in a variety of presentation settings.