Skip to content

Commit

Permalink
moved things following golem structure
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelso committed Jul 23, 2024
1 parent f2dd22b commit 4bc2912
Show file tree
Hide file tree
Showing 37 changed files with 55 additions and 63 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion R/mod_info_UI.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mod_info_UI <- function(id){
activities and grouped under ", tags$code("arena-helpers")
),
br(),
h4("Open Foris Arena ", tags$img(src="assets/Arena-Logo.png", height = '30px')),
h4("Open Foris Arena ", tags$img(src="www/Arena-Logo.png", height = '30px')),
p(
"They aim to provide additional functionality to ",
tags$a(
Expand Down
28 changes: 13 additions & 15 deletions R/shiny_run_speval.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@
shiny_run_speval <- function(...) {

## GLOBAL ####################################################################
## Initiate translation
## !!! TO BE REMOVED IN PACKAGE !!!
## !!! In a package the translation folder needs to be directed to the package location
#i18n <- shiny.i18n::Translator$new(translation_json_path = 'assets/translations.json')
shiny::addResourcePath(prefix = "www", directoryPath = system.file("app/www", package = "speval"))

i18n <- shiny.i18n::Translator$new(
translation_json_path = system.file("assets/translations.json", package = "MCredd")
)
# i18n <- shiny.i18n::Translator$new(translation_csvs_path = "assets/translation")
translation_json_path = system.file("app/www/translations.json", package = "speval")
)
i18n$set_translation_language('en')
## !!! END REMOVE

Expand All @@ -49,31 +46,32 @@ shiny_run_speval <- function(...) {
shinyjs::useShinyjs(),
shinyWidgets::useSweetAlert(),
shiny.i18n::usei18n(i18n),
# tags$head(tags$link(rel = "stylesheet", type = "text/css", href = "style.css")),
htmltools::htmlDependency(
name = "flag-icons",
version = "6.6.6",
src = c(href="https://cdn.jsdelivr.net/gh/lipis/[email protected]/"),
stylesheet = "css/flag-icons.min.css"
),
#tags$head(includeHTML("assets/add-favicon.html")),
tags$head(includeHTML(system.file("assets/add-favicon.html", package = "speval"))),
# tags$head(includeHTML("ga-tracker-draft-head.html")),
#shiny::includeCSS(system.file("www/style.css", package = "speval")),
tags$head(
tags$link(rel = "stylesheet", type = "text/css", href = "www/custom.css"),
includeHTML(system.file("app/www/add-favicon.html", package = "speval")),
#includeHTML("ga-tracker-draft-head.html")
),
# leafletjs,

## UI elements -------------------------------------------------------------
page_navbar(
id = "navbar",
## ++ Styling ++++++
#title = div(img(src="assets/Arena-Logo.png", width = '100%'), i18n$t("Timor Leste REDD+ Geoportal"), style = "display:inline;"),
title = div(
tags$a(
href = "https://openforis.org/solutions/arena/",
#alt = "arena-helpers",
tags$img(src="assets/arena-helpers3.png", height = '60px'),
tags$img(src="www/arena-helpers3.png", height = '60px'),
.noWS = "before-end"
),
#img(src="assets/arena-helpers3.png", height = '60px'),
i18n$t("Species name validation tool"),
i18n$t("Plant species name validation tool"),
style = "display:inline;font-color: black !important"
),
window_title = "species validation",
Expand Down
17 changes: 0 additions & 17 deletions R/zzz.R

This file was deleted.

Binary file modified inst/.DS_Store
Binary file not shown.
Binary file added inst/app/.DS_Store
Binary file not shown.
Binary file renamed inst/assets/.DS_Store → inst/app/www/.DS_Store
Binary file not shown.
File renamed without changes
28 changes: 28 additions & 0 deletions inst/app/www/add-favicon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!-- favicons generated with https:/www.better-converter.com/Image-converters/Image-to-Favicons -->
<!-- downloaded manually to inst/assests/
<!-- href updated manually to point to assets/favicons -->
<link rel="shortcut icon" type="image/x-icon" href="/www/favicons/favicon.ico" />
<link rel="icon" type="image/png" sizes="16x16" href="/www/favicons/favicon-16x16.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/www/favicons/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="96x96" href="/www/favicons/favicon-96x96.png" />

<link rel="apple-touch-icon" sizes="57x57" href="/www/favicons/apple-57x57-touch-icon.png" />
<link rel="apple-touch-icon" sizes="60x60" href="/www/favicons/apple-60x60-touch-icon.png" />
<link rel="apple-touch-icon" sizes="72x72" href="/www/favicons/apple-72x72-touch-icon.png" />
<link rel="apple-touch-icon" sizes="76x76" href="/www/favicons/apple-76x76-touch-icon.png" />
<link rel="apple-touch-icon" sizes="114x114" href="/www/favicons/apple-114x114-touch-icon.png" />
<link rel="apple-touch-icon" sizes="120x120" href="/www/favicons/apple-120x120-touch-icon.png" />
<link rel="apple-touch-icon" sizes="144x144" href="/www/favicons/apple-144x144-touch-icon.png" />
<link rel="apple-touch-icon" sizes="152x152" href="/www/favicons/apple-152x152-touch-icon.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/www/favicons/apple-180x180-touch-icon.png" />

<link rel="icon" type="image/png" sizes="196x196" href="/www/favicons/android-chrome-196x196.png" />

<meta name="theme-color" content="#ffffff" />

<meta name="msapplication-TileColor" content="#ffffff" />
<meta name="msapplication-TileImage" content="/windows-tile.png">
<meta name="msapplication-square70x70logo" content="/windows-small-tile.png" />
<meta name="msapplication-square150x150logo" content="/windows-medium-tile.png" />
<meta name="msapplication-wide310x150logo" content="/windows-wide-tile.png" />
<meta name="msapplication-square310x310logo" content="/windows-large-tile.png" />
File renamed without changes
6 changes: 6 additions & 0 deletions inst/app/www/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

/* Remove padding bottom for radioGroupButton */

.nav-item>.form-group {
margin-bottom: 0 !important;
}
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
"cultural_date_format": "%d-%m-%Y",
"languages": ["en", "fr", "sp"],
"translation": [
{
"en": "Plant species name validation tool",
"fr": "Outil de validation des noms scientifiques pour les plantes",
"sp": "Soy el modulo 1"
},
{
"en": "I am module 1",
"fr": "Je suis le module 1",
Expand All @@ -13,4 +18,4 @@
"sp": "Soy el modulo 2"
}
]
}
}
28 changes: 0 additions & 28 deletions inst/assets/add-favicon.html

This file was deleted.

Binary file removed inst/assets/arena-helpers1.png
Binary file not shown.
Binary file removed inst/assets/arena-helpers2.png
Binary file not shown.
Binary file removed inst/assets/logos.pptx
Binary file not shown.
2 changes: 1 addition & 1 deletion pkg-creation-process.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ shiny_run_speval()
devtools::install()
library(speval)
shiny_run_speval()
speval::shiny_run_speval()
```

------------------------------------------------------------------------
Expand Down

0 comments on commit 4bc2912

Please sign in to comment.