Docs: Improve `.from-version` macro (#7874)
* Docs: Improve `.from-version` macro * Restore icons in version badges
This commit is contained in:
parent
6236e7777c
commit
d29df793a4
|
@ -1,5 +1,5 @@
|
||||||
created: 20150117152612000
|
created: 20150117152612000
|
||||||
modified: 20230325101137075
|
modified: 20240223123123497
|
||||||
tags: $:/tags/Stylesheet
|
tags: $:/tags/Stylesheet
|
||||||
title: $:/editions/tw5.com/doc-styles
|
title: $:/editions/tw5.com/doc-styles
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
@ -181,18 +181,23 @@ tr.doc-table-subheading {
|
||||||
fill: <<colour alert-highlight>>;
|
fill: <<colour alert-highlight>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.doc-from-version.tc-tiddlylink {
|
a.doc-from-version {
|
||||||
display: inline-block;
|
background-color: <<colour muted-foreground>>;
|
||||||
border-radius: 1em;
|
color: <$wikify name="background" text="<<colour muted-foreground>>" mode="inline"><$transclude $variable="contrastcolour" target=<<background>> colourA="#000000" colourB="#ffffff" /></$wikify>;
|
||||||
background: <<colour muted-foreground>>;
|
padding: 3px;
|
||||||
color: <<colour background>>;
|
border-radius: 4px;
|
||||||
fill: <<colour background>>;
|
|
||||||
padding: 0 0.4em;
|
|
||||||
font-size: 0.7em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
line-height: 1.5;
|
font-size: 0.75em;
|
||||||
vertical-align: text-bottom;
|
}
|
||||||
|
|
||||||
|
a.doc-from-version.doc-from-version-new {
|
||||||
|
background-color: <<colour highlight-background>>;
|
||||||
|
color: <<colour highlight-foreground>>;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.doc-from-version svg {
|
||||||
|
fill: currentColor;
|
||||||
|
vertical-align: sub;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.doc-deprecated-version.tc-tiddlylink {
|
a.doc-deprecated-version.tc-tiddlylink {
|
||||||
|
|
|
@ -1,12 +1,19 @@
|
||||||
code-body: yes
|
code-body: yes
|
||||||
created: 20161008085627406
|
created: 20161008085627406
|
||||||
modified: 20221007122259593
|
modified: 20231206135257498
|
||||||
tags: $:/tags/Macro
|
tags: $:/tags/Macro
|
||||||
title: $:/editions/tw5.com/version-macros
|
title: $:/editions/tw5.com/version-macros
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
\define .from-version(version)
|
\procedure .from-version-reference() 5.3.0
|
||||||
<$link to={{{ [<__version__>addprefix[Release ]] }}} class="doc-from-version">{{$:/core/images/warning}} New in: <$text text=<<__version__>>/></$link>
|
|
||||||
|
\procedure .from-version-template(class, text)
|
||||||
|
<$link to={{{ [<version>addprefix[Release ]] }}} class=<<class>> >@@.tc-tiny-gap-right {{$:/core/images/info-button}}@@<<text>><<version>></$link>
|
||||||
|
\end
|
||||||
|
|
||||||
|
\procedure .from-version(version)
|
||||||
|
<$list filter="[<version>compare:version:gteq<.from-version-reference>]"><<.from-version-template "doc-from-version doc-from-version-new" "New in v">></$list>
|
||||||
|
<$list filter="[<version>compare:version:lt<.from-version-reference>]"><<.from-version-template "doc-from-version" "Introduced in v">></$list>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define .deprecated-since(version, superseded:"TODO-Link")
|
\define .deprecated-since(version, superseded:"TODO-Link")
|
||||||
|
|
Loading…
Reference in New Issue