diff --git a/src/ts/client/view/parts/GameModeRuleView.ts b/src/ts/client/view/parts/GameModeRuleView.ts index a3cf5a9..2d1f91c 100644 --- a/src/ts/client/view/parts/GameModeRuleView.ts +++ b/src/ts/client/view/parts/GameModeRuleView.ts @@ -38,7 +38,7 @@ export class GameModeRuleView { setHeader({ title, description,ruleName, iconCSS }: { title: string; ruleName:string; description?: string; iconCSS: string; }) { this.headerSegment.innerHTML = ""; const header = new TitleCupsuled(appendElement(this.headerSegment, "div")); - header.refresh(title, ruleName, { iconCSS,chara:"u-smallerChara" }); + header.refresh(title, ruleName, { iconCSS,chara:"u-smallerChara",id:ruleName.replace(/\s/g,"_") }); appendElement(this.headerSegment, "p", "u-smallerChara u-width90per").innerHTML = description || "" } setRule({ appliedClass }: { appliedClass: AppliedRuleClassResolved[]; }) { diff --git a/src/ts/client/view/parts/RuleIndexPart.ts b/src/ts/client/view/parts/RuleIndexPart.ts index 3214e9d..84c5f69 100644 --- a/src/ts/client/view/parts/RuleIndexPart.ts +++ b/src/ts/client/view/parts/RuleIndexPart.ts @@ -59,7 +59,8 @@ export class RuleIndexPart { } private generateRuleIndexHTML(ruleObj: RuleAttributeAndAppliedClassInfo, language: LanguageInApplication) { return `
-
${ruleObj.rule.title}${(ruleObj.rule.note || 0) !== 0 ? ` ${choiceString(contents.annotated, language)}` : ""}
${this.generateClassDescriptionInRuleIndex(ruleObj.appliedClass, language)}
+
${ruleObj.rule.title} + ${(ruleObj.rule.note || 0) !== 0 ? ` ${choiceString(contents.annotated, language)}` : ""}
${this.generateClassDescriptionInRuleIndex(ruleObj.appliedClass, language)}
`; } private generateClassDescriptionInRuleIndex(appliedClass: AppliedRuleClassResolved[], language: LanguageInApplication) { diff --git a/src/ts/client/view/parts/TitleCupsuled.ts b/src/ts/client/view/parts/TitleCupsuled.ts index b6b9c31..c4767f3 100644 --- a/src/ts/client/view/parts/TitleCupsuled.ts +++ b/src/ts/client/view/parts/TitleCupsuled.ts @@ -11,18 +11,20 @@ export class TitleCupsuled implements IView{ chara = "", subChara = "", hr = "u-thin", - iconCSS + iconCSS, + id = "" }:{ chara?:"u-biggerChara"|"u-smallerChara"|"", subChara?:"u-biggerChara"|"u-smallerChara"|"", hr?:"u-thin"|"u-bold" underline?:boolean, - iconCSS?:string + iconCSS?:string, + id?:string } = {}){ this.container.innerHTML = ""; const title = this.container.appendChild(elementWithoutEscaping`
-
${(iconCSS) ? ` ` : "" }${main}
+
${(iconCSS) ? ` ` : "" }${main}
`); if (sub !== undefined) title.appendChild(elementWithoutEscaping`
${sub}
`)