Template:Article: Difference between revisions

From AbhiprayaVedi
No edit summary
No edit summary
 
(40 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#default_form:Article_EN}}
<includeonly>
{{DISPLAYTITLE:{{{Display_Name|{{PAGENAME}}}}}}}
{{#set:
 
DisplayTitle={{{DisplayTitle|{{{Title|}}}}}}
<div class="article-wrapper">
|Date={{{Date|}}}
 
|Category={{{Category|}}}
<div class="article-header">
|Author={{{Author|}}}
 
|Image1={{{Image1|}}}
<div class="article-meta">
|Language={{{Language|}}}
  {{{Author|}}}{{#if:{{{Date|}}}| <span class="meta-sep"></span> {{{Date}}}}}
|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-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>|}}
<div class="content-wrapper">
<div class="main-content">
{{#if:{{{Image1|}}}|<div class="image-left">[[File:{{{Image1}}}|frameless|400px|{{{Image1Caption|}}}]]<div class="image-caption">{{{Image1Caption|}}}</div></div>|}}
<div class="article-text">
{{{Content|}}}
</div>
</div>
 
<!-- Second Image (Centered) -->
{{#if:{{{Image2|}}}|
<div class="content-image">
[[File:{{{Image2}}}|frameless|650px|{{{Image2Caption|}}}]]
<div class="image-caption">{{{Image2Caption|}}}</div>
</div>
</div>
 
|}}
{{#if:{{{Intro|}}}|
<!-- Source Attribution -->
<div class="article-intro">
{{#if:{{{SourceName|}}}|
{{{Intro}}}
<div class="source-attribution">
<strong>Source:</strong> {{{SourceName|}}}
{{#if:{{{OriginalAuthor|}}}| • <strong>Original Author:</strong> {{{OriginalAuthor|}}}|}}
{{#if:{{{SourceURL|}}}| • [{{{SourceURL|}}} Original Article]|}}
</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 class="article-layout">
</div>|}}
 
  {{#if:{{{KeyPoint1|}}}{{{KeyPoint2|}}}|
    }}
 
  <div class="article-content">
 
    {{#if:{{{Image1|}}}|
    <div class="article-image">
    [[File:{{{Image1}}}|thumb|right|300px|{{{Image1_Caption|}}}]]
    </div>
    }}
 
    {{{Content}}}
 
    {{#if:{{{Image2|}}}|
    <div class="article-image">
    [[File:{{{Image2}}}|thumb|left|300px|{{{Image2_Caption|}}}]]
    </div>
    }}
 
  </div>
 
  {{#if:{{{Thumbnail|}}}{{{Highlight1|}}}{{{Highlight2|}}}|
<div class="article-floatbox">
 
    {{#if:{{{Thumbnail|}}}|
    [[File:{{{Thumbnail}}}|thumb|right|180px|{{{Thumbnail_Caption|}}}]]
    }}
 
    {{#if:{{{Highlight1|}}}{{{Highlight2|}}}|
    <div class="article-highlights">
      <h3>Highlights</h3>
      <ul>
        {{#if:{{{Highlight1|}}}|<li>{{{Highlight1}}}</li>}}
        {{#if:{{{Highlight2|}}}|<li>{{{Highlight2}}}</li>}}
      </ul>
    </div>
    }}
 
  </div>
  }}
 
</div>
</div>
 
<!-- Right Sidebar -->
{{#if:{{{Translator|}}}{{{Source|}}}|
<div class="right-sidebar">
<div class="article-source">
<!-- Author Info Box -->
  <h3>Source & Attribution</h3>
<div class="author-infobox">
  {{#if:{{{Translator|}}}|<p><strong>Translator:</strong> {{{Translator}}}</p>}}
{{#if:{{{Thumbnail|}}}|
  {{#if:{{{Source|}}}|<p><strong>Original Source:</strong> {{{Source}}}</p>}}
<div class="author-photo">
[[File:{{{Thumbnail}}}|frameless|150px]]
</div>
</div>
}}
|}}
 
<div class="author-name-box">[[Author:{{{Author|}}}|{{{Author|}}}]]</div>
{{#if:{{{Author_Bio|}}}|
{{#if:{{{Author_Bio|}}}|
<div class="article-author-bio">
<div class="author-bio">{{{Author_Bio|}}}</div>
  <h3>About the Author</h3>
|}}
  {{{Author_Bio}}}
</div>
<!-- Highlights -->
{{#if:{{{Highlight1|}}}|
<div class="highlight-box">
<div class="highlight-title">💡</div>
<div class="highlight-text">{{{Highlight1|}}}</div>
</div>
|}}
{{#if:{{{Highlight2|}}}|
<div class="highlight-box">
<div class="highlight-title">💡</div>
<div class="highlight-text">{{{Highlight2|}}}</div>
</div>
</div>
|}}
<!-- Key Points -->
{{#if:{{{KeyPoint1|}}}|
<div class="keypoints-float">
<div class="keypoints-header">📌 Key Points</div>
<ul class="keypoints-list">
{{#if:{{{KeyPoint1|}}}|<li>{{{KeyPoint1|}}}</li>|}}
{{#if:{{{KeyPoint2|}}}|<li>{{{KeyPoint2|}}}</li>|}}
{{#if:{{{KeyPoint3|}}}|<li>{{{KeyPoint3|}}}</li>|}}
{{#if:{{{KeyPoint4|}}}|<li>{{{KeyPoint4|}}}</li>|}}
</ul>
</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>
{{#if:{{{Category|}}}|[[Category:{{{Category}}}]]}}
</div>|}}
 
</div>
</div>
</div>
<!-- Categories -->
[[Category:{{{Category|}}}]]
[[Category:Articles]]
{{#if:{{{Language|}}}|[[Category:{{{Language}}} articles]]|}}
{{#if:{{{OriginalAuthor|}}}|
[[Category:Translations]]
[[Category:Translated by {{{Author|}}}]]
|[[Category:Articles by {{{Author|}}}]]}}
</includeonly>
<noinclude>
== Article Template ==
This template renders article pages with proper layout and styling.
[[Category:Templates]]
{{DEFAULTSORT:{{{DisplayTitle|{{{Title|}}}}}}}}
</noinclude>

Latest revision as of 16:04, 2 May 2026


Article Template

This template renders article pages with proper layout and styling.