feat(DiaryOverview): enhance styling and layout for diary overview panels
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 37s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 37s
- Added scoped CSS styles to improve the layout and visual presentation of diary overview panels. - Implemented responsive design adjustments for better usability on different screen sizes. - Updated time range label formatting in DiaryView to ensure consistent display of training start and end times.
This commit is contained in:
@@ -127,3 +127,190 @@ export default {
|
||||
emits: ['toggle-panel', 'update-training-times', 'update:training-start', 'update:training-end', 'edit-group', 'update-group-field', 'save-group', 'cancel-edit-group', 'delete-group', 'update:new-group-count', 'create-groups']
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.diary-overview-panels {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.85rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.diary-overview-switcher {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.diary-overview-switch {
|
||||
padding: 0.5rem 0.8rem;
|
||||
border: 1px solid #cfdbe3;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
color: #315066;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.diary-overview-switch.active {
|
||||
background: #e6f0f6;
|
||||
border-color: #9bb9cb;
|
||||
color: #173042;
|
||||
}
|
||||
|
||||
.diary-toggle-card {
|
||||
border: 1px solid #d9e4ec;
|
||||
border-radius: 8px;
|
||||
background: #f9fbfd;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.diary-toggle-body {
|
||||
padding: 0 0.9rem 0.9rem;
|
||||
}
|
||||
|
||||
.diary-toggle-body-open {
|
||||
padding-top: 0.9rem;
|
||||
}
|
||||
|
||||
.diary-workspace-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.diary-workspace-copy h3 {
|
||||
margin: 0.1rem 0 0.25rem;
|
||||
font-size: 1.15rem;
|
||||
}
|
||||
|
||||
.diary-workspace-label {
|
||||
font-size: 0.8rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
color: #517287;
|
||||
}
|
||||
|
||||
.diary-workspace-status {
|
||||
margin: 0;
|
||||
font-size: 0.92rem;
|
||||
color: #45606f;
|
||||
}
|
||||
|
||||
.diary-workspace-stats {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(110px, 1fr));
|
||||
gap: 0.75rem;
|
||||
width: min(560px, 100%);
|
||||
}
|
||||
|
||||
.diary-stat-card {
|
||||
padding: 0.8rem 0.9rem;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid #d9e4ec;
|
||||
}
|
||||
|
||||
.diary-stat-label {
|
||||
display: block;
|
||||
margin-bottom: 0.25rem;
|
||||
font-size: 0.76rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.03em;
|
||||
text-transform: uppercase;
|
||||
color: #5f7b8b;
|
||||
}
|
||||
|
||||
.diary-stat-value {
|
||||
display: block;
|
||||
font-size: 1rem;
|
||||
color: #173042;
|
||||
}
|
||||
|
||||
.diary-general-form {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: end;
|
||||
gap: 0.75rem;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.diary-general-form label {
|
||||
display: block;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.diary-groups-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1.4fr 1fr;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
@media (min-width: 769px) and (max-width: 1100px) {
|
||||
.diary-overview-panels {
|
||||
gap: 0.65rem;
|
||||
margin-bottom: 0.8rem;
|
||||
}
|
||||
|
||||
.diary-overview-switcher {
|
||||
gap: 0.4rem;
|
||||
}
|
||||
|
||||
.diary-overview-switch {
|
||||
padding: 0.42rem 0.68rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.diary-toggle-body {
|
||||
padding: 0 0.85rem 0.8rem;
|
||||
}
|
||||
|
||||
.diary-workspace-header {
|
||||
gap: 0.75rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.diary-workspace-copy h3 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.diary-workspace-status {
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
|
||||
.diary-workspace-stats {
|
||||
grid-template-columns: repeat(2, minmax(92px, 1fr));
|
||||
gap: 0.5rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.diary-stat-card {
|
||||
padding: 0.6rem 0.7rem;
|
||||
}
|
||||
|
||||
.diary-stat-label {
|
||||
font-size: 0.68rem;
|
||||
}
|
||||
|
||||
.diary-stat-value {
|
||||
font-size: 0.92rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.diary-workspace-header {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.diary-workspace-stats {
|
||||
grid-template-columns: repeat(2, minmax(120px, 1fr));
|
||||
}
|
||||
|
||||
.diary-groups-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1094,14 +1094,16 @@ export default {
|
||||
return !hasTrainingPlan && !hasParticipants && !hasActivities && !hasAccidents && !hasNotes;
|
||||
},
|
||||
diaryTimeRangeLabel() {
|
||||
if (this.trainingStart && this.trainingEnd) {
|
||||
return `${this.trainingStart} - ${this.trainingEnd}`;
|
||||
const formattedStart = this.formatDisplayTime(this.trainingStart);
|
||||
const formattedEnd = this.formatDisplayTime(this.trainingEnd);
|
||||
if (formattedStart && formattedEnd) {
|
||||
return `${formattedStart} - ${formattedEnd}`;
|
||||
}
|
||||
if (this.trainingStart) {
|
||||
return this.trainingStart;
|
||||
if (formattedStart) {
|
||||
return formattedStart;
|
||||
}
|
||||
if (this.trainingEnd) {
|
||||
return this.trainingEnd;
|
||||
if (formattedEnd) {
|
||||
return formattedEnd;
|
||||
}
|
||||
return this.$t('diary.trainingWindowUnset');
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user