Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design1
/
GCL_Project1
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-06-12 21:47:02 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
542da69ec7e8513e0f85071ad4ecf7c927f46db1
542da69e
1 parent
2e7f2265
style: document 페이지 스타일 추가
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
15 deletions
frontend/src/components/document/File.js
frontend/src/components/document/Thumbnail.js
frontend/src/components/document/index.js
frontend/src/components/document/File.js
View file @
542da69
import
React
from
'react'
;
import
{
Anchor
}
from
'@mantine/core'
;
import
{
HiOutlineDocumentDownload
}
from
'react-icons/hi'
;
import
palette
from
'../../lib/styles/palette'
;
const
File
=
({
filename
,
filepath
})
=>
{
return
(
<
a
style
=
{{
color
:
palette
.
blue6
}}
href
=
{
filepath
}
>
<
Anchor
style
=
{{
color
:
palette
.
blue7
}}
href
=
{
filepath
}
size
=
"lg"
>
{
filename
}
<
HiOutlineDocumentDownload
/>
<
/
a
>
<
/
Anchor
>
);
};
export
default
File
;
...
...
frontend/src/components/document/Thumbnail.js
View file @
542da69
import
{
Image
,
Text
}
from
'@mantine/core'
;
import
React
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styled
from
'styled-components'
;
import
palette
from
'../../lib/styles/palette'
;
const
ImageContainer
=
styled
.
div
`
padding: 10px;
border: 2px solid
${
palette
.
gray3
}
;
display: inline-flex;
`
;
const
ImageWrapper
=
styled
.
div
`
display: flex;
box-shadow: 2px 1px 7px 1px rgba(0, 0, 0, 0.4);
margin: 10px;
border-radius: 10px;
`
;
const
Thumbnails
=
({
srcs
})
=>
{
const
[
lists
,
setLists
]
=
useState
([]);
const
placeholder
=
()
=>
{
if
(
srcs
.
length
<=
4
)
{
const
list
=
[];
const
tempImgList
=
4
-
srcs
.
length
;
for
(
let
i
=
0
;
i
<
tempImgList
;
i
+=
1
)
{
list
.
push
(
<
ImageWrapper
>
<
Image
width
=
{
200
}
height
=
{
250
}
radius
=
"md"
withPlaceholder
/>
<
/ImageWrapper
>
);
}
setLists
(
list
);
}
};
useEffect
(()
=>
{
placeholder
();
},
[]);
return
(
<>
<
Text
style
=
{{
marginTop
:
'1rem'
}}
>
문서
내
이미지
<
/Text
>
<
ImageWrapper
>
<
Text
style
=
{{
marginTop
:
'1rem'
}}
size
=
"lg"
weight
=
{
500
}
>
문서
내
이미지
<
/Text
>
<
ImageContainer
>
{
srcs
.
map
(
src
=>
(
<
Image
width
=
{
200
}
height
=
{
250
}
radius
=
"md"
src
=
{
src
}
withPlaceholder
/>
<
ImageWrapper
>
<
Image
width
=
{
200
}
height
=
{
250
}
radius
=
"md"
src
=
{
src
}
withPlaceholder
/>
<
/ImageWrapper
>
))}
<
/ImageWrapper
>
{
lists
}
<
/ImageContainer
>
<
/
>
);
};
export
default
Thumbnails
;
...
...
frontend/src/components/document/index.js
View file @
542da69
...
...
@@ -22,7 +22,7 @@ const Document = () => {
templist
.
push
(
<
Container
style
=
{{
padding
:
'2rem
4
rem'
,
padding
:
'2rem
2
rem'
,
margin
:
'2rem 4rem'
,
border
:
'1px solid black'
,
}}
...
...
Please
register
or
login
to post a comment