Jump to content
Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Inner render for {{Home/FeaturedArticle}}, called via SMW format=template. Parameters (named args=yes):

  • Page: article page name (mainlabel)
  • HeroImage: File: name from Has image; may be empty

Image handling lives in {{Module:FeaturedExtract}}'s heroDiv function. Prefers HeroImage when set, falls back to the first File:... found in the page wikitext, then to the |image= parameter of the leading infobox call. When none yields an image the module uses default (here placeholder, default Placeholder-featured-article.jpg) as a decorative picture with empty alt text and no link; it returns empty only if that file is missing too, so no broken markup renders. heroDiv detects wide, landscape, square or portrait orientation and emits a modifier class on the wrapper. The card sets the picture in a 3:2 box (.home-featured__media) taking 40% of the card: a landscape or square picture fills it; a portrait one (a herbarium sheet, the placeholder plate) and a very wide one (a strip of scanned text) are shown whole on a tinted ground, never cropped. The thumbnail size hint is also derived from orientation so retina sharpness holds. A 3rd argument may be passed to heroDiv to force a thumbnail size.

The picture sets the card's height and the extract fills the height beside it, ending in a fade when the text runs past (TemplateStyles rejects the -webkit-box line clamp). The lead asks for up to 2000 characters, enough to fill the box at the widest layout. With fill=1 a lead shorter than that is followed by whole prose paragraphs from the article body, so a short lead does not leave the box half empty. With nomore=1 the card carries its own "Read the article" link under the text instead of an inline "read more". Layout in Template:Home/Cards - styles/styles.css (FEATURED ARTICLE, FULL WIDTH).