Add comprehensive CSS styles for the projects management page including: - Page layout with responsive header - Projects grid with auto-fill layout (300px min cards) - Project cards with hover effects and stats - Modal styles for create/edit and recycle bin - Form elements with proper styling - Button styles (primary/secondary) - Context menu for card actions - Recycle bin items with restore/delete actions - Empty state styling - Responsive design for mobile devices - Scrollbar styling Uses CSS variables from existing style.css for consistency. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
592 lines
11 KiB
CSS
592 lines
11 KiB
CSS
/**
|
|
* Projects Page Styles
|
|
* Styles for the projects management page with grid layout and modals
|
|
*/
|
|
|
|
/* === Page Layout === */
|
|
#app {
|
|
min-height: 100vh;
|
|
background: var(--bg-primary);
|
|
}
|
|
|
|
/* === Header === */
|
|
.projects-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 2rem 3rem;
|
|
background: var(--bg-secondary);
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.header-left h1 {
|
|
font-size: 2rem;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
margin: 0 0 0.5rem 0;
|
|
}
|
|
|
|
.back-link {
|
|
color: var(--accent);
|
|
text-decoration: none;
|
|
font-size: 0.9rem;
|
|
transition: opacity 0.2s;
|
|
}
|
|
|
|
.back-link:hover {
|
|
opacity: 0.8;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.header-right {
|
|
display: flex;
|
|
gap: 1rem;
|
|
align-items: center;
|
|
}
|
|
|
|
.search-input {
|
|
padding: 0.75rem 1rem;
|
|
background: var(--bg-tertiary);
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
color: var(--text-primary);
|
|
font-size: 0.9rem;
|
|
min-width: 280px;
|
|
transition: border-color 0.2s;
|
|
}
|
|
|
|
.search-input:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.search-input::placeholder {
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* === Projects Grid === */
|
|
.projects-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
gap: 1.5rem;
|
|
padding: 2rem 3rem;
|
|
max-width: 1600px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
/* === Project Cards === */
|
|
.project-card {
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
padding: 1.5rem;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
position: relative;
|
|
}
|
|
|
|
.project-card:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.project-card-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.project-icon {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 10px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 1.5rem;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.project-name {
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
margin: 0;
|
|
flex: 1;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.project-description {
|
|
font-size: 0.9rem;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 1rem;
|
|
line-height: 1.5;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.project-path {
|
|
font-size: 0.85rem;
|
|
color: var(--text-secondary);
|
|
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
background: var(--bg-tertiary);
|
|
padding: 0.4rem 0.6rem;
|
|
border-radius: 4px;
|
|
margin-bottom: 1rem;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.project-stats {
|
|
display: flex;
|
|
gap: 1.5rem;
|
|
font-size: 0.85rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.project-stat {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.4rem;
|
|
}
|
|
|
|
.project-stat-label {
|
|
font-weight: 500;
|
|
}
|
|
|
|
.project-stat-value {
|
|
color: var(--text-primary);
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* === Empty State === */
|
|
.empty-state {
|
|
text-align: center;
|
|
padding: 6rem 2rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.empty-state h2 {
|
|
font-size: 1.8rem;
|
|
color: var(--text-primary);
|
|
margin-bottom: 0.75rem;
|
|
}
|
|
|
|
.empty-state p {
|
|
font-size: 1rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
/* === Modal === */
|
|
.modal {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.7);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 1000;
|
|
backdrop-filter: blur(4px);
|
|
}
|
|
|
|
.modal-content {
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
width: 90%;
|
|
max-width: 600px;
|
|
max-height: 90vh;
|
|
overflow-y: auto;
|
|
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
|
|
}
|
|
|
|
.modal-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 1.5rem;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.modal-header h2 {
|
|
font-size: 1.5rem;
|
|
color: var(--text-primary);
|
|
margin: 0;
|
|
}
|
|
|
|
.close-btn {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-secondary);
|
|
font-size: 2rem;
|
|
cursor: pointer;
|
|
width: 36px;
|
|
height: 36px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 6px;
|
|
transition: all 0.2s;
|
|
line-height: 1;
|
|
}
|
|
|
|
.close-btn:hover {
|
|
background: var(--bg-tertiary);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
/* === Form Elements === */
|
|
#project-form {
|
|
padding: 1.5rem;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.form-group label {
|
|
display: block;
|
|
margin-bottom: 0.5rem;
|
|
font-size: 0.9rem;
|
|
font-weight: 500;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.form-group input[type="text"],
|
|
.form-group input[type="color"],
|
|
.form-group textarea {
|
|
width: 100%;
|
|
padding: 0.75rem;
|
|
background: var(--bg-tertiary);
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
color: var(--text-primary);
|
|
font-size: 0.95rem;
|
|
font-family: inherit;
|
|
transition: border-color 0.2s;
|
|
}
|
|
|
|
.form-group input:focus,
|
|
.form-group textarea:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.form-group input[type="color"] {
|
|
height: 42px;
|
|
padding: 0.25rem;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.form-group textarea {
|
|
resize: vertical;
|
|
min-height: 80px;
|
|
}
|
|
|
|
.form-row {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.modal-actions {
|
|
display: flex;
|
|
gap: 1rem;
|
|
justify-content: flex-end;
|
|
padding: 1.5rem;
|
|
border-top: 1px solid var(--border);
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
/* === Buttons === */
|
|
.btn-primary,
|
|
.btn-secondary {
|
|
padding: 0.75rem 1.5rem;
|
|
border: none;
|
|
border-radius: 6px;
|
|
font-size: 0.95rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
font-family: inherit;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--accent);
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: var(--accent-hover);
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: var(--bg-tertiary);
|
|
color: var(--text-primary);
|
|
border: 1px solid var(--border);
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: var(--border);
|
|
border-color: var(--text-secondary);
|
|
}
|
|
|
|
/* === Context Menu === */
|
|
.context-menu {
|
|
position: fixed;
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
|
|
z-index: 1001;
|
|
min-width: 160px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.context-menu ul {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0.5rem 0;
|
|
}
|
|
|
|
.context-menu li {
|
|
padding: 0.75rem 1rem;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
font-size: 0.9rem;
|
|
color: var(--text-primary);
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.context-menu li:hover {
|
|
background: var(--bg-tertiary);
|
|
}
|
|
|
|
.context-menu .icon {
|
|
font-size: 1rem;
|
|
width: 20px;
|
|
text-align: center;
|
|
}
|
|
|
|
.context-menu li#ctx-delete {
|
|
color: var(--error);
|
|
}
|
|
|
|
.context-menu li#ctx-delete:hover {
|
|
background: rgba(239, 68, 68, 0.1);
|
|
}
|
|
|
|
/* === Recycle Bin === */
|
|
.recycle-bin-content {
|
|
padding: 1.5rem;
|
|
max-height: 60vh;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.recycle-bin-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 1rem;
|
|
background: var(--bg-tertiary);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
margin-bottom: 0.75rem;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.recycle-bin-item:hover {
|
|
border-color: var(--accent);
|
|
background: var(--bg-primary);
|
|
}
|
|
|
|
.recycle-bin-item-info {
|
|
flex: 1;
|
|
}
|
|
|
|
.recycle-bin-item-name {
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.recycle-bin-item-path {
|
|
font-size: 0.85rem;
|
|
color: var(--text-secondary);
|
|
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
}
|
|
|
|
.recycle-bin-item-actions {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.btn-restore,
|
|
.btn-delete-permanent {
|
|
padding: 0.5rem 1rem;
|
|
font-size: 0.85rem;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
font-family: inherit;
|
|
}
|
|
|
|
.btn-restore {
|
|
background: var(--success);
|
|
color: white;
|
|
border: none;
|
|
}
|
|
|
|
.btn-restore:hover {
|
|
background: #16a34a;
|
|
}
|
|
|
|
.btn-delete-permanent {
|
|
background: transparent;
|
|
color: var(--error);
|
|
border: 1px solid var(--error);
|
|
}
|
|
|
|
.btn-delete-permanent:hover {
|
|
background: var(--error);
|
|
color: white;
|
|
}
|
|
|
|
.recycle-bin-empty {
|
|
text-align: center;
|
|
padding: 3rem 1rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* === Responsive Design === */
|
|
@media (max-width: 1024px) {
|
|
.projects-grid {
|
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
padding: 1.5rem 2rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.projects-header {
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
padding: 1.5rem;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.header-left {
|
|
text-align: center;
|
|
}
|
|
|
|
.header-right {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.search-input {
|
|
min-width: 100%;
|
|
}
|
|
|
|
.projects-grid {
|
|
grid-template-columns: 1fr;
|
|
padding: 1rem;
|
|
}
|
|
|
|
.form-row {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.modal-content {
|
|
width: 95%;
|
|
margin: 1rem;
|
|
}
|
|
|
|
.modal-actions {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.modal-actions button {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.header-left h1 {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.project-card {
|
|
padding: 1rem;
|
|
}
|
|
|
|
.project-stats {
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
}
|
|
|
|
/* === Loading State === */
|
|
.loading {
|
|
text-align: center;
|
|
padding: 3rem;
|
|
color: var(--text-secondary);
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.loading::before {
|
|
content: '';
|
|
display: inline-block;
|
|
width: 32px;
|
|
height: 32px;
|
|
border: 3px solid var(--border);
|
|
border-radius: 50%;
|
|
border-top-color: var(--accent);
|
|
animation: spin 0.8s linear infinite;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
/* === Scrollbar Styling === */
|
|
.projects-grid::-webkit-scrollbar,
|
|
.modal-content::-webkit-scrollbar,
|
|
.recycle-bin-content::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
.projects-grid::-webkit-scrollbar-track,
|
|
.modal-content::-webkit-scrollbar-track,
|
|
.recycle-bin-content::-webkit-scrollbar-track {
|
|
background: var(--bg-primary);
|
|
}
|
|
|
|
.projects-grid::-webkit-scrollbar-thumb,
|
|
.modal-content::-webkit-scrollbar-thumb,
|
|
.recycle-bin-content::-webkit-scrollbar-thumb {
|
|
background: var(--border);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.projects-grid::-webkit-scrollbar-thumb:hover,
|
|
.modal-content::-webkit-scrollbar-thumb:hover,
|
|
.recycle-bin-content::-webkit-scrollbar-thumb:hover {
|
|
background: var(--text-secondary);
|
|
}
|