Template:Authorbox/Doc: Difference between revisions

From questden
Jump to navigationJump to search
(A clarification, and manually building wikitable formatting so it doesn't recursively apply borders to the example)
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{Doc}}</noinclude>
<noinclude>{{Doc}}</noinclude>
A template for making authorboxes.  It replaces this header you used to have to copy-paste into every new one you made:
A template for making [[:Category:Author Boxes|authorboxes]].  It replaces this header you used to have to copy-paste into every new one you made:


  <nowiki> {| id="toc" width="70%" style="text-align:left; clear:both;" align=center
  <nowiki> {| width="70%" style="text-align:left; clear:both; background-color: #F9F9F9; border:1px solid #AAAAAA; border-spacing: 7px; border-collapse: separate;" align=center
  |- style="background:#ccccff" align="center" width="95%"
  |- style="background:#ccccff" align="center" width="95%"
  | '''Quests by [[NAME]]'''
  | style="font-size:12px" | '''Quests by [[NAME]]'''
  |-
  |-
  | style="font-size:11px" |</nowiki>
  | style="font-size:11px" |</nowiki>
Line 12: Line 12:
This template also makes it so author boxes now support the <code>authoralias</code> parameter!
This template also makes it so author boxes now support the <code>authoralias</code> parameter!


==Example==
__NOTOC__ <!--The headings in the examples show up otherwise and make it look weird-->
 
==Examples==
===Creating an authorbox===


{| style="margin: auto; background-color:#F2F2F2; width:95%; border-collapse:collapse; border:1px solid #BBB" cellpadding="2"
{| style="margin: auto; background-color:#F2F2F2; width:95%; border-collapse:collapse; border:1px solid #BBB" cellpadding="2"
Line 20: Line 23:
| style="text-align:left; width: 50%; border:1px solid #BBB" |
| style="text-align:left; width: 50%; border:1px solid #BBB" |
==Template:NAME==
==Template:NAME==
__NOEDITSECTION__
  <nowiki> {{subst:makebox}}
  <nowiki> {{subst:makebox}}


Line 32: Line 36:
| style="border:1px solid #BBB" |
| style="border:1px solid #BBB" |
==Template:NAME==
==Template:NAME==
__NOEDITSECTION__
{{authorbox|author=NAME|authoralias={{{authoralias|}}}}}  
{{authorbox|author=NAME|authoralias={{{authoralias|}}}}}  


Line 42: Line 47:


{|class="wikitable" style="width:100%"
{|class="wikitable" style="width:100%"
|[[:Category:Author Boxes]]
|[[Special:Categories|Category]]: [[:Category:Author Boxes|Author Boxes]]
|}
|}
|}
|}


When you edit the author box in the future, the first line of code will have changed to:
When you edit the author box in the future, the first line of code will have changed to:
Line 52: Line 56:


This is expected behavior, and you don't need to mess with it.
This is expected behavior, and you don't need to mess with it.
===Calling an authorbox===
{| style="margin: auto; background-color:#F2F2F2; width:95%; border-collapse:collapse; border:1px solid #BBB" cellpadding="2"
! style="border:1px solid #BBB" | Code
! style="border:1px solid #BBB" | Output
|- valign="top" style="background-color:#FFFFFF"
| style="text-align:left; width: 50%; border:1px solid #BBB" |
<nowiki>{{NAME}}</nowiki>
| style="border:1px solid #BBB" |
{{authorbox|author=NAME|authoralias={{{authoralias|}}}}}
'''TGchan:'''
[[Example Quest 1]] |
[[Example Quest 2]] |
[[Example Quest 3]]
|}
|- valign="top" style="background-color:#FFFFFF"
| style="text-align:left; width: 50%; border:1px solid #BBB" |
<nowiki>{{NAME|authoralias=Alternate Name}}</nowiki>
| style="border:1px solid #BBB" |
{{authorbox|author=NAME|authoralias={{{authoralias|Alternate Name}}}}}
'''TGchan:'''
[[Example Quest 1]] |
[[Example Quest 2]] |
[[Example Quest 3]]
|}
|}

Latest revision as of 10:51, 5 November 2017

This is a template documentation page. It is transcluded into place.

A template for making authorboxes. It replaces this header you used to have to copy-paste into every new one you made:

 {| width="70%" style="text-align:left; clear:both; background-color: #F9F9F9; border:1px solid #AAAAAA; border-spacing: 7px; border-collapse: separate;" align=center
 |- style="background:#ccccff" align="center" width="95%"
 | style="font-size:12px" | '''Quests by [[NAME]]'''
 |-
 | style="font-size:11px" |

Just type {{subst:makebox}}, add your links, and close the table with |}.

This template also makes it so author boxes now support the authoralias parameter!


Examples

Creating an authorbox

Code Output

Template:NAME

 {{subst:makebox}}

 '''TGchan:'''
 [[Example Quest 1]] |
 [[Example Quest 2]] |
 [[Example Quest 3]]

 |}

 <noinclude>[[Category:Author Boxes]]</noinclude>

Template:NAME

Quests by NAME

TGchan: Example Quest 1 | Example Quest 2 | Example Quest 3

Category: Author Boxes

When you edit the author box in the future, the first line of code will have changed to:

{{authorbox|author=NAME|authoralias={{{authoralias|}}}}}.

This is expected behavior, and you don't need to mess with it.

Calling an authorbox

Code Output
{{NAME}}
Quests by NAME

TGchan: Example Quest 1 | Example Quest 2 | Example Quest 3

{{NAME|authoralias=Alternate Name}}
Quests by Alternate Name

TGchan: Example Quest 1 | Example Quest 2 | Example Quest 3