Toggle navigation
Toggle navigation
This project
Loading...
Sign in
오인제
/
Tunnel
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
정의왕
2021-12-09 03:08:18 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b99fd765f2c3bbd712e3bbcb3c257362e39bd2c8
b99fd765
1 parent
8ac8e395
Board UI ver1.0(Board + BoardModal)
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
20 deletions
tunnel_BE/server/routes/logout.js
turnel_FE/src/component/views/Board/Board.js
turnel_FE/src/component/views/MainPage/MainPage.js
turnel_FE/src/component/views/Modal/BoardModal.js
turnel_FE/src/component/views/style/Board.scss
turnel_FE/src/component/views/style/MainPage.scss
tunnel_BE/server/routes/logout.js
0 → 100644
View file @
b99fd76
const
express
=
require
(
"express"
);
const
bodyParser
=
require
(
"body-parser"
);
const
router
=
express
.
Router
();
const
{
User
}
=
require
(
'../models'
);
router
.
get
(
'/'
,(
req
,
res
)
=>
{
});
//로그아웃
router
.
post
(
'/'
,(
req
,
res
)
=>
{
req
.
session
.
id
=
null
;
req
.
session
.
name
=
null
;
req
.
session
.
personality
=
null
;
req
.
session
.
status
=
null
;
req
.
session
.
isAuthorized
=
null
;
console
.
log
(
"Logout"
);
res
.
sendStatus
(
200
);
})
module
.
exports
=
router
;
\ No newline at end of file
turnel_FE/src/component/views/Board/Board.js
View file @
b99fd76
import
React
,
{
useCallback
,
useState
}
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
import
'../style/Board.scss'
import
{
CKEditor
}
from
"@ckeditor/ckeditor5-react"
;
import
ClassicEditor
from
"@ckeditor/ckeditor5-build-classic"
;
import
{
Button
}
from
"semantic-ui-react"
;
import
ReactHtmlParser
from
'react-html-parser'
;
import
BoardModal
from
"../Modal/BoardModal"
;
...
...
@@ -13,9 +10,11 @@ function Board() {
}
return
(
<
div
className
=
"Board"
>
<
div
className
=
"contents-container"
>
<
div
className
=
"write-button"
>
<
BoardModal
onViewContentHandler
=
{
onViewContentHandler
}
/
>
<
/div
>
{
viewContent
.
map
(
element
=>
<
div
class
Name
=
"contents"
>
<
div
class
=
"ui segment"
>
<
h2
>
{
element
.
title
}
<
/h2
>
<
div
>
{
ReactHtmlParser
(
element
.
content
)}
...
...
@@ -23,10 +22,6 @@ function Board() {
<
/div
>
)}
<
/div
>
<
div
className
=
"write-button"
>
<
BoardModal
viewContent
=
{
viewContent
}
onViewContentHandler
=
{
onViewContentHandler
}
/
>
<
/div
>
<
/div
>
);
};
...
...
turnel_FE/src/component/views/MainPage/MainPage.js
View file @
b99fd76
...
...
@@ -13,7 +13,7 @@ function MainPage() {
<
div
id
=
"Main"
>
<
div
className
=
"Main-header"
>
<
div
className
=
"title"
>
<
h1
>
Tunnel
<
/h1
>
<
h1
>
"말하기 어려운 고민 여기에 털어놓으세요 :)"
<
/h1
>
<
/div
>
<
div
className
=
"None-title"
>
<
Button
className
=
"ui right floated button"
onClick
=
{()
=>
goToLogin
()}
>
...
...
@@ -23,7 +23,7 @@ function MainPage() {
<
/div
>
<
div
className
=
"Main-body"
>
<
Board
/>
<
div
className
=
"user-container"
>
{
/*
<div className="user-container">
<div className="userInfo">
<h1>User ID</h1>
</div>
...
...
@@ -49,7 +49,7 @@ function MainPage() {
</div>
</div>
</div>
<
/div
>
</div>
*/
}
<
/div
>
<
/div
>
);
...
...
turnel_FE/src/component/views/Modal/BoardModal.js
View file @
b99fd76
...
...
@@ -3,7 +3,7 @@ import { Button, Header, Image, Modal } from 'semantic-ui-react'
import
{
CKEditor
}
from
"@ckeditor/ckeditor5-react"
;
import
ClassicEditor
from
"@ckeditor/ckeditor5-build-classic"
;
function
BoardModal
({
viewContent
,
onViewContentHandler
})
{
function
BoardModal
({
onViewContentHandler
})
{
const
handleClose
=
(
event
)
=>
{
event
.
preventDefault
();
setOpen
(
false
);
...
...
@@ -57,7 +57,6 @@ function BoardModal({viewContent, onViewContentHandler}) {
...
BoardContent
,
content
:
data
,
})
console
.
log
(
BoardContent
);
}}
onBlur
=
{(
event
,
editor
)
=>
{
...
...
turnel_FE/src/component/views/style/Board.scss
View file @
b99fd76
...
...
@@ -3,9 +3,7 @@
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
border
:
2px
solid
#333
;
padding
:
10px
0
30px
0
;
border-radius
:
30px
;
}
.title-input
{
width
:
500px
;
...
...
turnel_FE/src/component/views/style/MainPage.scss
View file @
b99fd76
#Main
{
margin-top
:
30px
;
background-color
:
beige
;
display
:
flex
;
flex-direction
:
column
;
.Main-header
{
display
:
flex
;
flex-direction
:
row
;
height
:
70px
;
.title
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
90%
;
height
:
60px
;
.h1
{
font-family
:
Arial
,
Helvetica
,
sans-serif
;
font-size
:
60px
;
font-weight
:
bold
;
}
}
.None-title
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
10%
;
.ui
button
{
height
:
40px
;
...
...
@@ -32,7 +37,7 @@
display
:
flex
;
justify-content
:
flex-start
;
flex-direction
:
column
;
width
:
75
%
;
width
:
100
%
;
height
:
100%
;
}
.user-container
{
...
...
Please
register
or
login
to post a comment