R/mod_home.R

Defines functions mod_home_server mod_home_ui

Documented in mod_home_server mod_home_ui

#' @title Home module
#'
#' @param id shiny id
#' @rdname mod_home
#' @keywords internal
#' @import shiny
mod_home_ui <- function(id){
  ns <- NS(id)

  fluidRow(
    column(
      width = 12,
      div(
        id = "home",
        class = "home",
        column(
          width = 1,
          class = "marge"
        ),
        column(
          width = 5,
          div(
            class = "title",
            "Learn SQL and R from the very very beginning"
          ),
          div(
            class = "subtitle",
            "dplyr documention",
            tags$a(
              # tags$i(
                "'highly recommend you at least learn the basics of SQL'",
              # ),
              href = "https://db.rstudio.com/dplyr/",
              target = "_blank"
            ),
            ". This application comes with those basics to be efficient with both."
          ),
          actionButton(
            inputId = "go_learn",
            "Start learning !"
          )
        ),
        column(
          width = 5,
          id = "teacher",
          div(
            class = "teaching-simple",
            tags$img(src = "www/img/teaching-simple.svg")
          )
        )
      )
    ),
    # div(
    #   class = "footer",
    #   tags$div(
    #     id = "footer-icon",
    #     tags$a(
    #       href = "https://github.com/ArthurData",
    #       target = "_blank",
    #       icon("github")
    #     ),
    #     tags$a(
    #       href = "https://stories.freepik.com",
    #       target = "_blank",
    #       p("Illustration by Freepik Stories")
    #     )
    #   )
    # )
  )
}


#' @param id shiny id
#' @rdname mod_home
#' @keywords internal
#' @import shiny
mod_home_server <- function(id) {
  moduleServer(
    id,
    function(input, output, session) ns <- session$ns
  )
}
ArthurData/sqlnstructor documentation built on Dec. 17, 2021, 9:44 a.m.