mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2025-04-18 15:31:17 -04:00
feat: initial commit
This commit is contained in:
parent
d667833847
commit
fcb8e17d6b
3 changed files with 52 additions and 0 deletions
5
library/css/style.css
Normal file
5
library/css/style.css
Normal file
|
@ -0,0 +1,5 @@
|
|||
.navbar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-content: center;
|
||||
}
|
27
library/index.html
Normal file
27
library/index.html
Normal 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
20
library/js/script.js
Normal 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) {
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue