上传文件至 css

This commit is contained in:
2025-11-30 13:08:02 +00:00
parent d6572c69b6
commit 71d5c50d4a

866
css/style.css Normal file
View File

@@ -0,0 +1,866 @@
:root {
--primary-color: #3498db;
--secondary-color: #2980b9;
--accent-color: #e74c3c;
--success-color: #27ae60;
--warning-color: #f39c12;
--danger-color: #e74c3c;
--info-color: #17a2b8;
--bg-color: #f8f9fa;
--text-color: #333333;
--card-bg: #ffffff;
--border-color: #dee2e6;
--shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
--radius: 8px;
--radius-lg: 12px;
--transition: all 0.3s ease;
--font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
[data-theme="dark"] {
--bg-color: #1a1a1a;
--text-color: #ffffff;
--card-bg: #2d2d2d;
--border-color: #404040;
--primary-color: #4a90e2;
--secondary-color: #357abd;
--shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
--shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.4);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: var(--font-family);
line-height: 1.6;
color: var(--text-color);
background-color: var(--bg-color);
transition: var(--transition);
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
input, textarea, .code-block, .api-key-input, .selectable {
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
min-height: calc(100vh - 140px);
}
.navbar {
background: var(--card-bg);
box-shadow: var(--shadow);
position: sticky;
top: 0;
z-index: 1000;
border-bottom: 1px solid var(--border-color);
}
.nav-container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
display: flex;
justify-content: space-between;
align-items: center;
height: 70px;
}
.nav-logo h2 {
color: var(--primary-color);
margin: 0;
}
.nav-logo a {
color: inherit;
text-decoration: none;
}
.nav-menu {
display: flex;
align-items: center;
gap: 20px;
}
.nav-link {
text-decoration: none;
color: var(--text-color);
font-weight: 500;
transition: var(--transition);
padding: 8px 12px;
border-radius: var(--radius);
}
.nav-link:hover, .nav-link.active {
color: var(--primary-color);
background: rgba(52, 152, 219, 0.1);
}
.nav-user {
color: var(--text-color);
font-weight: 500;
}
.notification-icon {
position: relative;
text-decoration: none;
font-size: 1.2rem;
}
.notification-badge {
position: absolute;
top: -5px;
right: -5px;
background: var(--danger-color);
color: white;
border-radius: 50%;
width: 18px;
height: 18px;
font-size: 0.7rem;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
}
.nav-dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
top: 100%;
right: 0;
background: var(--card-bg);
min-width: 180px;
box-shadow: var(--shadow-lg);
border-radius: var(--radius);
z-index: 1000;
border: 1px solid var(--border-color);
}
.dropdown-content a {
display: block;
padding: 12px 16px;
text-decoration: none;
color: var(--text-color);
border-bottom: 1px solid var(--border-color);
transition: var(--transition);
}
.dropdown-content a:hover {
background: var(--primary-color);
color: white;
}
.dropdown-content a:last-child {
border-bottom: none;
}
.nav-dropdown:hover .dropdown-content {
display: block;
}
.nav-toggle {
display: none;
background: none;
border: none;
font-size: 1.5rem;
color: var(--text-color);
cursor: pointer;
}
.btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 12px 24px;
border: none;
border-radius: var(--radius);
text-decoration: none;
font-weight: 600;
cursor: pointer;
transition: var(--transition);
text-align: center;
font-family: inherit;
}
.btn-primary {
background: var(--primary-color);
color: white;
}
.btn-primary:hover {
background: var(--secondary-color);
transform: translateY(-2px);
}
.btn-secondary {
background: transparent;
color: var(--primary-color);
border: 2px solid var(--primary-color);
}
.btn-secondary:hover {
background: var(--primary-color);
color: white;
}
.btn-danger {
background: var(--danger-color);
color: white;
}
.btn-danger:hover {
background: #c0392b;
transform: translateY(-2px);
}
.btn-success {
background: var(--success-color);
color: white;
}
.btn-success:hover {
background: #219a52;
}
.btn-full {
width: 100%;
justify-content: center;
}
.btn-sm {
padding: 8px 16px;
font-size: 0.875rem;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 8px;
font-weight: 500;
color: var(--text-color);
}
.form-group input,
.form-group textarea,
.form-group select {
width: 100%;
padding: 12px;
border: 2px solid var(--border-color);
border-radius: var(--radius);
font-size: 16px;
transition: var(--transition);
background: var(--card-bg);
color: var(--text-color);
font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
outline: none;
border-color: var(--primary-color);
}
.form-group small {
display: block;
margin-top: 5px;
color: #666;
font-size: 0.875rem;
}
[data-theme="dark"] .form-group small {
color: #aaa;
}
.checkbox-label {
display: flex;
align-items: flex-start;
cursor: pointer;
gap: 10px;
}
.checkbox-label input {
width: auto;
margin-top: 2px;
}
.alert {
padding: 15px;
border-radius: var(--radius);
margin-bottom: 20px;
border-left: 4px solid;
}
.alert-success {
background: #d4edda;
color: #155724;
border-left-color: var(--success-color);
}
.alert-error {
background: #f8d7da;
color: #721c24;
border-left-color: var(--danger-color);
}
.alert-warning {
background: #fff3cd;
color: #856404;
border-left-color: var(--warning-color);
}
[data-theme="dark"] .alert-success {
background: #1e3a2e;
color: #4ade80;
}
[data-theme="dark"] .alert-error {
background: #3a1e1e;
color: #f87171;
}
[data-theme="dark"] .alert-warning {
background: #3a2e1e;
color: #fbbf24;
}
.card {
background: var(--card-bg);
padding: 25px;
border-radius: var(--radius-lg);
box-shadow: var(--shadow);
transition: var(--transition);
}
.card:hover {
box-shadow: var(--shadow-lg);
transform: translateY(-2px);
}
.auth-card, .upload-card {
max-width: 500px;
margin: 0 auto;
}
.hero {
text-align: center;
padding: 80px 0;
background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
color: white;
border-radius: var(--radius-lg);
margin-bottom: 40px;
}
.hero h1 {
font-size: 3rem;
margin-bottom: 20px;
}
.hero p {
font-size: 1.2rem;
margin-bottom: 30px;
opacity: 0.9;
}
.hero-buttons {
display: flex;
gap: 15px;
justify-content: center;
flex-wrap: wrap;
}
.features {
margin: 60px 0;
}
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
margin-top: 40px;
}
.feature-card {
text-align: center;
padding: 40px 30px;
}
.feature-icon {
font-size: 3rem;
margin-bottom: 20px;
}
.feature-card h3 {
margin-bottom: 15px;
color: var(--text-color);
}
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
margin-bottom: 30px;
}
.stat-card {
text-align: center;
padding: 25px;
border-left: 4px solid var(--primary-color);
}
.stat-card.users { border-left-color: #e74c3c; }
.stat-card.images { border-left-color: #27ae60; }
.stat-card.storage { border-left-color: #f39c12; }
.stat-card.feedbacks { border-left-color: #9b59b6; }
.stat-number {
font-size: 2.5rem;
font-weight: bold;
margin-bottom: 10px;
color: var(--primary-color);
}
.stat-label {
color: var(--text-color);
opacity: 0.8;
font-size: 0.9rem;
}
.gallery {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 20px;
margin-top: 30px;
}
.gallery-item {
background: var(--card-bg);
border-radius: var(--radius);
overflow: hidden;
box-shadow: var(--shadow);
transition: var(--transition);
}
.gallery-item:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-lg);
}
.gallery-item img {
width: 100%;
height: 200px;
object-fit: cover;
display: block;
}
.image-info {
padding: 15px;
}
.image-title {
font-weight: 500;
margin-bottom: 5px;
color: var(--text-color);
}
.image-meta {
display: flex;
justify-content: space-between;
font-size: 0.8rem;
color: #666;
}
[data-theme="dark"] .image-meta {
color: #aaa;
}
.image-actions {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10px;
gap: 10px;
}
.status-badge {
padding: 4px 8px;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 600;
}
.status-pending { background: #fff3cd; color: #856404; }
.status-verified { background: #d4edda; color: #155724; }
.status-admin { background: #cce7ff; color: #004085; }
.status-public { background: #d4edda; color: #155724; }
.status-private { background: #f8d7da; color: #721c24; }
[data-theme="dark"] .status-pending { background: #3a2e1e; color: #fbbf24; }
[data-theme="dark"] .status-verified { background: #1e3a2e; color: #4ade80; }
[data-theme="dark"] .status-admin { background: #1e2a3a; color: #60a5fa; }
[data-theme="dark"] .status-public { background: #1e3a2e; color: #4ade80; }
[data-theme="dark"] .status-private { background: #3a1e1e; color: #f87171; }
.upload-area {
border: 2px dashed var(--primary-color);
border-radius: var(--radius);
padding: 40px;
text-align: center;
margin-bottom: 20px;
background: var(--card-bg);
transition: var(--transition);
cursor: pointer;
}
.upload-area:hover, .upload-area.dragover {
background: rgba(52, 152, 219, 0.1);
border-color: var(--secondary-color);
}
.file-list {
margin-top: 20px;
}
.file-item {
display: flex;
align-items: center;
padding: 15px;
background: var(--card-bg);
border-radius: var(--radius);
margin-bottom: 10px;
box-shadow: var(--shadow);
gap: 15px;
}
.file-preview {
width: 60px;
height: 60px;
border-radius: 5px;
object-fit: cover;
background: var(--bg-color);
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
color: #666;
}
.file-preview img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 5px;
}
.file-info {
flex: 1;
}
.file-name {
font-weight: bold;
margin-bottom: 5px;
}
.file-size {
color: #666;
font-size: 0.9em;
}
[data-theme="dark"] .file-size {
color: #aaa;
}
.file-metadata {
flex: 1;
display: flex;
flex-direction: column;
gap: 10px;
}
.file-title-input {
padding: 8px;
border: 1px solid var(--border-color);
border-radius: 4px;
background: var(--bg-color);
color: var(--text-color);
}
.remove-file {
background: var(--danger-color);
color: white;
border: none;
padding: 8px 12px;
border-radius: 4px;
cursor: pointer;
transition: var(--transition);
}
.remove-file:hover {
background: #c0392b;
}
.tags-container {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin: 10px 0;
}
.tag {
display: inline-flex;
align-items: center;
padding: 4px 12px;
border-radius: 20px;
font-size: 0.8rem;
font-weight: 500;
color: white;
cursor: pointer;
transition: var(--transition);
}
.tag:hover {
transform: translateY(-2px);
box-shadow: var(--shadow);
}
.code-block {
background: var(--bg-color);
padding: 15px;
border-radius: var(--radius);
font-family: 'Courier New', monospace;
margin: 10px 0;
border-left: 4px solid var(--primary-color);
overflow-x: auto;
}
.endpoint {
color: var(--primary-color);
font-weight: bold;
}
.param {
color: var(--danger-color);
}
.comment {
color: #666;
font-style: italic;
}
[data-theme="dark"] .comment {
color: #aaa;
}
.pagination {
display: flex;
gap: 5px;
justify-content: center;
margin-top: 20px;
flex-wrap: wrap;
}
.empty-state {
text-align: center;
padding: 60px 20px;
color: #666;
}
[data-theme="dark"] .empty-state {
color: #aaa;
}
.footer {
background: var(--card-bg);
color: var(--text-color);
text-align: center;
padding: 20px;
border-top: 1px solid var(--border-color);
}
.footer-content {
max-width: 1200px;
margin: 0 auto;
}
.footer a {
color: var(--primary-color);
text-decoration: none;
}
.footer a:hover {
text-decoration: underline;
}
@media (max-width: 768px) {
.nav-toggle {
display: block;
}
.nav-menu {
position: absolute;
top: 100%;
left: 0;
right: 0;
background: var(--card-bg);
flex-direction: column;
padding: 20px;
box-shadow: var(--shadow-lg);
display: none;
border-top: 1px solid var(--border-color);
}
.nav-menu.active {
display: flex;
}
.nav-dropdown .dropdown-content {
position: static;
box-shadow: none;
border: none;
background: transparent;
}
.hero h1 {
font-size: 2rem;
}
.hero-buttons {
flex-direction: column;
align-items: center;
}
.feature-grid,
.stats-grid,
.gallery {
grid-template-columns: 1fr;
}
.file-item {
flex-direction: column;
align-items: stretch;
text-align: center;
}
.file-metadata {
margin: 10px 0;
}
.container {
padding: 15px;
}
}
@keyframes loading {
0% { transform: translateX(-100%); }
100% { transform: translateX(100%); }
}
.loading-bar {
width: 100%;
height: 3px;
background: linear-gradient(90deg, var(--primary-color), var(--success-color), var(--danger-color));
animation: loading 2s infinite;
position: fixed;
top: 0;
left: 0;
z-index: 9999;
}
.theme-toggle {
background: none;
border: none;
font-size: 1.2rem;
cursor: pointer;
padding: 8px;
border-radius: var(--radius);
transition: var(--transition);
}
.theme-toggle:hover {
background: rgba(255, 255, 255, 0.1);
}
.captcha-container {
display: flex;
gap: 10px;
align-items: center;
}
.captcha-container input {
flex: 1;
}
.captcha-container img {
border: 1px solid var(--border-color);
border-radius: var(--radius);
height: 40px;
cursor: pointer;
}
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.hidden { display: none; }