Skip to content

ITP-May-25|NW | Rahwa Zeslus| Module-Data-Flows|Book library | Week2 #225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: book-library
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

You must title your PR like this:

COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
REGION | COHORT_NAME | FIRST_NAME LAST_NAME | PROJ_NAME

For example,

NW4 | Carol Owen | HTML-CSS-Module | Week1
London | May-2025 | Carol Owen | Sprint-1

Complete the task list below this message.
If your PR is rejected, check the task list.
Expand All @@ -18,7 +18,7 @@ If your PR is rejected, check the task list.
Self checklist

- [ ] I have committed my files one by one, on purpose, and for a reason
- [ ] I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
- [ ] I have titled my PR with REGION | COHORT_NAME | FIRST_NAME LAST_NAME | PROJ_NAME
- [ ] I have tested my changes
- [ ] My changes follow the [style guide](https://curriculum.codeyourfuture.io/guides/contributing/)
- [ ] My changes meet the [requirements](./README.md) of this task
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
167 changes: 90 additions & 77 deletions debugging/book-library/index.html
Original file line number Diff line number Diff line change
@@ -1,96 +1,109 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<title> </title>
<meta
charset="utf-8"
name="viewport"
content="width=device-width, initial-scale=1.0"
/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Book Library</title>

<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
/>
<link rel="stylesheet" type="text/css" href="style.css" />

<link rel="stylesheet" href="style.css" />
<script defer src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js" defer></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js" ></script>
<script defer src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>

<script src="script.js"></script>
</head>

<body>
<div class="jumbotron text-center">
<h1>Library</h1>
<p>Add books to your virtual library</p>
<h1>📚 Book Library</h1>
<p>Add books to your personal library</p>
</div>

<button data-toggle="collapse" data-target="#demo" class="btn btn-info">
Add new book
</button>
<div class="container mb-4">
<button
data-toggle="collapse"
data-target="#addBookForm"
class="btn btn-info mb-3"
>
+ Add New Book
</button>

<div id="addBookForm" class="collapse">
<div class="card card-body">
<div class="form-group">
<label for="title">Title:</label>
<input
type="text"
class="form-control"
id="title"
placeholder="e.g. The Hobbit"
required
/>

<div id="demo" class="collapse">
<div class="form-group">
<label for="title">Title:</label>
<input
type="title"
class="form-control"
id="title"
name="title"
required
/>
<label for="author">Author: </label>
<input
type="author"
class="form-control"
id="author"
name="author"
required
/>
<label for="pages">Pages:</label>
<input
type="number"
class="form-control"
id="pages"
name="pages"
required
/>
<label class="form-check-label">
<input
type="checkbox"
class="form-check-input"
id="check"
value=""
/>Read
</label>
<input
type="submit"
value="Submit"
class="btn btn-primary"
onclick="submit();"
/>
<label for="author">Author:</label>
<input
type="text"
class="form-control"
id="author"
placeholder="e.g. J.R.R. Tolkien"
required
/>

<label for="pages">Pages:</label>
<input
type="number"
class="form-control"
id="pages"
placeholder="e.g. 310"
required
/>

<div class="form-check my-2">
<input type="checkbox" class="form-check-input" id="check" />
<label class="form-check-label" for="check">Read</label>
</div>

<input
type="submit"
value="Submit"
class="btn btn-primary"
onclick="submit();"
/>
<small id="message" class="form-text text-danger mt-2"></small>
</div>
</div>
</div>

<input
type="text"
id="search"
class="form-control mt-4"
placeholder="🔍 Search by title or author..."
oninput="render()"
/>
</div>

<table class="table" id="display">
<thead class="thead-dark">
<tr>
<th>Title</th>
<th>Author</th>
<th>Number of Pages</th>
<th>Read</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<div class="container">
<table class="table table-bordered table-hover" id="display">
<thead class="thead-dark">
<tr>
<th>Title</th>
<th>Author</th>
<th>Pages</th>
<th>Read</th>
<th>Actions</th>
</tr>
</thead>
<tbody>

</tbody>
</table>
</div>

<script src="script.js"></script>
</body>
</html>
Loading