-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #282 from centrica-engineering/feature/content-str…
…ucture [discovery] content structure
- Loading branch information
Showing
214 changed files
with
1,243 additions
and
2,082 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
const { name } = Astro.props; | ||
import cem from "@connectedhomes/nucleus/custom-elements.json"; | ||
const compDetails = cem.tags.find((tag) => tag.name === name); | ||
--- | ||
|
||
<div class="purpose"> | ||
<p>{compDetails?.description}</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,70 @@ | ||
--- | ||
import type { Props } from "@astrojs/starlight/props"; | ||
import NucleusPageTitle from '../NucleusPageTitle.astro'; | ||
import NucleusPageTitle from "../NucleusPageTitle.astro"; | ||
--- | ||
|
||
<NucleusPageTitle {...Astro.props}/> | ||
<div class="section-tabs"> | ||
<NucleusPageTitle {...Astro.props} /> | ||
</div> | ||
|
||
<div class="lg:sl-flex"> | ||
{ | ||
Astro.props.toc && ( | ||
<aside class="right-sidebar-container"> | ||
<div class="right-sidebar"> | ||
<slot name="right-sidebar" /> | ||
</div> | ||
</aside> | ||
) | ||
} | ||
<div class="main-pane"><slot /></div> | ||
{ | ||
Astro.props.toc && ( | ||
<aside class="right-sidebar-container"> | ||
<div class="right-sidebar"> | ||
<slot name="right-sidebar" /> | ||
</div> | ||
</aside> | ||
) | ||
} | ||
<div class="main-pane"><slot /></div> | ||
</div> | ||
|
||
<style> | ||
.main-pane { | ||
isolation: isolate; | ||
} | ||
|
||
@media (min-width: 72rem) { | ||
.right-sidebar-container { | ||
order: 2; | ||
position: relative; | ||
width: calc( | ||
var(--sl-sidebar-width) + (100% - var(--sl-content-width) - var(--sl-sidebar-width)) / 2 | ||
); | ||
} | ||
|
||
.right-sidebar { | ||
position: fixed; | ||
/* top: 0; */ | ||
border-inline-start: 1px solid var(--sl-color-gray-6); | ||
padding-top: var(--sl-nav-height); | ||
width: 100%; | ||
height: 100vh; | ||
overflow-y: auto; | ||
scrollbar-width: none; | ||
} | ||
|
||
.main-pane { | ||
width: 100%; | ||
} | ||
|
||
:global([data-has-sidebar][data-has-toc]) .main-pane { | ||
--sl-content-margin-inline: auto 0; | ||
|
||
order: 1; | ||
width: calc( | ||
var(--sl-content-width) + (100% - var(--sl-content-width) - var(--sl-sidebar-width)) / 2 | ||
); | ||
} | ||
} | ||
</style> | ||
.section-tabs { | ||
position: sticky; | ||
top: 64px; | ||
z-index: 1; | ||
background-color: #f4f6f8; | ||
} | ||
|
||
.main-pane { | ||
isolation: isolate; | ||
} | ||
|
||
@media (min-width: 72rem) { | ||
.right-sidebar-container { | ||
order: 2; | ||
position: relative; | ||
width: calc( | ||
var(--sl-sidebar-width) + | ||
(100% - var(--sl-content-width) - var(--sl-sidebar-width)) / 2 | ||
); | ||
} | ||
|
||
.right-sidebar { | ||
position: fixed; | ||
/* top: 0; */ | ||
border-inline-start: 1px solid var(--sl-color-gray-6); | ||
padding-top: var(--sl-nav-height); | ||
width: 100%; | ||
height: 100vh; | ||
overflow-y: auto; | ||
scrollbar-width: none; | ||
} | ||
|
||
.main-pane { | ||
width: 100%; | ||
} | ||
|
||
:global([data-has-sidebar][data-has-toc]) .main-pane { | ||
--sl-content-margin-inline: auto 0; | ||
|
||
order: 1; | ||
width: calc( | ||
var(--sl-content-width) + | ||
(100% - var(--sl-content-width) - var(--sl-sidebar-width)) / 2 | ||
); | ||
} | ||
} | ||
</style> |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../ns-alert/_examples/highlighter/info.html → ...components/ns-alert/highlighter/info.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<ns-alert state="info"> | ||
<ns-alert type="highlighter" state="info"> | ||
<h2 slot="heading">Priority Services Register</h2> | ||
<p>You may be able to receive free priority support, <a href="#!">find out if you qualify</a>.</p> | ||
</ns-alert> |
2 changes: 1 addition & 1 deletion
2
...alert/_examples/highlighter/standard.html → ...onents/ns-alert/highlighter/standard.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<ns-alert type="highlighter" state="error"> | ||
<ns-alert type="highlighter"> | ||
<h2 slot="heading">Unfortunately, we're having technical problems at the moment</h2> | ||
<p>Either stay on this page and try again in a few moments, or try again later.</p> | ||
</ns-alert> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions
9
src/content/docs/_examples/components/ns-inputter/checkbox-inline.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<ns-inputter class="inline" heading="What options do you like?" helper="How can we help you?" validation="["isRequired"]" name="checkboxes"> | ||
<div slot="tip-details">By providing clarification on why this information is necessary.</div> | ||
<input checked type="checkbox" name="checkboxes" value="a" id="checkbox-01"> | ||
<label for="checkbox-01">Option A</label> | ||
<input type="checkbox" name="checkboxes" value="b" id="checkbox-02"> | ||
<label for="checkbox-02">Option B</label> | ||
<input type="checkbox" name="checkboxes" value="c" id="checkbox-03"> | ||
<label for="checkbox-03">Option C</label> | ||
</ns-inputter> |
9 changes: 9 additions & 0 deletions
9
src/content/docs/_examples/components/ns-inputter/checkbox.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<ns-inputter heading="What options do you like?" helper="How can we help you?" validation="["isRequired"]" name="checkboxes"> | ||
<div slot="tip-details">By providing clarification on why this information is necessary.</div> | ||
<input checked type="checkbox" name="checkboxes" value="a" id="checkbox-01"> | ||
<label for="checkbox-01">Option A</label> | ||
<input type="checkbox" name="checkboxes" value="b" id="checkbox-02"> | ||
<label for="checkbox-02">Option B</label> | ||
<input type="checkbox" name="checkboxes" value="c" id="checkbox-03"> | ||
<label for="checkbox-03">Option C</label> | ||
</ns-inputter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<ns-inputter helper="How can we help you?" validation="["isRequired","isEmail"]"> | ||
<div slot="tip-details">By providing clarification on why this information is necessary.</div> | ||
<label slot="label">Email</label> | ||
<input type="email" placeholder="e.g. [email protected]" autocomplete="email"> | ||
</ns-inputter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<ns-inputter mask="000000" validation="["isRequired"]"> | ||
<label slot="label">Mask</label> | ||
<input type="text"> | ||
</ns-inputter> |
4 changes: 4 additions & 0 deletions
4
src/content/docs/_examples/components/ns-inputter/number.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<ns-inputter validation="["isRequired","isBetween(5,20)"]"> | ||
<label slot="label">Number</label> | ||
<input type="number" min="0" max="10"> | ||
</ns-inputter> |
4 changes: 4 additions & 0 deletions
4
src/content/docs/_examples/components/ns-inputter/password.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<ns-inputter> | ||
<label slot="label">Password</label> | ||
<input type="password"> | ||
</ns-inputter> |
9 changes: 9 additions & 0 deletions
9
src/content/docs/_examples/components/ns-inputter/radio-inline.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<ns-inputter class="inline" heading="Which choice would you prefer?" helper="How can we help you?" validation="["isRequired"]" name="radiobuttons"> | ||
<div slot="tip-details">By providing clarification on why this information is necessary.</div> | ||
<input checked type="radio" name="radiobuttons" value="a" id="radio-01"> | ||
<label for="radio-01">Choice A</label> | ||
<input type="radio" name="radiobuttons" value="b" id="radio-02"> | ||
<label for="radio-02">Choice B</label> | ||
<input type="radio" name="radiobuttons" value="c" id="radio-03"> | ||
<label for="radio-03">Choice C</label> | ||
</ns-inputter> |
Oops, something went wrong.