R/mod_contrib.R

Defines functions mod_contrib_server mod_contrib_ui

Documented in mod_contrib_server mod_contrib_ui

# Contribution module

#' @title Contributution module
#' @description contribution
#'
#' @param id shiny id
#' @param input internal
#' @param output internal
#' @param session internal
#'
#' @rdname mod_contrib
#'
#' @keywords internal
#' @importFrom shiny NS tagList fluidRow
mod_contrib_ui <- function(id){
  ns <- NS(id)

  fluidRow(
    column(
      width = 12,
      div(
        id = "contribution",
        class = "contribution",
        column(width = 4),
        column(
          width = 4,
          div(
            class = "teachers",
            div(
              class = "collaboration",
              tags$img(
                src = "www/img/collaboration.svg"
              )
            )
          ),
          div(
            class = "title",
            "Would you like to contribute on this project?"
          ),
          div(
            class = "subtitle",
            "It will be great!"
          ),
          div(
            class = "purpose",
            "They are several ways to participate :",
            tags$ul(
              tags$li("Add more lessons or exercices"),
              tags$li("Add you own dataset to enriched this app")
            ),
            div(
              class = "subtitle",
              "Contact me or fork repo on Github"
            )
          )
        ),
        column(width = 4)
      )
    )
  )
}

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