knight f4f227b24d Implement Google Books API integration for book updates and enhance library management features
- Added a new endpoint in `index.js` to update book data using the Google Books API, allowing for real-time updates based on ISBN.
- Introduced a `rebuild_book_entries` function in `libraryManager.py` to facilitate user-driven updates of book entries from the Google Books API.
- Enhanced error handling and user prompts for better interaction during book updates.
- Updated `public/index.html` and `public/script.js` to improve the user interface and support new functionalities.
- Modified styles in `public/styles.css` to enhance the layout and usability of the checkout button and location prompt.
2024-12-12 10:32:20 -05:00

246 lines
4.3 KiB
CSS

#interactive.viewport {
position: relative;
width: 100%;
height: 400px;
overflow: hidden;
border: 2px solid #000;
background-color: #c0c0c0;
}
canvas.drawing, canvas.drawingBuffer {
position: absolute;
top: 0;
left: 0;
}
#book-info {
margin-top: 20px;
font-family: 'Courier New', Courier, monospace;
background-color: #f0f0f0;
border: 1px solid #000;
padding: 10px;
}
#prompt {
display: none;
margin-top: 20px;
font-family: 'Courier New', Courier, monospace;
background-color: #f0f0f0;
border: 1px solid #000;
padding: 10px;
}
#prompt-message {
font-weight: bold;
font-family: 'Courier New', Courier, monospace;
color: #800000;
}
#book-title, #book-author, #book-desc {
margin-top: 10px;
font-size: 16px;
font-family: 'Courier New', Courier, monospace;
color: #800000;
}
body {
font-family: 'Courier New', Courier, monospace;
background-color: #ddd4b0;
color: #000;
margin: 0;
padding: 0;
}
h1 {
text-align: center;
color: #800000;
font-size: 24px;
margin-top: 20px;
}
#search-bar {
display: block;
margin: 20px auto;
width: 80%;
padding: 10px;
font-size: 16px;
border: 2px solid #000;
background-color: #f0f0f0;
}
body.dark-mode #search-bar {
background-color: #333;
color: #fff;
border-color: #444;
}
#dark-mode-toggle {
position: fixed;
top: 10px;
right: 10px;
width: 40px;
height: 40px;
background-color: rgba(255, 255, 255, 0.5);
border: none;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
transition: background-color 0.3s;
opacity: 0.7;
}
#dark-mode-toggle:hover {
background-color: rgba(255, 255, 255, 0.7);
opacity: 1;
}
body.dark-mode #dark-mode-toggle {
background-color: rgba(0, 0, 0, 0.5);
}
body.dark-mode #dark-mode-toggle:hover {
background-color: rgba(0, 0, 0, 0.7);
}
table {
width: 90%;
margin: 20px auto;
border-collapse: collapse;
background-color: #fff;
}
th, td {
border: 1px solid #000;
padding: 10px;
text-align: left;
font-size: 14px;
}
th {
background-color: #c0c0c0;
cursor: pointer;
}
th:hover {
background-color: #a0a0a0;
}
a {
color: #800000;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
#book-table-body tr:nth-child(even) {
background-color: #f0f0f0;
}
#book-table-body tr:nth-child(odd) {
background-color: #e0e0e0;
}
#book-table-body tr:hover {
background-color: #d0d0d0;
}
#book-info, #prompt, #book-title, #book-author, #book-desc, th, td, body {
font-size: 18px;
font-weight: bold;
}
#search-bar:focus {
outline-color: #800000;
outline-style: solid;
outline-width: 2px;
}
body.dark-mode {
background-color: #121212;
color: #ffffff;
}
body.dark-mode table {
background-color: #2b2b2b;
}
body.dark-mode th, body.dark-mode td {
border-color: #444;
}
body.dark-mode button {
background-color: #333;
color: #fff;
}
body.dark-mode th {
background-color: #3a3a3a;
}
body.dark-mode td {
background-color: #2b2b2b;
}
body.dark-mode #book-table-body tr:nth-child(even) {
background-color: #333;
}
body.dark-mode #book-table-body tr:nth-child(odd) {
background-color: #2b2b2b;
}
body.dark-mode #book-table-body tr:hover {
background-color: #444;
}
/* Center the checkout button and make it fill the cell */
#book-table td button {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
}
/* Add more styles as needed for other elements */
#location-prompt {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #fff;
color: #000;
padding: 20px;
border: 2px solid #000;
z-index: 1000;
}
#location-prompt label {
display: block;
margin-bottom: 5px;
}
#location-prompt input {
width: 100%;
padding: 8px;
margin-bottom: 10px;
}
#location-prompt select {
width: 100%;
padding: 8px;
margin-bottom: 10px;
}
#location-prompt button {
padding: 8px 16px;
}