improve the ui and fix the alignment of the components

This commit is contained in:
2026-01-02 18:27:41 +05:30
parent 6ff5a934b0
commit bb0531d6f8
11 changed files with 1911 additions and 614 deletions

View File

@@ -1,15 +1,11 @@
/*Page2.css*/
/* General Styles */
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
/* Page Container */
.page-container {
display: flex;
flex-direction: column;
height: 100vh; /* Full screen height */
overflow: hidden; /* Prevent scrollbars unless necessary */
background-color: #fff; /* Solid background */
min-height: 100vh;
background-color: var(--off-white);
}
/* Header Bar */
@@ -17,43 +13,38 @@ body {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20px; /* Adjust padding on the sides */
height: auto; /* Allow header to adjust based on content */
min-height: 100px; /* Minimum height for the header */
background-color: white;
border-bottom: 2px solid #ccc;
width: 100%;
box-sizing: border-box;
padding: 15px 40px;
background-color: var(--white);
box-shadow: var(--shadow-sm);
position: sticky;
top: 0;
z-index: 100;
gap: 20px;
}
.header-bar .leftlogo,
.header-bar .rightlogo {
height: 60px; /* Adjust the logo size */
height: 55px;
width: auto;
object-fit: contain; /* Ensure logos don't stretch */
object-fit: contain;
flex-shrink: 0;
}
.header-bar .college-name {
font-size: 28px; /* Adjust font size to prevent overflow */
font-weight: bold;
color: #B7202E;
font-size: clamp(20px, 3vw, 28px);
font-weight: 700;
color: var(--primary-red);
text-align: center;
flex-grow: 1;
padding: 0 10px;
z-index: 10;
white-space: nowrap; /* Prevent text from wrapping */
overflow: visible; /* Ensure text is not cut off */
text-overflow: clip; /* Remove ellipsis */
margin: 0 20px; /* Add margin to prevent cutting off */
margin: 0;
letter-spacing: -0.5px;
}
/* Navigation Bar */
.navbar {
background-color: rgb(228, 227, 227);
padding: 10px 20px;
display: flex;
justify-content: center;
width: 100%;
background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
padding: 0 40px;
box-shadow: var(--shadow-sm);
}
.navbar ul {
@@ -62,23 +53,43 @@ body {
padding: 0;
display: flex;
justify-content: center;
flex-wrap: wrap;
gap: 5px;
}
.navbar ul li {
margin-right: 20px;
margin-left: 30px;
margin: 0;
}
.navbar ul li a {
color: black;
display: block;
color: var(--white);
text-decoration: none;
font-weight: bold;
text-align: center;
font-weight: 500;
padding: 16px 24px;
transition: var(--transition);
position: relative;
}
.navbar ul li a::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
width: 0;
height: 3px;
background-color: var(--white);
transition: var(--transition);
transform: translateX(-50%);
}
.navbar ul li a:hover::after,
.navbar ul li a.active::after {
width: calc(100% - 48px);
}
.navbar ul li a:hover {
text-decoration: underline;
color: red;
background-color: rgba(255, 255, 255, 0.1);
}
/* Main Container */
@@ -86,94 +97,209 @@ body {
display: flex;
flex: 1;
width: 100%;
height: calc(100vh - 160px); /* Subtract the height of the header and footer */
}
/* Stream Bar (Right Side) */
.stream-bar {
width: 20%;
background-color: #f0f0f0;
border-left: 2px solid #ccc;
padding: 20px;
box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
height: 100%;
position: relative;
}
.stream-bar h3 {
margin-top: 0;
font-size: 18px;
color: #333;
}
.stream-bar ul {
list-style: none;
padding: 0;
margin: 10px 0;
}
.stream-bar ul li {
padding: 10px;
cursor: pointer;
border-bottom: 1px solid #ddd;
transition: background-color 0.3s;
}
.stream-bar ul li a {
color: black; /* Change the link text to white on hover */
}
.stream-bar ul li:hover {
background-color: #B7202E;
color: white;
}
.stream-bar ul li:hover a {
color: white; /* Change the link text to white on hover */
min-height: calc(100vh - 200px);
}
/* Content Area (Left Side) */
.content-area {
flex: 1;
padding: 20px;
background-color: #fff;
border-left: 2px solid #ccc;
padding: 40px;
background-color: var(--white);
overflow-y: auto;
height: 100%;
box-sizing: border-box;
}
.content-area h2 {
color: var(--primary-red);
font-size: 28px;
font-weight: 600;
margin-bottom: 20px;
}
.content-area p {
color: var(--darker-gray);
line-height: 1.8;
}
/* Stream Bar (Right Side) */
.stream-bar {
width: 280px;
min-width: 280px;
background-color: var(--white);
border-left: 1px solid var(--medium-gray);
padding: 30px 20px;
box-shadow: -4px 0 20px rgba(0, 0, 0, 0.05);
}
.stream-bar h3 {
font-size: 18px;
font-weight: 700;
color: var(--primary-red);
margin-bottom: 20px;
padding-bottom: 12px;
border-bottom: 2px solid var(--primary-red);
text-transform: uppercase;
letter-spacing: 1px;
}
.stream-bar ul {
list-style: none;
padding: 0;
margin: 0;
}
.stream-bar ul li {
padding: 14px 16px;
cursor: pointer;
border-radius: var(--border-radius);
margin-bottom: 8px;
transition: var(--transition);
font-weight: 500;
color: var(--darker-gray);
border: 1px solid transparent;
}
.stream-bar ul li a {
color: inherit;
text-decoration: none;
display: block;
}
.stream-bar ul li:hover {
background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
color: var(--white);
transform: translateX(5px);
box-shadow: var(--shadow-md);
}
.stream-bar ul li:hover a {
color: var(--white);
}
.stream-bar ul li.active {
background-color: var(--primary-red);
color: var(--white);
border-color: var(--dark-red);
}
/* Footer Styles */
footer {
background-color: white;
padding: 10px;
background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
padding: 20px 40px;
text-align: center;
width: 100%;
box-sizing: border-box;
margin-top: auto;
position: relative;
}
.terms {
display: flex;
justify-content: center;
align-items: center;
gap: 30px;
flex-wrap: wrap;
}
.terms a {
color: black;
color: var(--white);
text-decoration: none;
font-weight: bold;
font-size: 16px;
font-weight: 500;
font-size: 14px;
padding: 8px 16px;
border-radius: var(--border-radius-sm);
transition: var(--transition);
}
.terms a:hover {
text-decoration: underline;
background-color: rgba(255, 255, 255, 0.15);
}
.footer-image {
width: 100%;
margin-top: 10px;
margin-bottom: 0;
position: relative;
max-width: 1200px;
margin: 15px auto 0;
display: block;
opacity: 0.9;
}
/* Prevent any margin or padding from appearing above or below the page */
body, html {
margin: 0;
padding: 0;
/* Responsive Design */
@media (max-width: 1024px) {
.stream-bar {
width: 240px;
min-width: 240px;
}
.header-bar {
padding: 12px 20px;
}
.navbar {
padding: 0 20px;
}
}
@media (max-width: 768px) {
.main-container {
flex-direction: column;
}
.stream-bar {
width: 100%;
min-width: 100%;
border-left: none;
border-top: 1px solid var(--medium-gray);
padding: 20px;
}
.stream-bar ul {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 10px;
}
.stream-bar ul li {
margin-bottom: 0;
text-align: center;
}
.stream-bar ul li:hover {
transform: translateY(-3px);
}
.header-bar {
flex-direction: column;
padding: 15px;
gap: 10px;
}
.header-bar .college-name {
order: -1;
font-size: 22px;
}
.navbar ul {
justify-content: center;
}
.navbar ul li a {
padding: 12px 16px;
font-size: 14px;
}
.content-area {
padding: 25px;
}
}
@media (max-width: 480px) {
.stream-bar ul {
grid-template-columns: 1fr;
}
.navbar ul li a {
padding: 10px 12px;
font-size: 13px;
}
.terms {
flex-direction: column;
gap: 15px;
}
}