Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions css/kunai/site/badge-ext.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,6 @@ main[role="main"] {

span.cpp {
@include cr-badge;

&.exposition-only {
border-color: #666;
color: #666;
font-style: italic;

i {
display: none;
}

&::before {
@include fa-patch;
content: "\f24a"; // fa-sticky-note-o
}

&::after {
content: "説明専用";
}
}
}
}
}
Expand Down
23 changes: 0 additions & 23 deletions css/kunai/site/sidebar-ext.scss
Original file line number Diff line number Diff line change
Expand Up @@ -140,29 +140,6 @@

> .title > ul.badges {
@include cr-badge-auto(".badge");

> li.badge[data-original-attr="exposition-only"] {
border-color: #666;
color: #666;
font-style: italic;

a {
color: #666;

i {
display: none;
}

&::before {
@include fa-patch;
content: "\f24a"; // fa-sticky-note-o
}
}
}

&.simple > li.badge[data-original-attr="exposition-only"] a::after {
display: block;
}
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion css/kunai/site/sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,8 @@ main[role="main"] .kunai-sidebar.force-legacy {
ul.others > li.other {
.cr-index {
ul.keys {
display: inline-block;
display: inline-flex;
flex-direction: row;
padding-left: 2px;
> li.key {
display: inline-block;
Expand Down
7 changes: 7 additions & 0 deletions js/kunai/ui/badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const sanitize = (badges) => {
let deprecated_or_removed = false
let cppv = null
let named_version = null
let exposition_only = false
for (const c of b_classes) {
if (/^(?:future|archive)$/.test(c)) {
named_version = c
Expand All @@ -30,6 +31,11 @@ const sanitize = (badges) => {
continue
}

if (c === 'exposition-only') {
exposition_only = true
classes.push('exposition-only-spec')
}

const cppm = c.match(/^cpp(\d[\da-zA-Z])(.*)$/)
if (!cppm) continue;

Expand All @@ -55,6 +61,7 @@ const sanitize = (badges) => {

const lang_path = cppv ? `/lang/cpp${cppv}` :
named_version ? `/lang/${named_version}` :
exposition_only ? '/reference/exposition-only' :
`/lang`
const a_elem = $('<a>', {href: `${lang_path}.html`})
.append($('<i>'))
Expand Down