forked from alphagov/govuk-design-system
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add toc component with markup example
- Loading branch information
Showing
2 changed files
with
121 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<nav class="app-c-toc"> | ||
<ul class="app-c-toc__section"> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Back link</a> | ||
</li> | ||
<li class="app-c-toc__section-item--current"> | ||
<a href="#">Breadcrumbs</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Button</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Checkbox</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Cookie banner</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Date input</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Download links</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Error message</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Error summary</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Feedback link</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Fieldset</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">File upload</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Input</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Inset text</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Label</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Legal text</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">List</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Panel</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Phase banner</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Previous next</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Radio</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Select</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Skip link</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Table</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Tag</a> | ||
</li> | ||
<li class="app-c-toc__section-item"> | ||
<a href="#">Textarea</a> | ||
</li> | ||
</ul> | ||
</nav> |
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,39 @@ | ||
@include exports("toc") { | ||
|
||
.app-c-toc { | ||
padding: 0 $govuk-gutter-half; | ||
@include govuk-core-16; | ||
} | ||
|
||
.app-c-toc__section { | ||
margin: $govuk-gutter-half 0; | ||
padding: 0; | ||
list-style-type: none; | ||
|
||
a, | ||
a:link, | ||
a:visited { | ||
display: block; | ||
padding: 8px ($govuk-gutter * 2) 8px $gutter-one-third; | ||
border-left: 4px solid transparent; | ||
color: $govuk-link-colour; | ||
background: inherit; | ||
text-decoration: none; | ||
} | ||
|
||
a:hover { | ||
border-left-color: $govuk-link-hover-colour; | ||
} | ||
} | ||
|
||
.app-c-toc__section-item--current { | ||
a, | ||
a:link, | ||
a:visited { | ||
border-left-color: $govuk-link-colour; | ||
background: $app-light-grey; | ||
font-weight: bold; | ||
} | ||
} | ||
|
||
} |