Tolkien Gateway

Template:Letter infobox

(Difference between revisions)
(added usage instructions)
m (more css tweaks...)
Line 2: Line 2:
 
<tr style="font-size: 80%;"><td colspan="2" style="background:#ccc; text-align:center;">''[[The Letters of J.R.R. Tolkien]]''</td></tr>
 
<tr style="font-size: 80%;"><td colspan="2" style="background:#ccc; text-align:center;">''[[The Letters of J.R.R. Tolkien]]''</td></tr>
 
<tr><th colspan="2" style="background:#ccc;">Letter {{{#}}}</th></tr>
 
<tr><th colspan="2" style="background:#ccc;">Letter {{{#}}}</th></tr>
<tr style="font-size: 80%;"><td>Recipient</td><td>{{{to|''Unknown''}}}</td></tr>
+
<tr style="font-size: 80%;"><td vertical-align: top;>Recipient</td><td>{{{to|''Unknown''}}}</td></tr>
<tr style="font-size: 80%;"><td>Date</td><td>{{{date|''Unknown''}}}</td></tr>
+
<tr style="font-size: 80%;"><td vertical-align: top;>Date</td><td>{{{date|''Unknown''}}}</td></tr>
{{#if: {{{subject|}}} | <tr style="font-size: 80%;"><td>Subject(s)</td><td>{{{subject}}}</td></tr> | }}
+
{{#if: {{{subject|}}} | <tr style="font-size: 80%;"><td vertical-align: top;>Subject(s)</td><td>{{{subject}}}</td></tr> | }}
 
<tr style="font-size:80%;">
 
<tr style="font-size:80%;">
<td style="margin:.5em;">{{#ifexpr: ({{{#|0}}}-1)>0 | [[Letter {{#expr:{{{#|0}}}-1}}|&larr; Letter {{#expr:{{{#|0}}}-1}}]] | }}</td>
+
<td colspan="2">
<td style="margin:.5em; text-align: right;">{{#ifexpr: ({{{#|999}}}+1)<355 | [[Letter {{#expr:{{{#|999}}}+1}}|Letter {{#expr:{{{#|999}}}+1}}]] &rarr; | }}</td>
+
<table border="0" cellspacing="0" cellpadding="4"><tr>
 +
<td>{{#ifexpr: ({{{#|0}}}-1)>0 | [[Letter {{#expr:{{{#|0}}}-1}}|&larr; Letter {{#expr:{{{#|0}}}-1}}]] | }}</td>
 +
<td style="text-align: right;">{{#ifexpr: ({{{#|999}}}+1)<355 | [[Letter {{#expr:{{{#|999}}}+1}}|Letter {{#expr:{{{#|999}}}+1}}]] &rarr; | }}</td>
 +
</table></tr>
 +
</td>
 
</tr>
 
</tr>
 
</table>
 
</table>

Revision as of 16:12, 3 August 2010

The Letters of J.R.R. Tolkien
Letter {{{#}}}
RecipientUnknown
DateUnknown


Usage

{{letter infobox
 |#=
 |to=
 |date=
 |subject=
}}
  • {{{#}}} -- the number of the letter. Required.
  • {{{to}}} -- the recipient of the letter. Defaults to Unknown.
  • {{{date}}} -- the date of the letter. Defaults to Unknown.
  • {{{subject}}} -- intended to be a list of keyword links, e.g. "[[War]]<br />[[The Lord of the Rings]]<br />[[Boromir]]" for Letter 66. Optional.
  • 'Previous' and 'Next' links are automatically generated at the bottom of the infobox from {{{#}}}.