MY SKY: full-page layout polish — aperture pinning, wheel-above-form, centred wheel
All checks were successful
ci/woodpecker/push/pyswiss Pipeline was successful
ci/woodpecker/push/main Pipeline was successful

- sky_view passes page_class="page-sky" so the footer pins correctly
- _natus.scss: page-sky aperture block (mirrors page-wallet pattern);
  sky-page stacks wheel above form via flex order + page-level scroll;
  wheel col uses aspect-ratio:1/1 so it takes natural square size without
  compressing to fit the form
- natus-wheel.js: _layout() sets viewBox + preserveAspectRatio="xMidYMid meet"
  so the wheel is always centred inside the SVG element regardless of its
  aspect ratio (fixes left-alignment in the dashboard applet)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Disco DeDisco
2026-04-16 14:40:52 -04:00
parent bd9a2fdae3
commit 8a24021739
5 changed files with 187 additions and 0 deletions

View File

@@ -317,6 +317,7 @@ def sky_view(request):
"saved_sky": request.user.sky_chart_data,
"saved_birth_dt": request.user.sky_birth_dt,
"saved_birth_place": request.user.sky_birth_place,
"page_class": "page-sky",
})

View File

@@ -118,6 +118,10 @@ const NatusWheel = (() => {
const size = Math.min(rect.width || 400, rect.height || 400);
_cx = size / 2;
_cy = size / 2;
// viewBox pins the coordinate system to size×size; preserveAspectRatio
// centres it inside the SVG element regardless of its aspect ratio.
svgEl.setAttribute('viewBox', `0 0 ${size} ${size}`);
svgEl.setAttribute('preserveAspectRatio', 'xMidYMid meet');
_r = size * 0.46; // leave a small margin
R = {