Template:Software documentation index/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 8: Line 8:
* [[Template:Software documentation index/components/button|button]]
* [[Template:Software documentation index/components/button|button]]


== Examples and Parameters ==
== Parameters ==
{| class="standard-table" style="width:100%"
{| class="standard-table" style="width:100%"
! Parameter
! Parameter
! Description
! Description
! Example
! Example and Preview
! Preview
|-
|-
| width = "15%" align="center" | <code>{{param|width}}</code>
| width = "15%" align="center" | <code>{{param|width}}</code>
| width = "37.5%" | Table width.
| Table width.
| width = "37.5%" | <pre style="margin:0">{{Software documentation index| width = 750px }}</pre>
| bgcolor="#262626" rowspan="22" align="center" style="vertical-align:top" | See [[#Example and Preview]].
| width = "10%" bgcolor="#262626" rowspan="22" align="center" style="vertical-align:top" | See [[#Preview]].
|-
|-
| align = "center" | <code>{{param|caption indent:top}}</code>
| align = "center" | <code>{{param|topindent}}</code>
| Indentation of the caption at the top.
| Top indent for the entire table.
| <pre style="margin:0">{{Software documentation index| caption indent:top = 1em }}</pre>
|-
|-
| align = "center" | <code>{{param|border color}}</code>
| align = "center" | <code>{{param|border color}}</code>
| Table border color.
| Table border color.
| <pre style="margin:0">{{Software documentation index| border color = green }}</pre>
|-
|-
| align = "center" | <code>{{param|header gradient colors}}</code>
| align = "center" | <code>{{param|header gradient colors}}</code>
| The colors of the gradient for the background of the header.
| The colors of the gradient for the background of the header.
| <pre style="margin:0">{{Software documentation index
| header gradient colors = blue 45%, yellow 55%
}}</pre>
|-
|-
| align = "center" | <code>{{param|header text color}}</code>
| align = "center" | <code>{{param|header text color}}</code>
| Text color of headers.
| Text color of headers.
| <pre style="margin:0">{{Software documentation index| header text color = red }}</pre>
|-
|-
| align = "center" | <code>{{param|button bgcolor}}</code>
| align = "center" | <code>{{param|button bgcolor}}</code>
| The color of the background behind the link button.
| The color of the background behind the link button.
| <pre style="margin:0">{{Software documentation index| button bgcolor = #000 }}</pre>
|-
|-
| align = "center" | <code>{{param|button text color}}</code>
| align = "center" | <code>{{param|button text color}}</code>
| The color of the link button text.
| The color of the link button text.
| <pre style="margin:0">{{Software documentation index| button text color = #FFF }}</pre>
|-
|-
| align = "center" | <code>{{param|row color 1}}</code>
| align = "center" | <code>{{param|row color 1}}</code>
| Color of the first row of the table.<br>Default value is <code>#252525</code>.
| Color of the first row of the table.<br>Default value is <code>#252525</code>.
| <pre style="margin:0">{{Software documentation index| row color 1 = #303030 }}</pre>
|-
|-
| align = "center" | <code>{{param|row color 2}}</code>
| align = "center" | <code>{{param|row color 2}}</code>
| Color of the second row of the table.<br>Default value is <code>#202020</code>.
| Color of the second row of the table.<br>Default value is <code>#202020</code>.
| <pre style="margin:0">{{Software documentation index| row color 2 = #252525 }}</pre>
|-
|-
| align = "center" | <code>{{param|comment}}</code>
| align = "center" | <code>{{param|comment}}</code>
| Comment above the software banner.
| 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.}}
   {{note|Created mainly for the to-do list, so that it doesn't look too bad next to the table.}}
| <pre style="margin:0">{{Software documentation index| comment = This software loves donuts. }}</pre>
|-
|-
| align = "center" | <code>{{param|comment style}}</code>
| align = "center" | <code>{{param|comment style}}</code>
| Custom Comment CSS.
| Custom Comment CSS.
   {{Warning|Overwrites the original style!}}
   {{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>
| align = "center" | <code>{{param|banner}}</code>
| Software banner.
| Software banner.
| <pre style="margin:0">{{Software documentation index| banner = Dota workshop about.png }}</pre>
|-
|-
| align = "center" | <code>{{param|banner width}}</code>
| align = "center" | <code>{{param|banner width}}</code>
| Banner width. Used to create rounded borders.
| Banner width.
| <pre style="margin:0">{{Software documentation index| banner width = 566px }}</pre>
|-
|-
| align = "center" | <code>{{param|desc}}</code>
| align = "center" | <code>{{param|desc}}</code>
| Software description.
| Software description.
| <pre style="margin:0">{{Software documentation index| banner width = 566px }}</pre>
|-
|-
| align = "center" | <code>{{param|desc width}}</code>
| 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.
| <pre style="margin:0">{{Software documentation index| desc width = 550px }}</pre>
|-
|-
| align = "center" | <code>{{param|link <1-6>}}</code>
| align = "center" | <code>{{param|link <1-6>}}</code>
| Link above the table. Maximum 6.
| Link above the table. Maximum 6.
| <pre style="margin:0">{{Software documentation index
| link 1 = '''[[SDK Installation/Download and installation]]'''
}}</pre>
|-
|-
| align = "center" | <code>{{param|toc}}</code>
| align = "center" | <code>{{param|toc}}</code>
| Table of Contents. Useful if the content is divided into headers.
| Table of Contents. Useful if the content is divided into headers.
| <pre style="margin:0">{{Software documentation index
| toc = [[#Basics|Basics]]&ensp;·&ensp;[[#References|References]]
}}</pre>
|-
|-
| align = "center" | <code>{{param|button <1-48>}}</code>
| align = "center" | <code>{{param|button <1-48>}}</code>
| The displayed name of the specified button.
| The displayed name of the specified button.
| <pre style="margin:0">{{Software documentation index| button 1 = Introduction }}</pre>
|-
|-
| align = "center" | <code>{{param|button <1-48> link}}</code>
| align = "center" | <code>{{param|button <1-48> link}}</code>
| Link to the page for the specified button.
| Link to the page for the specified button.
| <pre style="margin:0">{{Software documentation index
| button 8 link = :Category:Third Party Source Tools
}}</pre>
|-
|-
| align = "center" | <code>{{param|button <1-48> desc}}</code>
| align = "center" | <code>{{param|button <1-48> desc}}</code>
| Description of the page linked to by the specified button.
| Description of the page linked to by the specified button.
| <pre style="margin:0">{{Software documentation index
| button 3 desc = Creating, organizing and releasing your {{source|1}} project.
}}</pre>
|-
|-
| align = "center" | <code>{{param|button <1-48> header}}</code>
| align = "center" | <code>{{param|button <1-48> header}}</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]].
| 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| button 2 header = Basics }}</pre>
|-
|-
| align = "center" | <code>{{param|button <1-48> redlink}}</code>
| 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.}}
| 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>
|-
|-
|}
|}
== Example and Preview ==
<pre>
{{Software documentation index
| width = 750px


== Preview ==
| border color = #F2A52B4a
See {{cs2tools|1}}.
| button bgcolor = #2F2A26
| button text color = #E3C798
| header gradient colors = #594027,#312717
 
| comment = Gordon Freeman was here.
 
| banner = Placeholder for SDI banner.jpg
| banner width = 566px
 
| desc = '''Sweet Tools''' is free software distributed through {{steamicon|1}} for creating cool games without any programming knowledge.
| desc width = 550px
 
| link 1 = '''[[#Example and Preview|Download and Installation]]'''
| link 2 = '''[[#Example and Preview|Release Notes]]'''
 
| button 1 = Introduction
| button 1 link = #Example and Preview
| button 1 desc = Introduction to using this amazing toolkit.
 
| button 2 = Level Design
| 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
| width = 750px
 
| border color = #F2A52B4a
| button bgcolor = #2F2A26
| button text color = #E3C798
| header gradient colors = #594027,#312717
 
| comment = Gordon Freeman was here.
 
| banner = Placeholder for SDI banner.jpg
| banner width = 566px
 
| desc = '''Sweet Tools''' is free software distributed through {{steamicon|1}} for creating cool games without any programming knowledge.
| desc width = 550px
 
| link 1 = '''[[#Example and Preview|Download and Installation]]'''
| link 2 = '''[[#Example and Preview|Release Notes]]'''
 
| button 1 = Introduction
| button 1 link = #Example and Preview
| button 1 desc = Introduction to using this amazing toolkit.
 
| button 2 = Level Design
| 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.
}}}}


== See also ==
== See also ==
* {{T|DIP topicon}}
* {{T|DIP topicon}}

Latest revision as of 08:42, 7 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.

Components

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

Parameters

Parameter Description Example and Preview
{{{width}}} Table width. See #Example and Preview.
{{{topindent}}} Top indent for the entire table.
{{{border color}}} Table border color.
{{{header gradient colors}}} The colors of the gradient for the background of the header.
{{{header text color}}} Text color of headers.
{{{button bgcolor}}} The color of the background behind the link button.
{{{button text color}}} The color of the link button text.
{{{row color 1}}} Color of the first row of the table.
Default value is #252525.
{{{row color 2}}} Color of the second row of the table.
Default value is #202020.
{{{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 style}}} Custom Comment CSS.
Warning.pngWarning:Overwrites the original style!
{{{banner}}} Software banner.
{{{banner width}}} Banner width.
{{{desc}}} Software description.
{{{desc width}}} Software description width. Used when you need to make the text look nicer.
{{{link <1-6>}}} Link above the table. Maximum 6.
{{{toc}}} Table of Contents. Useful if the content is divided into headers.
{{{button <1-48>}}} The displayed name of the specified button.
{{{button <1-48> link}}} Link to the page for the specified button.
{{{button <1-48> desc}}} Description of the page linked to by the specified button.
{{{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.
{{{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.

Example and Preview

{{Software documentation index
| width = 750px

| border color		= #F2A52B4a
| button bgcolor	= #2F2A26
| button text color	= #E3C798
| header gradient colors = #594027,#312717

| comment = Gordon Freeman was here.

| banner = Placeholder for SDI banner.jpg
| banner width = 566px

| desc = '''Sweet Tools''' is free software distributed through {{steamicon|1}} for creating cool games without any programming knowledge.
| desc width = 550px

| link 1 = '''[[#Example and Preview|Download and Installation]]'''
| link 2 = '''[[#Example and Preview|Release Notes]]'''

| button 1		= Introduction
| button 1 link 	= #Example and Preview
| button 1 desc 	= Introduction to using this amazing toolkit.

| button 2		= Level Design
| 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.
}}
Gordon Freeman was here.

See also