mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-24 06:24:22 +00:00
feat(toc): ✨ add wrapper for TOC link to hold summary
Some extensions such as DiscussionTools add summary to the ToC item. We should add styles to support that
This commit is contained in:
parent
4849c648dc
commit
2157bcf490
|
@ -28,6 +28,7 @@
|
|||
padding: var( --space-xs );
|
||||
font-weight: var( --font-weight-medium );
|
||||
color: var( --color-emphasized );
|
||||
border-radius: var( --border-radius-base );
|
||||
|
||||
&.citizen-toc-top {
|
||||
height: 0;
|
||||
|
@ -89,6 +90,11 @@
|
|||
color: var( --color-subtle );
|
||||
}
|
||||
|
||||
&-summary {
|
||||
font-size: var( --font-size-x-small );
|
||||
color: var( --color-subtle );
|
||||
}
|
||||
|
||||
&-list-item {
|
||||
position: relative;
|
||||
|
||||
|
@ -119,7 +125,7 @@
|
|||
display: grid;
|
||||
place-content: center;
|
||||
cursor: pointer;
|
||||
border-radius: var( --border-radius--small );
|
||||
border-radius: var( --border-radius-base );
|
||||
|
||||
.citizen-ui-icon {
|
||||
&::before {
|
||||
|
@ -223,6 +229,7 @@
|
|||
margin: 0;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
transform: none;
|
||||
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
}}
|
||||
<a class="citizen-toc-link" href="#{{linkAnchor}}{{^linkAnchor}}{{anchor}}{{/linkAnchor}}">
|
||||
<div class="citizen-toc-indicator"></div>
|
||||
<div class="citizen-toc-text">
|
||||
<span class="citizen-toc-numb">{{number}}</span>
|
||||
<span class="citizen-toc-heading">{{{line}}}</span>
|
||||
<div class="citizen-toc-content">
|
||||
<div class="citizen-toc-text">
|
||||
<span class="citizen-toc-numb">{{number}}</span>
|
||||
<span class="citizen-toc-heading">{{{line}}}</span>
|
||||
</div>
|
||||
{{#html-summary}}<div class="citizen-toc-summary">{{.}}</span>{{/html-summary}}
|
||||
</div>
|
||||
</a>
|
||||
{{#html-summary}}
|
||||
{{{.}}}
|
||||
{{/html-summary}}
|
||||
{{#is-top-level-section}}{{#is-parent-section}}
|
||||
<button aria-controls="toc-{{anchor}}-sublist" class="citizen-toc-toggle">
|
||||
<span class="citizen-ui-icon mw-ui-icon-wikimedia-collapse"></span>
|
||||
|
|
Loading…
Reference in a new issue