Draft:Template:Article: Difference between revisions

From AbhiprayaVedi
No edit summary
No edit summary
Line 2: Line 2:
{{DISPLAYTITLE:{{{DisplayTitle|{{{Title|}}}}}}}}
{{DISPLAYTITLE:{{{DisplayTitle|{{{Title|}}}}}}}}


<div class="article-infobox" style="float: right; width: 250px; border: 1px solid #aaa; padding: 10px; margin: 0 0 10px 10px; background: #f9f9f9;">
<!-- Main Content Area with Sidebars -->
'''Title:''' {{{Title|}}}<br/>
<div style="display: flex; gap: 20px; margin: 20px 0;">
'''Author:''' {{{Author|}}}<br/>
 
'''Date:''' {{{Date|}}}<br/>
<!-- Left Sidebar - Key Points -->
'''Category:''' {{{Category|}}}
{{#if:{{{KeyPoint1|}}}|
<div class="left-sidebar" style="flex: 0 0 200px; background: #fffacd; border: 2px solid #f0e68c; border-radius: 5px; padding: 15px; font-size: 0.9em;">
<div style="font-weight: bold; color: #8b4513; margin-bottom: 10px; font-size: 1.1em;">📌 പ്രധാന പോയിന്റുകൾ</div>
<ul style="margin: 0; padding-left: 20px;">
{{#if:{{{KeyPoint1|}}}|<li>{{{KeyPoint1|}}}</li>}}
{{#if:{{{KeyPoint2|}}}|<li>{{{KeyPoint2|}}}</li>}}
{{#if:{{{KeyPoint3|}}}|<li>{{{KeyPoint3|}}}</li>}}
{{#if:{{{KeyPoint4|}}}|<li>{{{KeyPoint4|}}}</li>}}
</ul>
</div>
|}}
 
<!-- Main Content Column -->
<div class="main-content-column" style="flex: 1; min-width: 0;">
 
<!-- Article Metadata - Prominent -->
<div class="article-meta" style="font-size: 1.1em; margin-bottom: 25px; padding: 15px; background: #f5f5f5; border-left: 4px solid #0645ad; border-radius: 3px;">
{{#if:{{{OriginalAuthor|}}}|
'''യഥാർത്ഥ രചയിതാവ് (Original Author):''' {{{OriginalAuthor|}}} | '''പരിഭാഷ (Translated by):''' {{{Author|}}} | '''തീയതി (Date):''' {{{Date|}}} | '''വിഭാഗം (Category):''' {{{Category|}}}
|
'''രചയിതാവ് (Author):''' {{{Author|}}} | '''തീയതി (Date):''' {{{Date|}}} | '''വിഭാഗം (Category):''' {{{Category|}}}
}}
</div>
 
<!-- Thumbnail -->
{{#if:{{{Thumbnail|}}}|
{{#if:{{{Thumbnail|}}}|
[[File:{{{Thumbnail}}}|thumb|250px]]
<div style="float: right; margin: 0 0 15px 15px;">
[[File:{{{Thumbnail}}}|thumb|300px|{{{ThumbnailCaption|}}}]]
</div>
|}}
|}}
</div>


<div class="article-introduction" style="background: #f0f8ff; padding: 15px; margin: 20px 0; border-left: 4px solid #0645ad; font-size: 1.1em; line-height: 1.6;">
<!-- Introduction Section with Special Styling -->
<div class="article-introduction" style="background: linear-gradient(to right, #e3f2fd, #ffffff); padding: 20px; margin: 0 0 25px 0; border-left: 5px solid #2196f3; border-radius: 3px; font-size: 1.15em; line-height: 1.8; color: #1565c0; font-weight: 500;">
{{{Introduction|}}}
{{{Introduction|}}}
</div>
</div>


<div class="article-content">
<!-- Main Article Content with embedded image in middle -->
<div class="article-content" style="font-size: 1.05em; line-height: 1.8; text-align: justify;">
{{#if:{{{Image1|}}}|
<!-- Split content to insert image in middle -->
{{{Content|}}}
 
<div style="margin: 30px 0; text-align: center; clear: both;">
[[File:{{{Image1}}}|thumb|center|650px|{{{Image1Caption|}}}]]
</div>
|
<!-- No image, just content -->
{{{Content|}}}
{{{Content|}}}
}}
</div>
<!-- Additional Images (Image 2 and 3 only) -->
{{#if:{{{Image2|}}}|
<div class="article-images" style="margin: 30px 0;">
<div style="margin: 20px 0; text-align: center;">
[[File:{{{Image2}}}|thumb|center|600px|{{{Image2Caption|}}}]]
</div>
{{#if:{{{Image3|}}}|
<div style="margin: 20px 0; text-align: center;">
[[File:{{{Image3}}}|thumb|center|600px|{{{Image3Caption|}}}]]
</div>
</div>
}}
</div>
|}}


</div>
<!-- Right Sidebar - Highlights/Quick Facts -->
{{#if:{{{Highlight1|}}}|
<div class="right-sidebar" style="flex: 0 0 220px; background: #e8f5e9; border: 2px solid #81c784; border-radius: 5px; padding: 15px; font-size: 0.9em;">
<div style="font-weight: bold; color: #2e7d32; margin-bottom: 10px; font-size: 1.1em;">💡 പ്രത്യേക ശ്രദ്ധയ്ക്ക്</div>
<div style="line-height: 1.6;">
{{#if:{{{Highlight1|}}}|
<div style="background: white; padding: 10px; margin-bottom: 10px; border-radius: 3px; border-left: 3px solid #4caf50;">
{{{Highlight1|}}}
</div>
}}
{{#if:{{{Highlight2|}}}|
<div style="background: white; padding: 10px; margin-bottom: 10px; border-radius: 3px; border-left: 3px solid #4caf50;">
{{{Highlight2|}}}
</div>
}}
{{#if:{{{Highlight3|}}}|
<div style="background: white; padding: 10px; border-radius: 3px; border-left: 3px solid #4caf50;">
{{{Highlight3|}}}
</div>
}}
</div>
</div>
|}}
</div>
<!-- Source Attribution Section - Compact -->
{{#if:{{{SourceName|}}}|
<div class="source-attribution" style="background: #fff9e6; border: 1px solid #ffc107; border-radius: 3px; padding: 12px; margin: 25px 0 20px 0; font-size: 0.95em;">
<strong style="color: #856404;">📰 സ്രോതസ്സ് (Source):</strong>
{{{SourceName|}}}{{#if:{{{OriginalDate|}}}| • പ്രസിദ്ധീകരണം (Published): {{{OriginalDate|}}}}}{{#if:{{{SourceURL|}}}| • [{{{SourceURL|}}} യഥാർത്ഥ ലേഖനം (Original Article)]}}{{#if:{{{TranslationType|}}}| • തരം (Type): {{{TranslationType|}}}}}{{#if:{{{PermissionNote|}}}| • <em>{{{PermissionNote|}}}</em>}}
</div>
|}}
<!-- Translator/Author Bio Section -->
{{#if:{{{Author_Bio|}}}|
{{#if:{{{Author_Bio|}}}|
<div class="author-bio" style="background: #f9f9f9; padding: 15px; margin: 20px 0; border-top: 2px solid #ddd;">
<div class="author-bio" style="background: #f5f5f5; padding: 20px; margin: 30px 0 20px 0; border-top: 3px solid #9e9e9e; border-radius: 3px;">
=== About the Author ===
<div style="font-size: 1.2em; color: #424242; font-weight: bold; margin-bottom: 10px;">
{{#if:{{{OriginalAuthor|}}}|
✍️ പരിഭാഷകനെക്കുറിച്ച് (About the Translator)
|
✍️ രചയിതാവിനെക്കുറിച്ച് (About the Author)
}}
</div>
<div style="line-height: 1.6;">
{{{Author_Bio|}}}
{{{Author_Bio|}}}
</div>
</div>
</div>
|}}
|}}


<!-- Categories -->
[[Category:{{{Category|}}}]]
[[Category:{{{Category|}}}]]
[[Category:Articles]]
[[Category:Articles]]
{{#if:{{{OriginalAuthor|}}}|
[[Category:Articles by {{{OriginalAuthor|}}}]]
[[Category:Translations]]
[[Category:Translated by {{{Author|}}}]]
|
[[Category:Articles by {{{Author|}}}]]
[[Category:Articles by {{{Author|}}}]]
}}
</includeonly>
</includeonly>
<noinclude>
== Article Template Documentation ==
This template creates a beautifully formatted article page with:
* Custom display title (supports Malayalam)
* Prominent metadata line showing original author (for translations) or author
* Colored introduction section
* Optional left sidebar for key points
* Optional right sidebar for highlights
* Support for multiple images/charts within content (Image1 appears in middle of content)
* Compact source attribution line for translations
* Translator/Author bio section
* Automatic categorization (original author for translations, translator for translations)
=== Usage ===
<pre>
{{Draft:Template:Article
|DisplayTitle=പ്രധാനപ്പെട്ട ലേഖനം
|Title=Important-Article
|Author=പരിഭാഷകന്റെ പേര് (for translations) or രചയിതാവിന്റെ പേര് (for originals)
|OriginalAuthor=യഥാർത്ഥ ലേഖകൻ (only for translations)
|Date=2026-01-14
|Category=Politics
|Thumbnail=Example.jpg
|ThumbnailCaption=Main image description
|Introduction=ലേഖനത്തിന്റെ ആമുഖം...
|Content=പ്രധാന ഉള്ളടക്കം...
|Image1=Chart1.png (appears in middle of article)
|Image1Caption=First chart description
|Image2=Photo2.jpg (appears at end)
|Image2Caption=Second photo description
|Author_Bio=പരിഭാഷകനെക്കുറിച്ച് or രചയിതാവിനെക്കുറിച്ച്...
|KeyPoint1=ആദ്യ പോയിന്റ്
|Highlight1=പ്രത്യേക ശ്രദ്ധയ്ക്ക്
|SourceName=The Hindu (for translations)
|OriginalDate=2026-01-10
|SourceURL=https://example.com/original-article
|TranslationType=Translation
|PermissionNote=Published with permission
}}
</pre>
=== Key Changes ===
* Page title (H1) appears only once at top (from MediaWiki default)
* Blue styled title removed
* Metadata line is larger (1.1em) and more prominent with background
* Original Author shows in metadata line for translations
* Translator name shows as "Translated by" in metadata
* Image1 appears in middle of content
* Source attribution is compact single line
* Author bio changes to "About Translator" for translations
* Categories show original author for translations
* Category display shows DISPLAYTITLE, not page name
=== Parameters ===
'''Basic Information:'''
* '''DisplayTitle''' (required): Title as displayed
* '''Title''' (required): Page name
* '''Author''' (required): Translator name (for translations) or Author (for originals)
* '''OriginalAuthor''' (optional): Original author name (only for translations)
* '''Date''' (required): Publication date
* '''Category''' (required): Article category
'''Content:'''
* '''Thumbnail''' (optional): Main image
* '''Introduction''' (required): Brief intro
* '''Content''' (required): Main text
* '''Image1''' (optional): Appears mid-article
* '''Image2-3''' (optional): Appear at end
'''Source (translations only):'''
* '''SourceName''', '''OriginalDate''', '''SourceURL''', '''TranslationType''', '''PermissionNote'''
'''Sidebars:'''
* '''KeyPoint1-4''', '''Highlight1-3'''
'''Bio:'''
* '''Author_Bio''' (changes to translator bio if OriginalAuthor is set)
[[Category:Templates]]
</noinclude>

Revision as of 22:26, 14 January 2026


Article Template Documentation

This template creates a beautifully formatted article page with:

  • Custom display title (supports Malayalam)
  • Prominent metadata line showing original author (for translations) or author
  • Colored introduction section
  • Optional left sidebar for key points
  • Optional right sidebar for highlights
  • Support for multiple images/charts within content (Image1 appears in middle of content)
  • Compact source attribution line for translations
  • Translator/Author bio section
  • Automatic categorization (original author for translations, translator for translations)

Usage

{{Draft:Template:Article
|DisplayTitle=പ്രധാനപ്പെട്ട ലേഖനം
|Title=Important-Article
|Author=പരിഭാഷകന്റെ പേര് (for translations) or രചയിതാവിന്റെ പേര് (for originals)
|OriginalAuthor=യഥാർത്ഥ ലേഖകൻ (only for translations)
|Date=2026-01-14
|Category=Politics
|Thumbnail=Example.jpg
|ThumbnailCaption=Main image description
|Introduction=ലേഖനത്തിന്റെ ആമുഖം...
|Content=പ്രധാന ഉള്ളടക്കം...
|Image1=Chart1.png (appears in middle of article)
|Image1Caption=First chart description
|Image2=Photo2.jpg (appears at end)
|Image2Caption=Second photo description
|Author_Bio=പരിഭാഷകനെക്കുറിച്ച് or രചയിതാവിനെക്കുറിച്ച്...
|KeyPoint1=ആദ്യ പോയിന്റ്
|Highlight1=പ്രത്യേക ശ്രദ്ധയ്ക്ക്
|SourceName=The Hindu (for translations)
|OriginalDate=2026-01-10
|SourceURL=https://example.com/original-article
|TranslationType=Translation
|PermissionNote=Published with permission
}}

Key Changes

  • Page title (H1) appears only once at top (from MediaWiki default)
  • Blue styled title removed
  • Metadata line is larger (1.1em) and more prominent with background
  • Original Author shows in metadata line for translations
  • Translator name shows as "Translated by" in metadata
  • Image1 appears in middle of content
  • Source attribution is compact single line
  • Author bio changes to "About Translator" for translations
  • Categories show original author for translations
  • Category display shows DISPLAYTITLE, not page name

Parameters

Basic Information:

  • DisplayTitle (required): Title as displayed
  • Title (required): Page name
  • Author (required): Translator name (for translations) or Author (for originals)
  • OriginalAuthor (optional): Original author name (only for translations)
  • Date (required): Publication date
  • Category (required): Article category

Content:

  • Thumbnail (optional): Main image
  • Introduction (required): Brief intro
  • Content (required): Main text
  • Image1 (optional): Appears mid-article
  • Image2-3 (optional): Appear at end

Source (translations only):

  • SourceName, OriginalDate, SourceURL, TranslationType, PermissionNote

Sidebars:

  • KeyPoint1-4, Highlight1-3

Bio:

  • Author_Bio (changes to translator bio if OriginalAuthor is set)