${
// One text node, not two. The markup minifier collapses the space
// between adjacent template expressions, which rendered the title as
// "30.The Clinging" with the separator eaten. Join in JS instead.
[
h.number != null ? `${h.number}.` : '',
h.english ?? h.chinese ?? 'Hexagram',
]
.filter(Boolean)
.join(' ')
}
${h.chinese ? html`${h.chinese}` : nothing}
${h.pinyin ? html` ยท ${h.pinyin}` : nothing}
${
h.upperTrigram
? html`
${this.t('Upper')}
${trigramGlyph(h.upperTrigram) ?? ''}${h.upperTrigram}
`
: nothing
}
${
h.lowerTrigram
? html`
${this.t('Lower')}
${trigramGlyph(h.lowerTrigram) ?? ''}${h.lowerTrigram}
`
: nothing
}
${
// The Judgment and the Image are the written oracle of the figure, so
// they go with the readings; the figure, the trigrams and which lines
// are moving are what stays.
h.judgment && readings
? html`
${h.judgment}
`
: nothing
}
${h.image && readings ? html`
${h.image}
` : nothing}
${dailyMessage && readings ? html`
${dailyMessage}
` : nothing}
${
h.interpretation?.general && readings
? html`
${h.interpretation.general}
`
: nothing
}
${
changing.size > 0
? html`
${this.t('Changing lines: {{lines}}.', {
lines: Array.from(changing)
.sort((a, b) => a - b)
.join(', '),
})}
${
resultingHexagram?.english
? html` ${this.t('Becomes hexagram {{number}} {{name}}.', {
number: resultingHexagram.number,
name: resultingHexagram.english,
})}`
: nothing
}
`
: nothing
}
${this.renderLines(h, changing)}