Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
survey
Commits
a2418d6c
Commit
a2418d6c
authored
Jul 27, 2022
by
Jiwon Yoon
Browse files
Merge branch 'DH8' into develop0727
parents
eb4b5c31
34341510
Changes
7
Show whitespace changes
Inline
Side-by-side
frontend/src/answers/AQuestion.tsx
View file @
a2418d6c
...
@@ -52,7 +52,7 @@ export const AQuestion = ({ question, answerQuestion, addFiles }: Props) => {
...
@@ -52,7 +52,7 @@ export const AQuestion = ({ question, answerQuestion, addFiles }: Props) => {
}
}
return
(
return
(
<
div
className
=
"flex flex-col container w-4/5 h-auto border-2 border-themeColor items-center m-3 py-4"
>
<
div
className
=
"flex flex-col container w-4/5 h-auto border-2 border-themeColor items-center m-3 py-4
rounded-lg
"
>
<
div
className
=
"flex my-1 w-11/12 place-content-between items-center"
>
<
div
className
=
"flex my-1 w-11/12 place-content-between items-center"
>
<
div
className
=
"text-xl font-bold"
>
{
question
.
title
}
</
div
>
<
div
className
=
"text-xl font-bold"
>
{
question
.
title
}
</
div
>
{
question
.
isRequired
?
(
{
question
.
isRequired
?
(
...
...
frontend/src/commons/Header.tsx
View file @
a2418d6c
import
React
,
{
useEffect
,
useState
}
from
"
react
"
;
import
React
,
{
useState
}
from
"
react
"
;
import
{
Link
,
useLocation
,
useNavigate
}
from
"
react-router-dom
"
;
import
{
Link
,
useNavigate
}
from
"
react-router-dom
"
;
import
{
useAuth
}
from
"
../auth/auth.context
"
;
import
{
useAuth
}
from
"
../auth/auth.context
"
;
import
{
UserIcon
}
from
"
../icons
"
;
import
{
UserIcon
}
from
"
../icons
"
;
export
const
Header
=
()
=>
{
export
const
Header
=
()
=>
{
const
{
user
,
logout
}
=
useAuth
();
const
{
user
,
logout
}
=
useAuth
();
const
location
=
useLocation
();
const
navigate
=
useNavigate
();
const
navigate
=
useNavigate
();
const
[
windowSize
,
setWindowSize
]
=
useState
({
const
[
isClicked
,
setIsClicked
]
=
useState
(
false
);
width
:
window
.
innerWidth
,
height
:
window
.
innerHeight
,
});
const
handleResize
=
()
=>
{
const
handleHeaderClick
=
()
=>
{
setWindowSize
({
setIsClicked
(
!
isClicked
);
width
:
window
.
innerWidth
,
height
:
window
.
innerHeight
,
});
};
};
useEffect
(()
=>
{
window
.
addEventListener
(
"
resize
"
,
handleResize
);
return
()
=>
{
window
.
removeEventListener
(
"
resize
"
,
handleResize
);
};
},
[]);
return
(
return
(
<
div
className
=
"bg-white border-b-2 border-b-themeColor px-2 sm:px-4 py-
2
.5"
>
<
div
className
=
"bg-white border-b-2 border-b-themeColor px-2 sm:px-4 py-
3
.5"
>
<
div
className
=
"container flex flex-wrap place-content-center mx-auto"
>
<
div
className
=
"container flex flex-wrap
md:justify-start
place-content-center mx-auto"
>
<
Link
to
=
"/"
className
=
"font-bold text-2xl text-themeColor"
>
<
Link
to
=
"/"
className
=
"font-bold text-2xl text-themeColor
text-start
"
>
Simple Survey Form
Simple Survey Form
</
Link
>
</
Link
>
{
windowSize
.
width
<
768
?
(
<
div
className
=
"absolute right-4 top-2 hidden md:flex items-center justify-end md:flex-1"
>
<
UserIcon
className
=
"h-7 w-7 absolute top-4 right-2"
onClick
=
""
/>
)
:
(
<
div
className
=
"md:flex items-center justify-end md:flex-1 lg:w-0"
>
{
user
.
isLoggedIn
?
(
{
user
.
isLoggedIn
?
(
<
div
className
=
"pt-2"
>
<
div
>
<
button
<
button
onClick
=
{
()
=>
logout
(()
=>
navigate
(
"
/
"
))
}
onClick
=
{
()
=>
logout
(()
=>
navigate
(
"
/
"
))
}
className
=
"font-bold text-gray-600 hover:text-themeColor mx-1 py-2 px-3 rounded-md"
className
=
"font-bold text-gray-600 hover:text-themeColor mx-1 py-2 px-3 rounded-md"
...
@@ -51,7 +35,7 @@ export const Header = () => {
...
@@ -51,7 +35,7 @@ export const Header = () => {
</
Link
>
</
Link
>
</
div
>
</
div
>
)
:
(
)
:
(
<
div
className
=
"pt-2"
>
<
div
>
<
Link
to
=
"/login"
>
<
Link
to
=
"/login"
>
<
button
className
=
"font-bold text-gray-600 hover:text-themeColor mx-1 py-2 px-3 rounded-md"
>
<
button
className
=
"font-bold text-gray-600 hover:text-themeColor mx-1 py-2 px-3 rounded-md"
>
로그인
로그인
...
@@ -65,94 +49,59 @@ export const Header = () => {
...
@@ -65,94 +49,59 @@ export const Header = () => {
</
div
>
</
div
>
)
}
)
}
</
div
>
</
div
>
)
}
{
/* <div className="flex items-center md:order-2">
<
button
<
button
type="button"
className
=
"flex md:hidden w-8 h-8 rounded-full absolute top-4 right-5"
className="flex mr-3 text-sm bg-gray-800 rounded-full md:mr-0 focus:ring-4 focus:ring-gray-300 dark:focus:ring-gray-600"
onClick
=
{
handleHeaderClick
}
id="user-menu-button"
aria-expanded="false"
data-dropdown-toggle="user-dropdown"
data-dropdown-placement="bottom"
>
>
<span className="sr-only">Open user menu</span>
<
UserIcon
/>
<img
{
isClicked
?
(
className="w-8 h-8 rounded-full"
user
.
isLoggedIn
?
(
src="/docs/images/people/profile-picture-3.jpg"
<
div
className
=
"fixed top-14 right-1 w-48 bg-themeColor3 flex flex-col rounded-lg"
>
alt="user photo"
<
div
className
=
"p-3"
>
안녕하세요.
</
div
>
/>
<
div
className
=
"pl-3 pr-3 pb-3"
>
</button>
만들어진 설문을 확인하시려면 프로필을 눌러주세요.
</
div
>
<
div
className
=
"flex border-themeColor border-t-2"
>
<
Link
to
=
"/login"
>
<
div
<
div
className="
hidden z-50 my-4 text-base list-none bg-white rounded divide-y divide
-gray-
1
00
shadow dark:bg-gray-700 dark:divide-gray-600
"
className
=
"
p-2 w-24 border-r-2 border-themeColor text-center text-l text
-gray-
6
00
hover:text-themeColor
"
id="user-dropdown"
onClick
=
{
()
=>
logout
(()
=>
navigate
(
"
/
"
))
}
>
>
<div className="py-3 px-4">
로그아웃
<span className="block text-sm text-gray-900 dark:text-white">
Bonnie Green
</span>
<span className="block text-sm font-medium text-gray-500 truncate dark:text-gray-400">
name@flowbite.com
</span>
</
div
>
</
div
>
<ul className="py-1" aria-labelledby="user-menu-button">
</
Link
>
<li>
<
Link
to
=
"/profile"
>
<a
<
div
className
=
"p-2 w-24 text-center text-l text-gray-600 hover:text-themeColor"
>
href="#"
프로필
className="block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
>
Dashboard
</a>
</li>
<li>
<a
href="#"
className="block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
>
Settings
</a>
</li>
<li>
<a
href="#"
className="block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
>
Earnings
</a>
</li>
<li>
<a
href="#"
className="block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
>
Sign out
</a>
</li>
</ul>
</
div
>
</
div
>
<button
</
Link
>
data-collapse-toggle="mobile-menu-2"
</
div
>
type="button"
</
div
>
className="inline-flex items-center p-2 ml-1 text-sm text-gray-500 rounded-lg md:hidden hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200"
)
:
(
aria-controls="mobile-menu-2"
<
div
className
=
"fixed top-14 right-1 w-48 bg-themeColor3 flex flex-col rounded-lg"
>
aria-expanded="false"
<
div
className
=
"p-3"
>
로그아웃 상태입니다.
</
div
>
>
<
div
className
=
"pl-3 pr-3 pb-3"
>
<span className="sr-only">Open main menu</span>
설문지를 만드시려면 로그인해주세요.
<UserIcon className="w-7 h-7 absolute top-4 right-2" />
</
div
>
<svg
<
div
className
=
"flex border-themeColor border-t-2"
>
className="w-6 h-6"
<
Link
to
=
"/login"
>
aria-hidden="true"
<
div
className
=
"p-2 w-24 border-r-2 border-themeColor justify-center text-l text-gray-600 hover:text-themeColor"
>
fill="currentColor"
로그인
viewBox="0 0 20 20"
</
div
>
xmlns="http://www.w3.org/2000/svg"
</
Link
>
>
<
Link
to
=
"/signup"
>
<path
<
div
className
=
"p-2 w-24 justify-center text-l text-gray-600 hover:text-themeColor"
>
fill-rule="evenodd"
회원가입
d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
</
div
>
clip-rule="evenodd"
</
Link
>
></path>
</
div
>
</svg>
</
div
>
)
)
:
(
<></>
)
}
</
button
>
</
button
>
</div> */
}
</
div
>
</
div
>
</
div
>
</
div
>
);
);
...
...
frontend/src/profile/MySurveyCard.tsx
View file @
a2418d6c
...
@@ -52,7 +52,7 @@ export const MySurveyCard = ({ data }: Props) => {
...
@@ -52,7 +52,7 @@ export const MySurveyCard = ({ data }: Props) => {
return
(
return
(
<
div
className
=
"w-40 h-48 md:w-52 md:h-60 rounded border-2 hover:border-2 hover:border-themeColor"
>
<
div
className
=
"w-40 h-48 md:w-52 md:h-60 rounded border-2 hover:border-2 hover:border-themeColor"
>
<
button
className
=
"w-full
m
t-
2
"
onClick
=
{
editSurvey
}
>
<
button
className
=
"w-full
p
t-
1
"
onClick
=
{
editSurvey
}
>
<
p
className
=
"font-bold"
>
<
p
className
=
"font-bold"
>
{
data
.
title
?
data
.
title
:
"
제목없는 설문조사
"
}
{
data
.
title
?
data
.
title
:
"
제목없는 설문조사
"
}
</
p
>
</
p
>
...
@@ -73,7 +73,7 @@ export const MySurveyCard = ({ data }: Props) => {
...
@@ -73,7 +73,7 @@ export const MySurveyCard = ({ data }: Props) => {
</
button
>
</
button
>
<
button
<
button
type
=
"button"
type
=
"button"
className
=
"bg-themeColor rounded text-white py-1 px-1.5 ml-1 "
className
=
"bg-themeColor rounded text-white py-1 px-1.5 ml-1
mr-1.5
"
onClick
=
{
deleteSurvey
}
onClick
=
{
deleteSurvey
}
>
>
삭제
삭제
...
...
frontend/src/questions/Question.tsx
View file @
a2418d6c
...
@@ -157,8 +157,8 @@ Props) => {
...
@@ -157,8 +157,8 @@ Props) => {
return
(
return
(
<
div
<
div
style
=
{
{
borderColor
:
isSaved
?
"
#
58ACF
A
"
:
"
red
"
}
}
style
=
{
{
borderColor
:
isSaved
?
"
#
0A8A8
A
"
:
"
red
"
}
}
className
=
"flex flex-col container w-4/5 h-auto border-2 items-center m-3 py-2"
className
=
"flex flex-col container w-4/5 h-auto border-2 items-center m-3 py-2
rounded-lg
"
>
>
<
div
className
=
"flex h-16 w-full place-content-between items-center"
>
<
div
className
=
"flex h-16 w-full place-content-between items-center"
>
<
input
<
input
...
...
frontend/src/survey/EditResultButton.tsx
View file @
a2418d6c
...
@@ -16,7 +16,7 @@ export const EditResultButton = () => {
...
@@ -16,7 +16,7 @@ export const EditResultButton = () => {
?
{
?
{
width
:
"
140px
"
,
width
:
"
140px
"
,
color
:
"
white
"
,
color
:
"
white
"
,
backgroundColor
:
"
#
58ACFA
"
,
backgroundColor
:
"
#
008080
"
,
borderTopLeftRadius
:
"
25px
"
,
borderTopLeftRadius
:
"
25px
"
,
borderBottomLeftRadius
:
"
25px
"
,
borderBottomLeftRadius
:
"
25px
"
,
textAlign
:
"
center
"
,
textAlign
:
"
center
"
,
...
@@ -26,7 +26,7 @@ export const EditResultButton = () => {
...
@@ -26,7 +26,7 @@ export const EditResultButton = () => {
:
{
:
{
width
:
"
140px
"
,
width
:
"
140px
"
,
borderWidth
:
"
1px
"
,
borderWidth
:
"
1px
"
,
borderColor
:
"
#
58ACFA
"
,
borderColor
:
"
#
008080
"
,
borderTopLeftRadius
:
"
25px
"
,
borderTopLeftRadius
:
"
25px
"
,
borderBottomLeftRadius
:
"
25px
"
,
borderBottomLeftRadius
:
"
25px
"
,
textAlign
:
"
center
"
,
textAlign
:
"
center
"
,
...
@@ -43,7 +43,7 @@ export const EditResultButton = () => {
...
@@ -43,7 +43,7 @@ export const EditResultButton = () => {
?
{
?
{
width
:
"
140px
"
,
width
:
"
140px
"
,
color
:
"
white
"
,
color
:
"
white
"
,
backgroundColor
:
"
#
58ACFA
"
,
backgroundColor
:
"
#
008080
"
,
borderTopRightRadius
:
"
25px
"
,
borderTopRightRadius
:
"
25px
"
,
borderBottomRightRadius
:
"
25px
"
,
borderBottomRightRadius
:
"
25px
"
,
textAlign
:
"
center
"
,
textAlign
:
"
center
"
,
...
@@ -53,7 +53,7 @@ export const EditResultButton = () => {
...
@@ -53,7 +53,7 @@ export const EditResultButton = () => {
:
{
:
{
width
:
"
140px
"
,
width
:
"
140px
"
,
borderWidth
:
"
1px
"
,
borderWidth
:
"
1px
"
,
borderColor
:
"
#
58ACFA
"
,
borderColor
:
"
#
008080
"
,
borderTopRightRadius
:
"
25px
"
,
borderTopRightRadius
:
"
25px
"
,
borderBottomRightRadius
:
"
25px
"
,
borderBottomRightRadius
:
"
25px
"
,
textAlign
:
"
center
"
,
textAlign
:
"
center
"
,
...
...
frontend/src/survey/EditSurvey.tsx
View file @
a2418d6c
...
@@ -151,7 +151,7 @@ export const EditSurvey = () => {
...
@@ -151,7 +151,7 @@ export const EditSurvey = () => {
deleteQuestion
=
{
deleteQuestion
}
deleteQuestion
=
{
deleteQuestion
}
/>
/>
))
}
))
}
<
div
className
=
"flex w-4/5 content-center justify-center border-2 border-
black h-8 mt-3
"
>
<
div
className
=
"flex w-4/5 content-center justify-center border-2 border-
themeColor2 border-addQuestionColor h-8 mt-3 rounded-lg
"
>
<
button
type
=
"button"
onClick
=
{
addQuestion
}
>
<
button
type
=
"button"
onClick
=
{
addQuestion
}
>
질문 추가
질문 추가
</
button
>
</
button
>
...
...
frontend/tailwind.config.js
View file @
a2418d6c
...
@@ -4,7 +4,9 @@ module.exports = {
...
@@ -4,7 +4,9 @@ module.exports = {
theme
:
{
theme
:
{
extend
:
{
extend
:
{
colors
:
{
colors
:
{
'
themeColor
'
:
'
#58ACFA
'
,
'
themeColor
'
:
'
#0A8A8A
'
,
'
themeColor2
'
:
'
#41C1C1
'
,
'
themeColor3
'
:
'
#EAF4F4
'
,
},
},
},
},
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment