-
Notifications
You must be signed in to change notification settings - Fork 30
/
ui.R
116 lines (115 loc) · 4.08 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
ui <- navbarPage(
title = "",
theme = shinytheme("cyborg"),
tabPanel(
title = "Compare",
icon = icon(name = "balance-scale", lib = "font-awesome"),
includeCSS(file.path("includes", "style.css")),
sidebarLayout(
sidebarPanel(
width = 3,
# Sort list
# Filter drop down menu
h4("Filters"),
filterButtons(),
# Main keyboard selection options
h4("Keyboards"),
div(
style = "display: inline-block;",
pickerInput(
inputId = "sortKeyboards",
choices = c("Name", "# Keys"),
selected = "Name",
options = list(
`selected-text-format` = "static",
title = "Sort"
)
)
),
actionButton(
inputId = "selectAll",
label = NULL,
icon = icon("check-square"),
inline = TRUE
),
actionButton(
inputId = "reset",
label = NULL,
icon = icon("undo"),
inline = TRUE
),
prettyCheckboxGroup(
inputId = "keyboard",
label = "",
choices = keyboards$nameKeys,
shape = "curve",
outline = TRUE,
animation = "pulse"
),
# Insert footer
includeHTML(file.path("includes", "footer.html"))
),
mainPanel(
# Print button
downloadButton(
outputId = "printFile",
label = "Print to scale (PDF)"
),
# Print/display option
div(
style = "display: inline-block",
dropdown(
icon = icon("cog"),
prettyRadioButtons(
inputId = "printSize",
label = "Print size:",
choices = list("A4" = "A4", "Letter (8.5x11)" = "Letter"),
selected = "A4",
animation = "pulse"
),
prettyRadioButtons(
inputId = "printSepPages",
label = "Print on seperate pages?",
choices = list("Yes" = TRUE, "No" = FALSE),
selected = FALSE,
animation = "pulse"
),
prettyRadioButtons(
inputId = "keyboardHalf",
label = "Keyboard half:",
choices = c("Left (mirrored)", "Right"),
selected = "Right",
animation = "pulse"
)
)
),
# Image
imageOutput("layout")
)
)
),
tabPanel(
title = "Keyboards",
icon = icon(name = "keyboard", lib = "font-awesome"),
mainPanel(
width = 7,
DT::dataTableOutput("keyboardsDT"),
br(),
# Insert footer
includeHTML(file.path("includes", "footer.html")),
br()
)
),
tabPanel(
HTML('About</a></li><li><a href="https://github.com/jhelvy/splitKbCompare" target="_blank"><i class="fa fa-github fa-fw"></i>'),
icon = icon(name = "question-circle", lib = "font-awesome"),
mainPanel(
width = 6,
includeMarkdown("README.md"),
br(),
# Insert footer
includeHTML(file.path("includes", "footer.html")),
br()
)
)
)