mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-11 05:13:02 -05:00
feat(): add challenge label to support translations
This commit is contained in:
@@ -2,12 +2,13 @@
|
||||
import type { Props } from '@astrojs/starlight/props';
|
||||
import Default from '@astrojs/starlight/components/PageTitle.astro';
|
||||
|
||||
const challengeNumber = Astro.props.entry.data.challengeNumber;
|
||||
const {label: challengeLabel, number: challengeNumber} = Astro.props.entry.data.challenge;
|
||||
|
||||
---
|
||||
|
||||
<div class="page-title-content">
|
||||
<Default {...Astro.props}><slot /></Default>
|
||||
{challengeNumber && <div class="chip">Challenge #{challengeNumber}</div> }
|
||||
{challengeNumber && <div class="chip">{challengeLabel} #{challengeNumber}</div> }
|
||||
</div>
|
||||
|
||||
<style>
|
||||
@@ -22,7 +23,7 @@ const challengeNumber = Astro.props.entry.data.challengeNumber;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.chip {
|
||||
border-width: 1px;
|
||||
@@ -36,4 +37,4 @@ const challengeNumber = Astro.props.entry.data.challengeNumber;
|
||||
height: fit-content;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user