Page 1 of 1

Better visualisation of versions in API docs?

Posted: 20 Apr 2012, 00:32
by aubergine
Would it be possible to add a span around version numbers in the online API docs?

For example:
hasIndirect
One or more of the structure’s weapons are indirect. (3.2+ only)
If the "3.2+ only" could be wrapped in a span, it could be styled differently to make it stand out more.

Code: Select all

<span class="api-ver">3.2</span>
Apply some simple CSS:

Code: Select all

.api-ver:before {
  content: "WZ ";
}
.api-ver:after {
  content: "+";
}
.api-ver {
  background-color: #999;
  color: #eee;
}
Also, it would be nice if the version number could be moved to the start of the descriptive text, or better on the end of the bold funciton/event/global/property text line.

Re: Better visualisation of versions in API docs?

Posted: 21 Apr 2012, 01:28
by Duha
aubergine wrote:Would it be possible to add a span around version numbers in the online API docs?

For example:
hasIndirect
One or more of the structure’s weapons are indirect. (3.2+ only)
If the "3.2+ only" could be wrapped in a span, it could be styled differently to make it stand out more.

Code: Select all

<span class="api-ver">3.2</span>
Apply some simple CSS:

Code: Select all

.api-ver:before {
  content: "WZ ";
}
.api-ver:after {
  content: "+";
}
.api-ver {
  background-color: #999;
  color: #eee;
}
Also, it would be nice if the version number could be moved to the start of the descriptive text, or better on the end of the bold funciton/event/global/property text line.
Looks like it takes comments from code (https://github.com/Warzone2100/warzone2 ... .cpp#L1306)
And converted to html via hevia https://github.com/Warzone2100/warzone2 ... ile.am#L70

and where is no oportunity to add additional data to it.

Making own script that improves html output will help.