Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4947e78

Browse files
committed
PageBody and PageTitle components
1 parent1473b80 commit4947e78

File tree

13 files changed

+152
-129
lines changed

13 files changed

+152
-129
lines changed

‎frontend/src/components/Layout.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
importNavbarfrom'./Navbar';
22
importFooterfrom'./Footer';
3+
importReactfrom'react';
34

45
constLayout=({ children}:{children:React.ReactNode})=>{
56
return(
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
importReactfrom"react";
2+
3+
constPageBody=({ children}:{children:React.ReactNode})=>{
4+
return(
5+
<div>
6+
<sectionclassName="py-8 xl:px-24 sm:px-10 px-5">
7+
{children}
8+
</section>
9+
</div>
10+
);
11+
}
12+
13+
exportdefaultPageBody;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
constPageTitle=({ title}:{title:string})=>{
2+
return(
3+
<divclassName="text-center mt-10 mb-5">
4+
<h1className="font-bold text-6xl">{title}</h1>
5+
</div>
6+
)
7+
}
8+
9+
exportdefaultPageTitle;

‎frontend/src/pages/about/constitution.tsx‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
importLayoutfrom"@/components/Layout";
2+
importPageBodyfrom"@/components/PageBody";
3+
importPageTitlefrom"@/components/PageTitle";
24

3-
exportdefaultfunctionConstitution(){
5+
constConstitutionPage=()=>{
46
return(
57
<Layout>
6-
<sectionclassName="py-8 xl:px-24 sm:px-10 px-5"id="constitution">
7-
<divclassName="text-center my-10">
8-
<h1className="font-bold text-6xl">CONSTITUTION</h1>
9-
</div>
10-
8+
<PageTitletitle="CONSTITUTION"/>
9+
<PageBody>
1110
<div>
1211
<pclassName="text-xl my-5">
1312
Since the end of 2013, the constitution has been hosted on Github. The constitution by which CSESoc runs can be found here:
@@ -48,7 +47,9 @@ export default function Constitution() {
4847
</li>
4948
</ul>
5049
</div>
51-
</section>
50+
</PageBody>
5251
</Layout>
5352
);
5453
}
54+
55+
exportdefaultConstitutionPage;

‎frontend/src/pages/about/election-guide.tsx‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
importLayoutfrom"@/components/Layout";
2+
importPageBodyfrom"@/components/PageBody";
3+
importPageTitlefrom"@/components/PageTitle";
24

3-
constElectionGuide=()=>{
5+
constElectionGuidePage=()=>{
46
return(
57
<Layout>
6-
<sectionclassName="py-8 xl:px-24 sm:px-10 px-5"id="election-guide">
7-
<divclassName="text-center my-10">
8-
<h1className="font-bold text-6xl">ELECTION NOMINATION GUIDE</h1>
9-
</div>
10-
8+
<PageTitletitle="ELECTION GUIDE"/>
9+
<PageBody>
1110
<div>
1211
<pclassName="text-lg my-5">
1312
Before considering any executive position for CSESoc, it
@@ -108,9 +107,9 @@ const ElectionGuide = () => {
108107
</ul>
109108
</div>
110109
</div>
111-
</section>
110+
</PageBody>
112111
</Layout>
113112
);
114113
};
115114

116-
exportdefaultElectionGuide;
115+
exportdefaultElectionGuidePage;

‎frontend/src/pages/about/execs-directors-subcoms.tsx‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
importLayoutfrom"@/components/Layout";
2+
importPageBodyfrom"@/components/PageBody";
3+
importPageTitlefrom"@/components/PageTitle";
24

3-
constExecsDirectorsSubcommittees=()=>{
5+
constExecsDirectorsSubcommitteesPage=()=>{
46
return(
57
<Layout>
6-
<sectionclassName="py-8 xl:px-24 sm:px-10 px-5"id="execs-directors-subcommittees">
7-
<divclassName="text-center my-10">
8-
<h1className="font-bold text-6xl">EXECS, DIRECTORS&SUBCOMMITTEES</h1>
9-
</div>
10-
8+
<PageTitletitle="EXECS, DIRECTORS & SUBCOMMITTEES"/>
9+
<PageBody>
1110
{/* CSESOC TEAM */}
1211
<div>
1312
<pclassName="text-xl my-5">
@@ -244,9 +243,9 @@ const ExecsDirectorsSubcommittees = () => {
244243
</p>
245244
</div>
246245
</div>
247-
</section>
246+
</PageBody>
248247
</Layout>
249248
);
250249
}
251250

252-
exportdefaultExecsDirectorsSubcommittees;
251+
exportdefaultExecsDirectorsSubcommitteesPage;

‎frontend/src/pages/about/faqs.tsx‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
importLayoutfrom"@/components/Layout";
2+
importPageBodyfrom"@/components/PageBody";
3+
importPageTitlefrom"@/components/PageTitle";
24

3-
constFaqs=()=>{
5+
constFaqsPage=()=>{
46
return(
57
<Layout>
6-
<sectionclassName="py-8 xl:px-24 sm:px-10 px-5"id="faqs">
7-
<divclassName="text-center my-10">
8-
<h1className="font-bold text-6xl">FREQUENTLY ASKED QUESTIONS</h1>
9-
</div>
10-
8+
<PageTitletitle="FREQUENTLY ASKED QUESTIONS"/>
9+
<PageBody>
1110
<div>
1211
<pclassName="text-2xl my-5 font-semibold">
1312
What is CSESoc?
@@ -50,9 +49,9 @@ const Faqs = () => {
5049
subcommittee. Subcommittee recruitment opens during T1 of each year.
5150
</p>
5251
</div>
53-
</section>
52+
</PageBody>
5453
</Layout>
5554
);
5655
};
5756

58-
exportdefaultFaqs;
57+
exportdefaultFaqsPage;

‎frontend/src/pages/about/index.tsx‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
importLayoutfrom"@/components/Layout";
2+
importPageTitlefrom"@/components/PageTitle";
23
importImagefrom'next/image';
34
importLinkfrom'next/link';
45

56
exportdefaultfunctionAboutPage(){
67
return(
78
<Layout>
8-
<sectionclassName="py-8 xl:px-24 sm:px-10 px-5"id="about">
9-
<divclassName="text-center my-10">
10-
<h2className="font-bold text-6xl">ABOUT US</h2>
11-
</div>
9+
<PageTitletitle="ABOUT US"/>
10+
<sectionclassName="py-8 xl:px-24 sm:px-10 px-5">
1211
<divclassName="flex justify-center items-center">
1312
<divclassName="lg:grid grid-cols-6 flex-1 max-w-[90rem]">
1413
{/* LEFT SIDE */}

‎frontend/src/pages/about/our-history.tsx‎

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
importNavbarfrom"@/components/Navbar";
2-
importFooterfrom"@/components/Footer";
1+
importLayoutfrom"@/components/Layout";
2+
importPageBodyfrom"@/components/PageBody";
3+
importPageTitlefrom"@/components/PageTitle";
34

4-
constOurHistory=()=>{
5+
constOurHistoryPage=()=>{
56
// Years from 2020 to 2007
67
constyears:number[]=Array.from({length:14},(_,i)=>2020-i);
78

89
return(
9-
<sectionclassName="flex flex-col min-h-screen justify-between py-8 xl:px-24 md:px-10 px-5 relative overflow-hidden">
10-
<Navbar/>
11-
<sectionclassName="py-8 xl:px-24 sm:px-10 px-5"id="our-history">
12-
<divclassName="text-center my-10">
13-
<h1className="font-bold text-6xl">OUR HISTORY</h1>
14-
</div>
15-
10+
<Layout>
11+
<PageTitletitle="OUR HISTORY"/>
12+
<PageBody>
1613
<div>
1714
<pclassName="text-xl my-5">
1815
CSESoc was formed in October 2006 from the old CompSoc and SESoc societies.
@@ -50,10 +47,9 @@ const OurHistory = () => {
5047
</div>
5148
</div>
5249
))}
53-
</section>
54-
<Footer/>
55-
</section>
56-
)
50+
</PageBody>
51+
</Layout>
52+
);
5753
}
5854

59-
exportdefaultOurHistory;
55+
exportdefaultOurHistoryPage;

‎frontend/src/pages/contact-us.tsx‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
importContactsfrom'@/components/Contacts';
22
importLayoutfrom'@/components/Layout';
3+
importPageBodyfrom'@/components/PageBody';
4+
importPageTitlefrom'@/components/PageTitle';
35

46
exportdefaultfunctionContactUsPage(){
57
return(
68
<Layout>
7-
<sectionclassName="py-8 xl:px-24 sm:px-10 px-5"id="contact-us">
8-
<divclassName="text-center my-10">
9-
<h1className="font-bold text-6xl">CONTACT US</h1>
10-
</div>
11-
9+
<PageTitletitle="CONTACT US"/>
10+
11+
<PageBody>
1212
<ul>
1313
<li>
1414
<h3className="text-2xl font-semibold pt-5">
@@ -63,7 +63,7 @@ export default function ContactUsPage() {
6363
<Contacts/>
6464
</div>
6565
</div>
66-
</section>
66+
</PageBody>
6767
</Layout>
6868
);
6969
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp