Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
BrynnMartina authored Jul 18, 2023
1 parent e050fb5 commit f6cc69a
Show file tree
Hide file tree
Showing 12 changed files with 2,552 additions and 0 deletions.
27 changes: 27 additions & 0 deletions book1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<title>Book 1</title>
</head>
<body>
<h1>Book 1</h1>
<img class="book-image" src="book1.jpg" alt="Book 1">
<h2>Book Information</h2>
<p>Title: Book 1</p>
<p>Author: Author 1</p>
<p>Year: 2021</p>
<p>Genre: Fantasy</p>
<p>Rating: 4.5</p>
<p>Description: In a world of magic and adventure, follow the thrilling journey of
our protagonist as they uncover ancient secrets and battle mythical creatures.
This epic fantasy tale will transport you to a realm filled with enchantment,
bravery, and destiny. Prepare to be captivated by a story that will ignite your
imagination and leave you eagerly turning the pages until the very end.</p>

<h2>Recommendations</h2>
<ul>
<li>Recommended by User 1: Excellent book! I couldn't put it down.</li>
<li>Recommended by User 2: One of the best fantasy novels I've read.</li>
</ul>
</body>
</html>
Binary file added book1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions book2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<title>Book 2</title>
</head>
<body>
<h1>Book 2</h1>
<img class="book-image" src="book2.jpg" alt="Book 2">
<h2>Book Information</h2>
<p>Title: Book 2</p>
<p>Author: Author 2</p>
<p>Year: 2022</p>
<p>Genre: Mystery</p>
<p>Rating: 3.8</p>
<p>Description: Dive into a perplexing mystery that will keep you guessing until the
final twist. Follow our detective protagonist as they untangle a web of secrets,
deceit, and hidden agendas in a small town. With each clue leading to unexpected
revelations, you'll be on the edge of your seat, desperate to uncover the truth.
Prepare for a suspenseful journey through a labyrinth of intrigue that will leave
you breathless.</p>

<h2>Recommendations</h2>
<ul>
<li>Recommended by User 3: Gripping mystery with unexpected twists.</li>
<li>Recommended by User 4: A page-turner that kept me guessing until the end.</li>
</ul>
</body>
</html>
Binary file added book2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions book3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<title>Book 3</title>
</head>
<body>
<h1>Book 3</h1>
<img class="book-image" src="book3.jpg" alt="Book 3">
<h2>Book Information</h2>
<p>Title: Book 3</p>
<p>Author: Author 3</p>
<p>Year: 2020</p>
<p>Genre: Science Fiction</p>
<p>Rating: 4.2</p>
<p>Description: Embark on a mind-bending science fiction adventure that pushes the
boundaries of possibility. Set in a future where technology and humanity intertwine,
this thought-provoking tale explores the consequences of scientific advancements on
society. With imaginative world-building, complex characters, and ethical dilemmas,
this captivating story will make you question what it truly means to be human.
Brace yourself for a futuristic journey that will challenge your perceptions and
leave you pondering long after the last page.</p>

<h2>Recommendations</h2>
<ul>
<li>Recommended by User 5: A thought-provoking sci-fi novel that explores deep concepts.</li>
<li>Recommended by User 6: Engaging characters and an imaginative world.</li>
</ul>
</body>
</html>
Binary file added book3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html>
<head>
<title>Home Page</title>
<style>
.popular-books {
margin-top: 30px;
text-align: left;
}
.book {
display: inline-block;
margin: 10px;
}
.book-image {
width: 150px;
height: 200px;
object-fit: cover;
cursor: pointer;
}
</style>
</head>
<body>
<h1>Welcome to the Home Page</h1>

<button onclick="window.location.href = '/search'">Go to Search Page</button>
<button onclick="window.location.href = '/recommendation'">Go to Recommendation Page</button>

<h2>Popular Books</h2>

<div class="popular-books">
<div class="book" onclick="window.location.href = '/book1'">
<img class="book-image" src="book1.jpg" alt="Book 1">
<p>Title: Book 1</p>
<p>Author: Author 1</p>
<p>Rating: 4.5</p>
</div>
<div class="book" onclick="window.location.href = '/book2'">
<img class="book-image" src="book2.jpg" alt="Book 2">
<p>Title: Book 2</p>
<p>Author: Author 2</p>
<p>Rating: 3.8</p>
</div>
<div class="book" onclick="window.location.href = '/book3'">
<img class="book-image" src="book3.jpg" alt="Book 3">
<p>Title: Book 3</p>
<p>Author: Author 3</p>
<p>Rating: 4.2</p>
</div>
</div>
</body>
</html>
50 changes: 50 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
const express = require('express');
const app = express();
const port = 3000;

// Serve static files from the "public" directory
app.use(express.static('public'));

// Home page
app.get('/', (req, res) => {
res.sendFile(__dirname + '/public/index.html');
});

// Search page
app.get('/search', (req, res) => {
res.sendFile(__dirname + '/public/search.html');
});

// Recommendation page
app.get('/recommendation', (req, res) => {
res.sendFile(__dirname + '/public/recommendation.html');
});

// book1 page
app.get('/book1', (req, res) => {
res.sendFile(__dirname + '/public/book1.html');
});

// book2 page
app.get('/book2', (req, res) => {
res.sendFile(__dirname + '/public/book2.html');
});

// book3 page
app.get('/book3', (req, res) => {
res.sendFile(__dirname + '/public/book3.html');
});


// Start the server
app.listen(port, () => {
console.log(`Server is running on http://localhost:${port}`);
});

//Search page
const books = [
{ title: 'Book 1', author: 'Author 1', year: 2021, genre: 'Fantasy', rating: 4.5 },
{ title: 'Book 2', author: 'Author 2', year: 2022, genre: 'Mystery', rating: 3.8 },
{ title: 'Book 3', author: 'Author 3', year: 2020, genre: 'Science Fiction', rating: 4.2 }
];

Loading

0 comments on commit f6cc69a

Please sign in to comment.