R/readme_ui.R

Defines functions readme_ui

readme_ui <- function(id) {

  ns <- shiny::NS(id)
  
	miniUI::miniTabPanel(
		title = "Readme",
		icon = shiny::icon("file-lines"),
		shiny::fillRow(
		  flex = c(1, 1, 1),
		  shiny::fillCol(
		    shiny::div(
		      class = "explainbox_1",
		      shiny::h4("A nice and useful README?"),
		      shiny::HTML("<p> 
		        Especially if you share your work on cloud version control platforms
            like Github the README file is the 
            <a href=\"https://help.github.com/articles/about-readmes/\" rel=\"nofollow\">face of your project</a>
            for everybody who comes across it. It's important to give a good 
            overview about what the project does and how users can get started with it.
		      </p>")
		    ),
		    shiny::div(
		      class = "explainbox_2",
		      shiny::h4("The function", shiny::strong("rrtools::use_readme_rmd")),
		      shiny::HTML("            
            <ol>
              <li>Creates default README.Rmd</li>
              <li>Renders README.Rmd to Readme.md</li>
              <li>Creates code of conduct</li>
              <li>Creates instructions to contributors</li>
              <li>Adds additional files to .Rbuildignore</li>
            </ol>
		      ")
		    )
		  ),
		  shiny::fillCol(
		    shiny::div(
		      class = "function_interface_outer",
		      shiny::div(
		        class = "function_interface_inner",
		        shiny::h3("README.rmd and README.md"),
		        shiny::actionButton(
		          inputId = ns("run_readme"),
		          label = "Add a README file to your project",
		          icon = shiny::icon("circle-arrow-right"),
		          width = "95%"
		        )
		      )
		    )
		  ),
		  shiny::fillCol(
		    shiny::div(
		      id = "readme_help", class = "helpbox",
		      shiny::HTML(extract_help_as_html("usethis", "use_readme_rmd"))
		    )
		  )
		)
	)

}
nevrome/rrtools.addin documentation built on Nov. 8, 2022, 3:34 a.m.