assignment page styling updated
This commit is contained in:
parent
cbc2d631fb
commit
1f7124a786
2 changed files with 90 additions and 20 deletions
|
|
@ -20,14 +20,13 @@ const AssignmentPage = () => {
|
||||||
|
|
||||||
const fetchAssignments = async () => {
|
const fetchAssignments = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await fetch("http://localhost:8082/assignments/instructor/9", {
|
const res = await fetch("http://localhost:8082/instructor/list/9", {
|
||||||
// credentials: "include",
|
// credentials: "include",
|
||||||
});
|
});
|
||||||
if (!res.ok) throw new Error("Failed to fetch");
|
if (!res.ok) throw new Error("Failed to fetch");
|
||||||
|
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
console.log("Fetched assignments:", data); // ✅ This line shows what’s coming from the API
|
|
||||||
setProjects(data);
|
|
||||||
|
|
||||||
// Optional: Remove duplicate assignment IDs if needed
|
// Optional: Remove duplicate assignment IDs if needed
|
||||||
const unique = Array.from(
|
const unique = Array.from(
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
.assignment-page {
|
.assignment-page {
|
||||||
max-width: 600px;
|
max-width: 100%;
|
||||||
margin: auto;
|
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
margin-top: 70rem;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
min-height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
form {
|
form {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
|
@ -44,32 +48,97 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.project-list {
|
// .project-list {
|
||||||
margin-top: 2rem;
|
// display: grid;
|
||||||
|
// grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||||
|
// gap: 1.5rem;
|
||||||
|
// margin-top: 2rem;
|
||||||
|
// padding-bottom: 3rem;
|
||||||
|
|
||||||
|
// .project-item {
|
||||||
|
// background: #ffffff;
|
||||||
|
// border: 1px solid #e0e0e0;
|
||||||
|
// border-radius: 12px;
|
||||||
|
// padding: 1.5rem;
|
||||||
|
// box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
|
||||||
|
// transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||||
|
|
||||||
|
// .project-meta {
|
||||||
|
// margin-bottom: 0.75rem;
|
||||||
|
|
||||||
|
// strong {
|
||||||
|
// color: #34495e;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// h4 {
|
||||||
|
// margin: 0.5rem 0;
|
||||||
|
// font-size: 1.2rem;
|
||||||
|
// color: #2d3436;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// p {
|
||||||
|
// margin: 0.25rem 0;
|
||||||
|
// color: #555;
|
||||||
|
// line-height: 1.4;
|
||||||
|
|
||||||
|
// strong {
|
||||||
|
// color: #2d3436;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .action-buttons {
|
||||||
|
// display: flex;
|
||||||
|
// gap: 0.5rem;
|
||||||
|
// margin-top: 0.75rem;
|
||||||
|
|
||||||
|
// button {
|
||||||
|
// background-color: #f4f4f4;
|
||||||
|
// border: 1px solid #ddd;
|
||||||
|
// border-radius: 6px;
|
||||||
|
// padding: 0.4rem 0.8rem;
|
||||||
|
// cursor: pointer;
|
||||||
|
// font-size: 0.9rem;
|
||||||
|
|
||||||
|
// &:hover {
|
||||||
|
// background-color: #e9ecef;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// &:nth-child(1) {
|
||||||
|
// color: #2c3e50;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// &:nth-child(2) {
|
||||||
|
// color: #c0392b;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// &:nth-child(3) {
|
||||||
|
// color: #16a085;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
h3 {
|
.project-list {
|
||||||
color: #4a90e2;
|
display: grid;
|
||||||
}
|
grid-template-columns: repeat(3, 1fr); // exactly 2 columns
|
||||||
|
gap: 1.5rem;
|
||||||
|
margin-top: 2rem;
|
||||||
|
padding-bottom: 3rem;
|
||||||
|
|
||||||
.project-item {
|
.project-item {
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border: 1px solid #e0e0e0;
|
border: 1px solid #e0e0e0;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
margin-bottom: 1.5rem;
|
|
||||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
|
||||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||||
|
overflow-wrap: break-word;
|
||||||
// &:hover {
|
box-shadow: rgb(211, 0, 197) 0px 0px 15px, rgb(255, 42, 109) 0px 0px 25px;
|
||||||
// transform: translateY(-2px);
|
|
||||||
// box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
|
|
||||||
// }
|
|
||||||
|
|
||||||
.project-meta {
|
.project-meta {
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 0.75rem;
|
margin-bottom: 0.75rem;
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
strong {
|
strong {
|
||||||
color: #34495e;
|
color: #34495e;
|
||||||
|
|
@ -104,7 +173,6 @@
|
||||||
padding: 0.4rem 0.8rem;
|
padding: 0.4rem 0.8rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
transition: background-color 0.2s ease;
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #e9ecef;
|
background-color: #e9ecef;
|
||||||
|
|
@ -126,6 +194,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.modal-overlay {
|
.modal-overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
@ -138,6 +207,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal {
|
.modal {
|
||||||
|
|
@ -148,6 +218,7 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
|
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
|
||||||
animation: fadeIn 0.3s ease;
|
animation: fadeIn 0.3s ease;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal h3 {
|
.modal h3 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue