style improvement
This commit is contained in:
parent
e96ec53ebd
commit
c364a11158
15 changed files with 638 additions and 1137 deletions
|
|
@ -1,23 +0,0 @@
|
|||
import React from "react";
|
||||
import { Navigate } from "react-router-dom";
|
||||
import { useAuth } from "../hooks/useAuth"; // 예시 훅: 너의 프로젝트에 맞게 수정!
|
||||
|
||||
const ProtectedRoute = ({ children, role }) => {
|
||||
const { user, isLoading } = useAuth();
|
||||
|
||||
if (isLoading) {
|
||||
return <div>loading...</div>;
|
||||
}
|
||||
|
||||
if (!user) {
|
||||
return <Navigate to="/login" replace />;
|
||||
}
|
||||
|
||||
if (role && user.role !== role) {
|
||||
return <Navigate to="/" replace />;
|
||||
}
|
||||
|
||||
return children;
|
||||
};
|
||||
|
||||
export default ProtectedRoute;
|
||||
|
|
@ -1,421 +0,0 @@
|
|||
.assignment-page {
|
||||
max-width: 100%;
|
||||
padding: 20px;
|
||||
margin-top: 50rem;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
|
||||
form {
|
||||
margin-bottom: 20px;
|
||||
|
||||
div {
|
||||
margin-bottom: 15px;
|
||||
|
||||
label {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
textarea,
|
||||
input[type="file"] {
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
height: 80px;
|
||||
resize: vertical;
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 8px 16px;
|
||||
background-color: #4285f4;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: #3367d6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.assignment-links a {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
|
||||
.project-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 1.5rem;
|
||||
margin-top: 2rem;
|
||||
padding-bottom: 7rem;
|
||||
|
||||
.project-item {
|
||||
background: #0f0f1a;
|
||||
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;
|
||||
overflow-wrap: break-word;
|
||||
// box-shadow: rgb(211, 0, 197) 0px 0px 15px, rgb(255, 42, 109) 0px 0px 25px;
|
||||
border: 2px solid rgb(75 187 236);
|
||||
|
||||
.project-meta {
|
||||
margin-bottom: 0.75rem;
|
||||
color: lightgray;
|
||||
|
||||
strong {
|
||||
color: #00bfff;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin: 0.5rem 0;
|
||||
font-size: 1.2rem;
|
||||
color: white;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 1rem 0;
|
||||
color: white;
|
||||
line-height: 1.4;
|
||||
font-size: 15px;
|
||||
// margin-bottom: 10px;
|
||||
|
||||
strong {
|
||||
color: #00bfff;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
margin-top: 0.75rem;
|
||||
|
||||
button {
|
||||
background-color: #000000;
|
||||
border: 2px solid #00bfff;
|
||||
border-radius: 6px;
|
||||
padding: 0.4rem 0.8rem;
|
||||
cursor: pointer;
|
||||
font-size: 0.9rem;
|
||||
|
||||
&:hover {
|
||||
background-color: #E4E4E4;
|
||||
border: 2px solid #E4E4E4;
|
||||
}
|
||||
|
||||
&:nth-child(1) {
|
||||
color: #007fff;
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
color: #c0392b;
|
||||
}
|
||||
|
||||
&:nth-child(3) {
|
||||
color: #16a085;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.modal-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 1000;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.modal {
|
||||
background: #f3f3f3;
|
||||
padding: 2rem;
|
||||
border-radius: 12px;
|
||||
max-width: 500px;
|
||||
width: 100%;
|
||||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
|
||||
animation: fadeIn 0.3s ease;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.modal form {
|
||||
background-color: #f3f3f3;
|
||||
}
|
||||
|
||||
.modal h3 {
|
||||
margin-bottom: 1rem;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.modal form > div {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.modal label {
|
||||
display: block;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 500;
|
||||
margin-bottom: 0.4rem;
|
||||
color: black
|
||||
}
|
||||
|
||||
.modal input[type="text"],
|
||||
.modal input[type="password"],
|
||||
.modal input[type="file"],
|
||||
.modal textarea {
|
||||
width: 100%;
|
||||
padding: 0.6rem 0.8rem;
|
||||
border: 1px solid #BBBBBB;
|
||||
border-radius: 6px;
|
||||
font-size: 0.95rem;
|
||||
transition: border-color 0.2s ease;
|
||||
background-color: white;
|
||||
|
||||
&:focus {
|
||||
border-color: #007bff;
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
.modal textarea {
|
||||
resize: vertical;
|
||||
min-height: 80px;
|
||||
}
|
||||
|
||||
.modal-buttons {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 1rem;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.modal-buttons button {
|
||||
padding: 0.6rem 1.2rem;
|
||||
font-size: 0.95rem;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s ease;
|
||||
}
|
||||
|
||||
.modal-buttons button[type="submit"] {
|
||||
background-color: #ff4b2b;
|
||||
color: #fff;
|
||||
|
||||
&:hover {
|
||||
background-color: #FF2600;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-buttons button[type="button"] {
|
||||
background-color: #d3d3d3;
|
||||
color: #333;
|
||||
|
||||
&:hover {
|
||||
background-color: #cfcfcf;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(-10px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.assignment-header-box {
|
||||
background: #0f0f1a;
|
||||
border: 2px solid #00bfff;
|
||||
border-radius: 12px;
|
||||
padding: 50px 100px;
|
||||
text-align: center;
|
||||
margin-bottom: 2rem;
|
||||
// box-shadow: 0 0 20px #00bfff;
|
||||
box-shadow: rgb(211, 0, 197) 0px 0px 15px, rgb(255, 42, 109) 0px 0px 25px;
|
||||
border: 1px solid rgb(211, 0, 197);
|
||||
animation: pulseNeonBlue 2s infinite alternate;
|
||||
|
||||
h2 {
|
||||
color: #00bfff;
|
||||
margin-bottom: 1rem;
|
||||
font-weight: bold;
|
||||
// text-shadow: rgb(5, 217, 232) 0px 0px 5px;
|
||||
}
|
||||
|
||||
button {
|
||||
background-color: #000;
|
||||
border: 2px solid #00bfff;
|
||||
color: #00bfff;
|
||||
padding: 10px 20px;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
font-size: 1rem;
|
||||
font-weight: bold;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:hover {
|
||||
background-color: #00bfff;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// @keyframes pulseNeonBlue {
|
||||
// from {
|
||||
// box-shadow: 0 0 10px #00bfff, 0 0 20px #00bfff;
|
||||
// }
|
||||
// to {
|
||||
// box-shadow: 0 0 25px #00bfff, 0 0 40px #00bfff;
|
||||
// }
|
||||
// }
|
||||
|
||||
@keyframes pulseNeonHybrid {
|
||||
from {
|
||||
box-shadow:
|
||||
0 0 10px rgba(211, 0, 197, 0.7),
|
||||
0 0 20px rgba(255, 42, 109, 0.7),
|
||||
0 0 10px rgba(0, 191, 255, 0.7);
|
||||
}
|
||||
to {
|
||||
box-shadow:
|
||||
0 0 25px rgba(211, 0, 197, 0.9),
|
||||
0 0 40px rgba(255, 42, 109, 0.9),
|
||||
0 0 30px rgba(0, 191, 255, 0.9);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.assignment-list-box {
|
||||
margin-top: 40px;
|
||||
|
||||
h3 {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.assignment-cards {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.assignment-card {
|
||||
background: #f5f5f5;
|
||||
padding: 20px;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.1);
|
||||
transition: all 0.3s ease;
|
||||
|
||||
p {
|
||||
margin: 6px 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #2c7be5;
|
||||
text-decoration: underline;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Search Bar Styling
|
||||
.assignment-search-box {
|
||||
margin: 1rem 0;
|
||||
input {
|
||||
width: 100%;
|
||||
// padding: 0.5rem;
|
||||
font-size: 1rem;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #ccc;
|
||||
background-color: #1a1a2b;
|
||||
color: #fefefe;
|
||||
box-shadow: rgb(211, 0, 197) 0px 0px 15px, rgb(255, 42, 109) 0px 0px 25px;
|
||||
|
||||
&::placeholder {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: rgb(211, 0, 197);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.password-field {
|
||||
.input-wrapper {
|
||||
position: relative;
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
padding-right: 2.5rem;
|
||||
}
|
||||
|
||||
.eye-icon {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 0.75rem;
|
||||
transform: translateY(-50%);
|
||||
cursor: pointer;
|
||||
color: #555;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.spinner-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 3px solid rgba(0, 0, 0, 0.2);
|
||||
border-top: 3px solid #333;
|
||||
border-radius: 50%;
|
||||
animation: spin 0.6s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
|
@ -87,10 +87,9 @@ $cyber-black: #1a1a1a;
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
//min-height: 100vh;
|
||||
min-height: 95vh;
|
||||
width: 100%;
|
||||
padding-top: 1100px; /* Adjust padding-top to account for navbar height */
|
||||
margin-top: 60px; /* Add margin-top to account for navbar height */
|
||||
// margin-top: 70px; /* Add margin-top to account for navbar height */
|
||||
background-color: $dark-bg;
|
||||
overflow: hidden;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue