Files
wen_0908/static/css/style.css
2025-09-08 17:06:58 +08:00

298 lines
4.5 KiB
CSS

/* 全局樣式 */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Microsoft JhengHei', Arial, sans-serif;
line-height: 1.6;
color: #333;
background-color: #f5f5f5;
padding: 20px;
}
.container {
max-width: 1200px;
margin: 0 auto;
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
margin-bottom: 20px;
color: #2c3e50;
}
h2 {
color: #2c3e50;
margin-bottom: 15px;
}
/* 過濾區域 */
.filter-container {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 20px;
padding: 15px;
background-color: #f8f9fa;
border-radius: 5px;
}
.filter-group {
display: flex;
align-items: center;
gap: 5px;
}
.filter-group label {
font-weight: bold;
}
.filter-group input {
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
width: 80px;
}
button {
padding: 8px 15px;
background-color: #3498db;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s;
}
button:hover {
background-color: #2980b9;
}
button:disabled {
background-color: #95a5a6;
cursor: not-allowed;
}
#reset-filter-btn {
background-color: #95a5a6;
}
#reset-filter-btn:hover {
background-color: #7f8c8d;
}
/* 批量匯入樣式 */
.import-container {
margin-bottom: 30px;
padding: 20px;
background-color: #f8f9fa;
border-radius: 5px;
border: 1px solid #e9ecef;
}
.import-info {
margin-top: 15px;
font-size: 0.9em;
color: #6c757d;
}
.import-info p {
margin-bottom: 5px;
}
#import-file {
padding: 10px;
border: 1px dashed #ced4da;
border-radius: 4px;
width: 100%;
background-color: #fff;
}
/* 表格樣式 */
.table-container {
overflow-x: auto;
margin-bottom: 20px;
}
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;
}
table th, table td {
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid #ddd;
}
table th {
background-color: #3498db;
color: white;
}
table tr:nth-child(even) {
background-color: #f2f2f2;
}
table tr:hover {
background-color: #e9f7fe;
}
.action-btn {
margin-right: 5px;
padding: 5px 10px;
font-size: 0.9em;
}
.edit-btn {
background-color: #f39c12;
}
.edit-btn:hover {
background-color: #d35400;
}
.delete-btn {
background-color: #e74c3c;
}
.delete-btn:hover {
background-color: #c0392b;
}
/* 分頁控制 */
.pagination-container {
display: flex;
justify-content: center;
align-items: center;
gap: 15px;
margin-bottom: 20px;
}
#page-info {
font-size: 0.9em;
}
.page-size {
margin-left: 20px;
display: flex;
align-items: center;
gap: 5px;
}
.page-size select {
padding: 5px;
border: 1px solid #ddd;
border-radius: 4px;
}
/* 表單樣式 */
.form-container {
background-color: #f8f9fa;
padding: 20px;
border-radius: 5px;
margin-bottom: 20px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
.form-group input {
width: 100%;
padding: 10px;
border: 1px solid #ddd;
border-radius: 4px;
}
.form-actions {
display: flex;
gap: 10px;
margin-top: 20px;
}
#cancel-btn {
background-color: #95a5a6;
}
#cancel-btn:hover {
background-color: #7f8c8d;
}
/* 訊息提示 */
.message {
padding: 10px;
margin-bottom: 20px;
border-radius: 4px;
text-align: center;
display: none;
}
.success {
background-color: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
display: block;
}
.error {
background-color: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
display: block;
}
/* 導航鏈接 */
.nav-links {
margin-bottom: 20px;
padding: 10px 0;
border-bottom: 1px solid #eee;
}
.nav-link {
display: inline-block;
padding: 8px 15px;
background-color: #3498db;
color: white;
text-decoration: none;
border-radius: 4px;
transition: background-color 0.3s;
}
.nav-link:hover {
background-color: #2980b9;
}
/* 響應式設計 */
@media (max-width: 768px) {
.filter-container {
flex-direction: column;
align-items: flex-start;
}
.pagination-container {
flex-wrap: wrap;
}
.form-actions {
flex-direction: column;
}
button {
width: 100%;
}
}