-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.Rmd
88 lines (70 loc) · 2.09 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
output: github_document
always_allow_html: true
---
```{r setup, include=FALSE}
library(bslib)
knitr::opts_chunk$set(echo = TRUE)
```
# shiny386
<!-- badges: start -->
[![CRAN status](https://www.r-pkg.org/badges/version/shiny386)](https://CRAN.R-project.org/package=shiny386)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![R build status](https://github.com/RinteRface/shiny386/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/shiny386/actions)
<!-- badges: end -->
The goal of shiny386 is to provide an old school Bootstrap 4 template for Shiny. It is built on top of the [Bootstrap 386](http://kristopolous.github.io/BOOTSTRA.386/demo.html) HTML template.
## Installation
You can install the released version of shiny386 from Github with:
``` r
pak::pak("RinteRface/shiny386")
```
## Demo
```{r penguins-code, eval=TRUE, echo=FALSE}
card(
shiny386:::create_app_link(shiny386:::shinylive_links["inst/examples/shinylive/penguins"], header = FALSE),
full_screen = TRUE,
style = "margin: 0 auto; float: none;"
)
```
<p class="text-center mt-2">
<a
class="btn btn-primary"
data-bs-toggle="collapse"
href="#demo-code"
role="button"
aria-expanded="false"
aria-controls="demo-code">
Toggle code
</a>
</p>
<div class="collapse" id="demo-code">
```{r, results="asis", echo=FALSE, warning=FALSE, comment = ""}
shiny386:::print_r_code("penguins")
```
</div>
<br/>
You can play with the demo app below and modify the code.
```{r basic-code, eval=TRUE, echo=FALSE}
card(
shiny386:::create_app_link(shiny386:::shinylive_links["inst/examples/shinylive/basic"], mode = "editor"),
full_screen = TRUE,
style = "margin: 0 auto; float: none;"
)
```
## Example
This is a basic example which shows you how to solve a common problem:
``` r
library(shiny)
library(shiny386)
ui <- page_386(
card_386(
title = "My card",
"This is my card",
br(),
card_link_386(href = "https://www.google.com", "More"),
footer = "Card footer"
)
)
server <- function(input, output, session) {}
shinyApp(ui, server)
```