refactor: 分離 CSS 為模組化檔案
- 建立 styles 目錄 - 分離 CSS 為 5 個模組: * base.css - CSS 變數、Reset、全域樣式 * layout.css - 容器、Header、模組切換器 * components.css - 按鈕、表單、卡片、Toast、Modal * modules.css - 模組專屬樣式(預留) * utilities.css - 工具類別與響應式設計 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
257
styles/layout.css
Normal file
257
styles/layout.css
Normal file
@@ -0,0 +1,257 @@
|
||||
/**
|
||||
* Layout Styles - 布局樣式
|
||||
* 包含容器、整體布局、Header、模組切換器
|
||||
*/
|
||||
|
||||
/* ==================== Container ==================== */
|
||||
.app-container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
/* ==================== User Info Bar ==================== */
|
||||
.user-info-bar {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-radius: var(--radius);
|
||||
padding: 12px 20px;
|
||||
margin-bottom: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.user-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.user-details {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
font-weight: 600;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.user-role {
|
||||
font-size: 0.85rem;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.logout-btn {
|
||||
padding: 8px 20px;
|
||||
border: 2px solid rgba(255, 255, 255, 0.3);
|
||||
border-radius: 6px;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
color: #ffffff;
|
||||
font-family: inherit;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.logout-btn:hover {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border-color: rgba(255, 255, 255, 0.5);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.logout-btn svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
/* ==================== Module Selector ==================== */
|
||||
.module-selector {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
margin-bottom: 20px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.module-btn {
|
||||
flex: 1;
|
||||
min-width: 200px;
|
||||
padding: 14px 20px;
|
||||
border: 2px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
background: var(--bg-card);
|
||||
font-family: inherit;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 500;
|
||||
color: var(--text-secondary);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.module-btn:hover {
|
||||
border-color: var(--primary-light);
|
||||
color: var(--primary);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.module-btn.active {
|
||||
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
|
||||
border-color: var(--primary);
|
||||
color: white;
|
||||
box-shadow: 0 4px 15px rgba(26, 82, 118, 0.3);
|
||||
}
|
||||
|
||||
.module-btn.active.job-active {
|
||||
background: linear-gradient(135deg, var(--accent) 0%, #d35400 100%);
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
|
||||
}
|
||||
|
||||
.module-btn.active.desc-active {
|
||||
background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
|
||||
border-color: var(--green);
|
||||
box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
|
||||
}
|
||||
|
||||
.module-btn svg {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
.module-content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.module-content.active {
|
||||
display: block;
|
||||
animation: fadeIn 0.3s ease;
|
||||
}
|
||||
|
||||
/* ==================== App Header ==================== */
|
||||
.app-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
margin-bottom: 24px;
|
||||
padding: 20px 28px;
|
||||
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
|
||||
border-radius: var(--radius);
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.app-header.job-header {
|
||||
background: linear-gradient(135deg, var(--accent) 0%, #d35400 100%);
|
||||
}
|
||||
|
||||
.app-header.desc-header {
|
||||
background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
|
||||
}
|
||||
|
||||
.app-header .icon {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
border-radius: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.app-header .icon svg {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
fill: #ffffff;
|
||||
}
|
||||
|
||||
.app-header h1 {
|
||||
color: #ffffff;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.app-header .subtitle {
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
font-size: 0.875rem;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* ==================== Form Card ==================== */
|
||||
.form-card {
|
||||
background: var(--bg-card);
|
||||
border-radius: var(--radius);
|
||||
box-shadow: var(--shadow);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ==================== Sections ==================== */
|
||||
.section-box {
|
||||
background: #f8fafc;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
padding: 12px 16px;
|
||||
background: linear-gradient(135deg, #e8f4fc 0%, #f0f4f8 100%);
|
||||
border-bottom: 1px solid var(--border);
|
||||
font-weight: 600;
|
||||
font-size: 0.9rem;
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.section-header.green {
|
||||
background: linear-gradient(135deg, #e8f8f0 0%, #f0f8f4 100%);
|
||||
color: var(--green-dark);
|
||||
}
|
||||
|
||||
.section-body {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.section-divider {
|
||||
grid-column: 1 / -1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
.section-divider span {
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
color: var(--primary);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.section-divider::after {
|
||||
content: '';
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
background: linear-gradient(to right, var(--border), transparent);
|
||||
}
|
||||
Reference in New Issue
Block a user