Welcome to Warhammer 40k - Lexicanum! Log in and join the community.

Difference between revisions of "Template:Portal"

From Warhammer 40k - Lexicanum
Jump to: navigation, search
(Result)
Line 98: Line 98:
 
|Title=Spotlight on things
 
|Title=Spotlight on things
 
|Box Content=
 
|Box Content=
[[Image|ServiceImage.jpg|right|thumb|200px]]
+
[[Image:ServiceImage.jpg|right|thumb|200px]]
 
Image test with other things.
 
Image test with other things.
  
Line 112: Line 112:
 
* [[Squigs]]
 
* [[Squigs]]
  
[[Squigs]],[[Squigs]], [[Squigs]]
+
[[Squigs]],[[Squigs]], [[Squigs]].
 +
 
 +
<table>
 +
  <tr>
 +
      <td>[[Squigs]]</td>
 +
      <td>[[Squigs]]</td>
 +
  </tr>
 +
  <tr>
 +
      <td>[[Squigs]]</td>
 +
      <td>[[Squigs]]</td>
 +
  </tr>
 +
</table>
  
{|
 
|-
 
|rowspan="2"|[[Squigs]]
 
|[[Squigs]]
 
|[[Squigs]]
 
|-
 
|[[Squigs]]
 
|[[Squigs]]
 
|-
 
|[[Squigs]]
 
|colspan="2"|[[Squigs]]
 
|}
 
 
}}
 
}}
  

Revision as of 08:12, 12 May 2008

This template is part of a set of templates designed to streamline the portals look and feel.

Usage

The basic usage is

{{Portal}}

<div style="margin: 10px">

{{Portal Header|Icon=Icon.jpg|Box Content=
Main Intro
}}

Other content 

</div>
|}

As you can see there is the need of a DIV element to put some margin, and a "|}" to close the table at the end of the block.

Explaination

But let's explain what each row does.

{{Portal}}

Includes the portal navigation template (Template:Portalsnav) and opens the table that provides the base background colour (usually the darker one)

<div style="margin: 10px">

Adds some padding in a safe way, I could have tried to do it inside this template but mediawiki closes the div right after the end of the template. In other words, it's quick and dirty, but it works.

{{Portal Header|Icon=Icon.jpg|Box Content=
Main Intro
}}

Calls the main header template (Template:Portal Header) to display the introduction of the Portal along with an icon (resized to 100px wide), Box Content holds the content of the introduction box, usually a relevant quote in Race Portals.

Other content

The other boxes, the simplest way to add boxes or headings with no boxes is to use Template:Portal Box Template:Portal Heading.

</div>
|}

Closure of the 'safe padding' and the coloured container, again it's quick and dirty, but it works.

Real-life example

{{Portal}}

<div style="margin: 10px">

{{Portal Header|Icon=ServiceImage.jpg|Box Content=
<p style="text-align:center">
'''''Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 
Nunc adipiscing aliquet ligula. Praesent at magna. 
Mauris sit amet lorem et nulla lobortis pulvinar. 
Morbi luctus, enim vitae euismod tincidunt, metus justo sollicitudin augue, 
et feugiat lacus urna sed ligula.'''''<br />
'''--Drunken dude'''</p>
}}

{{Portal Heading|Title=Important Articles}}

<div style="float: left; width: 58%;">

{{Portal Box
|Title=Important stuff
|Box Content=
'''Seriously important'''

* [[thing1]]
* [[thing2]]
* [[thing3]]
* [[thing4]]
}}

{{Portal Box
|Title=More stuff
|Box Content=
'''Seriously important'''

* [[anotherthing1]]
* [[anotherthing2]]
* [[anotherthing3]]
* [[anotherthing4]]
}}

{{Portal Box
|Title=Last stuff
|Box Content=
It's not just about list, you can freely put long text, just like 
I'm doing here, all the wiki stuff works.
}}

</div>

<div style="float: right; width: 41%;">

{{Portal Box
|Title=Spotlight on things
|Box Content=
[[Image:ServiceImage.jpg|right|thumb|200px]]
Image test with other things.

}}

{{Portal Box
|Title=I really don't know what to put here
|Box Content=
So I'll just slap squigs around, you never go wrong with squigs
* [[Squigs]]
* [[Squigs]]
* [[Squigs]]
* [[Squigs]]

[[Squigs]],[[Squigs]], [[Squigs]].

<table>
   <tr>
      <td>[[Squigs]]</td>
      <td>[[Squigs]]</td>
   </tr> 
   <tr>
      <td>[[Squigs]]</td> 
      <td>[[Squigs]]</td> 
   </tr>
</table>

}}

</div>

<div style="clear:both">
{{Portal Heading|Title=Portal Maintenance|Box Content=}}
</div>

<div style="float: left; width: 58%;">
{{Portal Box
|Title=Recently Added/Modified
|Box Content=
* [[Special:Recentchanges]] Lame link I know.
}}
</div>

<div style="float: right; width: 41%;">
{{Portal Box
|Title=Requested Articles
|Box Content=
* [[Special:Wantedpages]] Lame link I know.
}}
</div>

</div>
|}

==Sources==
* <sup>1</sup> [[Lipsum]].

[[Category:Portals|Example]]
[[Category:Help|Portals]]

Result

This produces:


Portals :

Imperium ( Adeptus MechanicusAstra MilitarumAdepta SororitasInquisitionSpace MarinesAdeptus Custodes )
ChaosAeldariDrukhariGenestealer CultsLeagues of VotannNecronsOrksTauTyranids

LexicanumPublicationsQuotesGalaxyMiniaturesGames


Portal

ServiceImage.jpg

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc adipiscing aliquet ligula. Praesent at magna. Mauris sit amet lorem et nulla lobortis pulvinar. Morbi luctus, enim vitae euismod tincidunt, metus justo sollicitudin augue, et feugiat lacus urna sed ligula.

--Drunken dude

.

Important Articles

Important stuff

Seriously important

.

More stuff

Last stuff

It's not just about list, you can freely put long text, just like I'm doing here, all the wiki stuff works.

.

Spotlight on things

ServiceImage.jpg

Image test with other things.

.

I really don't know what to put here

So I'll just slap squigs around, you never go wrong with squigs

Squigs,Squigs, Squigs.

Squigs Squigs
Squigs Squigs
.

Portal Maintenance

Recently Added/Modified

.

Requested Articles

.

Sources