Files
COS498-HW3/frontend/public/styles/main.css
T
2025-11-25 22:55:02 +00:00

326 lines
5.9 KiB
CSS

/* Themeing */
:root {
--primary-color: #4C5454;
--secondary-color: #fff;
--accent-color: #AEF78E;
--tertiary-color: #2E0014;
--additional-color: #B80C09;
--sidebar-width: 320px;
--navbar-height: 60px;
--border-radius: 8px;
--shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
/* Reset and base styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
background-color: var(--secondary-color);
overflow: hidden;
height: 100vh;
}
/* Navigation Bar */
.navbar {
background-color: var(--primary-color);
color: var(--secondary-color);
height: var(--navbar-height);
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1000;
display: flex;
align-items: center;
box-shadow: var(--shadow);
}
.navbar-content {
width: 100%;
padding: 0 20px;
}
.navbar-brand {
display: flex;
align-items: center;
gap: 12px;
font-size: 1.2rem;
font-weight: bold;
}
.navbar-brand i {
font-size: 1.4rem;
color: var(--accent-color);
}
/* Main Container */
.main-container {
display: flex;
height: 100vh;
margin-top: var(--navbar-height);
}
/* Sidebar */
.sidebar {
width: var(--sidebar-width);
background-color: #f8f9fa;
border-right: 2px solid #e9ecef;
display: flex;
flex-direction: column;
height: calc(100vh - var(--navbar-height));
overflow: hidden;
}
.sidebar-header {
background-color: var(--primary-color);
color: var(--secondary-color);
padding: 15px 20px;
border-bottom: 1px solid #e9ecef;
}
.sidebar-header h3 {
font-size: 1.1rem;
font-weight: 600;
}
.sidebar-content {
flex: 1;
overflow-y: auto;
padding: 20px;
}
/* Books Section */
.books-section {
margin-bottom: 30px;
}
.books-section h4,
.chapters-section h4 {
color: var(--primary-color);
margin-bottom: 12px;
font-size: 1rem;
font-weight: 600;
border-bottom: 2px solid var(--accent-color);
padding-bottom: 5px;
}
.books-list {
margin-bottom: 20px;
}
.book-item {
background-color: var(--secondary-color);
padding: 12px 15px;
margin-bottom: 8px;
border-radius: var(--border-radius);
border: 2px solid #e9ecef;
cursor: pointer;
transition: all 0.2s ease;
font-weight: 500;
}
.book-item:hover {
background-color: var(--accent-color);
border-color: var(--primary-color);
color: var(--primary-color);
transform: translateX(5px);
}
.book-item.selected {
background-color: var(--primary-color);
color: var(--secondary-color);
border-color: var(--primary-color);
}
/* Chapters Section */
.chapters-section {
animation: slideDown 0.3s ease;
}
.chapters-list {
overflow-y: auto;
}
.chapter-item {
background-color: var(--secondary-color);
padding: 10px 12px;
margin-bottom: 6px;
border-radius: var(--border-radius);
border: 1px solid #e9ecef;
cursor: pointer;
transition: all 0.2s ease;
font-size: 0.95rem;
}
.chapter-item:hover {
background-color: var(--accent-color);
border-color: var(--primary-color);
color: var(--primary-color);
transform: translateX(3px);
}
.chapter-item.selected {
background-color: var(--additional-color);
color: var(--secondary-color);
border-color: var(--additional-color);
}
/* Content Area */
.content-area {
flex: 1;
height: calc(100vh - var(--navbar-height));
overflow: hidden;
}
.pdf-container {
height: 100%;
position: relative;
}
.pdf-placeholder {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
background-color: #f8f9fa;
color: #6c757d;
}
.placeholder-content {
text-align: center;
padding: 40px;
}
.placeholder-content i {
font-size: 4rem;
margin-bottom: 20px;
color: #dee2e6;
}
.placeholder-content h2 {
font-size: 1.5rem;
margin-bottom: 10px;
color: var(--primary-color);
}
.placeholder-content p {
font-size: 1rem;
color: #6c757d;
}
.pdf-viewer {
width: 100%;
height: 100%;
border: none;
}
/* Loading and utility classes */
.loading {
text-align: center;
color: #6c757d;
font-style: italic;
padding: 20px;
}
.error {
color: var(--additional-color);
background-color: #f8d7da;
border: 1px solid #f5c6cb;
border-radius: var(--border-radius);
padding: 10px;
margin: 10px 0;
font-size: 0.9rem;
}
/* Animations */
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Scrollbar styling */
.sidebar-content::-webkit-scrollbar,
.chapters-list::-webkit-scrollbar {
width: 6px;
}
.sidebar-content::-webkit-scrollbar-track,
.chapters-list::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 3px;
}
.sidebar-content::-webkit-scrollbar-thumb,
.chapters-list::-webkit-scrollbar-thumb {
background: #c1c1c1;
border-radius: 3px;
}
.sidebar-content::-webkit-scrollbar-thumb:hover,
.chapters-list::-webkit-scrollbar-thumb:hover {
background: #a8a8a8;
}
/* Responsive Design */
@media (max-width: 768px) {
:root {
--sidebar-width: 280px;
}
.main-container {
flex-direction: column;
}
.sidebar {
width: 100%;
height: 300px;
}
.content-area {
height: calc(100vh - var(--navbar-height) - 300px);
}
}
/* Legacy styles - keeping for compatibility */
a .active {
background-color: var(--accent-color);
color: var(--primary-color);
}
#navbar_frame {
width: 100%;
border: none;
height: 55px;
overflow: hidden;
}
#notable_ac_table {
padding-left: 45px;
padding-right: 45px;
width: 100%;
}
.notable_ac_table_img {
width: 100%;
}
.notable_ac_table_caption {
font-weight: bolder;
font-size: 30px;
}
.notable_ac_table_caption > a {
text-decoration: none;
color: black;
}