A calm place to write long-form, and publish it to the open social web. skypress.blog/
0

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'remove-sun-gradient-at-night' into trunk

+16
+4
src/pages/index.astro
··· 152 152 /* Per-phase sky gradient + star visibility + hero text colour */ 153 153 :global([data-phase='night']) .sky { background: linear-gradient(180deg, #080611, #140f28 50%, #231a38); } 154 154 :global([data-phase='night']) .stars { opacity: 1; } 155 + /* Night is the bare starfield — no sun glow, halo ring, or lit horizon. */ 156 + :global([data-phase='night']) .bloom, 157 + :global([data-phase='night']) .halo, 158 + :global([data-phase='night']) .horizon { opacity: 0; } 155 159 :global([data-phase='dawn']) .sky { background: linear-gradient(180deg, #231533, #7a2f63 42%, #d7613a 78%, #f4a14a); } 156 160 :global([data-phase='dawn']) .stars { opacity: 0.5; } 157 161 :global([data-phase='morning']) .sky { background: linear-gradient(180deg, #3a2752, #c0567f 34%, #f5934a 70%, #ffd98a); }
+12
src/pages/index.phase.test.ts
··· 66 66 expect( global, 'every [data-phase=...] selector must be :global()-wrapped' ).toBe( total ); 67 67 } ); 68 68 69 + // At night the sky is the bare starfield: the sun-driven layers (.bloom glow, .halo ring, 70 + // .horizon line) must be switched off so no sun gradient or halo bleeds into the dark sky. 71 + it( 'hides every sun layer at night, leaving only the stars', () => { 72 + const style = index.match( /<style>([\s\S]*?)<\/style>/ )?.[ 1 ] ?? ''; 73 + for ( const layer of [ 'bloom', 'halo', 'horizon' ] ) { 74 + const rule = new RegExp( 75 + `:global\\(\\s*\\[data-phase='night'\\]\\s*\\)\\s*\\.${ layer }\\b` 76 + ); 77 + expect( style, `night must silence the .${ layer } sun layer` ).toMatch( rule ); 78 + } 79 + } ); 80 + 69 81 // The inline head script must run before any module loads (for a no-flash sky), so it 70 82 // can't import phaseForHour — it hand-mirrors the same hour->phase boundaries. This guard 71 83 // keeps that copy honest: extract its `var p = <ternary>` expression straight from source