Draft:Template:Article: Difference between revisions
From AbhiprayaVedi
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly> | |||
{{ | <div class="article-container" data-language="{{{Language|}}}"> | ||
<!-- Article Header - Clean, No Duplication --> | |||
<!-- Article Header - | |||
<div class="article-header"> | <div class="article-header"> | ||
< | <div class="author-info"> | ||
<span class="author-name">{{{Author|}}}</span> | |||
<span class="date-info">{{{Date|}}}</span> | |||
<span class="category-badge">{{{Category|}}}</span> | |||
</div> | </div> | ||
</div> | </div> | ||
<!-- Introduction - | <!-- Introduction - Prominent but Compact --> | ||
<div class="introduction- | <div class="introduction-section"> | ||
{{{Introduction|}}} | {{{Introduction|}}} | ||
</div> | </div> | ||
<!-- Two Column Layout --> | <!-- Two Column Layout --> | ||
<div class=" | <div class="content-wrapper"> | ||
<!-- Main Content | <!-- Main Content --> | ||
<div class="main-content"> | <div class="main-content"> | ||
<!-- Image 1 - Left Aligned | <!-- Image 1 - Left Aligned --> | ||
{{#if:{{{Image1|}}}| | {{#if:{{{Image1|}}}| | ||
<div class="image-left"> | <div class="image-left"> | ||
| Line 34: | Line 29: | ||
|}} | |}} | ||
<!-- Article | <!-- Article Text --> | ||
<div class="article-text"> | <div class="article-text"> | ||
{{{Content|}}} | {{{Content|}}} | ||
</div> | </div> | ||
<!-- Additional Images | <!-- Additional Images --> | ||
{{#if:{{{Image2|}}}| | {{#if:{{{Image2|}}}| | ||
<div class="content-image"> | <div class="content-image"> | ||
[[File:{{{Image2}}}|thumb|center| | [[File:{{{Image2}}}|thumb|center|650px|{{{Image2Caption|}}}]] | ||
</div> | </div> | ||
|}} | |}} | ||
| Line 54: | Line 43: | ||
<!-- Source Attribution --> | <!-- Source Attribution --> | ||
{{#if:{{{SourceName|}}}| | {{#if:{{{SourceName|}}}| | ||
<div class="source- | <div class="source-attribution"> | ||
< | <strong>സ്രോതസ്സ്:</strong> {{{SourceName|}}} | ||
{{#if:{{{OriginalAuthor|}}}| • <strong>യഥാർത്ഥ രചയിതാവ്:</strong> {{{OriginalAuthor|}}}}} | |||
{{#if:{{{SourceURL|}}}| • [{{{SourceURL|}}} യഥാർത്ഥ ലേഖനം]}} | |||
{{#if:{{{OriginalAuthor|}}}| | |||
{{#if:{{{SourceURL|}}}| | |||
</div> | </div> | ||
|}} | |}} | ||
| Line 72: | Line 55: | ||
<div class="right-sidebar"> | <div class="right-sidebar"> | ||
<!-- Author | <!-- Author Infobox --> | ||
<div class="author-infobox"> | |||
<div class=" | |||
{{#if:{{{Thumbnail|}}}| | {{#if:{{{Thumbnail|}}}| | ||
<div class="author-photo"> | <div class="author-photo"> | ||
[[File:{{{Thumbnail}}}|frameless|280px | [[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 | <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 class="highlight-title">പ്രധാനം</div> | ||
<div class="highlight- | <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 class="highlight-title">പ്രധാനം</div> | ||
<div class="highlight- | <div class="highlight-text">{{{Highlight2|}}}</div> | ||
</div> | </div> | ||
|}} | |}} | ||
<!-- Key Points as Floating Box --> | |||
<!-- | |||
{{#if:{{{KeyPoint1|}}}| | {{#if:{{{KeyPoint1|}}}| | ||
<div class=" | <div class="keypoints-float"> | ||
<div class="keypoints- | <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> | ||
{{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>}} | |||
== 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: | |||
In the | |||
<pre> | <pre> | ||
<!-- Key Points as Floating Box --> | |||
{{#if:{{{KeyPoint1|}}}| | |||
<div class="keypoints-float"> | |||
... | |||
</div> | |||
|}} | |||
</pre> | |||
2. Cut this entire section | |||
3. Paste it in one of these locations: | |||
* **Top of main content**: After `<div class="main-content">` | |||
* **Within article text**: After `<div class="article-text">` | |||
</ | * **Bottom of main content**: Before `</div>` that closes main-content | ||
The CSS handles the floating automatically. | |||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> | ||
Revision as of 11:37, 3 April 2026
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.