mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-27 11:28:38 +01:00
Display "(deprecated)" next to deprecated endpoints
This commit is contained in:
parent
1213f81676
commit
17acd978a4
|
|
@ -289,6 +289,12 @@ Custom SCSS for the Matrix spec
|
|||
font-family: $font-family-monospace;
|
||||
color: $secondary;
|
||||
}
|
||||
|
||||
.endpoint-deprecated {
|
||||
color: $danger;
|
||||
font-weight: $font-weight-bold;
|
||||
margin-left: 0.35rem;
|
||||
}
|
||||
}
|
||||
|
||||
.page-description {
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
<a href="#{{ .anchor }}">
|
||||
<span class="http-api-method">{{ .method }}</span>
|
||||
<span class="endpoint-path">{{ .endpoint }}</span>
|
||||
{{ if .deprecated }}<span class="endpoint-deprecated">(deprecated)</span>{{ end }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@
|
|||
|
||||
{{/* Collect endpoints for the on-page endpoints TOC */}}
|
||||
{{ if $page }}
|
||||
{{ $entry := dict "anchor" $anchor "method" $method "endpoint" $endpoint "summary" $operation_data.summary }}
|
||||
{{/* Store each endpoint's metadata in a scratch variable */}}
|
||||
{{ $entry := dict "anchor" $anchor "method" $method "endpoint" $endpoint "summary" $operation_data.summary "deprecated" $operation_data.deprecated }}
|
||||
{{ if not (reflect.IsSlice ($page.Scratch.Get "api_endpoints")) }}
|
||||
{{ $page.Scratch.Set "api_endpoints" (slice) }}
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue