Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Mohammad Dwikurnia Apriadi
Diskuy-Frontend
Commits
407f2685
Commit
407f2685
authored
Mar 04, 2021
by
Jonathan Chandra
Browse files
fix naming, styling and delete duplicate styling on css file
parent
c9789c02
Changes
31
Hide whitespace changes
Inline
Side-by-side
src/components/LoginForm.jsx
View file @
407f2685
...
...
@@ -29,7 +29,7 @@ export default function LoginForm(props) {
</
h1
>
<
div
className
=
"App"
>
<
GoogleLogin
clientId
=
{
'
17380499766-td9qokkgpli952576g7d8l2059a7pgbf.apps.googleusercontent.com
'
}
clientId
=
{
CLIENT_ID
}
onSuccess
=
{
handleGoogleLogin
}
onFailure
=
{
handleGoogleLoginFailed
}
/>
...
...
src/components/Search.jsx
View file @
407f2685
...
...
@@ -42,7 +42,9 @@ export default function Search(props) {
</
h1
>
<
ThreadList
thread
=
{
threads
}
/>
{
totalItems
==
0
&&
(
<
p
>
No threads with keyword "
{
searchParam
}
" found.
</
p
>
<
div
className
=
"noThreadsMessage"
>
<
p
>
No threads with keyword "
{
searchParam
}
" found.
</
p
>
</
div
>
)
}
{
totalItems
!=
0
&&
(
<
div
className
=
"paginationContainer"
>
...
...
src/components/profile/Profile.jsx
View file @
407f2685
...
...
@@ -54,7 +54,7 @@ export default function Profile(props) {
<
b
>
Profile
</
b
>
</
h1
>
</
div
>
<
div
className
=
"profile
_s
ection"
>
<
div
className
=
"profile
S
ection"
>
<
div
className
=
"userIcon"
>
{
user
.
picture
==
'
None
'
?
(
<
i
className
=
"far fa-user-circle"
/>
...
...
@@ -69,8 +69,8 @@ export default function Profile(props) {
<
Button
text
=
"Edit Profile"
color
=
"orange"
url
=
"profile/update"
/>
)
}
</
div
>
<
div
className
=
"my
_t
hreads
_s
ection"
>
<
div
className
=
"sub
_h
eader
_my_t
hreads"
>
<
div
className
=
"my
T
hreads
S
ection"
>
<
div
className
=
"sub
H
eader
MyT
hreads"
>
<
h3
>
<
b
>
{
isUser
?
'
Your
'
:
user
.
username
}
's threads
</
b
>
</
h3
>
...
...
src/components/profile/UpdateProfileForm.jsx
View file @
407f2685
...
...
@@ -44,7 +44,7 @@ export default function FormCreateThread(props) {
};
return
(
<
div
className
=
"formContainer"
>
<
div
className
=
"formCo
mponentCo
ntainer"
>
<
div
className
=
"back"
onClick
=
{
back
}
>
<
i
className
=
"fas fa-angle-left"
></
i
>
<
h5
>
Back
</
h5
>
...
...
@@ -62,7 +62,7 @@ export default function FormCreateThread(props) {
</
div
>
)
}
<
form
onSubmit
=
{
handleSubmit
}
>
<
div
className
=
"form
_c
ontainer"
>
<
div
className
=
"form
C
ontainer"
>
<
label
htmlFor
=
"title"
>
Username
</
label
>
<
input
type
=
"text"
...
...
src/components/thread/CommentList.jsx
View file @
407f2685
...
...
@@ -4,7 +4,7 @@ export default function CommentList(props) {
return
(
<
div
>
{
props
.
comment
.
map
((
value
)
=>
(
<
div
id
=
"threadComment"
>
<
div
className
=
"threadComment"
>
<
Post
type
=
"comment"
content
=
{
value
}
/>
</
div
>
))
}
...
...
src/components/thread/CreateThread.jsx
View file @
407f2685
...
...
@@ -62,7 +62,7 @@ export default function ListThreads(props) {
};
return
(
<
div
className
=
"formContainer"
>
<
div
className
=
"formCo
mponentCo
ntainer"
>
<
div
className
=
"back"
onClick
=
{
back
}
>
<
i
className
=
"fas fa-angle-left"
></
i
>
<
h5
>
Back
</
h5
>
...
...
@@ -72,7 +72,7 @@ export default function ListThreads(props) {
<
b
>
Create a Thread
</
b
>
</
h1
>
</
div
>
<
div
className
=
"form
_s
ection"
>
<
div
className
=
"form
S
ection"
>
<
div
>
{
message
&&
(
<
div
>
...
...
@@ -82,7 +82,7 @@ export default function ListThreads(props) {
</
div
>
)
}
<
form
onSubmit
=
{
handleSubmit
}
>
<
div
className
=
"form
_c
ontainer"
>
<
div
className
=
"form
C
ontainer"
>
<
label
for
=
"title"
>
Title
</
label
>
<
input
type
=
"text"
...
...
src/components/thread/EditComment.jsx
View file @
407f2685
...
...
@@ -61,7 +61,7 @@ export default function EditComment(props) {
};
return
(
<
div
className
=
"formContainer"
>
<
div
className
=
"formCo
mponentCo
ntainer"
>
<
div
className
=
"back"
onClick
=
{
back
}
>
<
i
className
=
"fas fa-angle-left"
></
i
>
<
h5
>
Back
</
h5
>
...
...
@@ -71,7 +71,7 @@ export default function EditComment(props) {
<
b
>
Edit a Comment
</
b
>
</
h1
>
</
div
>
<
div
className
=
"form
_s
ection"
>
<
div
className
=
"form
S
ection"
>
<
div
>
{
message
&&
(
<
div
>
...
...
@@ -81,7 +81,7 @@ export default function EditComment(props) {
</
div
>
)
}
<
form
onSubmit
=
{
handleSubmit
}
>
<
div
className
=
"form
_c
ontainer"
>
<
div
className
=
"form
C
ontainer"
>
<
label
for
=
"body"
>
Body
</
label
>
<
textarea
className
=
"body"
...
...
src/components/thread/EditThread.jsx
View file @
407f2685
...
...
@@ -89,7 +89,7 @@ export default function EditThread(props) {
};
return
(
<
div
className
=
"formContainer"
>
<
div
className
=
"formCo
mponentCo
ntainer"
>
<
div
className
=
"back"
onClick
=
{
back
}
>
<
i
className
=
"fas fa-angle-left"
></
i
>
<
h5
>
Back
</
h5
>
...
...
@@ -99,7 +99,7 @@ export default function EditThread(props) {
<
b
>
Edit a Thread
</
b
>
</
h1
>
</
div
>
<
div
className
=
"form
_s
ection"
>
<
div
className
=
"form
S
ection"
>
<
div
>
{
message
&&
(
<
div
>
...
...
@@ -109,7 +109,7 @@ export default function EditThread(props) {
</
div
>
)
}
<
form
onSubmit
=
{
handleSubmit
}
>
<
div
className
=
"form
_c
ontainer"
>
<
div
className
=
"form
C
ontainer"
>
<
label
for
=
"title"
>
Title
</
label
>
<
input
type
=
"text"
...
...
src/components/thread/ListThreads.jsx
View file @
407f2685
...
...
@@ -16,8 +16,8 @@ export default function ListThreads(props) {
</
div
>
{
props
.
isRecent
?
(
<
div
className
=
"list
_t
hreads
_s
ection"
>
<
div
className
=
"sub
_h
eader
_l
ist
_t
hreads"
>
<
div
className
=
"list
T
hreads
S
ection"
>
<
div
className
=
"sub
H
eader
L
ist
T
hreads"
>
<
div
className
=
"tab"
>
<
Link
to
=
"/page/1"
style
=
{
{
textDecoration
:
'
none
'
}
}
>
<
h3
className
=
"active"
>
Recent
</
h3
>
...
...
@@ -36,8 +36,8 @@ export default function ListThreads(props) {
/>
</
div
>
)
:
(
<
div
className
=
"list
_t
hreads
_s
ection"
>
<
div
className
=
"sub
_h
eader
_l
ist
_t
hreads"
>
<
div
className
=
"list
T
hreads
S
ection"
>
<
div
className
=
"sub
H
eader
L
ist
T
hreads"
>
<
div
className
=
"tab"
>
<
Link
to
=
"/page/1"
style
=
{
{
textDecoration
:
'
none
'
}
}
>
<
h3
>
Recent
</
h3
>
...
...
src/components/thread/Post.jsx
View file @
407f2685
...
...
@@ -85,9 +85,9 @@ export default function Post(props) {
const
time
=
translate
(
content
.
inserted_at
);
return
(
<
div
id
=
"post"
>
<
div
id
=
"postHeader"
>
<
div
id
=
"headerData"
>
<
div
className
=
"post"
>
<
div
className
=
"postHeader"
>
<
div
className
=
"headerData"
>
<
div
className
=
"userImage"
>
{
user
.
picture
==
'
None
'
?
(
<
i
className
=
"far fa-user-circle"
/>
...
...
@@ -112,7 +112,7 @@ export default function Post(props) {
{
content
.
user_id
==
AuthService
.
getCurrentUserId
()
&&
(
<
div
id
=
"headerButton"
>
<
div
className
=
"headerButton"
>
<
div
className
=
"postButtonContainer"
>
{
checkType
==
'
threads
'
&&
(
<
Button
...
...
@@ -141,9 +141,9 @@ export default function Post(props) {
</
div
>
)
}
</
div
>
<
div
id
=
"postContent"
>
{
props
.
type
==
'
thread
'
&&
<
h1
id
=
"judul
"
>
{
content
.
title
}
</
h1
>
}
<
p
id
=
"isi
"
>
{
contents
}
</
p
>
<
div
className
=
"postContent"
>
{
props
.
type
==
'
thread
'
&&
<
h1
className
=
"postTitle
"
>
{
content
.
title
}
</
h1
>
}
<
p
className
=
"postBody
"
>
{
contents
}
</
p
>
<
div
className
=
"likeSection"
>
{
loggedIn
&&
(
<
button
className
=
"likeButton"
onClick
=
{
handleLike
}
>
...
...
src/components/thread/PreviewThread.jsx
View file @
407f2685
...
...
@@ -6,14 +6,14 @@ export default function PreviewThread(props) {
const
{
content
}
=
props
;
const
time
=
translate
(
content
.
inserted_at
);
return
(
<
div
id
=
"threadCard"
>
<
div
id
=
"threadCardHeader"
>
<
h2
id
=
"judul
"
>
<
div
className
=
"threadCard"
>
<
div
className
=
"threadCardHeader"
>
<
h2
className
=
"previewThreadTitle
"
>
<
b
>
{
content
.
title
}
</
b
>
</
h2
>
</
div
>
<
p
id
=
"t
opic"
>
{
content
.
topic_name
}
</
p
>
<
div
id
=
"threadCardContent"
>
<
p
className
=
"previewThreadT
opic"
>
{
content
.
topic_name
}
</
p
>
<
div
className
=
"threadCardContent"
>
<
p
>
By
{
'
'
}
<
Link
to
=
{
`/profile/
${
content
.
username
}
/1`
}
>
{
content
.
username
}
</
Link
>
{
'
'
}
...
...
src/components/thread/RecentThreads.jsx
View file @
407f2685
...
...
@@ -35,7 +35,9 @@ export default function RecentThreads(props) {
return
(
<
div
className
=
"recentThreads"
>
{
totalItems
==
0
?
(
<
p
>
There is no threads yet.
</
p
>
<
div
className
=
"noThreadsMessage"
>
<
p
>
There is no threads yet.
</
p
>
</
div
>
)
:
(
<
Fragment
>
<
ThreadList
thread
=
{
threads
}
/>
...
...
src/components/thread/Thread.jsx
View file @
407f2685
...
...
@@ -109,10 +109,10 @@ export default function Thread(props) {
</
div
>
{
loggedIn
&&
(
<
div
id
=
"addCommentSection"
>
<
div
className
=
"addCommentSection"
>
<
h3
>
Write a Comment
</
h3
>
<
form
onSubmit
=
{
handleSubmit
}
>
<
div
className
=
"comment
F
ormContainer"
>
<
div
className
=
"comment
f
ormCo
mponentCo
ntainer"
>
<
textarea
className
=
"commentBox"
placeholder
=
"Write your comment here"
...
...
@@ -121,8 +121,7 @@ export default function Thread(props) {
/>
<
div
>
<
button
className
=
"submitComment"
id
=
"addCommentButton"
className
=
"submitComment addCommentButton"
type
=
"submit"
>
Post Comment
...
...
@@ -142,8 +141,8 @@ export default function Thread(props) {
<
div
>
<
CommentList
comment
=
{
comment
}
thread_
id
=
{
threadParm
}
topic_
id
=
{
topicParm
}
thread_
className
=
{
threadParm
}
topic_
className
=
{
topicParm
}
/>
<
div
className
=
"paginationContainer"
>
<
Pagination
...
...
src/components/thread/TopThreads.jsx
View file @
407f2685
...
...
@@ -34,7 +34,9 @@ export default function TopThreads(props) {
return
(
<
div
className
=
"topThreads"
>
{
totalItems
==
0
?
(
<
p
>
There is no threads yet.
</
p
>
<
div
className
=
"noThreadsMessage"
>
<
p
>
There is no threads yet.
</
p
>
</
div
>
)
:
(
<
Fragment
>
<
ThreadList
thread
=
{
threads
}
/>
...
...
src/components/topic/CreateTopicForm.jsx
View file @
407f2685
...
...
@@ -40,7 +40,7 @@ export default function CreateTopicForm(props) {
};
return
(
<
div
className
=
"formContainer"
>
<
div
className
=
"formCo
mponentCo
ntainer"
>
<
div
className
=
"back"
onClick
=
{
back
}
>
<
i
className
=
"fas fa-angle-left"
></
i
>
<
h5
>
Back
</
h5
>
...
...
@@ -58,7 +58,7 @@ export default function CreateTopicForm(props) {
</
div
>
)
}
<
form
onSubmit
=
{
handleSubmit
}
>
<
div
className
=
"form
_c
ontainer"
>
<
div
className
=
"form
C
ontainer"
>
<
label
for
=
"title"
>
Topic Name
</
label
>
<
input
type
=
"text"
...
...
src/components/topic/Topic.jsx
View file @
407f2685
...
...
@@ -70,7 +70,7 @@ export default function Topic(props) {
</
button
>
)
}
</
div
>
<
div
className
=
"list
_t
hreads
_s
ection"
>
<
div
className
=
"list
T
hreads
S
ection"
>
{
totalItems
==
0
?
(
<
p
>
There are no threads with this topic yet.
</
p
>
)
:
(
...
...
src/components/topic/TopicList.jsx
View file @
407f2685
...
...
@@ -20,7 +20,7 @@ export default function TopicList(props) {
return
(
<
div
className
=
"topicContainer"
>
<
div
className
=
"
headerTopic
"
>
<
div
className
=
"
topicHeader
"
>
<
h1
>
Topic List
</
h1
>
{
loggedIn
&&
isAdmin
&&
(
<
Button
text
=
"Create Topic"
color
=
"orange"
url
=
"create/topic"
/>
...
...
@@ -42,7 +42,7 @@ export default function TopicList(props) {
>
<
div
className
=
"topicCard"
>
<
div
className
=
"topicCardHeader"
>
<
h2
id
=
"judul
"
>
{
value
.
name
}
</
h2
>
<
h2
className
=
"topicTitle
"
>
{
value
.
name
}
</
h2
>
</
div
>
</
div
>
</
Link
>
...
...
src/components/utility/Footer.jsx
View file @
407f2685
...
...
@@ -6,8 +6,8 @@ import '../../styles/utility/Footer.css';
function
Footer
()
{
return
(
<
div
id
=
"footerContainer"
>
<
div
id
=
"footer"
>
<
div
>
<
div
id
=
"footer
Container
"
>
<
div
id
=
"fasilkomLogo"
>
<
p
>
<
b
>
Developed under
</
b
>
...
...
src/styles/App.css
View file @
407f2685
...
...
@@ -4,8 +4,34 @@ body {
overflow-wrap
:
break-word
;
}
.header
{
margin-top
:
36px
;
}
.header
h1
{
font-family
:
"DM Sans"
;
font-size
:
36px
;
color
:
#003F5A
;
margin-bottom
:
24px
;
}
@media
only
screen
and
(
min-device-width
:
320px
)
and
(
max-device-width
:
540px
)
{
p
{
font-size
:
14px
;
}
}
\ No newline at end of file
.header
{
margin-top
:
18px
;
text-align
:
center
;
}
.header
h1
{
font-size
:
28px
;
}
}
@media
only
screen
and
(
max-device-width
:
320px
)
{
.header
{
text-align
:
center
;
}
}
src/styles/LoginForm.css
View file @
407f2685
.login
F
ormContainer
{
.login
f
ormCo
mponentCo
ntainer
{
margin-top
:
36px
;
margin-left
:
72px
;
margin-right
:
72px
;
...
...
@@ -11,20 +11,20 @@
margin-bottom
:
72px
;
}
.login
F
ormContainer
h1
{
.login
f
ormCo
mponentCo
ntainer
h1
{
margin-bottom
:
40px
;
text-align
:
center
;
}
@media
only
screen
and
(
min-device-width
:
320px
)
and
(
max-device-width
:
4
8
0px
)
{
.login
F
ormContainer
{
@media
only
screen
and
(
min-device-width
:
320px
)
and
(
max-device-width
:
5
40px
)
{
.login
f
ormCo
mponentCo
ntainer
{
margin-top
:
24px
;
margin-left
:
36px
;
margin-right
:
36px
;
margin-bottom
:
184px
;
}
.login
F
ormContainer
h1
{
.login
f
ormCo
mponentCo
ntainer
h1
{
font-size
:
28px
;
text-align
:
center
;
}
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
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