Template:Article: Difference between revisions
From AbhiprayaVedi
No edit summary |
No edit summary |
||
| (10 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly>{{DISPLAYTITLE:{{{DisplayTitle|{{{Title|}}}}}}}} | <includeonly> | ||
<templatestyles src="Article/styles.css" /> | {{#set: | ||
DisplayTitle={{{DisplayTitle|{{{Title|}}}}}} | |||
|Date={{{Date|}}} | |||
|Category={{{Category|}}} | |||
|Author={{{Author|}}} | |||
|Image1={{{Image1|}}} | |||
|Language={{{Language|}}} | |||
|Introduction={{{Introduction|}}} | |||
}} | |||
{{DISPLAYTITLE:{{{DisplayTitle|{{{Title|}}}}}}}} | |||
<templatestyles src="Template:Article/styles.css" /> | |||
{{#set:Date={{{Date|}}}|Category={{{Category|}}}}} | |||
<div class="article-container" data-language="{{{Language|}}}"> | <div class="article-container" data-language="{{{Language|}}}"> | ||
<div class="article-header"><div class="author-info"><span class="author-name">{{{Author|}}}</span> <span class="date-info">{{#time:d-m-Y|{{{Date|}}}}}</span> <span class="category-badge">{{{Category|}}}</span></div></div> | |||
<div class="article-header"> | |||
<div class="author-info"> | |||
<span class="author-name">{{{Author|}}}</span> | |||
<span class="date-info">{{#time:d-m-Y|{{{Date|}}}}}</span> | |||
<span class="category-badge">{{{Category|}}}</span> | |||
</div> | |||
</div | |||
{{#if:{{{Introduction|}}}|<div class="introduction-section">{{{Introduction|}}}</div>|}} | {{#if:{{{Introduction|}}}|<div class="introduction-section">{{{Introduction|}}}</div>|}} | ||
<div class="content-wrapper"> | <div class="content-wrapper"> | ||
<div class="main-content"> | <div class="main-content"> | ||
{{#if:{{{Image1|}}}|<div class="image-left">[[File:{{{Image1}}}|frameless|400px|{{{Image1Caption|}}}]]<div class="image-caption">{{{Image1Caption|}}}</div></div>|}} | |||
{{#if:{{{Image1|}}}| | |||
<div class="image-left"> | |||
[[File:{{{Image1}}}|frameless|400px|{{{Image1Caption|}}}]] | |||
<div class="image-caption">{{{Image1Caption|}}}</div> | |||
</div> | |||
|}} | |||
<div class="article-text"> | <div class="article-text"> | ||
{{{Content|}}} | {{{Content|}}} | ||
</div> | </div> | ||
<!-- Second Image (Centered) --> | <!-- Second Image (Centered) --> | ||
{{#if:{{{Image2|}}}| | {{#if:{{{Image2|}}}| | ||
| Line 41: | Line 28: | ||
</div> | </div> | ||
|}} | |}} | ||
<!-- Source Attribution --> | <!-- Source Attribution --> | ||
{{#if:{{{SourceName|}}}| | {{#if:{{{SourceName|}}}| | ||
| Line 50: | Line 36: | ||
</div> | </div> | ||
|}} | |}} | ||
<!-- “More in this Category” Section --> | |||
{{#if:{{{Category|}}}|<div class="related-articles"> | |||
<h2>📄 More in {{{Category|}}}</h2> | |||
<ul> | |||
{{#ask: | |||
[[Category:{{{Category|}}}]] | |||
[[!{{FULLPAGENAME}}]] | |||
[[Date::+]] | |||
|?DisplayTitle | |||
|sort=Date | |||
|order=desc | |||
|limit=5 | |||
|format=template | |||
|template=RelatedArticleRow | |||
|link=none | |||
|headers=hide | |||
|searchlabel= | |||
}} | |||
</ul> | |||
</div>|}} | |||
</div> | </div> | ||
<!-- Right Sidebar --> | <!-- Right Sidebar --> | ||
<div class="right-sidebar"> | <div class="right-sidebar"> | ||
<!-- Author Info Box --> | <!-- Author Info Box --> | ||
<div class="author-infobox"> | <div class="author-infobox"> | ||
| Line 68: | Line 71: | ||
|}} | |}} | ||
</div> | </div> | ||
<!-- Highlights --> | <!-- Highlights --> | ||
{{#if:{{{Highlight1|}}}| | {{#if:{{{Highlight1|}}}| | ||
| Line 76: | Line 78: | ||
</div> | </div> | ||
|}} | |}} | ||
{{#if:{{{Highlight2|}}}| | {{#if:{{{Highlight2|}}}| | ||
<div class="highlight-box"> | <div class="highlight-box"> | ||
| Line 83: | Line 84: | ||
</div> | </div> | ||
|}} | |}} | ||
<!-- Key Points --> | <!-- Key Points --> | ||
{{#if:{{{KeyPoint1|}}}| | {{#if:{{{KeyPoint1|}}}| | ||
| Line 96: | Line 96: | ||
</div> | </div> | ||
|}} | |}} | ||
<!-- Sidebar Widget with Related Articles --> | |||
{{#if:{{{Category|}}}|<div class="sidebar-related"> | |||
<div class="sidebar-related-title">🔗 Latest in {{{Category|}}}</div> | |||
<ul> | |||
{{#ask: | |||
[[Category:{{{Category|}}}]] | |||
[[!{{FULLPAGENAME}}]] | |||
[[Date::+]] | |||
|?DisplayTitle | |||
|sort=Date | |||
|order=desc | |||
|limit=3 | |||
|format=template | |||
|template=RelatedArticleRow | |||
|link=none | |||
|headers=hide | |||
|searchlabel= | |||
}} | |||
</ul> | |||
</div>|}} | |||
</div> | </div> | ||
</div> | </div> | ||
<!-- Categories --> | <!-- Categories --> | ||
[[Category:{{{Category|}}}]] | [[Category:{{{Category|}}}]] | ||
[[Category:Articles]] | [[Category:Articles]] | ||
{{#if:{{{Language|}}}|[[Category:{{{Language}}} articles]]|}} | {{#if:{{{Language|}}}|[[Category:{{{Language}}} articles]]|}} | ||
{{#if:{{{OriginalAuthor|}}}| | {{#if:{{{OriginalAuthor|}}}| | ||
[[Category:Translations]] | [[Category:Translations]] | ||
| Line 110: | Line 127: | ||
|[[Category:Articles by {{{Author|}}}]]}} | |[[Category:Articles by {{{Author|}}}]]}} | ||
</includeonly> | </includeonly> | ||
<noinclude> | <noinclude> | ||
== Article Template == | == Article Template == | ||
This template renders article pages with proper layout and styling. | This template renders article pages with proper layout and styling. | ||
[[Category:Templates]] | [[Category:Templates]] | ||
{{DEFAULTSORT:{{{DisplayTitle|{{{Title|}}}}}}}} | |||
</noinclude> | </noinclude> | ||
Latest revision as of 16:04, 2 May 2026
Article Template
This template renders article pages with proper layout and styling.