-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
116 lines (104 loc) · 2.9 KB
/
ui.R
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
library(shiny)
library(leaflet)
map_attribution <- tags$small(
icon("copyright"), "ESRI,",
icon("copyright"), "OpenStreetMap, Stamen",
icon("creative-commons"), "BY3.0",
style = "float: right;"
)
footer <- fluidRow(
column(
12,
hr(),
tags$h2(
tags$img(
src = "PSAlogo-text.png",
style = "height: 2em; padding-left: 2em; padding-right: 2em;"
),
tags$a(
href = "http://www.precisionsustainableag.org",
"precisionsustainableag.org"
),
style = "text-align: center;"
),
hr()
)
)
fluidPage(
theme = "bootstrap.css",
tags$head(
tags$style(
"div#dry_plot {height:85vh !important;}",
"div#yield_plot {height:85vh !important;}",
"h1{font-size:3rem !important;}",
"h2{font-size:2.5rem !important;}",
"body{font-size:160% !important;}",
".btn{font-size:120% !important;}", # font-family: monospace, monospace;
".form-control{font-size:100% !important;}",
".row:before, .row:after{ display: inline-block !important}" # Safari fix
),
tags$link(rel="apple-touch-icon", href="apple-touch-icon.png"),
tags$link(rel="icon", type="image/png", sizes="32x32", href="favicon-32x32.png"),
tags$link(rel="icon", type="image/png", sizes="16x16", href="favicon-16x16.png"),
tags$link(rel="manifest", href="site.webmanifest")
),
title = "PSA On-farm trial report",
titlePanel(
div(
tags$img(src = "PSAlogo-only.png", style = "height: 1.5em; vertical-align: middle;"),
"On-farm trial report",
style = "padding-top: 0.5em;"
)
),
tags$hr(),
fluidRow(
column(
4,
wellPanel(
textInput(
'lastname',
label = NULL,
placeholder = "Enter your last name"
),
uiOutput('fieldinfo'),
uiOutput('missingerror'),
uiOutput('ll_error'),
leafletOutput("map") %>%
shinycssloaders::withSpinner(type = 6, color = "#158cba"),
map_attribution,
actionButton(
"reset",
tags$small("Reset View"),
icon = icon("refresh", class = "fa-xs"),
class = "btn btn-success btn-sm"
)
),
uiOutput("fresh_text_summary"),
tags$br()
),
column(
8,
tabsetPanel(
tabPanel(
"Cover biomass", tags$br(),
column(6, plotOutput('dry_plot')),
column(5, uiOutput("dry_text_summary"))
),
tabPanel(
"Soil water", tags$br(),
conditionalPanel(
"input.lastname",
uiOutput("waterbox") %>%
shinycssloaders::withSpinner(type = 6, color = "#158cba")
)
),
tabPanel(
"Corn yield", tags$br(),
column(6, conditionalPanel("input.lastname", uiOutput("yieldbox"))),
column(6, plotOutput('yield_plot'))
)
)
)
),
footer
)