mirror of
https://github.com/quantum5/qcal.git
synced 2025-07-26 19:34:10 -04:00
mcal: add labels for different information
This commit is contained in:
parent
1fd038e900
commit
2c352f880c
|
@ -14,6 +14,7 @@ import {
|
|||
jdnHaabExt,
|
||||
jdnLordOfNight, jdnTzolkin,
|
||||
} from '@common/mayan';
|
||||
import {useMobileTooltipProps} from '@common/ui/MobileTooltip';
|
||||
|
||||
type MonthProps = {
|
||||
year: HaabYear;
|
||||
|
@ -26,12 +27,21 @@ type DateProps = MonthProps & {
|
|||
|
||||
function Day({year, month, day, todayJDN}: DateProps & { todayJDN: number }): JSX.Element {
|
||||
const jdn = haabExtJDN({year, month, day});
|
||||
const mobile = useMobileTooltipProps();
|
||||
return <div className={`Day ${jdn === todayJDN ? 'Day-today' : ''}`}>
|
||||
<div className="Day-name">{day}<span className="Day-haabMonth"> {haabNames[month]}</span></div>
|
||||
<div className="Day-tzolkin">{formatTzolkin(jdnTzolkin(jdn))}</div>
|
||||
<div className="Day-lc">{jdnLongCount(jdn)?.join('.')}</div>
|
||||
<div className="Day-lordOfNight">{formatLordOfNight(jdnLordOfNight(jdn))}</div>
|
||||
<div className="Day-gregorian">{jdnDate(jdn).toDateString()}</div>
|
||||
<div className="Day-tzolkin">
|
||||
<abbr title="Tzolkʼin" {...mobile}>T.</abbr> {formatTzolkin(jdnTzolkin(jdn))}
|
||||
</div>
|
||||
<div className="Day-lc">
|
||||
<abbr title="Long count" {...mobile}>L.</abbr> {jdnLongCount(jdn)?.join('.')}
|
||||
</div>
|
||||
<div className="Day-lordOfNight">
|
||||
<abbr title="Lord of the Night" {...mobile}>N.</abbr> {formatLordOfNight(jdnLordOfNight(jdn))
|
||||
}</div>
|
||||
<div className="Day-gregorian">
|
||||
<abbr title="Gregorian date" {...mobile}>G.</abbr> {jdnDate(jdn).toDateString()}
|
||||
</div>
|
||||
</div>;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue