Difference between revisions of "Template:Events"
From Earth Science Information Partners (ESIP)
(17 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
[[Category:Events]] | [[Category:Events]] | ||
− | + | ||
− | + | {{#vardefine: committee | |
− | </div><!-- | + | |{{#show: {{#titleparts: {{FULLPAGENAME}}|1|0}} |?Committee }} |
+ | }} | ||
+ | |||
+ | {{#vardefine: coordinates | ||
+ | |{{#if: {{{Event coordinates|}}} | ||
+ | |{{{Event coordinates|}}} | ||
+ | |{{#ifeq: {{#sub:{{#geocode: {{{Event location|}}}}}|0|3}} | ||
+ | |Geo | ||
+ | | | ||
+ | |{{#geocode: {{{Event location|}}} }} | ||
+ | }} | ||
+ | }} | ||
+ | }} | ||
+ | |||
+ | {{#vardefine: duration_label | ||
+ | |{{#ifeq:{{{Start date|}}} | ||
+ | |{{{End date|}}} | ||
+ | |{{#time: Y-m-d|{{{Start date|}}} }} {{{Start hour|}}}:{{{Start minute|}}}-{{{End hour|}}}:{{{End minute|}}} | ||
+ | |{{#time: Y-m-d|{{{Start date|}}} }} {{{Start hour|}}}:{{{Start minute|}}} - {{#time: Y-m-d|{{{End date|}}} }} {{{End hour|}}}:{{{End minute|}}} | ||
+ | }} | ||
+ | }} | ||
+ | |||
+ | {{#set: | ||
+ | |Start date={{{Start date|}}} {{{Start hour|}}}:{{{Start minute|}}} | ||
+ | |End date={{{End date|}}} {{{End hour|}}}:{{{End minute|}}} | ||
+ | |Portal={{{Portal|}}} | ||
+ | |Committee={{#var: committee}} | ||
+ | |Event tag={{{Event tag|}}}|+sep=; | ||
+ | |Event location={{{Event location|}}} | ||
+ | |Event coordinates={{#var: coordinates}} | ||
+ | |Event participant={{{Event participant|}}}|+sep=; | ||
+ | |Event duration label={{#var: duration_label}} | ||
+ | }} | ||
+ | </div> | ||
+ | <div class="row"> | ||
+ | <div class="col-12 col-md-7"><!-- | ||
####### NEWS FEED ####### | ####### NEWS FEED ####### | ||
− | --><div class="d-flex"> | + | --><div class="d-block d-md-flex"> |
− | <div class="text-muted" style="width:100px">Committee:</div>'''{{ | + | <div class="text-muted d-block d-md-flex" style="width:100px">Committee:</div>'''{{#var: committee}}''' |
</div> <!-- | </div> <!-- | ||
Line 17: | Line 52: | ||
-->{{#if: {{{Event tag|}}} | -->{{#if: {{{Event tag|}}} | ||
− | |<div class="d-flex"> | + | |<div class="d-block d-md-flex"> |
− | <div class="text-muted" style="width:100px">Tags:</div>{{#arraymap: {{{Event tag|}}} | + | <div class="text-muted d-block d-md-flex" style="width:100px">Tags:</div>{{#arraymap: {{{Event tag|}}} |
|; | |; | ||
|@@@ | |@@@ | ||
|<span class="text-nowrap"><i class="fa fa-hashtag small"></i> '''@@@'''</span> | |<span class="text-nowrap"><i class="fa fa-hashtag small"></i> '''@@@'''</span> | ||
|  | |  | ||
− | }}</div> | + | }}</div> |
− | |||
− | |||
− | |||
− | |||
}} <!-- | }} <!-- | ||
− | ####### | + | ####### DURATION ####### |
− | --><div class="d-flex"> | + | --><div class="d-block d-md-flex"> |
− | <div class="text-muted" style="width:100px">Duration:</div>{{#ifeq:{{{Start date|}}} | + | <div class="text-muted d-block d-md-flex" style="width:100px">Duration:</div>{{#ifeq:{{{Start date|}}} |
|{{{End date|}}} | |{{{End date|}}} | ||
− | |{{#time: M j, Y|{{{Start date|}}} }} <span class="text-muted">{{{Start hour|}}}:{{{Start minute|}}}-{{{End hour|}}}:{{{End minute|}}}</span> | + | |{{#time: M j, Y|{{{Start date|}}} }} <span class="text-muted d-inline-block ml-2">{{{Start hour|}}}:{{{Start minute|}}}-{{{End hour|}}}:{{{End minute|}}}</span> |
− | |{{#time: M j, Y|{{{Start date|}}} }} <span class="text-muted">{{{Start hour|}}}:{{{Start minute|}}}</span> - {{#time: M j, Y|{{{End date|}}} }} <span class="text-muted">{{{End hour|}}}:{{{End minute|}}}</span> | + | |{{#time: M j, Y|{{{Start date|}}} }} <span class="text-muted d-inline-block ml-2">{{{Start hour|}}}:{{{Start minute|}}}</span> - {{#time: M j, Y|{{{End date|}}} }} <span class="text-muted">{{{End hour|}}}:{{{End minute|}}}</span> |
}} | }} | ||
</div> <!-- | </div> <!-- | ||
Line 43: | Line 74: | ||
-->{{#if: {{{Event location|}}} | -->{{#if: {{{Event location|}}} | ||
− | |<div class="d-flex"> | + | |<div class="d-block d-md-flex"> |
− | <div class="text-muted" style="width:100px">Location:</div>'''{{{Event location|}}}''' | + | <div class="text-muted d-flex d-md-block" style="width:100px">Location:</div>'''{{{Event location|}}}''' |
</div> | </div> | ||
}} <!-- | }} <!-- | ||
Line 51: | Line 82: | ||
-->{{#if: {{{Event participant|}}} | -->{{#if: {{{Event participant|}}} | ||
− | |<div class="d-flex"> | + | |<div class="d-block d-md-flex"> |
− | <div class="text-muted" style="width:100px">Participants:</div>{{#arraymap: {{{Event participant|}}} | + | <div class="text-muted d-flex d-md-block" style="width:100px">Participants:</div>{{#arraymap: {{{Event participant|}}} |
|; | |; | ||
|@@@ | |@@@ | ||
Line 60: | Line 91: | ||
</div> | </div> | ||
}} | }} | ||
− | <!-- | + | </div> |
+ | <div class="col-12 col-md-5"><!-- | ||
+ | |||
+ | ####### MAP ###### | ||
+ | |||
+ | -->{{#if: {{#var: coordinates}} | ||
+ | | | ||
+ | <div class="card d-block mt-3 mt-md-0 shadow-sm"> | ||
+ | <div class="card-img-top">{{#display_map: {{#var: coordinates}}|height=130}}</div> | ||
+ | </div> | ||
+ | }} | ||
+ | </div> | ||
+ | </div><!-- | ||
####### EVENT DESCRIPTION ####### | ####### EVENT DESCRIPTION ####### |