-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
119 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
import React, { useState } from 'react'; | ||
import Head from 'next/head'; | ||
import NavBar from '../../components/layout/nav'; | ||
import { useMediaQuery } from 'react-responsive'; | ||
|
||
const About = () => { | ||
const isSmallScreen = useMediaQuery({ maxDeviceWidth: 575.98 }) | ||
const [data, setData] = useState([ | ||
{ | ||
title: "ศูนย์การเรียนรู้สำหรับผู้สูงอายุ", | ||
text: "สังคมที่มีประชากรอายุ 60 ปีขึ้นไปมากกว่าร้อยละ 10 ของประชากรทั้งประเทศ", | ||
subtext: "หรือมีประชากรอายุตั้งแต่ 65 ปีมากกว่าร้อยละ 7 ของประชากรทั้งประเทศ" | ||
}, | ||
{ | ||
title: "สถานพยาบาล", | ||
text: "สังคมที่มีประชากรอายุ 60 ปีขึ้นไป มากกว่าร้อยละ 20 ของประชากรทั้งประเทศ", | ||
subtext: "หรือมีประชากรอายุตั้งแต่ 65 ปี มากกว่าร้อยละ 14 ของประชากรทั้งประเทศ" | ||
}, | ||
{ | ||
title: "กิจกรรมสำหรับผู้สูงอายุในด้านต่างๆ", | ||
text: "สังคมที่มีประชากรอายุ 65 ปีขึ้นไปมากกว่า ร้อยละ 20 ของประชากรทั้งประเทศ", | ||
subtext: "" | ||
}, | ||
]) | ||
|
||
const [header,setHeader] = useState("สังคมผู้สูงอายุ") | ||
const [subHead,setSubHead] = useState("ภายในอำเภอกะทู้ จังหวัดภูเก็ต") | ||
|
||
const [status, setStatus] = useState(false) | ||
|
||
const [home, setHome] = useState( | ||
[ | ||
{ name: "เบี้ยยังชีพ", href: "#" }, | ||
{ name: "เข้าสู่หน้าหลัก", href: "/main" } | ||
] | ||
) | ||
|
||
const [homeMin, setHomeMin] = useState( | ||
[ | ||
{ name: "เบี้ยยังชีพ", href: "#" }, | ||
{ name: "เข้าสู่หน้าหลัก", href: "/main" }, | ||
] | ||
) | ||
|
||
const onConfirm = (order) => { | ||
setStatus(order) | ||
} | ||
|
||
return ( | ||
<React.Fragment> | ||
<Head> | ||
<title>Eldery DB</title> | ||
<link rel='icon' href='/static/logomain.svg' /> | ||
</Head> | ||
<NavBar name="main" tab={isSmallScreen ? homeMin : home} confirm={onConfirm} /> | ||
<div className="warp-society"> | ||
<div className="page-content"> | ||
{ | ||
isSmallScreen ? | ||
<div className="container-fluid"> | ||
<div className="head-content"> | ||
<h4>{header}</h4> | ||
<h5>{subHead}</h5> | ||
</div> | ||
|
||
<div className="detail-content"> | ||
<img src="/static/gifcover2.gif" /> | ||
<div className="data-detail-content"> | ||
{ | ||
data.map((item, index) => ( | ||
<div className="title-content" key={index}> | ||
<h6 className="header-title-content">{item.title}</h6> | ||
<h6>{item.text}</h6> | ||
<h6>{item.subtext}</h6> | ||
</div> | ||
)) | ||
} | ||
</div> | ||
</div> | ||
</div> | ||
: | ||
<div className="container-fluid"> | ||
<div className="head-content"> | ||
<h3>{header}</h3> | ||
<h3>{subHead}</h3> | ||
</div> | ||
|
||
<div className="detail-content"> | ||
<img src="/static/gifcover2.gif" /> | ||
<div className="data-detail-content"> | ||
{ | ||
data.map((item, index) => ( | ||
<div className="title-content" key={index}> | ||
<h6 className="header-title-content">{item.title}</h6> | ||
<h6>{item.text}</h6> | ||
<h6>{item.subtext}</h6> | ||
</div> | ||
)) | ||
} | ||
</div> | ||
</div> | ||
</div> | ||
} | ||
</div> | ||
</div> | ||
</React.Fragment> | ||
) | ||
} | ||
export default About; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e196f01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: