Template:Article: Difference between revisions

From AbhiprayaVedi
No edit summary
Tag: Reverted
No edit summary
 
(22 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 style="max-width:900px;margin:0 auto;padding:20px;font-family:Georgia,serif;line-height:1.6;background:#fdfcfc">
|Date={{{Date|}}}
 
|Category={{{Category|}}}
  <!-- TITLE -->
|Author={{{Author|}}}
  <div style="text-align:center;margin:0 0 0.2em 0">
|Image1={{{Image1|}}}
    <span style="font-size:2.2em;line-height:1.1;font-weight:bold;color:#2c1810">{{{Display_Name|{{PAGENAME}}}}}</span>
|Language={{{Language|}}}
  </div>
|Introduction={{{Introduction|}}}
 
}}
  <!-- META - INLINE STYLED -->
{{DISPLAYTITLE:{{{DisplayTitle|{{{Title|}}}}}}}}
  <div style="text-align:center;background:#f8f9fa;color:#444;font-size:1.15em;font-weight:bold;padding:8px 16px;margin:0 auto 1em auto;border-radius:4px;max-width:350px;display:inline-block;line-height:1.2">
<templatestyles src="Template:Article/styles.css" />
    {{{Author|}}} {{#if:{{{Date|}}}| <span style="margin:0 1em;font-weight:normal">•</span> {{{Date}}}}}
{{#set:Date={{{Date|}}}|Category={{{Category|}}}}}
  </div>
<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:{{{Intro|}}}|
{{#if:{{{Introduction|}}}|<div class="introduction-section">{{{Introduction|}}}</div>|}}
  <div style="background:#f8f9fa;padding:16px;border-left:5px solid #adb5bd;margin-bottom:1em;font-size:1.2em">
<div class="content-wrapper">
    {{{Intro}}}
<div class="main-content">
  </div>
{{#if:{{{Image1|}}}|<div class="image-left">[[File:{{{Image1}}}|frameless|400px|{{{Image1Caption|}}}]]<div class="image-caption">{{{Image1Caption|}}}</div></div>|}}
  }}
<div class="article-text">
 
{{{Content|}}}
  <!-- CONTENT WITH Image1 WRAP -->
  <div style="overflow:hidden">
    {{#if:{{{Image1|}}}|[[File:{{{Image1}}}|thumb|left|300px|{{{Image1_Caption|}}}]]}}
    {{{Content}}}
    {{#if:{{{Image2|}}}|[[File:{{{Image2}}}|thumb|right|300px|{{{Image2_Caption|}}}]]}}
  </div>
 
  <!-- FLOATBOX -->
  {{#if:{{{Thumbnail|}}}{{{Highlight1|}}}{{{Highlight2|}}}|
  <div style="float:right;width:220px;margin:0 0 1em 1.5em;background:#f8f9fa;padding:12px;border-left:4px solid #dee2e6">
    {{#if:{{{Thumbnail|}}}|[[File:{{{Thumbnail}}}|center|160px|{{{Thumbnail_Caption|}}}]]}}
    {{#if:{{{Highlight1|}}}{{{Highlight2|}}}|
    <div style="margin-top:12px">
      <h3 style="margin:0 0 8px 0;font-size:0.95em">Highlights</h3>
      {{#if:{{{Highlight1|}}}|<div style="margin:8px 0;padding-bottom:6px;border-bottom:1px solid #ddd">{{{Highlight1}}}</div>}}
      {{#if:{{{Highlight2|}}}|<div style="margin:8px 0;padding-bottom:6px">{{{Highlight2}}}</div>}}
    </div>
    }}
  </div>
  }}
 
  {{#if:{{{Author_Bio|}}}|
  <div style="clear:both;margin-top:2em;background:#f1f3f4;padding:15px;border-radius:6px;border-top:2px solid #dee2e6">
    <h3 style="margin-top:0">About the Author</h3>
    {{{Author_Bio}}}
  </div>
  }}
 
  {{#if:{{{Category|}}}|[[Category:{{{Category}}}]]}}
</div>
</div>
<!-- Second Image (Centered) -->
{{#if:{{{Image2|}}}|
<div class="content-image">
[[File:{{{Image2}}}|frameless|650px|{{{Image2Caption|}}}]]
<div class="image-caption">{{{Image2Caption|}}}</div>
</div>
|}}
<!-- Source Attribution -->
{{#if:{{{SourceName|}}}|
<div class="source-attribution">
<strong>Source:</strong> {{{SourceName|}}}
{{#if:{{{OriginalAuthor|}}}| • <strong>Original Author:</strong> {{{OriginalAuthor|}}}|}}
{{#if:{{{SourceURL|}}}| • [{{{SourceURL|}}} Original Article]|}}
</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>
<!-- Right Sidebar -->
<div class="right-sidebar">
<!-- Author Info Box -->
<div class="author-infobox">
{{#if:{{{Thumbnail|}}}|
<div class="author-photo">
[[File:{{{Thumbnail}}}|frameless|150px]]
</div>
|}}
<div class="author-name-box">[[Author:{{{Author|}}}|{{{Author|}}}]]</div>
{{#if:{{{Author_Bio|}}}|
<div class="author-bio">{{{Author_Bio|}}}</div>
|}}
</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>
|}}
<!-- 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>
</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.