-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
389 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,199 @@ | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; | ||
} | ||
|
||
:root { | ||
--primary-color: #aa5040; | ||
--text-color-light: #ededed; | ||
} | ||
|
||
header { | ||
background-color: var(--primary-color); | ||
padding: 10px; | ||
} | ||
|
||
#navbar { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 0 20px; | ||
} | ||
|
||
#navbar h2 { | ||
margin: 0; | ||
} | ||
|
||
#navbar ul { | ||
list-style-type: none; | ||
display: flex; | ||
margin-left: auto; | ||
} | ||
|
||
#navbar ul li { | ||
margin-left: 16px; | ||
} | ||
|
||
#navbar ul li a { | ||
text-decoration: none; | ||
color: var(--text-color-light); | ||
} | ||
|
||
.welcome { | ||
background-color: var(--text-color-light); | ||
padding: 20px; | ||
text-align: center; | ||
} | ||
|
||
.search { | ||
text-align: center; | ||
padding: 20px; | ||
} | ||
|
||
.search input[type="text"] { | ||
padding: 10px; | ||
width: 190px; | ||
border-radius: 10px; | ||
} | ||
|
||
.search button[type="submit"] { | ||
padding: 10px 20px; | ||
background-color: #333; | ||
color: var(--text-color-light); | ||
border: none; | ||
cursor: pointer; | ||
border-radius: 10px; | ||
} | ||
|
||
/* Featured books section styles */ | ||
.featured-books { | ||
padding: 20px; | ||
overflow: hidden; | ||
text-align: center; | ||
} | ||
|
||
.featured-books h2 { | ||
margin-bottom: 10px; | ||
padding: 10px; | ||
} | ||
|
||
.img1 { | ||
width: 150px; | ||
display: flex; | ||
} | ||
|
||
.img1 img { | ||
width: 100%; | ||
padding: 10px; | ||
float: left; | ||
box-sizing: border-box; | ||
} | ||
|
||
/* Footer styles */ | ||
footer { | ||
background-color: var(--primary-color); | ||
padding: 10px; | ||
text-align: center; | ||
position: static; | ||
} | ||
|
||
.contact-info p { | ||
margin-bottom: 10px; | ||
color: var(--text-color-light); | ||
} | ||
|
||
.static-pages ul { | ||
list-style-type: none; | ||
} | ||
|
||
.static-pages ul li { | ||
display: inline; | ||
margin-right: 10px; | ||
} | ||
|
||
.static-pages ul li a { | ||
text-decoration: none; | ||
color: var(--text-color-light); | ||
} | ||
|
||
.book-img { | ||
float: left; | ||
} | ||
|
||
.book-img { | ||
max-width: 100%; | ||
height: auto; | ||
} | ||
|
||
.add-to-cart-button { | ||
background-color: var(--primary-color); | ||
color: #fff; | ||
padding: 5px 11px; | ||
border: none; | ||
cursor: pointer; | ||
border-radius: 5px; | ||
font-size: 14px; | ||
margin-top: 8px; | ||
} | ||
|
||
.img1 { | ||
padding: 20px; | ||
display: -webkit-box; | ||
} | ||
.book-container { | ||
text-align: center; | ||
margin: 10px; | ||
} | ||
#cart { | ||
top: -360px; | ||
border: 1px solid #ddd; | ||
padding: 10px; | ||
border-radius: 5px; | ||
background-color: #f5f5f5; | ||
width: 300px; | ||
height: 300px; /* Set a fixed height for the cart container */ | ||
overflow-y: auto; | ||
float: right; | ||
position: relative; | ||
} | ||
#cart h2 { | ||
font-size: 24px; | ||
margin: 0; | ||
color: #333; | ||
border-bottom: 1px solid #ccc; | ||
padding-bottom: 10px; | ||
} | ||
#cart-items { | ||
list-style-type: none; | ||
padding: 0; | ||
} | ||
#cart-items li { | ||
font-size: 18px; | ||
margin-bottom: 10px; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
background-color: #fff; | ||
padding: 10px; | ||
border: 1px solid #ccc; | ||
border-radius: 5px; | ||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); | ||
} | ||
#cart-items img { | ||
max-width: 50px; | ||
max-height: 75px; | ||
} | ||
.checkout-button { | ||
background-color: #4CAF50; | ||
color: white; | ||
border: none; | ||
padding: 10px 15px; | ||
cursor: pointer; | ||
border-radius: 5px; | ||
transition: background-color 0.3s ease; | ||
margin-top: 10px; | ||
} | ||
.checkout-button:hover { | ||
background-color: #45a049; | ||
} |
This file contains 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 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 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
window.addEventListener('DOMContentLoaded', () => { | ||
const navbarDiv = document.getElementById('navbar'); | ||
const nav = document.createElement('nav'); | ||
nav.style.backgroundColor = '#aa5040'; | ||
nav.style.padding = '5px'; | ||
nav.style.textDecoration = 'none'; | ||
nav.style.textDecorationColor = '#ffff'; | ||
|
||
nav.innerHTML = ` | ||
<ul style="display: flex; justify-content: space-between; align-items: center;"> | ||
<li> | ||
<strong style="font-weight: bold; color: black; font-size: 20px;">E-library</strong> | ||
</li> | ||
<li style="display: inline; margin-left: auto;"> | ||
<a href="../index.html" class="nav-link">Home</a> | ||
</li> | ||
<li style="display: inline; margin-left: 10px;"> | ||
<a href="books.html" class="nav-link">Books</a> | ||
</li> | ||
<li style="display: inline; margin-left: 10px;"> | ||
<a href="about-us.html" class="nav-link">About Us</a> | ||
</li> | ||
<li style="display: inline; margin-left: 10px;"> | ||
<a href="contact.html" class="nav-link">Contact</a> | ||
</li> | ||
<li style="display: inline; margin-left: 10px;"> | ||
<a href="login.html" class="nav-link">Log In</a> | ||
</li> | ||
</ul> | ||
`; | ||
|
||
const navLinks = nav.querySelectorAll('a.nav-link'); | ||
navLinks.forEach(link => { | ||
link.style.color = '#ededed'; | ||
link.style.textDecoration = 'none'; | ||
}); | ||
|
||
navbarDiv.appendChild(nav); | ||
|
||
// Add CSS styles to make text bold | ||
const navLinksNew = nav.querySelectorAll('.nav-link'); | ||
navLinksNew.forEach(link => { | ||
link.style.textDecoration = 'none'; | ||
link.style.color = 'white'; | ||
link.style.marginRight = '10px'; // Add margin to the right | ||
}); | ||
}); |
Oops, something went wrong.