Template:Main page/doc

This template is used to format the main page. Its purpose is to reduce error in maintaining the main page, which is otherwise easy because there is separate markup for the desktop and mobile main pages. This template helps guarantee both main pages get required updates because most information can be sent just once to the parameters of this template, and the template takes care of the necessary duplication and differences in layout.

Parameters

 * : The heading for the feature section. This only shows up on the mobile main page. The feature box on the desktop main page does not use a heading.
 * : The content to show in the feature box. On the desktop main page, this is the upper left box. It is usually used for the most recently announced or released expansion.
 * Updating the feature background must be done separately as explained below.
 * : Links to the pages for expansions in order from most to least recently released. Include only one link per line.
 * On the desktop main page, only the first five are used, and this does not affect the backgrounds, which must be separately updated as explained below.
 * Game modes in this section are currently hardcoded into the template and must be updated separately for both desktop and mobile pages. This is because updating these is particularly complex if more need to be linked here, and this only needs to be done on rare occasions.
 * : This section takes a special format:
 * Each class section, which identifies the class and the heroes of that class, are separated by a blank line. The blank line must be empty; it can't have spaces, tabs, or other whitespace.
 * The first line of each class section is for the class itself. It has two parts separated by a  (and uses Main page class link for some of the formatting):
 * A partial CSS class name for the class section to allow for unique styling in MediaWiki:Hydra.css and MediaWiki:Mobile.css. (Note that two CSS classes are created from this, one with  appended that is for styling the whole section for that class, and one with   appended for styling only the class link itself.) It should not have spaces, special characters should be avoided, and lowercase is preferred.
 * The name of the class page.
 * The following lines identify each hero. They have four parts separated by  (and use Main page hero link for their formatting):
 * A partial CSS class name for the hero link.  is automatically appended to this name. It should not have spaces, special characters should be avoided, and lowercase is preferred.
 * The name of the hero page.
 * The text to display for the link. This can be left blank to just use the name of the hero page for this text.
 * Either an ID recognized by Heroportrait or the name of the hero card image without the  or   portion. (This uses the Heroportrait template to display the image behind the link on the desktop main page.)
 * : The service from which to get the main page video from. This will most commonly be  or.
 * : The id of the specific video to fetch from the given service. See EmbedVideo docuemntation on the Gamepedia Help Wiki for more information on these video parameters, as they coorespond to the  and   parameters used with the   parser function it provides.
 * : A list of links to the various card mechanics, one link per line. On the desktop main page, this is automatically divided into three columns. On the mobile main page, it is divided into two.
 * : The heading text for the first list of links in the Gameplay box. This list is in the left column on both the desktop and mobile main pages.
 * : The list of links, with one link per line, to show under.
 * : The heading text for the first list of links in the Gameplay box. This list is in the left column on both the desktop and mobile main pages.
 * : The list of links, with one link per line, to show under.
 * : The heading text for the first list of links in the Gameplay box. This list is in the middle column on the desktop main page and the right column on the mobile main page.
 * : The list of links, with one link per line, to show under.
 * : The heading text for the first list of links in the Gameplay box. This list is in the right column on both the desktop and mobile main pages.
 * : The list of links, with one link per line, to show under.

Desktop main page
The easy but slow way: Alternative longer method, but updates much faster:
 * Note: Administrative rights are normally required for either method.
 * Note: There's a transparent brown automatically applied over the image to darken it.
 * Note: The typical size used for this is 450 × 599 pixels.
 * Uploading over the currently used image, usually named something like File:Main page feature background 2.jpg, is the minimum needed, but won't update immediately due to the image cache. The only way to speed is to use the alternate method below.
 * These images should be in Category:Desktop main page images if you need to find the current one.
 * 1) Upload the image, using a filename not currently used on the wiki.
 * 2) * Adding the file to Category:Desktop main page images is recommended.
 * 3) * Protecting the file is strongly recommended.
 * 4) Find the direct URL by clicking on the image on its file page.
 * 5) * The part of the url needed looks like this:
 * 6) * The characters before the filename change with the filename, so they won't always be, which is why looking them up like this is required.
 * 7) (Probably in another tab) Open MediaWiki:Hydra.css for editing.
 * 8) * Find
 * 9) * On the second line below that, replace the current URL inside  with the partial URL from step 2, leaving   in front.
 * 10) Optionally, it's possible to adjust the positioning.
 * 11) * The background-position is defined between "no-repeat" and " / cover" and may be something like "center top".
 * 12) * "left top", "right bottom", and other combinations of left, right, top, bottom can be specified to adjust the background alignment. (Look up CSS  for even more options.)
 * 13) Save MediaWiki:Hydra.css and refresh the main page. Usually, you should see the change immediately.
 * 14) * Rarely, it may take minutes for the CSS cache to update, but usually only if the CSS page is edited more than once in a brief time.

Mobile main page

 * Note: Administrative rights are normally required for either method.
 * Note: There's a transparent brown automatically applied over the image to darken it.
 * Note: The typical size used for this is 700 × 200 pixels.

The easy but slow way: Alternative longer method, but updates much faster:
 * Uploading over the currently used image, usually named something like File:Mobile Main Page Feature header.jpg, is the minimum needed, but won't update immediately due to the image cache. The only way to speed is to use the alternate method below.
 * These images should be in Category:Mobile main page images if you need to find the current one.
 * 1) Upload the image, using a filename not currently used on the wiki.
 * 2) * Adding the file to Category:Mobile main page images is recommended.
 * 3) * Protecting the file is strongly recommended.
 * 4) Find the direct URL by clicking on the image on its file page.
 * 5) * The part of the url needed looks like this:
 * 6) * The characters before the filename change with the filename, so they won't always be, which is why looking them up like this is required.
 * 7) (Probably in another tab) Open MediaWiki:Mobile.css for editing.
 * 8) * Find
 * 9) * On the second line below that, replace the current URL inside  with the partial URL from step 2, leaving   in front.
 * 10) Save MediaWiki:Mobile.css and refresh the main page. Usually, you should see the change immediately.
 * 11) * Rarely, it may take minutes for the CSS cache to update, but usually only if the CSS page is edited more than once in a brief time.

Updating the expansion backgrounds

 * Note: Administrative rights are required to fully complete this.
 * Note: There's a transparent brown automatically applied over the image to darken it.
 * Note: The typical size used for this is 185 × 150 pixels.

This usually only needs to be done when a new expansion is announced. At this point, the feature should be updated to include the basic info on the upcoming expansion, while the most recently released expansion now needs to be moved into the first expansion slot. The procedure for doing this is as follows:


 * 1) Upload the background for the new expansion background. Usually, you can make this cutting out an appropriately-sized portion of the feature background.
 * 2) * The usual filename convention is.
 * 3) * Adding the file to Category:Desktop main page images is recommended.
 * 4) * Protecting the file is strongly recommended.
 * 5) (Probably in another tab) Open MediaWiki:Hydra.css for editing.
 * 6) Find   and the image url inside the   part on the line after the   line. Cut that and paste it over the URL below in
 * 7) Work upwards and repeat this for ,  , and  , always pasting into the next one down.
 * 8) Find the direct URL of the recent uploaded expansion background by clicking on the image on its file page.
 * 9) * The part of the url needed looks like this:
 * 10) * The characters before the filename change with the filename, so they won't always be, which is why looking them up like this is required.
 * 11) Place the partial URL from the previous step in the   underneath , adding   in front.
 * 12) Save MediaWiki:Hydra.css and refresh the main page. Usually, you should see the change immediately.