Difference between revisions of "Template:NeighborhoodCard"

From ThresholdRPG Wiki
(Create NeighborhoodCard template — infobox + auto-categorization for neighborhood pages)
 
(Restyle to match Deity infobox chrome (rounded border, float right, transparent bg); conditional row rendering so empty fields don't leave empty cells; add image parameter)
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
{| style="border-color: white; border-style: solid; border-width: 2px; background-color: black; margin-left: 10px; padding: 0px;"
+
{| style="border-color: darkgray; border-radius: 15px; border-style: solid; border-width: 1px; float: right; margin: 10px; padding: 5px;"
| style="font-weight: bold; text-align: center;" colspan="2" | {{ #if: {{{name|}}} | {{{name|}}} | {{PAGENAME}} }}
 
|-
 
| style="text-align: left; background-color: #DCDCDC; color: black;" | Region
 
| style="text-align: left;" | {{ #if: {{{region|}}} | {{{region|}}} }}
 
|-
 
| style="text-align: left; background-color: #DCDCDC; color: black;" | {{ #if: {{{restriction|}}} | Restriction }}
 
| style="text-align: left;" | {{ #if: {{{restriction|}}} | {{{restriction|}}} }}
 
 
|-
 
|-
 +
| colspan="2" style="text-align: center;" | '''{{{name|{{PAGENAME}}}}}'''
 +
{{#if:{{{image|}}}|
 +
{{!}}-
 +
{{!}} colspan="2" style="text-align: center;" {{!}} [[File:{{{image}}}{{!}}200px]]
 +
}}
 +
{{#if:{{{region|}}}|
 +
{{!}}-
 +
{{!}} '''Region''' {{!}}{{!}} {{{region}}}
 +
}}
 +
{{#if:{{{restriction|}}}|
 +
{{!}}-
 +
{{!}} '''Restriction''' {{!}}{{!}} {{{restriction}}}
 +
}}
 
|}
 
|}
 
[[Category:Neighborhoods]]
 
[[Category:Neighborhoods]]

Revision as of 01:27, 22 May 2026


{{#vardefine: nodoc | {{{nodoc}}} }}{{#vardefine: baddoc | {{{baddoc}}} }}

Template-info.png Documentation

This template creates a card to show a neighborhood's name, the region it's located in, and any racial or other restriction on moving in. It also adds the page to the Category:Neighborhoods category.

Example : {{NeighborhoodCard|name=Parkside Manors|region=Thrace}}
Result :

Parkside Manors
Region Thrace


Usage

{{NeighborhoodCard|name|region|restriction|image}}

Parameters

All parameters are optional. Rows for empty parameters are hidden.

name
When not used, the page name is shown.
region
The region the neighborhood is in. Examples: Thrace, Sable, Kelnore, Androctonus, Banyee.
restriction
Any race or heritage restriction on moving in. Omit if there are no restrictions.
image
Filename of an image (without File: prefix) to display in the card, sized to 200px wide. Omit if there is no image yet.