Difference between revisions of "Template:CalendarEvent"

From Pirate Party Belgium
Jump to: navigation, search
(icon for event type)
(use css + filter tags with the same name as the page)
Line 1: Line 1:
<includeonly><div style="overflow:hidden;">{{CalendarDate|{{{?Has date}}}|{{{?Has time|}}}}}
+
<includeonly><div class="pirate-event">{{CalendarDate|{{{?Has date}}}|{{{?Has time|}}}}}
<div style="margin:0 .75em 6.5px 0; padding: 0 .6em;">
+
<div class="details">
   <div style="font-weight:bold;">{{#if: {{{?Has event type|}}}
+
   <div class="title">{{#if: {{{?Has event type|}}}
 
| [[File:{{#switch: {{{?Has event type|}}}
 
| [[File:{{#switch: {{{?Has event type|}}}
 
   | Meeting = Community_Noun_project_2280.svg
 
   | Meeting = Community_Noun_project_2280.svg
Line 11: Line 11:
 
   }}]] <nowiki />
 
   }}]] <nowiki />
 
}}{{NamedLink|{{{?Has page}}}|{{{?Has title|}}}}}</div>{{#if: {{{?Has location|}}}
 
}}{{NamedLink|{{{?Has page}}}|{{{?Has title|}}}}}</div>{{#if: {{{?Has location|}}}
| <div style="font-size:small;">[[File:Simpleicons Places placeholder-tool.svg|x15px|link=]] {{{?Has location}}}</div>
+
| <div class="location">[[File:Simpleicons Places placeholder-tool.svg|x15px|link=]] {{{?Has location}}}</div>
 
}}{{#if: {{{?Organized by|}}}{{{?In topic|}}}
 
}}{{#if: {{{?Organized by|}}}{{{?In topic|}}}
| {{#if: {{{?Has time|}}} | <br /> }}<div style="font-size:small;>Tags: {{#arraymap:{{{?Organized by|}}},{{{?In topic|}}}|,|x|[[x|{{ShowTitle|x}}]]}}</div>  
+
| {{#if: {{{?Has time|}}} | <br /> }}<div class="tags">Tags: {{#arraymap:{{{?Organized by|}}},{{{?In topic|}}}|,|x|{{#ifeq:x|{{BASEPAGENAME}}||[[x|{{ShowTitle|x}}]]}}}}</div>  
 
}}
 
}}
 
</div></div></includeonly><noinclude>== Usage ==
 
</div></div></includeonly><noinclude>== Usage ==

Revision as of 18:42, 28 September 2017

Usage

{{CalendarEvent
| ?Has page = <!-- mandatory -->
| ?Has title =
| ?Has date =  <!-- mandatory, format = yyyy/mm/dd -->
| ?Has time = <!-- optional, format = hh:mm -->
| ?Organized by =
| ?Has location =
| ?In topic = 
| ?Has event type = 
}}

Example

<time datetime="Error: Invalid time." class="date">
Error: Invalid time.
Error: Invalid time.
Error: Invalid time.
 
[[{{{page}}}]]