Template: Blog post
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<!-- Template:Blog_post --> | |||
<noinclude> | <noinclude> | ||
<!-- | <!-- | ||
| Line 4: | Line 6: | ||
Make sure Cargo is installed and enabled before using this template. | Make sure Cargo is installed and enabled before using this template. | ||
--> | --> | ||
{{#cargo_declare: | {{#cargo_declare: | ||
_table=blog_posts | |||
| title=String | |||
| date=Date | |||
| authors=List (;) of Page | |||
| image=File | |||
| image_alt=String | |||
| description=Wikitext string | |||
| keywords=List (;) of String | |||
| mode=String (allowed values=draft,featured,hidden) | |||
}} | }} | ||
{{documentation}} | {{documentation}} | ||
</noinclude><includeonly> | </noinclude><includeonly> | ||
{{#cargo_store: | {{#cargo_store: | ||
_table=blog_posts | |||
| title={{{title|{{PAGENAME}}}}} | |||
| date={{{date|}}} | |||
| authors={{{authors|{{{author|}}}}}} | |||
| image={{{image|}}} | |||
| image_alt={{{image_alt|{{{description|}}}}}} | |||
| description={{{description|}}} | |||
| keywords={{{keywords|}}} | |||
| mode={{{mode|}}} | |||
}} | }} | ||
<templatestyles src="Template:Blog_post/styles.css" /> | <templatestyles src="Template:Blog_post/styles.css" /> | ||
<div class="blogpost"> | <div class="blogpost"> | ||
<!-- Banner image (hidden if hide_banner is set or image not set) --> | |||
{{#if:{{{hide_banner|}}}||{{#if:{{{image|}}}|[[File:{{{image}}}|class=blogpost-banner|alt={{{image_alt|{{{description|}}}}}}]]}}}} | |||
<h1 class="blogpost-title">{{{title|{{PAGENAME}}}}}</h1> | <h1 class="blogpost-title">{{{title|{{PAGENAME}}}}}</h1> | ||
<div class="blogpost-meta"> | <div class="blogpost-meta"> | ||
{{#if:{{{date|}}}|<span class="blogpost-date">{{{date}}}</span>}} | {{#if:{{{date|}}}|<span class="blogpost-date">{{{date}}}</span>}} | ||
{{#if:{{{authors|{{{author|}}}}}}| | {{#if:{{{authors|{{{author|}}}}}}|{{#if:{{{date|}}}| • }}<span class="blogpost-authors">{{{authors|{{{author|}}}}}}</span>}} | ||
{{#if:{{{mode|}}}| • <span class="blogpost-mode">{{{mode}}}</span>}} | {{#if:{{{mode|}}}| • <span class="blogpost-mode">{{{mode}}}</span>}} | ||
</div> | </div> | ||
{{#if:{{{description|}}}|<div class="blogpost-desc">{{{description}}}</div>}} | |||
{{#if:{{{description|}}}| | |||
{{#if:{{{keywords|}}}|<div class="blogpost-keywords"><b>Keywords:</b> {{{keywords}}}</div>}} | |||
</div> | </div> | ||
[[Category:Blog posts]] | [[Category:Blog posts]] | ||
</includeonly> | </includeonly> | ||
Revision as of 20:15, 1 October 2025
This template defines the table "blog_posts". View table. Template:Documentation