Format:Election box candidate with party link
|- class="vcard" ! style="background-color: {{Template:{{{party}}}/meta/color}}; width: 5px;" | | class="org" style="width: 130px" | | class="fn" | {{{candidate}}} | style="text-align: right; margin-right: 0.5em" | {{{votes}}} | style="text-align: right; margin-right: 0.5em" | {{{percentage}}} | style="text-align: right; margin-right: 0.5em" | {{{change}}}
|-
Documentație format
Această documentație este adusă de la pagina Format:Election box candidate with party link/doc.
|
[lectură]
[modificare]
[istoric] |
Aceasta este pagina de documentație pentru Format:Election box candidate with party link. Pagina descrie modul de folosire al formatului și conține categoriile de care acesta aparține, precum și orice altceva ce nu face parte din formatul propriu-zis. |
Utilizare
Conexiuni ale unui anumit partid
A more sophisticated effect can be achieved using Template:Election box candidate with party link. This adds a link to the candidate's party and also adds a color tab to the left of the candidate. For example:
For example:
{{Election box begin | title=[[United Kingdom general election, 2005|General Election 2005]]: Strangford}} {{Election box candidate with party link| |party = Labour Party (UK) |candidate = Tony Blair |votes = 9,999 |percentage = 50.0 |change = +10.0 }} {{Election box candidate with party link| |party = Conservative Party (UK) |candidate = Michael Howard |votes = 9,999 |percentage = 50.0 |change = +10.0 }} {{Election box end}}
Will create this:
{{{titlu}}} | |||||
---|---|---|---|---|---|
Partid politic | Candidat | Voturi valide | % | ±% | |
[[Labour Party (UK)|Format:Labour Party (UK)/meta/shortname]] | Tony Blair | 9,999 | 50.0 | +10.0 | |
[[Conservative Party (UK)|Format:Conservative Party (UK)/meta/shortname]] | Michael Howard | 9,999 | 50.0 | +10.0 |
However, this does rely on some additional setup for each party. See below for more details.
Party set up
It is necessary to do some a little bit of setup for each party in the election. This involves creating two simple templates for the article that you will be linking to (eg Labour Party (UK)). These contain the identifying color of the party and the short name that will be used as the link caption (as the full wikipedia page name will probably not be suitable).
The two templates that you will need to create are:
- Template:ArticleName/meta/color
- Template:ArticleName/meta/shortname
The color template will just contain the party's identifying color (eg red), and the shortname template will just contain the name of the party as you want it to appear on the link (eg Labour).
You should also add something to the main article's talk page to indicate that these two templates exist. There is a template Template:Election box metadata that can be used to do this.
Instrucțiuni pas cu pas
Following are some easy step-by-step instructions for adding the two sub-pages:
- First, go to the article about the party that you want to set up. Eg Labour Party (UK).
- Click on the discussion tab to get to article's talk page.
- Click on the edit this page tab to start editing the page.
- Add the text {{Election box metadata}} somewhere on the page. This will create a section on the page that provides links to the meta pages, however they don't exist yet.
- Save the page.
- Click on the red link to the page
ArticleName/meta/color
. As this page does not yet exist, this will take you directly to the page creation screen. - Enter just the identifying color of the party. This can be a color name, such as red or an RGB code such as #FF0000. If you use an RGB code you will need to type it as <nowiki>#FF0000</nowiki> otherwise it will be treated as a list element.
- Put the text For Template:Election box in the Edit Summary field (otherwise someone will flag it for speedy deletion)!
- Save the page.
- Repeat the previous four steps for the
ArticleName/meta/shortname
sub-page.
Exemple
- Talk:Labour Party (UK)#Election box metadata
- Template:Labour Party (UK)/meta/color
- Template:Labour Party (UK)/meta/shortname
Microformat
Sintaxa HTML markup produsă de acest format include un hCard microformat, care face ca detaliile referitoare la o anumită persoană (parsable), să fie catalogate automat pentru toată Wikipedia ori printr-un browser să fie subiect al unei baze de date sau a unui grup de adrese. Pentru a afla mai multe despre folosirea formatelor pe Wikipedia, vă rugăm să vedeți articolul proiectul microformat de pe Wikipedia.
Sub-formate
Informațiile privind data nașterii (în engleză date-of-birth) ("bday") vor fi incluse în micro-format doar dacă unul din următoarele formate {{Birth date}}, {{Birth date and age}}, {{Birth-date}} ({{bday}}) ori {{Birth-date and age}} ({{b-da}}) sunt utilizate în acea infobox. (Nu utilizați acestea dacă datele sunt anterioare anului 1583).
Pentru a include o conexiune URL (în engleză Universal Resource Locator), folosiți {{URL}}.
Vă rugăm să nu înlăturați nimic din aceste sub-formate. (Conform originalului, Please do not remove instances of these sub-templates.)
Clase
Formatul hCard utilizează diferite clase HTML incluzând și
- * adr
- * agent
- * bday
- * birthplace
- * category
- * country-name
- * deathdate
- * deathplace
- * extended-address
- * family-name
- * fn (required)
- * given-name
- * honorific-prefix
- * honorific-suffix
- * label
- * locality
- * n
- * nickname
- * note
- * org
- * role
- * url
- * vcard
- *
Vă rugăm să nu re-denumiți aceste clase; nici să colapsați elementele care le folosesc. (Conform originalului, Please do not rename or remove these classes; nor collapse nested elements which use them.
A se vedea și
- {{Election box begin}}
- {{Election box begin no change}}
- {{Election box begin no party}}
- {{Election box candidate}}
- {{Election box candidate for alliance}}
- {{Election box candidate minor party}}
- {{Election box candidate with party link}}
- {{Election box candidate with party link no change}}
- {{Election box winning candidate with party link}}
- {{Election box winning candidate with party link no change}}
- {{Election box gain}}
- {{Election box gain with party link}}
- {{Election box hold with party link}}
- {{Election box hold with party link no swing}}
- {{Election box void}}
- {{Election box majority}}
- {{Election box margin of victory}}
- {{Election box metadata}}
- {{Election box new seat win}}
- {{Election box Registered electors}}
- {{Election box rejected}}
- {{Election box turnout}}
- {{Election box turnout no change}}
- {{Election box turnout no party}}
- {{Election box total}}
- {{Election box total no change}}
- {{Election box end}}
- {{Election box inline begin}}
- {{Election box inline begin no change}}
- {{Election box inline candidate}}
- {{Election box inline candidate no change}}
- {{Election box inline candidate with party link}}
- {{Election box inline candidate with party link no change}}
- {{Election box inline incumbent}}
- {{Election box inline end}}
- {{Election Summary}} – pentru partidele politice care nu au articole pe WikiPedia
- {{Election summary begin}}
- {{Election summary party}}
- {{S-end}}