Template:Software documentation index/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(35 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>


== Examples and 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
! Example
! Preview
! width = "8%" | Preview
|-
| style="text-align:center" | <code>{{param|comment}}</code>
| 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.}}
| 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]].
|-
|-
| width = "15%" align="center" | <code>{{param|width}}</code>
| style="text-align:center" | <code>{{param|banner}}</code>
| width = "40%" | Table width.
| Software banner.
| width = "40%" | <pre style="margin:0">{{Software documentation index| width = 750px }}</pre>
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; banner = Placeholder for SDI banner.jpg</pre>
| width = "10%" bgcolor="#262626" rowspan="22" align="center" style="vertical-align:top" | See [[#Preview]].
|-
|-
| align = "center" | <code>{{param|caption indent:top}}</code>
| style="text-align:center" | <code>{{param|desc}}</code>
| Indentation of the caption at the top.
| Software description.
| <pre style="margin:0">{{Software documentation index| caption indent:top = 1em }}</pre>
| 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|border color}}</code>
| style="text-align:center" | <code>{{param|link<1-6>}}</code>
| Table border color.
| Link above the table. Maximum 6.
| <pre style="margin:0">{{Software documentation index| border color = green }}</pre>
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; link4 = '''[[Source SDK Release Notes|Release Notes]]'''</pre>
|-
|-
| align = "center" | <code>{{param|header gradient colors}}</code>
| style="text-align:center" | <code>{{param|toc}}</code>
| The colors of the gradient for the background of the header.
| Table of Contents. Useful if the content is divided into headers.
| <pre style="margin:0">{{Software documentation index
| 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>
| header gradient colors = blue 45%, yellow 55%
}}</pre>
|-
|-
| align = "center" | <code>{{param|header text color}}</code>
| style="text-align:center" | <code>{{param|button<1-48>}}</code>
| Text color of headers.
| The displayed name of the specified button.
| <pre style="margin:0">{{Software documentation index| header text color = red }}</pre>
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; button11 = Level design</pre>
|-
|-
| align = "center" | <code>{{param|button bgcolor}}</code>
| style="text-align:center" | <code>{{param|button<1-48>link}}</code>
| The color of the background behind the link button.
| Link to the page for the specified button.
| <pre style="margin:0">{{Software documentation index| button bgcolor = #000 }}</pre>
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; button16link = Half-Life: Alyx Workshop Tools/Addon Sounds</pre>
|-
|-
| align = "center" | <code>{{param|button text color}}</code>
| style="text-align:center" | <code>{{param|button<1-48>desc}}</code>
| The color of the link button text.
| Description of the page linked to by the specified button.
| <pre style="margin:0">{{Software documentation index| button text color = #FFF }}</pre>
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; button5desc = About creating cool maps</pre>
|-
|-
| align = "center" | <code>{{param|row color 1}}</code>
| style="text-align:center" | <code>{{param|button<1-48>header}}</code>
| Color of the first row of the table.<br>Default value is <code>#252525</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]].
| <pre style="margin:0">{{Software documentation index| row color 1 = #303030 }}</pre>
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; button45header = Something about mapping</pre>
|-
|-
| align = "center" | <code>{{param|row color 2}}</code>
| style="text-align:center" | <code>{{param|button<1-48>redlink}}</code>
| Color of the second row of the table.<br>Default value is <code>#202020</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.}}
| <pre style="margin:0">{{Software documentation index| row color 2 = #252525 }}</pre>
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; button6redlink = true</pre>
|-
|-
| align = "center" | <code>{{param|comment}}</code>
| style="text-align:center" | <code>{{param|button<2-48>radius}}</code>
| Comment above the software banner.
| The radius of the table row with the button.<br>Available values:
  {{note|Created mainly for the to-do list, so that it doesn't look too bad next to the table.}}
* default - empty.
| <pre style="margin:0">{{Software documentation index| comment = This software loves donuts. }}</pre>
* 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 style}}</code>
| colspan="3" style="background:#949494; color:#262626; text-align:center" | '''Style'''
| Custom Comment CSS.
  {{Warning|Overwrites the original style!}}
| <pre style="margin:0">{{Software documentation index| comment style = width:750px; margin:0 auto }}</pre>
|-
|-
| align = "center" | <code>{{param|banner}}</code>
| style="text-align:center" | <code>{{param|topindent}}</code>
| Software banner.
| Top indent for the entire table.
| <pre style="margin:0">{{Software documentation index| banner = Dota workshop about.png }}</pre>
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; topindent = 2em</pre>
|-
|-
| align = "center" | <code>{{param|banner width}}</code>
| align="center" | <code>{{param|width}}</code>
| Banner width. Used to create rounded borders.
| Table width.
| <pre style="margin:0">{{Software documentation index| banner width = 566px }}</pre>
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; width = 600px</pre>
|-
|-
| align = "center" | <code>{{param|desc}}</code>
| style="text-align:center" | <code>{{param|bannerwidth}}</code>
| Software description.
| Banner width.
| <pre style="margin:0">{{Software documentation index| banner width = 566px }}</pre>
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; bannerwidth = 560px</pre>
|-
|-
| align = "center" | <code>{{param|desc width}}</code>
| style="text-align:center" | <code>{{param|descwidth}}</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.
| <pre style="margin:0">{{Software documentation index| desc width = 550px }}</pre>
| 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.
| <pre style="margin:0">{{Software documentation index
  {{Warning|Overwrites the original style!}}
| link 1 = '''[[SDK Installation/Download and installation]]'''
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; commentStyle = background:#000; border-radius:.3em</pre>
}}</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.
| <pre style="margin:0">{{Software documentation index
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; borderColor = #F2A52B4a</pre>
| toc = [[#Basics|Basics]]&ensp;·&ensp;[[#References|References]]
}}</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.
| <pre style="margin:0">{{Software documentation index| button 1 = Introduction }}</pre>
| 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.
| <pre style="margin:0">{{Software documentation index| button 8 link = :Category:Third Party Source Tools }}</pre>
| 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.
| <pre style="margin:0">{{Software documentation index
| style="background-color:#1f1f1f" | <pre style="margin:.25em 0">&#124; buttonBG = #2F2A26</pre>
| button 3 desc = Creating, organizing and releasing your {{source|1}} project.
}}</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>.
| <pre style="margin:0">{{Software documentation index| button 2 header = Basics }}</pre>
| 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.}}
| <pre style="margin:0">{{Software documentation index| button 5 redlink = true }}</pre>
|-
|-
| 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>
|}
|}


== Preview ==
== Preview ==
See {{cs2tools|1}}.
{{CodeBlock|lines=30|<nowiki>{{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
}}</nowiki>}}
 
{{Capsule|{{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
}}}}
 
== Components ==
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]]
* [[Template:Software documentation index/components/button|button]]


== 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