Yuyao Huang bc590eb40a handle long titles with text-overflow ellipsis
- goals.css: goal-title truncates with ellipsis, goal-info
  gets min-width:0 (prevents flex overflow), mobile allows
  word-break wrap
- tasks.css: task-title truncates with ellipsis
- notes.css: note-card-title truncates with ellipsis
2026-05-09 10:57:09 +08:00

160 lines
2.5 KiB
CSS

.goals-page {
padding: 1rem;
}
.goals-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 2rem;
}
.goals-header h1 {
color: #2c3e50;
}
.goals-list {
display: grid;
gap: 1rem;
}
.goal-card {
background: white;
padding: 1.5rem;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
display: flex;
justify-content: space-between;
align-items: center;
transition: transform 0.2s, box-shadow 0.2s;
}
.goal-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.goal-info {
flex: 1;
min-width: 0;
}
.goal-title {
font-size: 1.2rem;
font-weight: 600;
color: #2c3e50;
margin-bottom: 0.5rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.goal-status {
font-size: 0.9rem;
color: #7f8c8d;
}
.goal-status.active {
color: #27ae60;
}
.goal-status.inactive {
color: #e74c3c;
}
.goal-actions {
display: flex;
gap: 0.5rem;
align-items: center;
}
.toggle-btn {
padding: 0.5rem 1rem;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 0.9rem;
transition: background-color 0.2s;
}
.toggle-btn.activate {
background-color: #27ae60;
color: white;
}
.toggle-btn.activate:hover {
background-color: #229954;
}
.toggle-btn.deactivate {
background-color: #f39c12;
color: white;
}
.toggle-btn.deactivate:hover {
background-color: #e67e22;
}
.edit-btn {
padding: 0.5rem 1rem;
background-color: #3498db;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.2s;
}
.edit-btn:hover {
background-color: #2980b9;
}
.delete-btn {
padding: 0.5rem 1rem;
background-color: #e74c3c;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.2s;
}
.delete-btn:hover {
background-color: #c0392b;
}
.empty-state {
text-align: center;
padding: 3rem;
color: #7f8c8d;
}
.empty-state h3 {
margin-bottom: 1rem;
}
@media (max-width: 640px) {
.goals-header {
flex-direction: column;
align-items: stretch;
gap: 0.75rem;
}
.goal-card {
flex-direction: column;
align-items: stretch;
gap: 0.75rem;
padding: 1rem;
}
.goal-title {
white-space: normal;
word-break: break-word;
}
.goal-actions {
justify-content: flex-end;
flex-wrap: wrap;
}
}