Template:News item: Difference between revisions

From Pikipedia, the Pikmin wiki
Jump to navigation Jump to search
mNo edit summary
(Changed the rounding of news type boxes to match the wiki's new rounding style in the 2020 site redesign, and added an example.)
 
(18 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{| style="width: 100%;"
{| style="width: 100%;"
| style="color: #353; font-style: italic; width: 50%; text-align: center;" | {{{1}}}
| class="news-date" style="width: 50%; text-align: center;" | {{{1}}}
| style="text-align: center;" | <div title={{#switch:{{{2|}}} | c="News about the community" | s="News about the official Pikmin series" | w="News about the wiki's evolution"}} style="display: inline-block; width: 80px; border: {{#switch:{{{2|}}} | c=#363 | s=#336 | w=#663}} solid 1px; {{round|8}} background-color: {{#switch:{{{2|}}} | c=#BEB | s=#BBE | w=#EEB}};">{{#switch:{{{2|}}} | c=Community | s=Series | w=Wiki}}</div>
| class="news-type" style="text-align: center;" | <div title={{#switch:{{{2|}}} | c="News about the Pikmin community" | s="Official news about the Pikmin series" | w="News about Pikipedia" | n="News about the Nintendo Independent Wiki Alliance" | b="News about Pikmin Bloom events" }} style="display: inline-block; width: 80px; border: {{#switch:{{{2|}}} | c=#633 | s=#336 | w=#663 | n=#633 | b=#363 }} solid 1px; {{round|5|full=y}} background-color: {{#switch:{{{2|}}} | c=#BEE | s=#BBE | w=#EEB | n=#EBB | b=#BEB }};">{{#switch:{{{2|}}} | c=Community | s=Series | w=Wiki | n=NIWA | b=Bloom }}</div>
|-
|-
| colspan="2" style="text-indent: 1em;" | {{{3}}}
| colspan="2" style="text-indent: 1em;" | {{{3}}}
Line 7: Line 7:


==Info==
==Info==
This template creates a table with information about a news feed, for use with {{tem|News}}.
This template creates a table with information about a news feed, for use with {{tem|news}}.


==Parameters==
==Parameters==
Line 14: Line 14:
|-
|-
! 1
! 1
| '''Yes''' ||  || Date || Date of the item. It should have the month first, then a space, then the day number, followed by the ordinal qualifier, using the <code><nowiki><sup></nowiki></code> tags. Example: <code><nowiki>January 1<sup>st</sup></nowiki></code> for "January 1<sup>st</sup>".
| '''Yes''' ||  || Date || Date of the item. It should use {{tem|date}}, year included.
|-
|-
! 2
! 2
| '''Yes''' ||  || Type || Type of item.
| '''Yes''' ||  || Type || Type of item.
*'''c''': Community-related news.
*'''c''': Community-related news.
*'''s''': Series-related news (official revelations about the series).
*'''s''': Official news about the series.
*'''w''': Wiki-related news.
*'''w''': Wiki-related news.
*'''n''': NIWA wiki-related news.
*'''b''': News about ''Pikmin Bloom'' events.
|-
|-
! 3
! 3
Line 31: Line 33:
</pre>
</pre>


[[Category:Inline templates]]
==Example==
{|class="wikitable"
!Code
!Result
|-
|<pre>{{news item|{{date|28|July|2017}}|s|'''{{hp}}''' has been released in North America and Europe!}}</pre>
|{{news item|{{date|28|July|2017}}|s|'''{{hp}}''' has been released in North America and Europe!}}
|}


</noinclude>
[[Category:Inline templates]]</noinclude>

Latest revision as of 20:45, October 18, 2022

{{{1}}}
{{{3}}}

Info

This template creates a table with information about a news feed, for use with {{news}}.

Parameters

Parameter Mandatory Default Purpose Detailed description
1 Yes Date Date of the item. It should use {{date}}, year included.
2 Yes Type Type of item.
  • c: Community-related news.
  • s: Official news about the series.
  • w: Wiki-related news.
  • n: NIWA wiki-related news.
  • b: News about Pikmin Bloom events.
3 Yes Text The actual item text.

Skeleton

{{news item | <date> | <type> | <text>}}

Example

Code Result
{{news item|{{date|28|July|2017}}|s|'''{{hp}}''' has been released in North America and Europe!}}
July 28th, 2017
Series
Hey! Pikmin has been released in North America and Europe!