File tree Expand file tree Collapse file tree 6 files changed +50
-15
lines changed
settings/creator/Containers/celestials/moons Expand file tree Collapse file tree 6 files changed +50
-15
lines changed Original file line number Diff line number Diff line change 11<script lang =" ts" >
22 import { getTypedContext } from " src/calendar/view.utils" ;
33 import Flags from " ../calendar/ui/Events/Flags.svelte" ;
4- import MoonUI from " ../calendar/ui/Moon.svelte" ;
54 import { dateString } from " src/utils/functions" ;
65 import {
76 CALENDAR_SEARCH ,
109 setClickableIcon ,
1110 } from " src/utils/icons" ;
1211 import { derived , get } from " svelte/store" ;
12+ import MoonUI from " src/calendar/ui/Moons/Moon.svelte" ;
13+
1314
1415 const store = getTypedContext (" store" );
1516 const parent = getTypedContext (" parent" );
Original file line number Diff line number Diff line change 33 import Dots from " ../Events/Dots.svelte" ;
44 import { TFile } from " obsidian" ;
55 import type { CalEvent } from " src/@types" ;
6- import Moon from " ../Moon.svelte" ;
76 import { ViewState } from " src/stores/calendar.store" ;
87 import Flags from " ../Events/Flags.svelte" ;
98 import { addEventWithModal } from " src/events/modal/event" ;
1514 import { isCalEvent } from " src/events/event.types" ;
1615 import { openAgendaView } from " src/agenda/view.agenda" ;
1716 import { getTypedContext } from " src/calendar/view.utils" ;
17+ import MoonContainer from " ../Moons/MoonContainer.svelte" ;
1818
1919 export let month: MonthStore ;
2020 export let day: DayOrLeapDay ;
185185 {#key $events }
186186 {#if $full && $viewState != ViewState .Year }
187187 {#if $displayMoons }
188- <div class =" moon-container" >
189- {#each $moons as moon }
190- <Moon {moon } />
191- {/each }
192- </div >
188+ <MoonContainer moons ={$moons } />
193189 {/if }
194190 {#key $events }
195191 <Flags events ={$events } />
243239 .opened {
244240 border : 2px solid var (--background-modifier-border );
245241 }
246-
247- /* .moon-container {
248- display: flex;
249- flex-flow: row;
250- } */
251242 </style >
Original file line number Diff line number Diff line change 99 $ : path = SHADOW_MAP [moon .phase ?? " New moon" ];
1010 </script >
1111
12- <div aria-label ={label ? ` ${moon .name }\n ${moon .phase } ` : null }>
12+ <div
13+ class =" moon-wrapper"
14+ aria-label ={label ? ` ${moon .name }\n ${moon .phase } ` : null }
15+ >
1316 <svg
1417 class =" moon"
1518 id ={moon .id }
3235</div >
3336
3437<style >
38+ .moon-wrapper ,
39+ .moon {
40+ width : min-content ;
41+ height : min-content ;
42+ min-width : 0 ;
43+ }
44+ .moon {
45+ display : flex ;
46+ align-items : center ;
47+ }
3548 </style >
Original file line number Diff line number Diff line change 1+ <script lang =" ts" >
2+ import Moon from " ./Moon.svelte" ;
3+ import type { MoonState } from " src/schemas/calendar/moons" ;
4+
5+ export let moons: MoonState [] = [];
6+ export let dayView: boolean = false ;
7+
8+ /* export */ let width: number ;
9+
10+ let target: HTMLElement ;
11+ </script >
12+
13+ <div class ="moon-container" class:full ={! dayView } bind:this ={target }>
14+ <div class =" left-button" ></div >
15+ <div class =" moons" >
16+ {#if target != null }
17+ {#each moons as moon }
18+ <Moon {moon } />
19+ {/each }
20+ {/if }
21+ </div >
22+ <div class =" right-button" ></div >
23+ </div >
24+
25+ <style >
26+ .moons {
27+ display : inline-flex ;
28+ overflow-y : scroll ;
29+ }
30+ </style >
Original file line number Diff line number Diff line change 6161<style scoped >
6262 .week {
6363 display : grid ;
64- grid-template-columns : repeat (var (--calendar-columns ), 1fr );
64+ grid-template-columns : repeat (var (--calendar-columns ), minmax ( 0 , 1fr ) );
6565 text-align : center ;
6666 }
6767 .week-number {
Original file line number Diff line number Diff line change 11<script lang =" ts" >
22 import { ExtraButtonComponent } from " obsidian" ;
3- import MoonSVG from " src/calendar/ui/Moon.svelte" ;
3+ import MoonSVG from " src/calendar/ui/Moons/ Moon.svelte" ;
44 import type { Moon } from " src/schemas/calendar/moons" ;
55 import { EDIT , TRASH , setNodeIcon } from " src/utils/icons" ;
66 import { MOON_CYCLE , MOON_OFFSET } from " src/utils/icons" ;
You can’t perform that action at this time.
0 commit comments