Better visualisation of versions in API docs?

For AI and campaign script related discussions and questions
Post Reply
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Better visualisation of versions in API docs?

Post 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.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Re: Better visualisation of versions in API docs?

Post 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.
http://addons.wz2100.net/ developer
Post Reply