mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-12 05:43:03 -05:00
feat(doc): improve documentation authoring exp
This commit is contained in:
39
docs/src/components/PageTitle.astro
Normal file
39
docs/src/components/PageTitle.astro
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
import type { Props } from '@astrojs/starlight/props';
|
||||
import Default from '@astrojs/starlight/components/PageTitle.astro';
|
||||
|
||||
const challengeNumber = Astro.props.entry.data.challengeNumber;
|
||||
---
|
||||
|
||||
<div class="page-title-content">
|
||||
<Default {...Astro.props}><slot /></Default>
|
||||
{challengeNumber && <div class="chip">Challenge #{challengeNumber}</div> }
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.page-title-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@media (max-width: 1010px) {
|
||||
.page-title-content {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
.chip {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: var(--color-chip-border);
|
||||
border-radius: 6px;
|
||||
padding: 2px 8px;
|
||||
background-color: var(--color-chip);
|
||||
color: var(--sl-color-text);
|
||||
width: fit-content;
|
||||
height: fit-content;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user