Frontend: justified generated text, mobile layout without sideways scrolling
Summaries, analyses and answers are justified with hyphenation in the text's own language. Grid tracks can no longer grow past the screen (minmax(0, 1fr), min(…, 100%)), form fields may shrink, the privacy table scrolls on its own, and the body clips horizontal overflow as a safety net. Phones get tighter spacing and smaller headings; the facts lists stack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -11,14 +11,17 @@ const ORDER = { natal: NATAL_ORDER, synastry: SYNASTRY_ORDER, forecast: FORECAST
|
||||
export function AnalysisView({
|
||||
content,
|
||||
kind = "natal",
|
||||
language,
|
||||
}: {
|
||||
content: AnalysisContent;
|
||||
kind?: "natal" | "synastry" | "forecast";
|
||||
/** The language of the text, for hyphenation. */
|
||||
language?: string;
|
||||
}) {
|
||||
const order = ORDER[kind];
|
||||
const sections = order.map((key) => content.sections?.[key]).filter((s) => s !== undefined);
|
||||
return (
|
||||
<article className="analysis">
|
||||
<article className="analysis" lang={language}>
|
||||
<header className="analysis-head">
|
||||
<h2>{content.title}</h2>
|
||||
{content.summary && (
|
||||
|
||||
@@ -78,7 +78,7 @@ export function ChartSummary({
|
||||
<h2 id="summary-title" className="summary-title">
|
||||
{content.title}
|
||||
</h2>
|
||||
<p className="summary-text">
|
||||
<p className="summary-text" lang={summary?.language}>
|
||||
<Rich text={content.summary ?? ""} />
|
||||
</p>
|
||||
<a
|
||||
|
||||
@@ -155,7 +155,7 @@ export function DetailedAnalysis({
|
||||
<RegenerateButton<Analysis> url={`/admin/analyses/${analysis.id}/regenerate`} onStarted={setAnalysis} />
|
||||
)}
|
||||
{note && <p className="hint">{note}</p>}
|
||||
<AnalysisView content={analysis.content} kind={target.kind} />
|
||||
<AnalysisView content={analysis.content} kind={target.kind} language={analysis.language} />
|
||||
{questionsLeft !== undefined && (
|
||||
<AnalysisQuestions
|
||||
analysisId={analysis.id}
|
||||
|
||||
Reference in New Issue
Block a user