From 66b9800b0e1142804f849eae945eb1a52dca0660 Mon Sep 17 00:00:00 2001 From: Stephanie Pennington Date: Mon, 18 Dec 2023 14:29:58 -0500 Subject: [PATCH] add footer --- h2/app.r | 6 +- h2/components/layout/footer.html | 1 + h2/components/layout/homepage.html | 2 +- h2/components/layout/style copy.css | 22 +++++- h2/components/modules/mod_run.R | 110 ++++++++++++++-------------- 5 files changed, 80 insertions(+), 61 deletions(-) create mode 100644 h2/components/layout/footer.html diff --git a/h2/app.r b/h2/app.r index 57fa2df..ec73a47 100644 --- a/h2/app.r +++ b/h2/app.r @@ -1,6 +1,6 @@ source("./global.r") -ui <- fluidPage( +ui <- fluidPage(theme = shinythemes::shinytheme("readable"), includeCSS("./components/layout/style copy.css"), tags$div(class = "container", tags$img(src = "images/earth-header.png", height = "300px", width = "100%", class = "earth", alt = "Earth's atmosphere"), @@ -24,9 +24,11 @@ ui <- fluidPage( #download_ui("download_1"), ) ), - tabPanel(title = "Carbon Tracking"), + tabPanel(title = p(icon("chart-pie","fa-2x"), "Carbon Tracking", value="outputTab")), tabPanel(title = "About") ), + hr(), + includeHTML("./components/layout/footer.html") ) server <- function(input, output, session) { diff --git a/h2/components/layout/footer.html b/h2/components/layout/footer.html new file mode 100644 index 0000000..3cb6488 --- /dev/null +++ b/h2/components/layout/footer.html @@ -0,0 +1 @@ + diff --git a/h2/components/layout/homepage.html b/h2/components/layout/homepage.html index a0e3718..56d2825 100644 --- a/h2/components/layout/homepage.html +++ b/h2/components/layout/homepage.html @@ -1,4 +1,4 @@ -

Welcome to the user interface for Hector: an open source, object-oriented, and interactive simple global climate carbon-cycle model. It runs essentially instantaneously while still representing the most critical global scale earth system processes, and is one of a class of models heavily used for for emulating complex climate models and uncertainty analyses. +

Welcome to the user interface for Hector: an open source, object-oriented, and interactive simple global climate carbon-cycle model. It runs essentially instantaneously while still representing the most critical global scale earth system processes, and is one of a class of models heavily used for for emulating complex climate models and uncertainty analyses.

This interactive version is built upon previous work by developers at the Joint Global Change Research Institute (JGCRI), including the development of the initial C++ version of Hector, and the follow up R Package "Hector R".

diff --git a/h2/components/layout/style copy.css b/h2/components/layout/style copy.css index d475f3d..f4d24df 100644 --- a/h2/components/layout/style copy.css +++ b/h2/components/layout/style copy.css @@ -6,7 +6,6 @@ h5 { body { font-family:"Barlow Regular", Sans-Serif !important; - font-size: 20px; } .about-info @@ -88,3 +87,24 @@ body { font-size: 14px; } + +.navbar-nav +{ + float:none; + margin:0 auto; + display: block; + text-align: center; + color: #000000; +} + +.navbar-nav > li { + display: inline-block; + float:none; + color: #000000; +} + +.sticky-footer +{ + font-size: 12px; +} +} diff --git a/h2/components/modules/mod_run.R b/h2/components/modules/mod_run.R index 6c768b9..721443e 100644 --- a/h2/components/modules/mod_run.R +++ b/h2/components/modules/mod_run.R @@ -7,17 +7,16 @@ run_ui <- function(id) { tabsetPanel( tabPanel(class = "params", "Standard Scenarios", chooseSliderSkin(skin = "Flat", color = "#375a7f"), - prettyRadioButtons(ns("ssp_path"), label="Select SSP:", - choices = list("SSP 1-1.9"="input/hector_ssp119.ini", - "SSP 1-2.6"="input/hector_ssp126.ini", - "SSP 2-4.5"="input/hector_ssp245.ini", - "SSP 3-7.0"="input/hector_ssp370.ini", - "SSP 4-3.4"="input/hector_ssp434.ini", - "SSP 4-6.0"="input/hector_ssp460.ini", - "SSP 5-3.4OS"="input/hector_ssp534-over.ini", - "SSP 5-8.5"="input/hector_ssp585.ini"), - selected = "input/hector_ssp245.ini", inline=TRUE, - shape = "square", width = "80%"), + selectInput(ns("ssp_path"), label="Select SSP:", + choices = list("SSP 1-1.9"="input/hector_ssp119.ini", + "SSP 1-2.6"="input/hector_ssp126.ini", + "SSP 2-4.5"="input/hector_ssp245.ini", + "SSP 3-7.0"="input/hector_ssp370.ini", + "SSP 4-3.4"="input/hector_ssp434.ini", + "SSP 4-6.0"="input/hector_ssp460.ini", + "SSP 5-3.4OS"="input/hector_ssp534-over.ini", + "SSP 5-8.5"="input/hector_ssp585.ini"), + selected = "input/hector_ssp245.ini"), sliderInput(ns("time"), label="Select dates:", min = 1750, max = 2300, value = c(1900,2100), sep="", width = "90%", step=5), h5("Model Parameters"), @@ -32,58 +31,55 @@ run_ui <- function(id) { sliderInput(ns("q10_rh"), label="Heterotrophic temperature sensitivity", # Q10_RH() min = 1, max = 5, value = 2, step=0.1, width = "90%"), sliderInput(ns("volscl"), label="Volcanic forcing scaling factor", # VOLCANIC_SCALE() - min = 0, max = 1, value = 1, width = "90%"), - materialSwitch(ns("savetoggle"),"Save Run", value = FALSE), - textInput(ns("run_name"), label = "Run Name", placeholder = "Run 1"), - dropdownButton(inputId = ns("dropdown"), - icon = icon("gear"), - circle = TRUE, - status = "primary", - dataTableOutput(ns("savetable")), - actionButton(ns("deleteRuns"), "Delete Selected") - ) + min = 0, max = 1, value = 1, width = "90%") ) ) ), mainPanel(width = 8, - tabsetPanel( - tabPanel(p(icon("chart-line","fa-2x"), "Scenario Output", value="outputTab"), - br(), - fluidRow( - column(4, - selectInput(ns("variable"), "Select variable:", - list("Carbon Cycle" = list("Atmospheric CO2" = CONCENTRATIONS_CO2(), - "FFI Emissions" = FFI_EMISSIONS(), - "LUC Emissions" = LUC_EMISSIONS()), - "Concentrations" = list("N2O Concentration" = CONCENTRATIONS_N2O()), - "Emissions" = list("Black Carbon Emissions" = EMISSIONS_BC(), - "Organic Carbon Emissions" = EMISSIONS_OC()), - "Forcings" = list("RF - Total" = RF_TOTAL(), - "RF - Albedo" = RF_ALBEDO(), - "RF - CO2" = RF_CO2(), - "RF - N2O" = RF_N2O(), - "RF - Black Carbon" = RF_BC(), - "RF - Organic Carbon" = RF_OC(), - "RF - Total SO2" = RF_SO2(), - "RF - Volcanic Activity" = RF_VOL(), - "RF - CH4" = RF_CH4())), - selected = "Atmospheric CO2", multiple = FALSE), - ), - column(3, - actionBttn(ns("run"),"Run", color = "primary"), - - ) - ), - fluidRow( - withSpinner(plotlyOutput(ns("graph"))) - ) - ), - tabPanel(p(icon("globe-americas","fa-2x"), "World Maps", value="outputTab") - ), - tabPanel(p(icon("chart-pie","fa-2x"), "Carbon Tracking", value="outputTab") + fluidRow( + column(4, + selectInput(ns("variable"), "Choose Output Variable:", + list("Carbon Cycle" = list("Atmospheric CO2" = CONCENTRATIONS_CO2(), + "FFI Emissions" = FFI_EMISSIONS(), + "LUC Emissions" = LUC_EMISSIONS()), + "Concentrations" = list("N2O Concentration" = CONCENTRATIONS_N2O()), + "Emissions" = list("Black Carbon Emissions" = EMISSIONS_BC(), + "Organic Carbon Emissions" = EMISSIONS_OC()), + "Forcings" = list("RF - Total" = RF_TOTAL(), + "RF - Albedo" = RF_ALBEDO(), + "RF - CO2" = RF_CO2(), + "RF - N2O" = RF_N2O(), + "RF - Black Carbon" = RF_BC(), + "RF - Organic Carbon" = RF_OC(), + "RF - Total SO2" = RF_SO2(), + "RF - Volcanic Activity" = RF_VOL(), + "RF - CH4" = RF_CH4())), + selected = "Atmospheric CO2", multiple = FALSE), ) - + ), + fluidRow( + column(2, + actionBttn(ns("run"),"Run", color = "primary") + ), + column(3, + materialSwitch(ns("savetoggle"),"Save Run", value = FALSE) + ), + column(5, + textInput(ns("run_name"), label = "Run Name", placeholder = "Run 1") + ), + column(2, + dropdownButton(inputId = ns("dropdown"), + icon = icon("gear"), + circle = TRUE, + status = "primary", + dataTableOutput(ns("savetable")), + actionButton(ns("deleteRuns"), "Delete Selected") + ) + ) + ), + fluidRow( + withSpinner(plotlyOutput(ns("graph"))) ) ) )