Skip to content

Commit

Permalink
init shinylive
Browse files Browse the repository at this point in the history
  • Loading branch information
DivadNojnarg committed Sep 25, 2024
1 parent bcb56a3 commit 78c01d7
Show file tree
Hide file tree
Showing 14 changed files with 1,676 additions and 14 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
^LICENSE\.md$
^.vscode$
^index\.md$
^README\.Rmd$
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ Imports:
shiny,
magrittr,
httpuv
Depends:
R (>= 2.10)
Binary file added R/sysdata.rda
Binary file not shown.
13 changes: 13 additions & 0 deletions R/utils-shiny.R
Original file line number Diff line number Diff line change
Expand Up @@ -468,3 +468,16 @@ buildTabItem <- function (index, tabsetId, foundSelected, tabs = NULL, divTag =
}
return(list(liTag = liTag, divTag = divTag))
}

create_link_iframe <- function(link) {
shiny::tags$iframe(
class = "html-fill-item",
src = link,
height = "800",
width = "100%",
style = "border: 1px solid rgba(0,0,0,0.175); border-radius: .375rem;",
allowfullscreen = "",
allow = "autoplay",
`data-external` = "1"
)
}
44 changes: 44 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
output: github_document
---

<!-- README.md is generated from README.Rmd. Please edit that file -->

# 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::paks("RinteRface/shiny386")
```

## 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)
```
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# 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)

[![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.
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
remotes::install_github("RinteRface/shiny386")
pak::paks("RinteRface/shiny386")
```

## Example
Expand All @@ -37,4 +46,3 @@ ui <- page_386(
server <- function(input, output, session) {}
shinyApp(ui, server)
```

3 changes: 3 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
template:
bootstrap: 5
url: https://shiny386.rinterface.com/
60 changes: 60 additions & 0 deletions index.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
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 showcase-code, eval=TRUE, echo=FALSE}
card(
shiny386:::create_link_iframe(shiny386:::shinylive_links["inst/examples/shinylive/basic"]),
full_screen = TRUE,
style = "margin: 0 auto; float: none;"
)
```

The original app may be found [here](https://shiny.rstudio.com/gallery/bus-dashboard.html)

## 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)
```
Loading

0 comments on commit 78c01d7

Please sign in to comment.