Skip to content

Commit

Permalink
initial commit dfe footer with connection to accessibility panel
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-rogers-hub committed Dec 13, 2024
1 parent 8c345bf commit 7f715e0
Showing 1 changed file with 92 additions and 0 deletions.
92 changes: 92 additions & 0 deletions R/footer_dfe.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#' Footer Function
#'
#' This function create a gov style footer for your page
#' @param full Whenever you want to have blank footer or official gov version.
#' Defaults to \code{FALSE}
#' @return a footer html shiny object
#' @keywords footer
#' @export
#' @examples
#' if (interactive()) {
#'
#' ui <- fluidPage(
#' shinyGovstyle::header(
#' main_text = "Example",
#' secondary_text = "User Examples",
#' logo="shinyGovstyle/images/moj_logo.png"),
#' shinyGovstyle::banner(
#' inputId = "banner", type = "beta", 'This is a new service'),
#' tags$br(),
#' tags$br(),
#' footerDfe(full = TRUE)
#' )
#'
#' server <- function(input, output, session) {
#' observeEvent(input$link_to_accessibility, {
#' updateTabsetPanel(session, "navlistPanel", selected = "Accessibility")
#' })
#' }
#'
#' shinyApp(ui = ui, server = server)
#' }

footerDfe <- function(full = FALSE){

Check notice

Code scanning / lintr

Variable and function name style should match snake_case or symbols. Note

Variable and function name style should match snake_case or symbols.

Check notice

Code scanning / lintr

There should be a space before an opening curly brace. Note

There should be a space before an opening curly brace.

Check notice

Code scanning / lintr

There should be a space between a right parenthesis and a body expression. Note

There should be a space between a right parenthesis and a body expression.
govFooter <- shiny::tags$footer(class = "govuk-footer ",

Check notice

Code scanning / lintr

Variable and function name style should match snake_case or symbols. Note

Variable and function name style should match snake_case or symbols.
role = "contentinfo",

Check notice

Code scanning / lintr

Indentation should be 4 spaces but is 34 spaces. Note

Indentation should be 4 spaces but is 34 spaces.
shiny::div(class = "govuk-width-container ",
shiny::div(class = "govuk-footer__meta",

Check notice

Code scanning / lintr

Indentation should be 6 spaces but is 45 spaces. Note

Indentation should be 6 spaces but is 45 spaces.
if (full==FALSE){

Check notice

Code scanning / lintr

Indentation should be 8 spaces but is 56 spaces. Note

Indentation should be 8 spaces but is 56 spaces.

Check notice

Code scanning / lintr

Put spaces around all infix operators. Note

Put spaces around all infix operators.

Check notice

Code scanning / lintr

There should be a space before an opening curly brace. Note

There should be a space before an opening curly brace.

Check notice

Code scanning / lintr

There should be a space between a right parenthesis and a body expression. Note

There should be a space between a right parenthesis and a body expression.
shiny::div(
class = "govuk-footer__meta-item govuk-footer__meta-item--grow")

Check notice

Code scanning / lintr

Hanging indent should be 69 spaces but is 60 spaces. Note

Hanging indent should be 69 spaces but is 60 spaces.

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 124 characters. Note

Lines should not be more than 100 characters. This line is 124 characters.
}

Check notice

Code scanning / lintr

Indentation should be 8 spaces but is 56 spaces. Note

Indentation should be 8 spaces but is 56 spaces.
else {

Check notice

Code scanning / lintr

else should come on the same line as the previous }. Note

else should come on the same line as the previous }.
shiny::tagList(
shiny::div(

Check notice

Code scanning / lintr

Hanging indent should be 73 spaces but is 60 spaces. Note

Hanging indent should be 73 spaces but is 60 spaces.
class = "govuk-footer__meta-item govuk-footer__meta-item--grow",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 126 characters. Note

Lines should not be more than 100 characters. This line is 126 characters.
shiny::tag("svg", list(
role = "presentation",

Check notice

Code scanning / lintr

Hanging indent should be 85 spaces but is 64 spaces. Note

Hanging indent should be 85 spaces but is 64 spaces.
focusable = "false",
class = "govuk-footer__licence-logo",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 101 characters. Note

Lines should not be more than 100 characters. This line is 101 characters.
xmlns = "http://www.w3.org/2000/svg",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 101 characters. Note

Lines should not be more than 100 characters. This line is 101 characters.
viewbox = "0 0 483.2 195.7",
height = "17",
width = "41",
shiny::tag("path", list(fill = "currentColor",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 110 characters. Note

Lines should not be more than 100 characters. This line is 110 characters.
d = paste0("M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7",

Check notice

Code scanning / lintr

Indentation should be 87 spaces but is 88 spaces. Note

Indentation should be 87 spaces but is 88 spaces.

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 146 characters. Note

Lines should not be more than 100 characters. This line is 146 characters.
"zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 149 characters. Note

Lines should not be more than 100 characters. This line is 149 characters.
".1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 150 characters. Note

Lines should not be more than 100 characters. This line is 150 characters.
"-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 151 characters. Note

Lines should not be more than 100 characters. This line is 151 characters.
"-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 150 characters. Note

Lines should not be more than 100 characters. This line is 150 characters.
".8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 150 characters. Note

Lines should not be more than 100 characters. This line is 150 characters.
"7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 150 characters. Note

Lines should not be more than 100 characters. This line is 150 characters.
"h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 150 characters. Note

Lines should not be more than 100 characters. This line is 150 characters.
".1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 150 characters. Note

Lines should not be more than 100 characters. This line is 150 characters.
" 97.8 145")

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 111 characters. Note

Lines should not be more than 100 characters. This line is 111 characters.
)))

Check notice

Code scanning / lintr

Indentation should be 85 spaces but is 64 spaces. Note

Indentation should be 85 spaces but is 64 spaces.
),

Check notice

Code scanning / lintr

Indentation should be 75 spaces but is 62 spaces. Note

Indentation should be 75 spaces but is 62 spaces.
shiny::tags$span(class = "govuk-footer__licence-description",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 123 characters. Note

Lines should not be more than 100 characters. This line is 123 characters.
"All content is available under the",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 116 characters. Note

Lines should not be more than 100 characters. This line is 116 characters.
shiny::tags$a(class = "govuk-footer__link",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 122 characters. Note

Lines should not be more than 100 characters. This line is 122 characters.
href = "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 102 characters. Note

Lines should not be more than 100 characters. This line is 102 characters.
rel = "license",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 109 characters. Note

Lines should not be more than 100 characters. This line is 109 characters.
"Open Government Licence v3.0"),

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 125 characters. Note

Lines should not be more than 100 characters. This line is 125 characters.
", except where otherwise stated"),

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 114 characters. Note

Lines should not be more than 100 characters. This line is 114 characters.
br(),

Check notice

Code scanning / lintr

Indentation should be 75 spaces but is 62 spaces. Note

Indentation should be 75 spaces but is 62 spaces.

Check warning

Code scanning / lintr

no visible global function definition for 'br' Warning

no visible global function definition for 'br'
actionLink("Accessibility", "Accessibility information")

Check warning

Code scanning / lintr

no visible global function definition for 'actionLink' Warning

no visible global function definition for 'actionLink'

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 118 characters. Note

Lines should not be more than 100 characters. This line is 118 characters.
),

Check notice

Code scanning / lintr

Hanging indent should be 73 spaces but is 62 spaces. Note

Hanging indent should be 73 spaces but is 62 spaces.
shiny::tags$div(class = "govuk-footer__meta-item",

Check notice

Code scanning / lintr

Hanging indent should be 73 spaces but is 60 spaces. Note

Hanging indent should be 73 spaces but is 60 spaces.

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 110 characters. Note

Lines should not be more than 100 characters. This line is 110 characters.
shiny::tags$a(

Check notice

Code scanning / lintr

Indentation should be 75 spaces but is 76 spaces. Note

Indentation should be 75 spaces but is 76 spaces.
class = "govuk-footer__link govuk-footer__copyright-logo",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 136 characters. Note

Lines should not be more than 100 characters. This line is 136 characters.
href = "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/",

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 170 characters. Note

Lines should not be more than 100 characters. This line is 170 characters.
"\u00A9 Crown copyright"

Check notice

Code scanning / lintr

Lines should not be more than 100 characters. This line is 102 characters. Note

Lines should not be more than 100 characters. This line is 102 characters.
)

))

Check notice

Code scanning / lintr

Hanging indent should be 73 spaces but is 60 spaces. Note

Hanging indent should be 73 spaces but is 60 spaces.

}

Check notice

Code scanning / lintr

Indentation should be 8 spaces but is 56 spaces. Note

Indentation should be 8 spaces but is 56 spaces.
)

Check notice

Code scanning / lintr

Indentation should be 6 spaces but is 45 spaces. Note

Indentation should be 6 spaces but is 45 spaces.
)

Check notice

Code scanning / lintr

Indentation should be 4 spaces but is 34 spaces. Note

Indentation should be 4 spaces but is 34 spaces.
)
attachDependency(govFooter)

Check warning

Code scanning / lintr

no visible global function definition for 'attachDependency' Warning

no visible global function definition for 'attachDependency'
}

Check notice

Code scanning / lintr

Trailing blank lines are superfluous. Note

Trailing blank lines are superfluous.

0 comments on commit 7f715e0

Please sign in to comment.