-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
83 lines (69 loc) · 2.95 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
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(dplyr)
library(shinythemes)
library(RJSONIO)
options(encoding = "UTF-8") # 之後讀取檔案就要改成CP950
shinyUI(fluidPage(
shinythemes::themeSelector(), # <--- Add this somewhere in the UI
theme = shinytheme("darkly"), # 考慮用 journal, flatly, darkly。
navbarPage( # navbar導航欄的意思
"Random Group Generate",
# 上傳檔案區
tabPanel("Upload Student List",
pageWithSidebar(
headerPanel('How to use this!'),
sidebarPanel(hr()),
# Show Upload Student Name List
mainPanel(h1("TA is so cute!!"),
h1("LOVE U~\n"),
br(),
HTML('<img src="kiss.png"/>'),
h3("by TA's boyfriend"))
)
),
# 亂數分組區域
tabPanel("Ramdom Group",
fluidPage(
tabsetPanel(
tabPanel(h4("Student Name List"),
br(),
column(2),
column(3, div(tableOutput('namelist1'), style = "font-size:140%")),
column(3, div(tableOutput('namelist2'), style = "font-size:140%")),
column(3, div(tableOutput('namelist3'), style = "font-size:140%")),
column(1)
),
tabPanel(h4("Random Result"),
br(),
column(2,
br(),br(),br(),br(),
actionButton(inputId = "defalut", label = h4("Default")),
br(),br(),
actionButton("random", h4("Let's random~~")),
br(),br(),br(),br(),
downloadButton('downloadData', 'Download')
),
column(5,
tags$h2(tags$b("Original Group")),
wellPanel(div(tableOutput("grouplist"), style = "font-size:140%"), align="center")
),
column(5,
tags$h2(tags$b("Random Group")),
wellPanel(div(tableOutput("random_group"), style = "font-size:140%"), align="center")
)
# verbatimTextOutput("value")
# HTML("  ") # 空格的功用
)
)
)
)
)
))