Draft:Template:Article: Difference between revisions
From AbhiprayaVedi
No edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
{{DISPLAYTITLE:{{{DisplayTitle|{{{Title|}}}}}}}} | {{DISPLAYTITLE:{{{DisplayTitle|{{{Title|}}}}}}}} | ||
<!-- Custom CSS --> | <!-- Custom CSS with Malayalam Font Support --> | ||
<style> | <style> | ||
/* Malayalam Font Stack */ | |||
.malayalam-text { | |||
font-family: 'Manjari', 'Meera', 'Rachana', 'AnjaliOldLipi', 'Chilanka', 'Dyuthi', 'Gayathri', 'Karumbi', 'Keraleeyam', 'Lohit Malayalam', 'Noto Sans Malayalam', 'Noto Serif Malayalam', sans-serif; | |||
} | |||
.article-container { | .article-container { | ||
max-width: 1200px; | max-width: 1200px; | ||
| Line 9: | Line 14: | ||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; | ||
} | } | ||
/* Apply Malayalam fonts when Language=Malayalam */ | |||
{{#ifeq:{{{Language|}}}|Malayalam| | |||
.article-container { | |||
font-family: 'Manjari', 'Meera', 'Rachana', 'AnjaliOldLipi', 'Chilanka', 'Dyuthi', 'Gayathri', 'Karumbi', 'Keraleeyam', 'Lohit Malayalam', 'Noto Sans Malayalam', 'Noto Serif Malayalam', sans-serif; | |||
} | |||
.article-header h1, | |||
.article-content, | |||
.introduction-box, | |||
.sidebar-title, | |||
.keypoint-list li, | |||
.highlight-box, | |||
.source-box, | |||
.author-bio-box { | |||
font-family: 'Manjari', 'Meera', 'Rachana', 'AnjaliOldLipi', 'Chilanka', 'Dyuthi', 'Gayathri', 'Karumbi', 'Keraleeyam', 'Lohit Malayalam', 'Noto Sans Malayalam', 'Noto Serif Malayalam', sans-serif; | |||
line-height: 1.8; | |||
} | |||
|}} | |||
.article-header { | .article-header { | ||
| Line 123: | Line 147: | ||
.article-content p { | .article-content p { | ||
margin-bottom: 1.2em; | margin-bottom: 1.2em; | ||
} | |||
/* Language Badge */ | |||
.language-badge { | |||
display: inline-block; | |||
background: rgba(255, 255, 255, 0.2); | |||
color: white; | |||
padding: 4px 12px; | |||
border-radius: 20px; | |||
font-size: 0.85em; | |||
margin-left: 10px; | |||
} | } | ||
| Line 141: | Line 176: | ||
<!-- Article Header --> | <!-- Article Header --> | ||
<div class="article-header"> | <div class="article-header"> | ||
<h1 style="margin: 0 0 15px 0; font-size: 2.5em; text-shadow: 2px 2px 4px rgba(0,0,0,0.2);">{{{DisplayTitle|{{{Title|}}}}}}</h1> | <h1 style="margin: 0 0 15px 0; font-size: 2.5em; text-shadow: 2px 2px 4px rgba(0,0,0,0.2);"> | ||
{{{DisplayTitle|{{{Title|}}}}}} | |||
{{#if:{{{Language|}}}|<span class="language-badge">{{#ifeq:{{{Language}}}|Malayalam|മലയാളം|English}}</span>|}} | |||
</h1> | |||
<div style="font-size: 1.1em; opacity: 0.95;"> | <div style="font-size: 1.1em; opacity: 0.95;"> | ||
{{#if:{{{OriginalAuthor|}}}| | {{#if:{{{OriginalAuthor|}}}| | ||
| Line 271: | Line 309: | ||
[[Category:{{{Category|}}}]] | [[Category:{{{Category|}}}]] | ||
[[Category:Articles]] | [[Category:Articles]] | ||
{{#if:{{{Language|}}}|[[Category:{{{Language}}} articles]]|}} | |||
{{#if:{{{OriginalAuthor|}}}| | {{#if:{{{OriginalAuthor|}}}| | ||
[[Category:Articles by {{{OriginalAuthor|}}}]] | [[Category:Articles by {{{OriginalAuthor|}}}]] | ||
| Line 283: | Line 322: | ||
{{TemplateData|<nowiki> | {{TemplateData|<nowiki> | ||
{ | { | ||
"description": "Template for displaying article content with modern styling, sidebars, and metadata. | "description": "Template for displaying article content with modern styling, sidebars, and metadata. Supports both Malayalam and English with appropriate fonts.", | ||
"format": "block", | "format": "block", | ||
"params": { | "params": { | ||
| Line 293: | Line 332: | ||
"example": "കേരളത്തിലെ കാലാവസ്ഥാ വ്യതിയാനം" | "example": "കേരളത്തിലെ കാലാവസ്ഥാ വ്യതിയാനം" | ||
}, | }, | ||
" | "Language": { | ||
"label": " | "label": "Language", | ||
"description": " | "description": "Primary language of the article. Affects font rendering.", | ||
"type": "string", | "type": "string", | ||
"required": true, | "required": true, | ||
" | "default": "Malayalam", | ||
"suggestedvalues": [ | |||
"Malayalam", | |||
"English" | |||
] | |||
}, | }, | ||
"Author": { | "Author": { | ||
| Line 487: | Line 530: | ||
== Usage == | == Usage == | ||
This template is used automatically by Form:Article. | This template is used automatically by Form:Article for both Malayalam and English articles with appropriate font rendering. | ||
[[Category:Templates]] | [[Category:Templates]] | ||
[[Category:Article Templates]] | [[Category:Article Templates]] | ||
</noinclude> | </noinclude> | ||
Revision as of 15:06, 31 March 2026
Usage
This template is used automatically by Form:Article for both Malayalam and English articles with appropriate font rendering.