generated from tpl/obsidian-sample-plugin
Fix date filter using month filter when year is all time and add background to stats section
This commit is contained in:
parent
dc7b84f287
commit
cba99adc2a
|
@ -167,12 +167,13 @@
|
|||
.obt-reading-stats {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
gap: var(--size-4-6);
|
||||
max-width: 50rem;
|
||||
margin: 0 auto;
|
||||
|
||||
.section {
|
||||
padding: 0.5rem;
|
||||
background-color: var(--background-secondary);
|
||||
border: 1px solid var(--background-modifier-border);
|
||||
border-radius: 0.5rem;
|
||||
|
||||
|
|
|
@ -29,13 +29,13 @@ export function createDateFilter<T>(
|
|||
if (date.year() !== filterYear) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (filterMonth !== ALL_TIME) {
|
||||
if (date.month() !== filterMonth - 1) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
})
|
||||
.sort((a, b) => selector(a).diff(selector(b)));
|
||||
|
|
Loading…
Reference in New Issue