-
Notifications
You must be signed in to change notification settings - Fork 0
/
left_column.py
82 lines (73 loc) · 2.47 KB
/
left_column.py
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
import streamlit as st
from helper_functions import refresh
categories = ["R", "Python", "Data Warehouse",
"Database", "MySQL", "Algorithms", "Data Structure"]
questionTypes = ["Technical", "Behavioural"]
# def onChange(option):
# del option
def left_column():
st.markdown("#")
st.markdown("#")
st.markdown(
f"""
<style>
.st-b6{{
color:rgb(61, 48, 96);
}}
.st-bb{{
background-color: rgb(243, 238, 255);
border-color: black;
}}
</style>
""",
unsafe_allow_html=True
)
st.markdown("""
<style>
.welcome-font {
font-size:18px !important;
font-family: arial;
font-weight:700;
margin:0;
color:rgb(38, 29, 69);
# font-size:large;
}
}
</style>
""", unsafe_allow_html=True)
st.markdown('<p class="welcome-font">Try something new!</p>',
unsafe_allow_html=True)
st.markdown("#")
# button to redirect to quiz page (currently does nothing)
option = st.selectbox(
"Type",
options=(questionTypes),
index=questionTypes.index(st.session_state.questionType),
key="typeSelectBox",
placeholder="Select type...",
)
if option == "Technical":
category = st.selectbox("Category",
options=("R", "Python", "Data Warehouse", "Database",
"MySQL", "Algorithms", "Data Structure"),
key="categorySelectBox",
index=categories.index(st.session_state.category))
# if "category" not in st.session_state:
st.session_state.category = category
else:
st.session_state.category = "R"
st.markdown("#")
start = st.button("Start Learning!",
use_container_width=True, key="quizbutton")
if start:
st.session_state.questionType = option
# st.session_state.rateAnswer=False
# st.session_state.responding=False
# st.session_state.getQuestion=False
st.session_state.skip=""
# del st.session_state.messages
st.session_state.messages=[]
st.session_state.userAnswer=None
# del st.session_state["inputButton"]
# del st.session_state["chatcontainer"]
refresh("quizbutton")