Template: Blog post

No edit summary
No edit summary
Line 1: Line 1:
<!-- Template:Blog_post -->
<noinclude>
<noinclude>
<!--
This template uses Extension:Cargo.
Make sure Cargo is installed and enabled before using this template.
-->
{{#cargo_declare:
{{#cargo_declare:
  _table=blog_posts
  _table=blog_posts
Line 31: Line 25:
}}
}}


<div class="blogpost">
<!-- Make the visible page title the post title (requires $wgAllowDisplayTitle = true) -->
  <!-- Banner image (hidden if hide_banner is set or image not set) -->
{{DISPLAYTITLE:{{{title|{{PAGENAME}}}}}}}
  {{#if:{{{hide_banner|}}}||{{#if:{{{image|}}}|[[File:{{{image}}}|class=blogpost-banner|alt={{{image_alt|{{{description|}}}}}}]]}}}}


  <h1 class="blogpost-title">{{{title|{{PAGENAME}}}}}</h1>
<templatestyles src="Template:Blog_post/styles.css" />


   <div class="blogpost-meta">
<article class="blog-article">
     {{#if:{{{date|}}}|<span class="blogpost-date">{{{date}}}</span>}}
 
     {{#if:{{{authors|{{{author|}}}}}}|{{#if:{{{date|}}}| • }}<span class="blogpost-authors">{{{authors|{{{author|}}}}}}</span>}}
  <!-- Title -->
     {{#if:{{{mode|}}}| • <span class="blogpost-mode">{{{mode}}}</span>}}
  <h1 class="blog-h1">{{{title|{{PAGENAME}}}}}</h1>
 
  <!-- Byline -->
   <div class="blog-byline">
     {{#if:{{{date|}}}|<span class="blog-date">{{#time:j F Y|{{{date}}}}}</span>}}
     {{#if:{{{authors|{{{author|}}}}}}|
      {{#if:{{{date|}}}| • }}
      <span class="blog-authors">{{{authors|{{{author|}}}}}}</span>
    }}
    <!-- Optional: show Translate link if you use Extension:Translate and set translate=yes -->
     {{#ifeq:{{{translate|}}}|yes| • <span class="blog-translate">[[Special:Translate|Translate this post]]</span>|}}
   </div>
   </div>


   {{#if:{{{description|}}}|<div class="blogpost-desc">{{{description}}}</div>}}
  <!-- Hero image -->
  {{#if:{{{image|}}}|
    <figure class="blog-hero">
      [[File:{{{image}}}|class=blog-hero-img|alt={{{image_alt|}}}]]
      {{#if:{{{image_alt|}}}|<figcaption class="blog-hero-cap">{{{image_alt}}}</figcaption>}}
    </figure>
  }}
 
  <!-- Standfirst -->
   {{#if:{{{description|}}}|<p class="blog-standfirst">{{{description}}}</p>}}
 
  <!-- Body content follows (normal wikitext on the page) -->


   {{#if:{{{keywords|}}}|<div class="blogpost-keywords"><b>Keywords:</b> {{{keywords}}}</div>}}
   {{#if:{{{keywords|}}}|<div class="blog-tags"><b>Keywords:</b> {{{keywords}}}</div>}}
</div>
</article>


[[Category:Blog posts]]
[[Category:Blog posts]]
</includeonly>
</includeonly>

Revision as of 20:30, 1 October 2025

This template defines the table "blog_posts". View table. Template:Documentation

Discuss this page