Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
10 changes: 10 additions & 0 deletions css/badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
@include cr-badge-spec(#7473CA, '.fa-archive');
}

&.exposition-only-spec {
@include cr-badge-spec(#666, '.fa-sticky-note-o');
}

&.latest-spec a {
display: flex;
}
Expand Down Expand Up @@ -173,6 +177,12 @@
content: "C++ (廃案)";
}
}

#{$sel}.exposition-only-spec {
& a:before, & ~ #{$sel}.latest-spec:not(.noprefix) a:before {
content: "説明専用";
}
}
}

@mixin cr-badge-auto($sel: "li.badge") {
Expand Down
12 changes: 7 additions & 5 deletions js/crsearch/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ export default class DOM {
li.addClass('added-in-spec').attr('title', `${cppv}で追加`)
}
} else {
name = attr == 'future' ? '将来' :
attr == 'archive' ? '廃案' :
null
const name = attr == 'future' ? '将来' :
attr == 'archive' ? '廃案' :
null

if (name) {
li.addClass('named-version-spec').attr('title', `C++ (${name})`)
li.attr('named-version', attr)
li.addClass('named-version-spec').attr('title', `C++ (${name})`)
li.attr('data-named-version', attr)
} else if (attr == 'exposition-only') {
li.addClass('exposition-only-spec').attr('title', '説明専用')
}
}

Expand Down
4 changes: 3 additions & 1 deletion js/crsearch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export default class Index {

const attrs = []
if (!opts.badges.noselfcpp && this._cpp_version) {
attrs.push(`added-in-cpp${this._cpp_version}`)
if (!/^(?:future|archive)$/.test(this._cpp_version)) {
attrs.push(`added-in-cpp${this._cpp_version}`)
}
}
if (this._attributes) {
attrs.push(...this._attributes)
Expand Down