Template:Software documentation index/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(32 intermediate revisions by the same user not shown)
Line 3: Line 3:
Table for use in software documentation indexes, such as [[SDK Docs|Source SDK Index]].
Table for use in software documentation indexes, such as [[SDK Docs|Source SDK Index]].


== Components ==
__TOC__
This template uses components to simplify working with repetitive code. Below is a list of all components included in the template.
 
* [[Template:Software documentation index/components/header|header]]
== Usage ==
* [[Template:Software documentation index/components/button|button]]
This template is usually written in a column. To use it, insert <code><nowiki>{{Software documentation index}}</nowiki></code> on the desired page and specify the [[#Parameters and Examples|parameters]] under the template name in the following format:
<pre>
{{Software documentation index
| parameter 1 = value
| parameter 2 = value
}}
</pre>


== Parameters ==
== Parameters and Examples ==
{| class="standard-table" style="width:100%"
{| class="standard-table" style="width:100%"
! Parameter
! width = "15%" | Parameter
! Description
! width = "40%" | Description
! Example and Preview
! Example
! width = "8%" | Preview
|-
|-
| width = "15%" align="center" | <code>{{param|width}}</code>
| style="text-align:center" | <code>{{param|comment}}</code>
| Table width.
| Comment above the software banner.
| bgcolor="#262626" rowspan="22" align="center" style="vertical-align:top" | See [[#Example and Preview]].
  {{note|Created mainly for the to-do list, so that it doesn't look too bad next to the table.}}
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; comment = Gordon Freeman was here.</pre>
| bgcolor="#262626" rowspan="23" align="center" style="vertical-align:top" | See [[#Preview]].
|-
| style="text-align:center" | <code>{{param|banner}}</code>
| Software banner.
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; banner = Placeholder for SDI banner.jpg</pre>
|-
| style="text-align:center" | <code>{{param|desc}}</code>
| Software description.
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; desc = '''Sweet Tools''' is free software distributed through {{steamicon|1}}.</pre>
|-
|-
| align = "center" | <code>{{param|topindent}}</code>
| style="text-align:center" | <code>{{param|link<1-6>}}</code>
| Top indent for the entire table.
| Link above the table. Maximum 6.
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; link4 = '''[[Source SDK Release Notes|Release Notes]]'''</pre>
|-
|-
| align = "center" | <code>{{param|border color}}</code>
| style="text-align:center" | <code>{{param|toc}}</code>
| Table border color.
| Table of Contents. Useful if the content is divided into headers.
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; toc = [[#Something about mapping|[#Something about mapping]]&ensp;·&ensp;[[#Something about scripting|[#Something about scripting]]</pre>
|-
|-
| align = "center" | <code>{{param|header gradient colors}}</code>
| style="text-align:center" | <code>{{param|button<1-48>}}</code>
| The colors of the gradient for the background of the header.
| The displayed name of the specified button.
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; button11 = Level design</pre>
|-
|-
| align = "center" | <code>{{param|header text color}}</code>
| style="text-align:center" | <code>{{param|button<1-48>link}}</code>
| Text color of headers.
| Link to the page for the specified button.
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; button16link = Half-Life: Alyx Workshop Tools/Addon Sounds</pre>
|-
|-
| align = "center" | <code>{{param|button bgcolor}}</code>
| style="text-align:center" | <code>{{param|button<1-48>desc}}</code>
| The color of the background behind the link button.
| Description of the page linked to by the specified button.
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; button5desc = About creating cool maps</pre>
|-
|-
| align = "center" | <code>{{param|button text color}}</code>
| style="text-align:center" | <code>{{param|button<1-48>header}}</code>
| The color of the link button text.
| Adds a heading above the specified button. This is useful if the software page prefers an option without redirects to guide pages, such as the page about [[:Category:Level Design|level design in Source]].
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; button45header = Something about mapping</pre>
|-
|-
| align = "center" | <code>{{param|row color 1}}</code>
| style="text-align:center" | <code>{{param|button<1-48>redlink}}</code>
| Color of the first row of the table.<br>Default value is <code>#252525</code>.
| If the page does not exist, use this parameter to remove the custom link color. {{important|The custom color should not replace red links, so as not to confuse the user.}}
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; button6redlink = true</pre>
|-
|-
| align = "center" | <code>{{param|row color 2}}</code>
| style="text-align:center" | <code>{{param|button<2-48>radius}}</code>
| Color of the second row of the table.<br>Default value is <code>#202020</code>.
| The radius of the table row with the button.<br>Available values:
* default - empty.
* start - the default is specified for the first button.
* end - specify if the button is the last one.
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; button2radius = end</pre>
|-
|-
| align = "center" | <code>{{param|comment}}</code>
| colspan="3" style="background:#949494; color:#262626; text-align:center" | '''Style'''
| Comment above the software banner.
  {{note|Created mainly for the to-do list, so that it doesn't look too bad next to the table.}}
|-
|-
| align = "center" | <code>{{param|comment style}}</code>
| style="text-align:center" | <code>{{param|topindent}}</code>
| Custom Comment CSS.
| Top indent for the entire table.
  {{Warning|Overwrites the original style!}}
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; topindent = 2em</pre>
|-
|-
| align = "center" | <code>{{param|banner}}</code>
| align="center" | <code>{{param|width}}</code>
| Software banner.
| Table width.
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; width = 600px</pre>
|-
|-
| align = "center" | <code>{{param|banner width}}</code>
| style="text-align:center" | <code>{{param|bannerwidth}}</code>
| Banner width.
| Banner width.
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; bannerwidth = 560px</pre>
|-
|-
| align = "center" | <code>{{param|desc}}</code>
| style="text-align:center" | <code>{{param|descwidth}}</code>
| Software description.
|-
| align = "center" | <code>{{param|desc width}}</code>
| Software description width. Used when you need to make the text look nicer.
| Software description width. Used when you need to make the text look nicer.
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; descwidth = 550px</pre>
|-
|-
| align = "center" | <code>{{param|link <1-6>}}</code>
| style="text-align:center" | <code>{{param|commentStyle}}</code>
| Link above the table. Maximum 6.
| Custom Comment CSS.
  {{Warning|Overwrites the original style!}}
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; commentStyle = background:#000; border-radius:.3em</pre>
|-
|-
| align = "center" | <code>{{param|toc}}</code>
| style="text-align:center" | <code>{{param|borderColor}}</code>
| Table of Contents. Useful if the content is divided into headers.
| Table border color.
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; borderColor = #F2A52B4a</pre>
|-
|-
| align = "center" | <code>{{param|button <1-48>}}</code>
| style="text-align:center" | <code>{{param|headerGradColors}}</code>
| The displayed name of the specified button.
| The colors of the gradient for the background of the header.
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; headerGradColors = #594027,#312717</pre>
|-
|-
| align = "center" | <code>{{param|button <1-48> link}}</code>
| style="text-align:center" | <code>{{param|buttonTextColor}}</code>
| Link to the page for the specified button.
| The color of the link button text.
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; buttonTextColor = #E3C798</pre>
|-
|-
| align = "center" | <code>{{param|button <1-48> desc}}</code>
| style="text-align:center" | <code>{{param|buttonBG}}</code>
| Description of the page linked to by the specified button.
| The color of the background behind the link button.
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; buttonBG = #2F2A26</pre>
|-
|-
| align = "center" | <code>{{param|button <1-48> header}}</code>
| style="text-align:center" | <code>{{param|rowColor1}}</code>
| Adds a heading above the specified button. This is useful if the software page prefers an option without redirects to guide pages, such as the page about [[:Category:Level Design|level design in Source]].
| Color of the first row of the table.<br>Default value is <code>#252525</code>.
|-
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; rowColor1 = #303030</pre>
| align = "center" | <code>{{param|button <1-48> redlink}}</code>
| If the page does not exist, use this parameter to remove the custom link color. {{important|The custom color should not replace red links, so as not to confuse the user.}}
|-
|-
| style="text-align:center" | <code>{{param|rowColor2}}</code>
| Color of the second row of the table.<br>Default value is <code>#202020</code>.
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; rowColor1 = #252525</pre>
|}
|}
== Example and Preview ==
<pre>
{{Software documentation index
| width = 750px


| border color = #36647A
== Preview ==
| button bgcolor = #23292D
{{CodeBlock|lines=30|<nowiki>{{Software documentation index
| button text color = #7BC4E0
| width = 750px
| header text color = #7BC4E0
| descwidth = 550px
| header gradient colors = #274759,#172931
| bannerwidth = 566px
| borderColor = #F2A52B4a
| buttonBG = #2F2A26
| buttonTextColor = #E3C798
| headerGradColors = #594027,#312717


| comment = Gordon Freeman was here.
| comment = Gordon Freeman was here.
| banner  = Placeholder for SDI banner.jpg
| desc   = '''Sweet Tools''' is free software distributed through {{steamicon|1}} for creating cool games without any programming knowledge.


| banner = Placeholder for SDI banner.jpg
| link1 = '''[[#Example and Preview|Download and Installation]]'''
| banner width = 566px
| link2 = '''[[#Example and Preview|Release Notes]]'''


| desc = '''Sweet Tools''' is free software distributed through {{steamicon|1}} for creating cool games without any programming knowledge.
| button1 = Introduction
| desc width = 550px
| button1link = #Example and Preview
| button1desc = Introduction to using this amazing toolkit.


| link 1 = '''[[#Example and Preview|Download and Installation]]'''
| button2 = Level Design
| link 2 = '''[[#Example and Preview|Release Notes]]'''
| button2link = #Something about mapping
| button2desc = Create [[Map (level design)|levels]] with an incredibly cute map editor.
| button2header = Something about mapping


| button 1 = Introduction
| button3 = Materials
| button 1 link = #Example and Preview
| button3link = #Something about mapping
| button 1 desc = Introduction to using this amazing toolkit.
| button3desc = Learn how to add a character's face to a texture that will only be seen many years later.
 
| button3radius = end
| button 2 = Level Design
}}</nowiki>}}
| button 2 link = #Something about mapping
| button 2 desc = Create [[Map (level design)|levels]] with an incredibly cute map editor.
| button 2 header = Something about mapping
 
| button 3 = Materials
| button 3 link = #Something about mapping
| button 3 desc = Learn how to add a character's face to a texture that will only be seen many years later.
}}
</pre>


{{Capsule|{{Software documentation index
{{Capsule|{{Software documentation index
| width = 750px
| width = 750px
 
| descwidth = 550px
| border color = #2B4957
| bannerwidth = 566px
| button bgcolor = #23292D
| borderColor = #F2A52B4a
| button text color = #7BC4E0
| buttonBG = #2F2A26
| header text color = #7BC4E0
| buttonTextColor = #E3C798
| header gradient colors = #274759,#172931
| headerGradColors = #594027,#312717


| comment = Gordon Freeman was here.
| comment = Gordon Freeman was here.
| banner  = Placeholder for SDI banner.jpg
| desc   = '''Sweet Tools''' is free software distributed through {{steamicon|1}} for creating cool games without any programming knowledge.


| banner = Placeholder for SDI banner.jpg
| link1 = '''[[#Example and Preview|Download and Installation]]'''
| banner width = 566px
| link2 = '''[[#Example and Preview|Release Notes]]'''


| desc = '''Sweet Tools''' is free software distributed through {{steamicon|1}} for creating cool games without any programming knowledge.
| button1 = Introduction
| desc width = 550px
| button1link = #Example and Preview
| button1desc = Introduction to using this amazing toolkit.


| link 1 = '''[[#Example and Preview|Download and Installation]]'''
| button2 = Level Design
| link 2 = '''[[#Example and Preview|Release Notes]]'''
| button2link = #Something about mapping
| button2desc = Create [[Map (level design)|levels]] with an incredibly cute map editor.
| button2header = Something about mapping


| button 1 = Introduction
| button3 = Materials
| button 1 link = #Example and Preview
| button3link = #Something about mapping
| button 1 desc = Introduction to using this amazing toolkit.
| button3desc = Learn how to add a character's face to a texture that will only be seen many years later.
| button3radius = end
}}}}


| button 2 = Level Design
== Components ==
| button 2 link = #Something about mapping
This template uses components to simplify working with repetitive code. Below is a list of all components included in the template.
| button 2 desc = Create [[Map (level design)|levels]] with an incredibly cute map editor.
* [[Template:Software documentation index/components/header|header]]
| button 2 header = Something about mapping
* [[Template:Software documentation index/components/button|button]]
 
| button 3 = Materials
| button 3 link = #Something about mapping
| button 3 desc = Learn how to add a character's face to a texture that will only be seen many years later.
}}}}


== See also ==
== See also ==
* {{T|DIP topicon}}
* {{T|DIP topicon}}
<includeonly>{{sandbox other||
[[Category:Templates]]
[[Category:Formatting templates]]
}}</includeonly>

Latest revision as of 13:04, 22 September 2025

Edit-copy.png
This is a documentation subpage for Template:Software documentation index.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

Table for use in software documentation indexes, such as Source SDK Index.

Usage

This template is usually written in a column. To use it, insert {{Software documentation index}} on the desired page and specify the parameters under the template name in the following format:

{{Software documentation index
| parameter 1 = value
| parameter 2 = value
}}

Parameters and Examples

Parameter Description Example Preview
{{{comment}}} Comment above the software banner.
Note.pngNote:Created mainly for the to-do list, so that it doesn't look too bad next to the table.
| comment = Gordon Freeman was here.
See #Preview.
{{{banner}}} Software banner.
| banner = Placeholder for SDI banner.jpg
{{{desc}}} Software description.
| desc = '''Sweet Tools''' is free software distributed through {{steamicon|1}}.
{{{link<1-6>}}} Link above the table. Maximum 6.
| link4 = '''[[Source SDK Release Notes|Release Notes]]'''
{{{toc}}} Table of Contents. Useful if the content is divided into headers.
| toc = [[#Something about mapping|[#Something about mapping]] · [[#Something about scripting|[#Something about scripting]]
{{{button<1-48>}}} The displayed name of the specified button.
| button11 = Level design
{{{button<1-48>link}}} Link to the page for the specified button.
| button16link = Half-Life: Alyx Workshop Tools/Addon Sounds
{{{button<1-48>desc}}} Description of the page linked to by the specified button.
| button5desc = About creating cool maps
{{{button<1-48>header}}} Adds a heading above the specified button. This is useful if the software page prefers an option without redirects to guide pages, such as the page about level design in Source.
| button45header = Something about mapping
{{{button<1-48>redlink}}} If the page does not exist, use this parameter to remove the custom link color.
Icon-Important.pngImportant:The custom color should not replace red links, so as not to confuse the user.
| button6redlink = true
{{{button<2-48>radius}}} The radius of the table row with the button.
Available values:
  • default - empty.
  • start - the default is specified for the first button.
  • end - specify if the button is the last one.
| button2radius = end
Style
{{{topindent}}} Top indent for the entire table.
| topindent = 2em
{{{width}}} Table width.
| width = 600px
{{{bannerwidth}}} Banner width.
| bannerwidth = 560px
{{{descwidth}}} Software description width. Used when you need to make the text look nicer.
| descwidth = 550px
{{{commentStyle}}} Custom Comment CSS.
Warning.pngWarning:Overwrites the original style!
| commentStyle = background:#000; border-radius:.3em
{{{borderColor}}} Table border color.
| borderColor = #F2A52B4a
{{{headerGradColors}}} The colors of the gradient for the background of the header.
| headerGradColors = #594027,#312717
{{{buttonTextColor}}} The color of the link button text.
| buttonTextColor = #E3C798
{{{buttonBG}}} The color of the background behind the link button.
| buttonBG = #2F2A26
{{{rowColor1}}} Color of the first row of the table.
Default value is #252525.
| rowColor1 = #303030
{{{rowColor2}}} Color of the second row of the table.
Default value is #202020.
| rowColor1 = #252525

Preview

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
{{Software documentation index | width = 750px | descwidth = 550px | bannerwidth = 566px | borderColor = #F2A52B4a | buttonBG = #2F2A26 | buttonTextColor = #E3C798 | headerGradColors = #594027,#312717 | comment = Gordon Freeman was here. | banner = Placeholder for SDI banner.jpg | desc = '''Sweet Tools''' is free software distributed through {{steamicon|1}} for creating cool games without any programming knowledge. | link1 = '''[[#Example and Preview|Download and Installation]]''' | link2 = '''[[#Example and Preview|Release Notes]]''' | button1 = Introduction | button1link = #Example and Preview | button1desc = Introduction to using this amazing toolkit. | button2 = Level Design | button2link = #Something about mapping | button2desc = Create [[Map (level design)|levels]] with an incredibly cute map editor. | button2header = Something about mapping | button3 = Materials | button3link = #Something about mapping | button3desc = Learn how to add a character's face to a texture that will only be seen many years later. | button3radius = end }}
Gordon Freeman was here.

Components

This template uses components to simplify working with repetitive code. Below is a list of all components included in the template.

See also