srg-kostyrko / obsidian-journal

MIT License
106 stars 7 forks source link

Adjust calendar size to the sidebar width #44

Closed stracker-phil closed 3 months ago

stracker-phil commented 5 months ago

The calendar in the sidebar has a static width and does not adjust to the sidebar size.

Reason: The grid template uses a fixed column width of 30px

Suggestion: Switch to fr for grid-column sizing for a dynamic grid size.

Sample CSS:

.journal-calendar-view-month.with-week {
    /* old: grid-template-columns: repeat(8, 30px); */
    grid-template-columns: 1.25fr repeat(7, 1fr); 
}

.journal-calendar-view-month {
    ...
    /* old: grid-template-columns: repeat(7, 30px); */
    grid-template-columns: repeat(7, 1fr);
    ...
}
Result: ![2024-04-20_23-04-53 (1)](https://github.com/srg-kostyrko/obsidian-journal/assets/2669200/920d35ac-31fc-4cdb-b408-739750d0dc90)
srg-kostyrko commented 5 months ago

good point, thanks for suggestion, will add it

srg-kostyrko commented 3 months ago

released in 1.4.0