Difference between revisions of "Template:Portal card"

From Wayne County, Ohio Online Resource Center
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly><div class="portal-card"><!--
 
<includeonly><div class="portal-card"><!--
 
-->{{#if: {{{header|}}}  |<div class="portal-card-header">{{{header|}}}</div>}}<!--
 
-->{{#if: {{{header|}}}  |<div class="portal-card-header">{{{header|}}}</div>}}<!--
-->{{#if: {{{image|}}}  |<div class="portal-card-img">[[File:{{PAGENAME:{{{image|}}}}}|class=img-fluid]]</div>}}<!--
+
-->{{#if: {{{image|}}}  |<div class="{{#switch:{{{header|}}}|Picture of the Day=|#default=portal-card-img}} {{#if: {{{header|}}}|with-header}}">[[File:{{PAGENAME:{{{image|}}}}}|class=img-fluid]]</div>}}<!--
 
--><div class="portal-card-body"><!--
 
--><div class="portal-card-body"><!--
 
--><div><!--
 
--><div><!--
 
-->{{#if: {{{tagline|}}} |<div class="portal-card-body-tagline">{{{tagline|}}}</div>}}<!--
 
-->{{#if: {{{tagline|}}} |<div class="portal-card-body-tagline">{{{tagline|}}}</div>}}<!--
-->{{#if: {{{title|}}}  |<div class="portal-card-body-title">{{{title|}}}</div>}}<!--
+
-->{{#if: {{{title|}}}  |<div class="portal-card-body-title plainlinks">{{{title|}}}</div>}}<!--
 
--></div><!--
 
--></div><!--
 
-->{{#if: {{{content|}}} |<div class="portal-card-body-text">
 
-->{{#if: {{{content|}}} |<div class="portal-card-body-text">
Line 30: Line 30:
 
;Example
 
;Example
 
<pre>
 
<pre>
 +
{{Portal card
 +
|header=Header
 +
|title=Title
 +
|tagline=Tagline
 +
|content=Content content content
 +
|image=File:20000_squid_Nautilus_viewbay.jpg
 +
|footer=Footer
 +
}}
 +
</pre>
 +
 +
;Result
 
{{Portal card
 
{{Portal card
 
| header=Header
 
| header=Header
Line 38: Line 49:
 
| footer=Footer
 
| footer=Footer
 
}}
 
}}
 +
 +
 +
;Wall
 +
To get a centered grid with tiles, wrap instances of this template with:
 +
<pre>
 +
<div id="portal">
 +
{{Portal top |...}}
 +
<div class="portal-content">
 +
...
 +
{{Portal card|...}}
 +
{{Portal card|...}}
 +
{{Portal card|...}}
 +
...
 +
</div>
 +
</div>
 
</pre>
 
</pre>
  
 
;Result
 
;Result
 +
<div id="portal">
 +
{{Portal top
 +
|title=Collection Name
 +
|welcome=Portal Name
 +
|portals={{Portals}}<!-- contains all portal landing links -->
 +
}}
 +
<div class="portal-content">
 
{{Portal card
 
{{Portal card
 +
| header=Header
 +
| title=Title
 +
| tagline=Tagline
 +
| content=Content content content
 +
| image=File:20000_squid_Nautilus_viewbay.jpg
 +
| footer=Footer
 +
}}{{Portal card
 +
| header=Header
 +
| title=Title
 +
| tagline=Tagline
 +
| content=Content content content
 +
| image=File:20000_squid_Nautilus_viewbay.jpg
 +
| footer=Footer
 +
}}{{Portal card
 
| header=Header
 
| header=Header
 
| title=Title
 
| title=Title
Line 49: Line 96:
 
| footer=Footer
 
| footer=Footer
 
}}
 
}}
 +
</div>
 +
</div>

Latest revision as of 18:23, 19 October 2022

Description

Creates a responsive block. All parameters are optional, but at list one parameter is needed.

Usage
{{Portal card
|header=
|title=
|tagline=
|content=
|image=
|footer=
}}
Example
{{Portal card
|header=Header
|title=Title
|tagline=Tagline
|content=Content content content
|image=File:20000_squid_Nautilus_viewbay.jpg
|footer=Footer
}}
Result
Header
20000 squid Nautilus viewbay.jpg
Tagline

Content content content


Wall

To get a centered grid with tiles, wrap instances of this template with:

<div id="portal">
{{Portal top |...}}
<div class="portal-content">
...
{{Portal card|...}}
{{Portal card|...}}
{{Portal card|...}}
...
</div>
</div>
Result
Wayne County, Ohio Online Resource Center Portals
Portal Name
Collection Name
Header
20000 squid Nautilus viewbay.jpg
Tagline

Content content content

Header
20000 squid Nautilus viewbay.jpg
Tagline

Content content content

Header
20000 squid Nautilus viewbay.jpg
Tagline

Content content content