Skip to content

Commit 8ffdbcc

Browse files
Merge pull request #21 from AdamSpannbauer/about_app_btn
restyle buttons
2 parents 33adb13 + a4b58d0 commit 8ffdbcc

File tree

7 files changed

+26
-57
lines changed

7 files changed

+26
-57
lines changed

R/app_ui.R

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,13 @@ app_ui = function(request) {
2323
<hr>"),
2424
shiny::checkboxGroupInput(
2525
"auto_escape_check_group",
26-
label = shiny::tags$label(
27-
"Auto Escape Backslashes",
28-
shinyBS::bsButton("escape_tooltip",
29-
label = "",
30-
icon = shiny::icon("question"),
31-
style = "background-color:transparent",
32-
size = "extra-small"),
33-
),
26+
label = "Auto Escape Backslashes",
3427
choices = c("Pattern" = "pattern",
3528
"Test String" = "test_str"),
3629
selected = "test_str"
3730
), # shiny::checkboxGroupInput
3831
shinyBS::bsPopover(
39-
id = "escape_tooltip",
32+
id = "auto_escape_check_group",
4033
title = "Bring your own escapes?",
4134
content = paste0("When working with regex in R, you often need more ",
4235
shiny::code("\\\\"), " than you think. For example, in Rs regex ",
@@ -47,7 +40,7 @@ app_ui = function(request) {
4740
"for example, a new line in the test string will be converted to the letter ",
4841
shiny::code("n"), " (because ", shiny::code("\\\\n"), " -> ", shiny::code("n"), ")."
4942
),
50-
placement = "right",
43+
placement = "bottom",
5144
trigger = "hover",
5245
options = list(container = "body")
5346
), # shinyBS::bsPopover
@@ -115,26 +108,23 @@ app_ui = function(request) {
115108
), # fluidRow
116109
shiny::hr(),
117110
shiny::fluidRow(
118-
col_12(align = "center",
119-
shiny::HTML(
120-
paste0(
121-
"<a ",
122-
"href='https://adamspannbauer.github.io/2018/01/16/r-regex-tester-shiny-app/' ",
123-
"target='_blank'",
124-
">",
125-
"<h4>About the app<h4>",
126-
"</a>"
127-
)
128-
) # HTML
129-
) # col_12
130-
), # fluidRow
131-
shiny::hr(),
132-
shiny::fluidRow(
133-
col_12(align = "center",
134-
shiny::includeHTML(
135-
app_sys(file.path("app/www", buy_me_stuff_btn()))
136-
)
137-
) # col_12
111+
col_5(align = "center",
112+
offset = 1,
113+
shiny::actionButton(
114+
inputId = "about_app",
115+
"About",
116+
icon = shiny::icon("file-alt"),
117+
onclick = "window.open('https://adamspannbauer.github.io/2018/01/16/r-regex-tester-shiny-app/', '_blank')"
118+
)
119+
), # col
120+
col_5(align = "center",
121+
shiny::actionButton(
122+
inputId = "buy_me_stuff",
123+
"Buy me a coffee",
124+
icon = shiny::icon("coffee"),
125+
onclick = "window.open('https://www.buymeacoffee.com/qp7GmCrco', '_blank')"
126+
)
127+
) # col
138128
) # fluidRow
139129
), # sidebarPanel
140130
shiny::mainPanel(

R/buy_me_stuff.R

Lines changed: 0 additions & 10 deletions
This file was deleted.

R/golem_utils_ui.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ col_12 <- function(...) {
2727
}
2828

2929

30+
#' @importFrom shiny column
31+
col_5 <- function(...) {
32+
column(5, ...)
33+
}
34+
35+
3036
#' @importFrom shiny column
3137
col_4 <- function(...) {
3238
column(4, ...)

inst/app/www/beer_sprite.png

-28.4 KB
Binary file not shown.

inst/app/www/buy_me_beer_button.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

inst/app/www/buy_me_coffee_button.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

man/buy_me_stuff_btn.Rd

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)