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 {
 | 
						.obt-reading-stats {
 | 
				
			||||||
		display: flex;
 | 
							display: flex;
 | 
				
			||||||
		flex-direction: column;
 | 
							flex-direction: column;
 | 
				
			||||||
		gap: 1rem;
 | 
							gap: var(--size-4-6);
 | 
				
			||||||
		max-width: 50rem;
 | 
							max-width: 50rem;
 | 
				
			||||||
		margin: 0 auto;
 | 
							margin: 0 auto;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		.section {
 | 
							.section {
 | 
				
			||||||
			padding: 0.5rem;
 | 
								padding: 0.5rem;
 | 
				
			||||||
 | 
								background-color: var(--background-secondary);
 | 
				
			||||||
			border: 1px solid var(--background-modifier-border);
 | 
								border: 1px solid var(--background-modifier-border);
 | 
				
			||||||
			border-radius: 0.5rem;
 | 
								border-radius: 0.5rem;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -29,13 +29,13 @@ export function createDateFilter<T>(
 | 
				
			||||||
					if (date.year() !== filterYear) {
 | 
										if (date.year() !== filterYear) {
 | 
				
			||||||
						return false;
 | 
											return false;
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
					if (filterMonth !== ALL_TIME) {
 | 
										if (filterMonth !== ALL_TIME) {
 | 
				
			||||||
						if (date.month() !== filterMonth - 1) {
 | 
											if (date.month() !== filterMonth - 1) {
 | 
				
			||||||
							return false;
 | 
												return false;
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
				return true;
 | 
									return true;
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
			.sort((a, b) => selector(a).diff(selector(b)));
 | 
								.sort((a, b) => selector(a).diff(selector(b)));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue