Skip to content

Commit

Permalink
moved broken code to archive and added app skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelso committed Jun 27, 2024
1 parent b21f3c2 commit 6a7366e
Show file tree
Hide file tree
Showing 62 changed files with 453 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
Empty file added R/function1.R
Empty file.
Empty file added R/function2.R
Empty file.
18 changes: 18 additions & 0 deletions R/hello.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Hello, world!
#
# This is an example function named 'hello'
# which prints 'Hello, world!'.
#
# You can learn more about package authoring with RStudio at:
#
# http://r-pkgs.had.co.nz/
#
# Some useful keyboard shortcuts for package authoring:
#
# Install Package: 'Cmd + Shift + B'
# Check Package: 'Cmd + Shift + E'
# Test Package: 'Cmd + Shift + T'

hello <- function() {
print("Hello, world!")
}
67 changes: 67 additions & 0 deletions R/mod1_UI.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@



mod1_UI <- function(id){

## From https://shiny.rstudio.com/articles/modules.html
# `NS(id)` returns a namespace function, which was save as `ns` and will
# invoke later.
ns <- NS(id)

##
## UI Elements ###############################################################
##

card_left <- card(
h1("Welcome"),
p(
bsicons::bs_icon("1-circle", class = "text-primary"),
"More text."),
br(),
p(
bsicons::bs_icon("2-circle", class = "text-primary"),
"More text again."
),
)


## Emission factors ----------------------------------------------------------
card_right_sub1 <- card(
p("Placeholder for content"),
)

card_right_sub2 <- card(
p("placeholder for content")
)

card_right_top <- card(
card_header(bsicons::bs_icon("1-circle-fill", size = "1.5rem", class = "text-primary"), "Card right top"),
layout_column_wrap(
width = 1/2,
card_right_sub1,
card_right_sub2
)
)

card_right_bot <- card(
p("placeholder for more content")
)

card_right <- card(
card_right_top,
card_right_bot
)


## UI elements wrapped in a tagList() function
tagList(

layout_columns(
col_widths = c(4, 8),
card_left,
card_right
)

) ## END tagList

} ## END module UI function
Empty file added R/mod1_server.R
Empty file.
67 changes: 67 additions & 0 deletions R/mod2_UI.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@



mod2_UI <- function(id){

## From https://shiny.rstudio.com/articles/modules.html
# `NS(id)` returns a namespace function, which was save as `ns` and will
# invoke later.
ns <- NS(id)

##
## UI Elements ###############################################################
##

card_left <- card(
h4("WELCOME TO MODULE 2"),
p(
bsicons::bs_icon("1-circle", class = "text-primary"),
"More text."),
br(),
p(
bsicons::bs_icon("2-circle", class = "text-primary"),
"More text again."
),
)


## Emission factors ----------------------------------------------------------
card_right_sub1 <- card(
p("Placeholder for module 2 content"),
)

card_right_sub2 <- card(
p("placeholder for module 2 content")
)

card_right_top <- card(
card_header(bsicons::bs_icon("1-circle-fill", size = "1.5rem", class = "text-primary"), "Card right top"),
layout_column_wrap(
width = 1/2,
card_right_sub1,
card_right_sub2
)
)

card_right_bot <- card(
p("placeholder for more content")
)

card_right <- card(
card_right_top,
card_right_bot
)


## UI elements wrapped in a tagList() function
tagList(

layout_columns(
col_widths = c(4, 8),
card_left,
card_right
)

) ## END tagList

} ## END module UI function
Empty file added R/mod2_server.R
Empty file.
79 changes: 79 additions & 0 deletions R/mod_info_UI.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@



mod_info_UI <- function(id){

## From https://shiny.rstudio.com/articles/modules.html
# `NS(id)` returns a namespace function, which was save as `ns` and will
# invoke later.
ns <- NS(id)

##
## UI Elements ###############################################################
##

card_left <- card(
h1("Welcome"),

h4("What is ", tags$code("arena-helpers")),
p(
"This app is part of of a collection of tools designed to support Forest inventory related
activities and grouped under ", tags$code("arena-helpers")
),
br(),
h4("Open Foris Arena ", tags$img(src="assets/Arena-Logo.png", height = '30px')),
p(
"They aim to provide additional functionality to ",
tags$a(
href = "https://openforis.org/solutions/arena/",
#alt = "arena-helpers",
"Open Foris Arena ",
bsicons::bs_icon("box-arrow-up-right", class = "text-primary"),
.noWS = "before-end"
),
" in particular support data analysis parts that cannot be embedded directly
to OF Arena "
)
)


## Emission factors ----------------------------------------------------------
card_right_sub1 <- card(
p("Placeholder for content"),
)

card_right_sub2 <- card(
p("placeholder for content")
)

card_right_top <- card(
card_header(bsicons::bs_icon("1-circle-fill", size = "1.5rem", class = "text-primary"), "Card right top"),
layout_column_wrap(
width = 1/2,
card_right_sub1,
card_right_sub2
)
)

card_right_bot <- card(
p("placeholder for more content")
)

card_right <- card(
card_right_top,
card_right_bot
)


## UI elements wrapped in a tagList() function
tagList(

layout_columns(
col_widths = c(4, 8),
card_left,
card_right
)

) ## END tagList

} ## END module UI function
Loading

0 comments on commit 6a7366e

Please sign in to comment.