Skip to content

Commit 645fe14

Browse files
committed
feat: Add of the 'Privacy Policy' and 'Terms & Conditions' inner page
1 parent 70f1756 commit 645fe14

File tree

11 files changed

+674
-16
lines changed

11 files changed

+674
-16
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Bookffee",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "Bookffee is a website to search for books, which allows you to know their prices and synopses, as well as being able to filter them by genre, popularity and date.",
55
"main": "app.js",
66
"scripts": {

public/css/legal-pages.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#main-section {
2+
color: #fafafa;
3+
}
4+
5+
#main-section a {
6+
color: #eeb842;
7+
transition: color 0.25s ease-in-out !important;
8+
}
9+
10+
#main-section a:hover {
11+
color: #ffcb5c;
12+
}
13+

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ the opening of an issue to check the change you want to make.
4343

4444
## Project Status:
4545

46-
### `Version: 1.0.0` | `Still in Development`
46+
### `Version: 1.1.0`
4747
<!-- <h3><i>You can access Bookffee by clicking <a href="" target="_blank">here</a>.</i></h3> -->
4848

4949
## License

routes/index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,20 @@ router.get('/books', async (req, res) => { // Book details route
103103
} catch (err) { res.status(404).render('page-not-found'); }
104104
});
105105

106+
router.get('/terms-conditions', async (req, res) => { // Terms & Conditions route
107+
try {
108+
res.render('terms-conditions', { sectionTitle: 'Terms & Conditions' });
109+
// In case there's an error, redirect the user to the 404 error page
110+
} catch (err) { res.status(404).render('page-not-found'); }
111+
});
112+
113+
router.get('/privacy-policy', async (req, res) => { // Privacy Policy route
114+
try {
115+
res.render('privacy-policy', { sectionTitle: 'Privacy Policy' });
116+
// In case there's an error, redirect the user to the 404 error page
117+
} catch (err) { res.status(404).render('page-not-found'); }
118+
});
119+
106120
router.post('/search', (req, res) => {
107121
// Action after the user inputs a book name in the page's searcher
108122
const { q: search } = req.body;

views/book-details.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<%- include( 'templates/head' , { home: '' , categories: '' , popular: '' ,
2-
recent: '' , pageStyle: 'css/book-details.css' }) %>
2+
pageStyle: 'css/book-details.css' }) %>
33

44
<div class="mb-5">
55
<section class="container-fluid row justify-content-center banner">
@@ -16,7 +16,7 @@
1616
<div class="row d-table ms-4 mt-5">
1717
<div class="col-md-auto">
1818
<% if (typeof(bookInfo.volumeInfo.authors) === 'object') { %>
19-
<h3><i class="main-data">Author:</i>&nbsp; <%= bookInfo.volumeInfo.authors[0] %>, and others</h3>
19+
<h3><i class="main-data">Author:</i>&nbsp; <%= bookInfo.volumeInfo.authors[0] %></h3>
2020
<% } else if (typeof(bookInfo.volumeInfo.authors) !== 'object') { %>
2121
<h3><i class="main-data">Author:</i>&nbsp; <%= bookInfo.volumeInfo.authors %></h3>
2222
<% } %>

views/books-section.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<%- include( 'templates/head' , { home: navbarHome , categories:
2-
navbarCategories , popular: navbarPopular, recent: '' ,
2+
navbarCategories , popular: navbarPopular,
33
pageStyle: 'css/books-section.css' }) %>
44

55
<div class='container-md'>

views/page-not-found.ejs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
<%- include('templates/head', {
2-
sectionTitle: "Page not Found (404)",
3-
home: "",
4-
categories: "",
5-
popular: "",
6-
recent: "",
7-
pageStyle: "css/pageNotFound.css"
8-
}) %>
1+
<%- include('templates/head', { sectionTitle: "Page not Found (404)" , home: ""
2+
, categories: "" , popular: "" , pageStyle: "css/pageNotFound.css" }) %>
93

104
<%- include("templates/footer") %>

views/privacy-policy.ejs

Lines changed: 396 additions & 0 deletions
Large diffs are not rendered by default.

views/templates/footer.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<h2>Get Help</h2>
1616
<ul class="list-unstyled footer-link footer-text">
1717
<li><a href="https://github.com/LucioFex/Bookffee">GitHub Repository</a></li>
18-
<li><a href="https://www.termsfeed.com/live/9536373f-6d92-48e8-8302-d110eb779777">Terms &amp; Conditions</a></li>
19-
<li><a href="https://www.termsfeed.com/live/5183445b-0ed9-4583-8f72-45caff7059f8">Privacy Policy</a></li>
18+
<li><a href="/terms-conditions">Terms &amp; Conditions</a></li>
19+
<li><a href="/privacy-policy">Privacy Policy</a></li>
2020
</ul>
2121
</div>
2222
<div class="col-md-3 mb-5">

views/templates/navbar.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
</div>
7373
</nav>
7474

75-
<% if (sectionTitle) { %>
75+
<% if (sectionTitle && !["Terms & Conditions", "Privacy Policy"].includes(sectionTitle)) { %>
7676
<div class="container-md">
7777
<div id="page-title"
7878
class="my-5 pb-3 text-center text-white border-bottom border-1 border-secondary">

0 commit comments

Comments
 (0)