Skip to content

Commit 885e0f6

Browse files
Merge pull request #209 from Ed-Gah/BUB2_Redesign-FAQs-Page
Bub2 redesign fa qs page
2 parents 008cb3e + 89adf20 commit 885e0f6

File tree

6 files changed

+87
-18
lines changed

6 files changed

+87
-18
lines changed

components/FaqsSection.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import React from "react";
2+
3+
const FaqsSection = ({ faqs_data }) => {
4+
return (
5+
<div>
6+
<style jsx>
7+
{`
8+
.cdx-card-custom {
9+
margin-top: 20px;
10+
flex: 20%;
11+
margin-right: 20px;
12+
max-width: 400px;
13+
}
14+
.faqs-section {
15+
display: grid;
16+
grid-template-columns: 1fr 1fr;
17+
}
18+
`}
19+
</style>
20+
<div className="faqs-section">
21+
{faqs_data?.map((faq, index) => (
22+
<span key={index} className="cdx-card cdx-card-custom">
23+
<span className="cdx-card__text">
24+
<span className="cdx-card__text__title">{faq?.que}</span>
25+
<span className="cdx-card__text__description">{faq?.ans}</span>
26+
</span>
27+
</span>
28+
))}
29+
</div>
30+
</div>
31+
);
32+
};
33+
34+
export default FaqsSection;

components/Footer.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ export default () => (
77
background-color: #f5f5f5;
88
margin-top: auto;
99
padding: 1em;
10+
position: fixed;
11+
left: 0;
12+
bottom: 0;
1013
}
1114
`}
1215
</style>

components/Header.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,21 +98,21 @@ function Header(props) {
9898
</label>
9999
</li>
100100
</Link>
101-
{/* <Link href="/faq">
102-
<li
103-
id="form-tabs-3-label"
104-
className="cdx-tabs__list__item"
105-
role="presentation"
101+
<Link href="/faqs">
102+
<li
103+
id="form-tabs-3-label"
104+
className="cdx-tabs__list__item"
105+
role="presentation"
106+
>
107+
<label
108+
htmlFor="form-tabs-3-input"
109+
role="tab"
110+
aria-selected={props.page === "faqs" ? "true" : "false"}
106111
>
107-
<label
108-
for="form-tabs-3-input"
109-
role="tab"
110-
aria-selected={this.props.page === "faq" ? "true" : "false"}
111-
>
112-
FAQ
113-
</label>
114-
</li>
115-
</Link> */}
112+
FAQs
113+
</label>
114+
</li>
115+
</Link>
116116
</ul>
117117
{session && (
118118
<div className="user-info__right">

pages/faqs.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import Header from "../components/Header";
2+
import FaqsSection from "../components/FaqsSection";
3+
import { faq_data } from "../utils/constants";
4+
5+
const Faqs = () => {
6+
return (
7+
<div>
8+
<style jsx>
9+
{`
10+
.faq-container {
11+
color: #36c;
12+
flex-grow: 0;
13+
overflow: auto;
14+
height: 60vh;
15+
}
16+
`}
17+
</style>
18+
<Header page="faqs" />
19+
<div>
20+
<div className="container p-0">
21+
<div className="main-content">
22+
<h4>Frequently Asked Questions</h4>
23+
<div className="faq-container">
24+
<FaqsSection faqs_data={faq_data} />
25+
</div>
26+
</div>
27+
</div>
28+
</div>
29+
</div>
30+
);
31+
};
32+
33+
export default Faqs;

pages/queue.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ const Queue = ({ data }) => {
7474
marginTop: "2em",
7575
}}
7676
>
77-
<h4>Search Book</h4>
7877
<div className="cdx-search-input cdx-search-input--has-end-button">
7978
<div
8079
className="cdx-text-input cdx-text-input--has-start-icon"

utils/constants.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ export const faq_data = [
2929
{
3030
que: "What are the future enhancements?",
3131
ans:
32-
"Bulk upload future, MediaWiki OAuth integration and Direct uploading to Commons.",
32+
"Bulk upload feature, direct upload to Wikimedia Commons and addition of newer libraries are some features being actively worked upon.",
3333
},
3434
{
3535
que: "Can I upload my own book?",
3636
ans:
37-
"If an appropriate license is attached to the book which allows it to be archived(which doesn't allow copyright infringement suits, etc.), then book can be uploaded.",
37+
"If an appropriate license is attached to the book which allows it to be archived (which doesn't allow copyright infringement suits, etc.), then book can be uploaded.",
3838
},
3939
{
4040
que: "Can I delete or undo an upload?",
4141
ans:
42-
"Archives are supposed to be read-only and deleting is a 'write' operation. So it doesn't support.",
42+
"Archives are supposed to be read-only and deleting is a 'write' operation. So it is not supported.",
4343
},
4444
];

0 commit comments

Comments
 (0)