Une adresse pour chaque écran, de vrais liens pour y aller
Routeur pur (fragment vers écran et inversement) et navigation sur hashchange : aide et ses questions, glossaire et ses termes, à propos, menu, mes parties et chaque partie, vue d'une position avec « Jouer à partir d'ici » et « Retour à ma partie », « Copier le lien de la position ». Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
43031d1ec6
commit
f4914b30ab
+210
-5
@@ -1165,14 +1165,14 @@ html.landscape .banner {
|
||||
bottom: var(--space-2);
|
||||
}
|
||||
|
||||
/* L'aide reste une page qu'on fait défiler. */
|
||||
html.landscape.help-open,
|
||||
html.landscape.help-open body {
|
||||
/* L'aide et la vue d'une position restent des pages qu'on fait défiler. */
|
||||
html.landscape.page-open,
|
||||
html.landscape.page-open body {
|
||||
height: auto;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
html.landscape.help-open body {
|
||||
html.landscape.page-open body {
|
||||
padding: 0 var(--space-4);
|
||||
background: var(--background);
|
||||
}
|
||||
@@ -1306,7 +1306,7 @@ html.rotated .banner {
|
||||
}
|
||||
|
||||
.about {
|
||||
margin-top: var(--space-8);
|
||||
margin-top: var(--space-2);
|
||||
font-size: 15px;
|
||||
line-height: 20px;
|
||||
color: var(--muted);
|
||||
@@ -1316,3 +1316,208 @@ html.rotated .banner {
|
||||
user-select: text;
|
||||
-webkit-user-select: text;
|
||||
}
|
||||
|
||||
#help-back {
|
||||
margin-top: var(--space-4);
|
||||
}
|
||||
|
||||
/* Les onglets de l'aide : des liens, l'onglet courant souligné en brique. */
|
||||
.help-tabs {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-1);
|
||||
margin-top: var(--space-4);
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.help-tabs a {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
min-height: 44px;
|
||||
padding: 0 var(--space-3);
|
||||
font-weight: 500;
|
||||
color: var(--muted);
|
||||
text-decoration: none;
|
||||
border-bottom: 3px solid transparent;
|
||||
}
|
||||
|
||||
.help-tabs a[aria-current="page"] {
|
||||
font-weight: 700;
|
||||
color: var(--text);
|
||||
border-bottom-color: var(--accent);
|
||||
}
|
||||
|
||||
.help-notice:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Une question de l'aide : son titre est un lien qui l'ouvre (son adresse),
|
||||
* ou la referme quand elle est ouverte. */
|
||||
.question {
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.help .question h3 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.question h3 a {
|
||||
display: flex;
|
||||
gap: var(--space-2);
|
||||
align-items: center;
|
||||
min-height: 52px;
|
||||
padding: var(--space-2) 0;
|
||||
color: var(--text);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.question h3 a::after {
|
||||
content: "";
|
||||
flex: none;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
margin: 0 6px 4px auto;
|
||||
border-right: 2px solid var(--muted);
|
||||
border-bottom: 2px solid var(--muted);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.question.open h3 a::after {
|
||||
margin-bottom: -4px;
|
||||
transform: rotate(-135deg);
|
||||
}
|
||||
|
||||
.answer {
|
||||
padding-bottom: var(--space-3);
|
||||
}
|
||||
|
||||
/* Le terme ouvert par son adresse (#/glossaire/<terme>). */
|
||||
.glossary dt a {
|
||||
color: var(--text);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.glossary dt.current,
|
||||
.glossary dt.current + dd {
|
||||
margin-inline: calc(-1 * var(--space-4));
|
||||
padding-inline: var(--space-4);
|
||||
background: var(--accent-soft);
|
||||
}
|
||||
|
||||
/* -------------------------------------------------- Liens et boutons */
|
||||
|
||||
/* Un lien qui mène à un écran, avec l'allure d'un bouton. */
|
||||
a.button {
|
||||
display: inline-flex;
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: var(--button-height);
|
||||
padding: 0 20px;
|
||||
font-weight: 700;
|
||||
color: var(--on-accent);
|
||||
text-decoration: none;
|
||||
background: var(--accent);
|
||||
border: 2px solid var(--accent);
|
||||
border-radius: var(--radius-pill);
|
||||
touch-action: manipulation;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
a.button.secondary {
|
||||
color: var(--text);
|
||||
background: transparent;
|
||||
border-color: var(--border-strong);
|
||||
}
|
||||
|
||||
a.button:active {
|
||||
transform: translateY(1px);
|
||||
filter: brightness(0.94);
|
||||
}
|
||||
|
||||
a.icon-button,
|
||||
a.item,
|
||||
a.link-button {
|
||||
text-decoration: none;
|
||||
touch-action: manipulation;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
a.link-button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.infoline .copy-link {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
/* Zone de texte de la copie de repli (presse-papiers), hors de l'écran. */
|
||||
.offscreen {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: -10000px;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------ Vue d'une position */
|
||||
|
||||
.position-view {
|
||||
max-width: var(--page-width);
|
||||
margin: 0 auto;
|
||||
padding-bottom: var(--space-6);
|
||||
}
|
||||
|
||||
.position-title {
|
||||
margin: var(--space-6) 0 var(--space-2);
|
||||
font-size: 24px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.position-message:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.position-board {
|
||||
margin: var(--space-2) 0;
|
||||
}
|
||||
|
||||
/* En paysage, le plateau tient dans la hauteur de l'écran. */
|
||||
html.landscape .position-board {
|
||||
width: min(100%, calc(80vh * 640 / 520));
|
||||
height: auto;
|
||||
margin-inline: auto;
|
||||
aspect-ratio: 640 / 520;
|
||||
}
|
||||
|
||||
.position-detail {
|
||||
margin: var(--space-2) 0 var(--space-4);
|
||||
font-size: 15px;
|
||||
line-height: 20px;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.position-actions {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1.6fr;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
|
||||
.position-actions > * {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.position-copy {
|
||||
display: inline-flex;
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
margin-top: var(--space-3);
|
||||
}
|
||||
|
||||
.position-copy .icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user