mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-15 11:45:40 +00:00
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
|
||||
modified: 20230325101137075
|
||||
modified: 20240223123123497
|
||||
tags: $:/tags/Stylesheet
|
||||
title: $:/editions/tw5.com/doc-styles
|
||||
type: text/vnd.tiddlywiki
|
||||
@ -181,18 +181,23 @@ tr.doc-table-subheading {
|
||||
fill: <<colour alert-highlight>>;
|
||||
}
|
||||
|
||||
a.doc-from-version.tc-tiddlylink {
|
||||
display: inline-block;
|
||||
border-radius: 1em;
|
||||
background: <<colour muted-foreground>>;
|
||||
color: <<colour background>>;
|
||||
fill: <<colour background>>;
|
||||
padding: 0 0.4em;
|
||||
font-size: 0.7em;
|
||||
text-transform: uppercase;
|
||||
a.doc-from-version {
|
||||
background-color: <<colour muted-foreground>>;
|
||||
color: <$wikify name="background" text="<<colour muted-foreground>>" mode="inline"><$transclude $variable="contrastcolour" target=<<background>> colourA="#000000" colourB="#ffffff" /></$wikify>;
|
||||
padding: 3px;
|
||||
border-radius: 4px;
|
||||
font-weight: bold;
|
||||
line-height: 1.5;
|
||||
vertical-align: text-bottom;
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
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 {
|
||||
|
@ -1,12 +1,19 @@
|
||||
code-body: yes
|
||||
created: 20161008085627406
|
||||
modified: 20221007122259593
|
||||
modified: 20231206135257498
|
||||
tags: $:/tags/Macro
|
||||
title: $:/editions/tw5.com/version-macros
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\define .from-version(version)
|
||||
<$link to={{{ [<__version__>addprefix[Release ]] }}} class="doc-from-version">{{$:/core/images/warning}} New in: <$text text=<<__version__>>/></$link>
|
||||
\procedure .from-version-reference() 5.3.0
|
||||
|
||||
\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
|
||||
|
||||
\define .deprecated-since(version, superseded:"TODO-Link")
|
||||
|
Loading…
Reference in New Issue
Block a user