Anonymous

Draft:Template:Article: Difference between revisions

From AbhiprayaVedi
No edit summary
No edit summary
Line 1: Line 1:
{{#default_form:Article}}<includeonly>
<includeonly>
{{DISPLAYTITLE:{{{DisplayTitle|{{{Title|}}}}}}}}
<div class="article-container" data-language="{{{Language|}}}">


<div class="article-container">
<!-- Article Header - Clean, No Duplication -->
 
<!-- Article Header - Sober Colors -->
<div class="article-header">
<div class="article-header">
<h1>{{{DisplayTitle|{{{Title|}}}}}}</h1>
<div class="author-info">
<span class="author-name">{{{Author|}}}</span>
<span class="date-info">{{{Date|}}}</span>
<span class="category-badge">{{{Category|}}}</span>
</div>
</div>
<!-- Author Line - Single Line, Sober -->
<div class="author-line">
<span class="author-info">രചയിതാവ്: {{{Author|}}}</span> •
<span class="date-info">തീയതി: {{{Date|}}}</span>
{{#if:{{{Category|}}}| • <span class="category-info">വിഭാഗം: {{{Category|}}}</span>|}}
</div>
</div>


<!-- Introduction - Immediately After Author Line -->
<!-- Introduction - Prominent but Compact -->
<div class="introduction-box">
<div class="introduction-section">
{{{Introduction|}}}
{{{Introduction|}}}
</div>
</div>


<!-- Two Column Layout -->
<!-- Two Column Layout -->
<div class="two-column-layout">
<div class="content-wrapper">


<!-- Main Content Column (Left) -->
<!-- Main Content -->
<div class="main-content">
<div class="main-content">


<!-- Image 1 - Left Aligned at Beginning -->
<!-- Image 1 - Left Aligned -->
{{#if:{{{Image1|}}}|
{{#if:{{{Image1|}}}|
<div class="image-left">
<div class="image-left">
Line 34: Line 29:
|}}
|}}


<!-- Article Content -->
<!-- Article Text -->
<div class="article-text">
<div class="article-text">
{{{Content|}}}
{{{Content|}}}
</div>
</div>


<!-- Additional Images - Can be added manually in content -->
<!-- Additional Images -->
{{#if:{{{Image2|}}}|
{{#if:{{{Image2|}}}|
<div class="content-image">
<div class="content-image">
[[File:{{{Image2}}}|thumb|center|600px|{{{Image2Caption|}}}]]
[[File:{{{Image2}}}|thumb|center|650px|{{{Image2Caption|}}}]]
</div>
|}}
 
{{#if:{{{Image3|}}}|
<div class="content-image">
[[File:{{{Image3}}}|thumb|center|600px|{{{Image3Caption|}}}]]
</div>
</div>
|}}
|}}
Line 54: Line 43:
<!-- Source Attribution -->
<!-- Source Attribution -->
{{#if:{{{SourceName|}}}|
{{#if:{{{SourceName|}}}|
<div class="source-box">
<div class="source-attribution">
<div class="source-title">📰 സ്രോതസ്സ്</div>
<strong>സ്രോതസ്സ്:</strong> {{{SourceName|}}}
<div class="source-content">
{{#if:{{{OriginalAuthor|}}}| <strong>യഥാർത്ഥ രചയിതാവ്:</strong> {{{OriginalAuthor|}}}}}
<strong>പ്രസിദ്ധീകരണം:</strong> {{{SourceName|}}}
{{#if:{{{SourceURL|}}}| [{{{SourceURL|}}} യഥാർത്ഥ ലേഖനം]}}
{{#if:{{{OriginalDate|}}}|<br/><strong>തീയതി:</strong> {{{OriginalDate|}}}}}
{{#if:{{{OriginalAuthor|}}}|<br/><strong>യഥാർത്ഥ രചയിതാവ്:</strong> {{{OriginalAuthor|}}}}}
{{#if:{{{SourceURL|}}}|<br/><strong>ലിങ്ക്:</strong> [{{{SourceURL|}}} യഥാർത്ഥ ലേഖനം]}}
{{#if:{{{TranslationType|}}}|<br/><strong>തരം:</strong> {{{TranslationType|}}}}}
{{#if:{{{PermissionNote|}}}|<br/><em>{{{PermissionNote|}}}</em>}}
</div>
</div>
</div>
|}}
|}}
Line 72: Line 55:
<div class="right-sidebar">
<div class="right-sidebar">


<!-- Author Info Box (Like MediaWiki Infobox) -->
<!-- Author Infobox -->
{{#if:{{{Author|}}}|
<div class="author-infobox">
<div class="infobox author-box">
{{#if:{{{Thumbnail|}}}|
{{#if:{{{Thumbnail|}}}|
<div class="author-photo">
<div class="author-photo">
[[File:{{{Thumbnail}}}|frameless|280px|link={{{Author|}}}]]
[[File:{{{Thumbnail}}}|frameless|280px]]
</div>
</div>
|}}
|}}
<div class="author-name">[[{{{Author|}}}|{{{Author|}}}]]</div>
<div class="author-name-box">[[{{{Author|}}}|{{{Author|}}}]]</div>
{{#if:{{{Author_Bio|}}}|
{{#if:{{{Author_Bio|}}}|
<div class="author-bio-short">
<div class="author-bio">
{{{Author_Bio|}}}
{{{Author_Bio|}}}
</div>
</div>
|}}
|}}
</div>
</div>
|}}


<!-- Highlights -->
<!-- Highlights -->
{{#if:{{{Highlight1|}}}|
{{#if:{{{Highlight1|}}}|
<div class="highlight-box">
<div class="highlight-box">
<div class="highlight-title">💡 പ്രധാനം</div>
<div class="highlight-title">പ്രധാനം</div>
<div class="highlight-content">{{{Highlight1|}}}</div>
<div class="highlight-text">{{{Highlight1|}}}</div>
</div>
</div>
|}}
|}}
Line 99: Line 80:
{{#if:{{{Highlight2|}}}|
{{#if:{{{Highlight2|}}}|
<div class="highlight-box">
<div class="highlight-box">
<div class="highlight-title">💡 പ്രധാനം</div>
<div class="highlight-title">പ്രധാനം</div>
<div class="highlight-content">{{{Highlight2|}}}</div>
<div class="highlight-text">{{{Highlight2|}}}</div>
</div>
|}}
 
{{#if:{{{Highlight3|}}}|
<div class="highlight-box">
<div class="highlight-title">💡 പ്രധാനം</div>
<div class="highlight-content">{{{Highlight3|}}}</div>
</div>
</div>
|}}
|}}


</div>
<!-- Key Points as Floating Box -->
 
</div>
 
<!-- Floating Key Points Box -->
{{#if:{{{KeyPoint1|}}}|
{{#if:{{{KeyPoint1|}}}|
<div class="floating-keypoints">
<div class="keypoints-float">
<div class="keypoints-title">📌 പ്രധാന പോയിന്റുകൾ</div>
<div class="keypoints-header">പ്രധാന പോയിന്റുകൾ</div>
<ul class="keypoints-list">
<ul class="keypoints-list">
{{#if:{{{KeyPoint1|}}}|<li>{{{KeyPoint1|}}}</li>}}
{{#if:{{{KeyPoint1|}}}|<li>{{{KeyPoint1|}}}</li>}}
Line 130: Line 100:
</div>
</div>


<!-- Categories -->
</div>
 
</div>
 
<!-- Categories - Bilingual -->
[[Category:{{{Category|}}}]]
[[Category:{{{Category|}}}]]
[[Category:Articles]]
[[Category:Articles]]
{{#if:{{{Language|}}}|[[Category:{{{Language}}} articles]]|}}
{{#if:{{{Language|}}}|[[Category:{{{Language}}} articles]]|}}
<!-- English Category Names -->
{{#switch:{{{Category|}}}
|Politics=[[Category:രാഷ്ട്രീയം]]
|Society=[[Category:സമൂഹം]]
|Culture=[[Category:സംസ്കാരം]]
|Science=[[Category:ശാസ്ത്രം]]
|Literature=[[Category:സാഹിത്യം]]
|Cinema=[[Category:സിനിമ]]
|Environment=[[Category:പരിസ്ഥിതി]]
|Economics=[[Category:സമ്പദ്‌വ്യവസ്ഥ]]
|Opinion=[[Category:അഭിപ്രായം]]
}}
{{#if:{{{OriginalAuthor|}}}|
{{#if:{{{OriginalAuthor|}}}|
[[Category:Articles by {{{OriginalAuthor|}}}]]
[[Category:Articles by {{{OriginalAuthor|}}}]]
Line 144: Line 132:


<noinclude>
<noinclude>
== Template Documentation ==
{{TemplateData|<nowiki>
{
  "description": "Modern article template with bilingual category support and refined styling",
  "params": {
    "DisplayTitle": {
      "label": "Display Title",
      "description": "Article title (used for page title, not displayed in header)",
      "type": "string",
      "required": true
    },
    "Language": {
      "label": "Language",
      "description": "Article language",
      "type": "string",
      "required": true,
      "suggestedvalues": ["Malayalam", "English"]
    },
    "Author": {
      "label": "Author",
      "description": "Author name",
      "type": "string",
      "required": true
    },
    "Date": {
      "label": "Date",
      "description": "Publication date",
      "type": "date",
      "required": true
    },
    "Category": {
      "label": "Category",
      "description": "Article category (English name)",
      "type": "string",
      "required": true,
      "suggestedvalues": ["Politics", "Society", "Culture", "Science", "Literature", "Cinema", "Environment", "Economics", "Opinion"]
    },
    "Introduction": {
      "label": "Introduction",
      "description": "Article introduction",
      "type": "content",
      "required": true
    },
    "Content": {
      "label": "Content",
      "description": "Main article content",
      "type": "content",
      "required": true
    },
    "Thumbnail": {
      "label": "Author Photo",
      "description": "Author photo for infobox",
      "type": "wiki-file-name"
    },
    "Image1": {
      "label": "Image 1",
      "description": "First content image",
      "type": "wiki-file-name"
    },
    "Image1Caption": {
      "label": "Image 1 Caption",
      "type": "string"
    },
    "Image2": {
      "label": "Image 2",
      "description": "Second content image",
      "type": "wiki-file-name"
    },
    "Image2Caption": {
      "label": "Image 2 Caption",
      "type": "string"
    },
    "KeyPoint1": {"label": "Key Point 1", "type": "string"},
    "KeyPoint2": {"label": "Key Point 2", "type": "string"},
    "KeyPoint3": {"label": "Key Point 3", "type": "string"},
    "KeyPoint4": {"label": "Key Point 4", "type": "string"},
    "Highlight1": {"label": "Highlight 1", "type": "content"},
    "Highlight2": {"label": "Highlight 2", "type": "content"},
    "OriginalAuthor": {"label": "Original Author", "type": "string"},
    "SourceName": {"label": "Source Name", "type": "string"},
    "SourceURL": {"label": "Source URL", "type": "url"},
    "Author_Bio": {"label": "Author Bio", "type": "content"}
  }
}
</nowiki>}}


This template creates a clean, two-column article layout with sober colors.
== How to Edit Key Points Position ==


=== Layout Structure ===
Key points appear as a floating box in the right sidebar. To move them elsewhere:
* **Header**: Title only (no duplication)
* **Author Line**: Single line with author, date, category
* **Introduction**: Directly below author line
* **Two Columns**:
** Left: Main content with left-aligned Image1
** Right: Author infobox, highlights
* **Floating Key Points**: Appears in content as needed


=== Usage ===
1. In the template code, find the section:
Used automatically by Form:Article.
 
=== Image Placement ===
* **Image1**: Left-aligned at content start
* **Image2-3**: Can be placed manually in content or at end
* **Thumbnail**: Used for author photo in infobox
 
=== Manual Image Insertion ===
In the Content field, you can insert images anywhere:
<pre>
<pre>
Your text here...
<!-- Key Points as Floating Box -->
{{#if:{{{KeyPoint1|}}}|
<div class="keypoints-float">
...
</div>
|}}
</pre>


[[File:ImageName.jpg|thumb|right|300px|Caption]]
2. Cut this entire section


More text...
3. Paste it in one of these locations:
 
* **Top of main content**: After `<div class="main-content">`
[[File:AnotherImage.png|thumb|left|350px|Another caption]]
* **Within article text**: After `<div class="article-text">`
</pre>
* **Bottom of main content**: Before `</div>` that closes main-content


=== Font Detection ===
The CSS handles the floating automatically.
To check which font is rendering:
# Right-click on Malayalam text
# Select "Inspect" or "Inspect Element"
# Look for "Computed" tab
# Find "font-family" - shows which font is actually being used


[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Revision as of 11:37, 3 April 2026


Template:TemplateData

How to Edit Key Points Position

Key points appear as a floating box in the right sidebar. To move them elsewhere:

1. In the template code, find the section:

<!-- Key Points as Floating Box -->
{{#if:{{{KeyPoint1|}}}|
<div class="keypoints-float">
...
</div>
|}}

2. Cut this entire section

3. Paste it in one of these locations:

  • **Top of main content**: After `
    `
  • **Within article text**: After `
    `
  • **Bottom of main content**: Before `` that closes main-content

The CSS handles the floating automatically.