feat: initial commit

This commit is contained in:
Smigz 2023-11-18 19:57:34 -05:00
parent d667833847
commit fcb8e17d6b
3 changed files with 52 additions and 0 deletions

5
library/css/style.css Normal file
View file

@ -0,0 +1,5 @@
.navbar {
display: flex;
justify-content: space-between;
align-content: center;
}

27
library/index.html Normal file
View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/style.css">
<title>Anonymous Library</title>
</head>
<body>
<div class="container">
<nav class="navbar">
<h1 class="header">Anonymous BookClub</h1>
<ul>
<li>Search Books</li>
<li>Add Book</li>
</ul>
</nav>
<div class="content">
</div>
<footer>
</footer>
</div>
<script src="js/script.js"></script>
</body>
</html>

20
library/js/script.js Normal file
View file

@ -0,0 +1,20 @@
const myLibrary = [];
function Book(title, author, pages, read) {
this.title = title;
this.author = author;
this.pages = pages;
this.read = read;
this.info = function(){
// returns book info
let haveRead = this.read ? "have read" : "have not read";
return `${this.title}, by ${this.author}, ${this.pages} pages, ${haveRead}`;
};
}
function addBookToLibrary(book) {
}