generated from CodeYourFuture/Module-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 122
London | ITP-May-2025 | Hibo Sharif | Module-Data-Group | Sprint2 | Book Library #249
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
hibosharif202504
wants to merge
17
commits into
CodeYourFuture:main
Choose a base branch
from
hibosharif202504:feature/book-library
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a21d0c4
updated the delButton variable to match the delBut in the rest in the…
c357ade
Added a bracket to the for-loop in the render function.
005bee7
I have corrected the title.value to author.value
99c322f
Updated the variable library in submit() function to myLibrary.
aa246d7
Added .forEach() to run through each element in the array.
fe25217
I have fixed a typo in the event type "clicks" to "click"
a6cb098
Updated the read/unread button
1dcad48
Added deleteCell and appended the call to appear in the website.
1c985f6
Added local storage to the file.
48680db
shortened the myLibrary.push into one line
1cbaa37
Updated the index.html file
219e1cc
Updated the css.style file
6780b44
updated the style.css file
e48d91a
updated index.html to submit the new book entries
a2fdbc0
add live server configuration
2c631e6
I have updated the script.js , index.html ans the style.css files acc…
044558c
Delete .vscode/settings.json
hibosharif202504 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,96 +1,68 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<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> | ||
<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" /> | ||
</head> | ||
<html lang="en"> | ||
|
||
<body> | ||
<div class="jumbotron text-center"> | ||
<h1>Library</h1> | ||
<p>Add books to your virtual library</p> | ||
</div> | ||
<head> | ||
<title>Book Library</title> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
<button data-toggle="collapse" data-target="#demo" class="btn btn-info"> | ||
Add new book | ||
</button> | ||
<!-- Bootstrap and jQuery --> | ||
<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> | ||
|
||
<div id="demo" class="collapse"> | ||
<!-- Stylesheets --> | ||
<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"> | ||
</head> | ||
|
||
<body> | ||
<div class="jumbotron text-center"> | ||
<h1>Library</h1> | ||
<p>Add books to your virtual library</p> | ||
</div> | ||
|
||
<button type="button" data-toggle="collapse" data-target="#demo" class="btn btn-info" aria-expanded="false" | ||
aria-controls="demo" id="addBookBtn"> | ||
Add new book | ||
</button> | ||
|
||
<div id="demo" class="collapse" aria-labelledby="addBookBtn"> | ||
<form id="book-form"> | ||
<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 | ||
/> | ||
<input type="text" class="form-control" id="title" required> | ||
|
||
<label for="author">Author:</label> | ||
<input type="text" class="form-control" id="author" required> | ||
|
||
<label for="pages">Number of Pages:</label> | ||
<input type="number" class="form-control" id="pages" min="1" required> | ||
|
||
<label class="form-check-label"> | ||
<input | ||
type="checkbox" | ||
class="form-check-input" | ||
id="check" | ||
value="" | ||
/>Read | ||
<input type="checkbox" class="form-check-input" id="check" value="read" name="read">Read | ||
</label> | ||
<input | ||
type="submit" | ||
value="Submit" | ||
class="btn btn-primary" | ||
onclick="submit();" | ||
/> | ||
|
||
<input type="submit" value="Submit" class="btn btn-primary"> | ||
</div> | ||
</div> | ||
</form> | ||
</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>Delete</th> | ||
</tr> | ||
</thead> | ||
<tbody></tbody> | ||
</table> | ||
|
||
<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> | ||
<!-- Your main script --> | ||
<script src="script.js"></script> | ||
</body> | ||
|
||
<script src="script.js"></script> | ||
</body> | ||
</html> | ||
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
.form-group { | ||
width: 400px; | ||
height: 300px; | ||
align-self: left; | ||
padding-left: 20px; | ||
max-width: 400px; | ||
margin: 20px auto; | ||
padding: 20px; | ||
background-color: #f8f9fa; | ||
border-radius: 10px; | ||
} | ||
|
||
.btn { | ||
display: block; | ||
margin: 10px 0; | ||
} | ||
|
||
.form-check-label { | ||
padding-left: 20px; | ||
margin: 5px 0px 5px 0px; | ||
margin: 10px 0; | ||
display: inline-block; | ||
} | ||
|
||
input[type="submit"] { | ||
margin-top: 10px; | ||
} | ||
|
||
button.btn-info { | ||
margin: 20px; | ||
margin: 20px auto; | ||
display: block; | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.