Difference between revisions of "Template:Article card"

From blackwiki
Jump to navigation Jump to search
blackwiki>Certes
(If the description is missing, transclude the article's lead as an excerpt)
m (18 revisions imported)
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
<div style="margin-top: 10px; margin-bottom: 10px; background-color: white; box-shadow: 0px 20px 40px -30px black; max-width: {{{width|500px}}}; height: 110px; overflow: hidden; position: relative; border: 0.5px solid #999; border-radius: 8px;">
+
<templatestyles src="Article card/styles.css" />
<div style="margin-right: 10px; padding: 0; max-width: 200px; height: 110px; float: left; overflow: hidden; border-right: 1px solid #999; text-align: center;"><div class="nomobile">[[file:{{{image|Wikipedia-logo-v2.svg}}}|x110px|link= {{{article|wikipedia}}}]]</div></div>
+
<div class="articlecard" style="margin-top: 10px; margin-bottom: 10px; background-color: white; box-shadow: 0px 20px 40px -30px black; max-width: {{{width|500px}}}; height: 110px; overflow: hidden; position: relative; border: 0.5px solid #999; border-radius: 8px;">
 +
<div style="margin-right: 10px; padding: 0; max-width: 200px; height: 110px; float: left; overflow: hidden; border-right: 1px solid #999; text-align: center;">
 +
{{#if:{{{image|none}}}
 +
|<div>[[file:{{{image|Wikipedia-logo-v2.svg}}}|x110px|link= {{{article|wikipedia}}}]]</div>
 +
|<div style="display: none;">[[file:{{{image|Wikipedia-logo-v2.svg}}}|link= {{{article|wikipedia}}}]]</div>
 +
}}
 +
</div>
 
<div style="margin: 3px; max-height: 100%; overflow: scroll;">
 
<div style="margin: 3px; max-height: 100%; overflow: scroll;">
 
[[{{{article|wikipedia}}}|<span style="font-family: serif; color: black; text-decoration: underline; text-decoration-color: white;"><strong>{{{article|<em>{{{article}}}</em> Wikipedia}}}</strong></span>]]
 
[[{{{article|wikipedia}}}|<span style="font-family: serif; color: black; text-decoration: underline; text-decoration-color: white;"><strong>{{{article|<em>{{{article}}}</em> Wikipedia}}}</strong></span>]]
Line 6: Line 12:
 
{{#if:{{{description|}}}
 
{{#if:{{{description|}}}
 
|[[{{{article|Wikipedia}}}|<span style="color: #333; text-decoration: underline; text-decoration-color: white;">{{small|{{{description|<em>{{{description}}}</em> Lorem ipsum dolor sit amet, consectetur adipiscing elit.}}}}}</span>]]
 
|[[{{{article|Wikipedia}}}|<span style="color: #333; text-decoration: underline; text-decoration-color: white;">{{small|{{{description|<em>{{{description}}}</em> Lorem ipsum dolor sit amet, consectetur adipiscing elit.}}}}}</span>]]
|<span style="color: #333; text-decoration: underline; text-decoration-color: white;">{{Transclude lead excerpt|{{{article|Wikipedia}}}}}</span>
+
|<span style="color: #333; text-decoration: underline; text-decoration-color: white;">{{small|{{Transclude lead excerpt|{{{article|Wikipedia}}}|paragraphs= 1}}}}</span>
 
}}
 
}}
 
</div>
 
</div>
 
</div><noinclude>{{documentation}}</noinclude>
 
</div><noinclude>{{documentation}}</noinclude>

Latest revision as of 14:32, 28 October 2020

50px Template documentation[view] [edit] [history] [purge]

Script error: No such module "Uses TemplateStyles".

About

This template is an alternative to {{Article card vertical}}

Intended use

This template is intended for use on Portals. It creates a modern looking "card" linking to an article with a description and an image.

Parameters

Parameter Use Notes
image Specify the name of the image related to the article.
  • Do not ad the "File:" prefix.
  • Will not display on mobile.
  • Setting to "none" will hide image on desktop.
article Specify the article you are linking to.
description Text shown under the article name.
  • Will scroll if there is to much text.
  • Do not include links in description!.
width Specify the width of the box. not necessary

Example

{{article card
| article= Ward Cunningham
| description= Howard G. "Ward" Cunningham (born May 26, 1949) is an American computer programmer who developed the first wiki.
| image= Ward_Cunningham_-_Commons-1.jpg
}}

produces:

View More Examples