Toggle navigation
Toggle navigation
This project
Loading...
Sign in
최은석
/
ossw-project
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
채지성
2022-06-04 01:34:24 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cd914905c53aaf69f8056cc1e1ead00ca1001870
cd914905
1 parent
65a693bc
mainpage_demo2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
12 deletions
client/src/Component/mainpage.css
client/src/Component/mainpage.js
client/src/index.css
client/src/Component/mainpage.css
View file @
cd91490
...
...
@@ -5,18 +5,28 @@
display
:
grid
;
grid-template-rows
:
1.4
fr
1
fr
;
margin
:
1%
;
background-color
:
#FFE4b1
;
}
.mainpage
:nth-child
(
1
)
:not
(
.mainpage
:nth-child
(
1
)
:nth-child
(
1
))
{
display
:
grid
;
grid-template-columns
:
1
fr
1
fr
;
grid-template-rows
:
8%
16%
74%
;
grid-template-rows
:
8%
12%
79%
;
}
.mainpage
:nth-child
(
1
)
:not
(
.haksikTitle
)
{
border
:
2px
solid
black
;
}
.mainpage
:nth-child
(
1
)
:nth-child
(
1
)
{
.mainpage
:nth-child
(
1
)
:nth-child
(
1
),
.mainpage
:nth-child
(
1
)
:nth-child
(
2
)
{
padding-left
:
10%
;
border-bottom
:
2px
solid
black
;
}
.mainpage
:nth-child
(
1
)
:nth-child
(
3
),
.mainpage
:nth-child
(
1
)
:nth-child
(
4
),
...
...
@@ -24,8 +34,17 @@
.mainpage
:nth-child
(
1
)
:nth-child
(
6
)
{
text-align
:
center
;
padding-top
:
2%
;
}
.mainpage
:nth-child
(
1
)
:nth-child
(
3
),
.mainpage
:nth-child
(
1
)
:nth-child
(
4
)
{
border-bottom
:
2px
solid
black
;
}
.lunchTable
,
.dinnerTable
{
display
:
flex
;
flex-direction
:
column
;
...
...
@@ -34,8 +53,18 @@
.mainpage
:nth-child
(
2
)
{
display
:
grid
;
grid-template-rows
:
8%
90%
;
padding-left
:
2%
;
grid-template-rows
:
10%
90%
;
}
.mainpage
:nth-child
(
2
)
:nth-child
(
1
)
{
border-bottom
:
2px
solid
black
;
border-top
:
2px
hidden
black
;
}
.mainpage
:nth-child
(
2
)
:nth-child
(
2
)
{
border
:
2px
solid
black
;
border-top
:
2px
hidden
black
;
}
...
...
client/src/Component/mainpage.js
View file @
cd91490
...
...
@@ -14,6 +14,11 @@ function MainPage() {
let
today
=
currentYear
+
'/'
+
currentMonth
+
'/'
+
currentDate
;
const
todayMealTable
=
async
()
=>
{
axios
.
get
(
"/api/todayMenu"
).
then
(
(
res
)
=>
{
const
makeTable
=
(
arr_
,
dom_
)
=>
{
arr_
.
forEach
((
elem
)
=>
{
...
...
@@ -24,9 +29,6 @@ function MainPage() {
};
const
todayMealTable
=
async
()
=>
{
axios
.
get
(
"/api/todayMenu"
).
then
(
(
res
)
=>
{
const
index1
=
res
.
data
[
0
].
indexOf
(
':'
);
const
index2
=
res
.
data
[
1
].
indexOf
(
':'
);
let
lunchArr
=
res
.
data
[
0
].
substring
(
index1
+
1
);
...
...
@@ -38,15 +40,13 @@ function MainPage() {
if
(
index1
!==
-
1
){
dinnerArr
=
dinnerArr
.
split
(
','
);
}
console
.
log
(
lunchArr
,
dinnerArr
);
const
lunchDom
=
document
.
getElementsByClassName
(
'lunchTable'
)[
0
];
const
dinnerDom
=
document
.
getElementsByClassName
(
'dinnerTable'
)[
0
];
makeTable
(
lunchArr
,
lunchDom
);
makeTable
(
dinnerArr
,
dinnerDom
);
setlunch
(
lunchArr
);
setdinner
(
dinnerArr
);
console
.
log
()
...
...
@@ -63,7 +63,7 @@ function MainPage() {
<
div
className
=
'mainpage'
>
<
div
>
<
div
>
<
div
className
=
'haksikTitle'
>
{
today
}
제
2
기숙사
학식
<
/div
>
<
div
><
/div
>
...
...
@@ -74,7 +74,7 @@ function MainPage() {
<
/div
>
<
div
className
=
'dinnerTable'
><
/div
>
<
/div
>
<
div
>
<
div
className
=
'mainpageUnder'
>
<
div
>
메뉴에
대한
이야기
<
/div
>
<
div
><
/div
>
<
/div
>
...
...
client/src/index.css
View file @
cd91490
...
...
@@ -15,7 +15,9 @@ code {
*
{
margin
:
0px
;
padding
:
0px
;
/*
border-style: solid;
border-color: black;
border-width: 5px;
*/
}
...
...
Please
register
or
login
to post a comment