Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a75712a60a | ||
|
|
90fd87ab4a |
@@ -220,6 +220,28 @@ td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|||||||
.legend-square { background: var(--square); }
|
.legend-square { background: var(--square); }
|
||||||
.legend-opposition { background: var(--tense); }
|
.legend-opposition { background: var(--tense); }
|
||||||
.aspect-tag { white-space: nowrap; }
|
.aspect-tag { white-space: nowrap; }
|
||||||
|
|
||||||
|
/* Aspect grid */
|
||||||
|
.aspect-grid-wrap { overflow-x: auto; }
|
||||||
|
.aspect-grid { width: auto; border-collapse: collapse; font-size: 16px; }
|
||||||
|
.aspect-grid td, .aspect-grid th {
|
||||||
|
width: 30px; min-width: 30px; height: 30px; padding: 0; text-align: center; vertical-align: middle;
|
||||||
|
border: 1px solid var(--line); line-height: 1;
|
||||||
|
}
|
||||||
|
.aspect-grid th { color: var(--ink); font-weight: 400; font-size: 17px; background: var(--panel-2); }
|
||||||
|
.aspect-grid .grid-angle { font: 600 11px var(--font-body); color: var(--gold); letter-spacing: 0.3px; }
|
||||||
|
.asp-conjunction { color: var(--gold); }
|
||||||
|
.asp-trine, .asp-sextile { color: var(--harmonic); }
|
||||||
|
.asp-square { color: var(--square); }
|
||||||
|
.asp-opposition { color: var(--tense); }
|
||||||
|
.details > summary { cursor: pointer; color: var(--gold); min-height: 44px; display: flex; align-items: center; }
|
||||||
|
.details[open] > summary { margin-bottom: 8px; }
|
||||||
|
@media (max-width: 640px) {
|
||||||
|
.aspect-grid { font-size: 13px; }
|
||||||
|
.aspect-grid td, .aspect-grid th { width: 23px; min-width: 23px; height: 23px; }
|
||||||
|
.aspect-grid th { font-size: 14px; }
|
||||||
|
.aspect-grid .grid-angle { font-size: 9px; }
|
||||||
|
}
|
||||||
.aspect-harmonic { color: var(--harmonic); }
|
.aspect-harmonic { color: var(--harmonic); }
|
||||||
.aspect-tense { color: var(--tense); }
|
.aspect-tense { color: var(--tense); }
|
||||||
.aspect-neutral { color: var(--gold); }
|
.aspect-neutral { color: var(--gold); }
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ANGLES, ASPECTS, POINTS, SIGNS, dms, orbText, pointName, signName } from "@/lib/astro";
|
import { ANGLES, ASPECTS, POINTS, SIGNS, dms, orbText, pointName, signName } from "@/lib/astro";
|
||||||
import type { Chart, Position } from "@/lib/types";
|
import type { Aspect, Chart, Position } from "@/lib/types";
|
||||||
|
|
||||||
function Pos({ p }: { p: Position }) {
|
function Pos({ p }: { p: Position }) {
|
||||||
return (
|
return (
|
||||||
@@ -46,6 +46,77 @@ export function BigThree({ chart }: { chart: Chart }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Rows and columns of the aspect grid: the points drawn on the wheel, then the angles.
|
||||||
|
const GRID_POINTS = [
|
||||||
|
"sun",
|
||||||
|
"moon",
|
||||||
|
"mercury",
|
||||||
|
"venus",
|
||||||
|
"mars",
|
||||||
|
"jupiter",
|
||||||
|
"saturn",
|
||||||
|
"uranus",
|
||||||
|
"neptune",
|
||||||
|
"pluto",
|
||||||
|
"north_node",
|
||||||
|
"lilith",
|
||||||
|
"chiron",
|
||||||
|
];
|
||||||
|
const GRID_ANGLES: [string, string][] = [
|
||||||
|
["ascendant", "AC"],
|
||||||
|
["midheaven", "MC"],
|
||||||
|
];
|
||||||
|
|
||||||
|
/** The usual triangular aspect grid: only the aspect symbols, the values are in the details below. */
|
||||||
|
function AspectGrid({ chart }: { chart: Chart }) {
|
||||||
|
const result = chart.chart;
|
||||||
|
const present = new Set(result.points.map((p) => p.id));
|
||||||
|
const rows: [string, string][] = GRID_POINTS.filter((id) => present.has(id)).map((id) => [
|
||||||
|
id,
|
||||||
|
POINTS[id]?.glyph ?? id,
|
||||||
|
]);
|
||||||
|
if (chart.highlights.time_known) {
|
||||||
|
for (const [key, label] of GRID_ANGLES) if (result.angles?.[key]) rows.push([key, label]);
|
||||||
|
}
|
||||||
|
const byPair = new Map<string, Aspect>();
|
||||||
|
for (const a of result.aspects ?? []) {
|
||||||
|
byPair.set(`${a.point1}|${a.point2}`, a);
|
||||||
|
byPair.set(`${a.point2}|${a.point1}`, a);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="aspect-grid-wrap">
|
||||||
|
<table className="aspect-grid" aria-label="Fényszögmátrix">
|
||||||
|
<tbody>
|
||||||
|
{rows.map(([id, label], i) => (
|
||||||
|
<tr key={id}>
|
||||||
|
{rows.slice(0, i).map(([other]) => {
|
||||||
|
const a = byPair.get(`${id}|${other}`);
|
||||||
|
const info = a ? ASPECTS[a.aspect] : undefined;
|
||||||
|
const text = a ? `${pointName(other)} ${info?.hu ?? a.aspect} ${pointName(id)}` : undefined;
|
||||||
|
return (
|
||||||
|
<td key={other} title={text}>
|
||||||
|
{a && (
|
||||||
|
<span className={`sym asp asp-${a.aspect}`} aria-label={text} role="img">
|
||||||
|
{info?.glyph ?? "?"}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</td>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
<th scope="row" title={pointName(id)}>
|
||||||
|
<span className={label.length > 2 ? "sym" : "grid-angle"} aria-label={pointName(id)} role="img">
|
||||||
|
{label}
|
||||||
|
</span>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
))}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/** Positions, angles, house cusps and aspects of a natal chart. */
|
/** Positions, angles, house cusps and aspects of a natal chart. */
|
||||||
export function ChartTables({ chart }: { chart: Chart }) {
|
export function ChartTables({ chart }: { chart: Chart }) {
|
||||||
const result = chart.chart;
|
const result = chart.chart;
|
||||||
@@ -140,8 +211,12 @@ export function ChartTables({ chart }: { chart: Chart }) {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{aspects.length > 0 && (
|
{aspects.length > 0 && (
|
||||||
|
<div className="field" style={{ gap: 12 }}>
|
||||||
|
<h3>Fényszögek</h3>
|
||||||
|
<AspectGrid chart={chart} />
|
||||||
|
<details className="details">
|
||||||
|
<summary>Részletek: orbisz, közeledő vagy távolodó</summary>
|
||||||
<div className="table-wrap">
|
<div className="table-wrap">
|
||||||
<h3 style={{ marginBottom: 8 }}>Fényszögek</h3>
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -183,6 +258,8 @@ export function ChartTables({ chart }: { chart: Chart }) {
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</details>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
{!timeKnown && (
|
{!timeKnown && (
|
||||||
<p className="hint">
|
<p className="hint">
|
||||||
|
|||||||
Reference in New Issue
Block a user