Template:Info: Difference between revisions

From HUIJIA FUN
m Index size of the image
Updated style
 
Line 1: Line 1:
{| class="infobox" style="font-size:85%; float:right; background-color:#f8f9fb; color:#000000; padding:5px; border-radius: 10px; box-shadow:0 1px 8px 0 rgba(248,259,251,.8)"
<includeonly><table class="infobox vgr-infobox {{{class|}}}" style="{{#if:{{{background|}}}|background-color:{{{background}}};}}"><!--
--><tr><th colspan="2" class="vgr-infobox-title">{{{title|{{PAGENAME}}}}}</th></tr><!--
-->{{#if:{{{file|}}}{{{file2|}}}{{{description|}}}|<tr class="vgr-infobox-media"><td colspan="2">{{#if:{{{file|}}}|[[File:{{{file}}}|{{{size|260px}}}]]}}{{{file2|}}}{{#if:{{{description|}}}|<div class="vgr-infobox-desc">{{{description}}}</div>}}</td></tr>}}<!--
-->{{#if:{{{title1|}}}|<tr class="vgr-infobox-group"><th colspan="2">{{{title1}}}</th></tr>}}<!--
-->{{#if:{{{1|}}}|<tr><th scope="row">{{{1}}}</th><td>{{{T1|}}}</td></tr>}}<!--
-->{{#if:{{{2|}}}|<tr><th scope="row">{{{2}}}</th><td>{{{T2|}}}</td></tr>}}<!--
-->{{#if:{{{3|}}}|<tr><th scope="row">{{{3}}}</th><td>{{{T3|}}}</td></tr>}}<!--
-->{{#if:{{{4|}}}|<tr><th scope="row">{{{4}}}</th><td>{{{T4|}}}</td></tr>}}<!--
-->{{#if:{{{5|}}}|<tr><th scope="row">{{{5}}}</th><td>{{{T5|}}}</td></tr>}}<!--
-->{{#if:{{{6|}}}|<tr><th scope="row">{{{6}}}</th><td>{{{T6|}}}</td></tr>}}<!--
-->{{#if:{{{7|}}}|<tr><th scope="row">{{{7}}}</th><td>{{{T7|}}}</td></tr>}}<!--
-->{{#if:{{{8|}}}|<tr><th scope="row">{{{8}}}</th><td>{{{T8|}}}</td></tr>}}<!--
-->{{#if:{{{9|}}}|<tr><th scope="row">{{{9}}}</th><td>{{{T9|}}}</td></tr>}}<!--
-->{{#if:{{{10|}}}|<tr><th scope="row">{{{10}}}</th><td>{{{T10|}}}</td></tr>}}<!--
-->{{#if:{{{11|}}}|<tr><th scope="row">{{{11}}}</th><td>{{{T11|}}}</td></tr>}}<!--
-->{{#if:{{{12|}}}|<tr><th scope="row">{{{12}}}</th><td>{{{T12|}}}</td></tr>}}<!--
-->{{#if:{{{13|}}}|<tr><th scope="row">{{{13}}}</th><td>{{{T13|}}}</td></tr>}}<!--
-->{{#if:{{{14|}}}|<tr><th scope="row">{{{14}}}</th><td>{{{T14|}}}</td></tr>}}<!--
-->{{#if:{{{15|}}}|<tr><th scope="row">{{{15}}}</th><td>{{{T15|}}}</td></tr>}}<!--
-->{{#if:{{{16|}}}|<tr><th scope="row">{{{16}}}</th><td>{{{T16|}}}</td></tr>}}<!--
-->{{#if:{{{17|}}}|<tr><th scope="row">{{{17}}}</th><td>{{{T17|}}}</td></tr>}}<!--
-->{{#if:{{{18|}}}|<tr><th scope="row">{{{18}}}</th><td>{{{T18|}}}</td></tr>}}<!--
-->{{#if:{{{19|}}}|<tr><th scope="row">{{{19}}}</th><td>{{{T19|}}}</td></tr>}}<!--
-->{{#if:{{{20|}}}|<tr><th scope="row">{{{20}}}</th><td>{{{T20|}}}</td></tr>}}<!--
-->{{#if:{{{title2|}}}|<tr class="vgr-infobox-group"><th colspan="2">{{{title2}}}</th></tr>}}<!--
-->{{#if:{{{21|}}}|<tr><th scope="row">{{{21}}}</th><td>{{{T21|}}}</td></tr>}}<!--
-->{{#if:{{{22|}}}|<tr><th scope="row">{{{22}}}</th><td>{{{T22|}}}</td></tr>}}<!--
-->{{#if:{{{23|}}}|<tr><th scope="row">{{{23}}}</th><td>{{{T23|}}}</td></tr>}}<!--
-->{{#if:{{{24|}}}|<tr><th scope="row">{{{24}}}</th><td>{{{T24|}}}</td></tr>}}<!--
-->{{#if:{{{25|}}}|<tr><th scope="row">{{{25}}}</th><td>{{{T25|}}}</td></tr>}}<!--
--></table></includeonly><noinclude>
An infobox with custom field names, shown on the right of an article. Its look comes from <code>.vgr-infobox</code> in <code>MediaWiki:Common.css</code>; colors read the current theme's variables, so it works under Theme-HJ, Theme-STR and Theme-VGR. On phones it becomes full width and stops floating.


== Origin ==
Author: [[Marina Malinti]]
== Parameters ==
Every parameter is optional; empty rows are not shown.
{| class="wikitable"
! Parameter !! Description
|-
|-
! colspan="2" style="background-color:#d4f0e0; color:#1f1f1f; font-size:120%; padding:0.7em;" | {{{title|HUIJIA FUN}}}
| <code>title</code> || Name at the top of the box; defaults to the page name
|-
|-
| colspan="2" style="text-align:center; padding:0.7em" | {{#if:{{{file|}}}|[[File:{{{file}}}|{{{size|250px}}}]]}}{{#if:{{{file2|}}}|{{{file2}}}}}<br><div style="margin-top: 8px;margin-bottom: 1px;">{{{description|}}}</div>
| <code>file</code> || Image file name (without <code>File:</code>)
|-
|-
! colspan="2" style="background-color:#d4f0e0; color:#1f1f1f; font-size:110%;" | {{{title1|}}}
| <code>size</code> || Image width, default <code>260px</code>
|{{#if:{{{1|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{1}}}</b></p>
{{!}}
<p>{{{T1}}}</p>}} {{#if:{{{2|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{2}}}</b></p>
{{!}}
<p>{{{T2}}}</p>}} {{#if:{{{3|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{3}}}</b></p>
{{!}}
<p>{{{T3}}}</p>}} {{#if:{{{4|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{4}}}</b></p>
{{!}}
<p>{{{T4}}}</p>}} {{#if:{{{5|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{5}}}</b></p>
{{!}}
<p>{{{T5}}}</p>}} {{#if:{{{6|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{6}}}</b></p>
{{!}}
<p>{{{T6}}}</p>}} {{#if:{{{7|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{7}}}</b></p>
{{!}}
<p>{{{T7}}}</p>}} {{#if:{{{8|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{8}}}</b></p>
{{!}}
<p>{{{T8}}}</p>}} {{#if:{{{9|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{9}}}</b></p>
{{!}}
<p>{{{T9}}}</p>}} {{#if:{{{10|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{10}}}</b></p>
{{!}}
<p>{{{T10}}}</p>}} {{#if:{{{11|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{11}}}</b></p>
{{!}}
<p>{{{T11}}}</p>}} {{#if:{{{12|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{12}}}</b></p>
{{!}}
<p>{{{T12}}}</p>}} {{#if:{{{13|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{13}}}</b></p>
{{!}}
<p>{{{T13}}}</p>}} {{#if:{{{14|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{14}}}</b></p>
{{!}}
<p>{{{T14}}}</p>}} {{#if:{{{15|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{15}}}</b></p>
{{!}}
<p>{{{T15}}}</p>}} {{#if:{{{16|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{16}}}</b></p>
{{!}}
<p>{{{T16}}}</p>}} {{#if:{{{17|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{17}}}</b></p>
{{!}}
<p>{{{T17}}}</p>}} {{#if:{{{18|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{18}}}</b></p>
{{!}}
<p>{{{T18}}}</p>}} {{#if:{{{19|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{19}}}</b></p>
{{!}}
<p>{{{T19}}}</p>}} {{#if:{{{20|}}}|<nowiki></nowiki>
{{!}}-
{{!}}<p><b>{{{20}}}</b></p>
{{!}}
<p>{{{T20}}}</p>}}
|-
|-
! colspan="2" style="background-color:#d4f0e0; color:#1f1f1f; font-size:110%;" | {{{title2|}}}
| <code>file2</code> || Any content below the image, such as a second image or tabs
|{{#if:{{{21|}}}|<nowiki></nowiki>
|-
{{!}}-
| <code>description</code> || Image caption
{{!}}<p><b>{{{21}}}</b></p>
|-
{{!}}
| <code>title1</code> || Subheading for the first group, shown above rows 1–20; hidden when empty
<p>{{{T21}}}</p>}} {{#if:{{{22|}}}|<nowiki></nowiki>
|-
{{!}}-
| <code>1</code>–<code>20</code>, <code>T1</code>–<code>T20</code> || First group: <code>1</code> is the field name, <code>T1</code> its value, and so on
{{!}}<p><b>{{{22}}}</b></p>
|-
{{!}}
| <code>title2</code> || Subheading for the second group, shown above rows 21–25; hidden when empty
<p>{{{T22}}}</p>}} {{#if:{{{23|}}}|<nowiki></nowiki>
|-
{{!}}-
| <code>21</code>–<code>25</code>, <code>T21</code>–<code>T25</code> || Second group
{{!}}<p><b>{{{23}}}</b></p>
|-
{{!}}
| <code>background</code> || Kept for old pages; overrides the theme background. A custom light background makes text unreadable under dark themes, so avoid it on new pages
<p>{{{T23}}}</p>}} {{#if:{{{24|}}}|<nowiki></nowiki>
|-
{{!}}-
| <code>class</code> || Extra CSS classes
{{!}}<p><b>{{{24}}}</b></p>
{{!}}
<p>{{{T24}}}</p>}}
|}
|}
<noinclude>
==Description==
===Origin===
This template was rewritten from https://otomad.wiki/Template:%E4%BA%BA%E7%89%A9%E4%BF%A1%E6%81%AF
===Note===
This template is used to present basic information about any subject.


It can define up to 20+5 properties. You can use this template in articles to achieve the effect of listing information about an item in a sidebar.
* A row only appears when its field name (<code>1</code>, <code>2</code>, ...) is filled in.
* Worldview and Canon pages: write dates in S.C. or O., not the Gregorian calendar.
* Real people in the Archive Area: no birthdays, social accounts or other personal details; school-level information only.


Here is an example:
== Example ==
<pre>
<pre>
{{info
{{info
|title=Plurimod Student Union
|title=Plurimod Student Union
|file=PSU.jpg
|file=PSU.jpg
|description=The LOGO of Plurimod Student Union  
|description=The logo of Plurimod Student Union
|title1=Information
|title1=Information
|1=Alias
|1=Alias
Line 132: Line 81:
|T3=[[User:PlurimodSU|Marina Malinti (PlurimodSU account operator)]]
|T3=[[User:PlurimodSU|Marina Malinti (PlurimodSU account operator)]]
|4=Founder
|4=Founder
|T4=[[User:PlurimodSU|Marina Malinti]]、Akatsuki0702
|T4=[[User:PlurimodSU|Marina Malinti]], Akatsuki0702
|5=Date of Found
|5=Founded
|T5=2023-06-07
|T5=2023-06-07
|title2=Relation
|title2=Relations
|21=Friendship Group
|21=Allied group
|T21=[[Huijia Group]]
|T21=[[Beijing Huijia Private School]]
}}
}}
</pre>
</pre>
The achieved effect is as follows:
{{info
{{info
|title=Plurimod Student Union
|title=Plurimod Student Union
|file=PSU.jpg
|file=PSU.jpg
|description=The LOGO of Plurimod Student Union  
|description=The logo of Plurimod Student Union
|title1=Information
|title1=Information
|1=Alias
|1=Alias
Line 153: Line 101:
|T3=[[User:PlurimodSU|Marina Malinti (PlurimodSU account operator)]]
|T3=[[User:PlurimodSU|Marina Malinti (PlurimodSU account operator)]]
|4=Founder
|4=Founder
|T4=[[User:PlurimodSU|Marina Malinti]]、Akatsuki0702
|T4=[[User:PlurimodSU|Marina Malinti]], Akatsuki0702
|5=Date of Found
|5=Founded
|T5=2023-06-07
|T5=2023-06-07
|title2=Relation
|title2=Relations
|21=Friendship Group
|21=Allied group
|T21=[[Huijia Group]]
|T21=[[Beijing Huijia Private School]]
}}
}}
</noinclude>
</noinclude>

Latest revision as of 18:18, 12 October 2026

An infobox with custom field names, shown on the right of an article. Its look comes from .vgr-infobox in MediaWiki:Common.css; colors read the current theme's variables, so it works under Theme-HJ, Theme-STR and Theme-VGR. On phones it becomes full width and stops floating.

Origin

Author: Marina Malinti

Parameters

Every parameter is optional; empty rows are not shown.

Parameter Description
title Name at the top of the box; defaults to the page name
file Image file name (without File:)
size Image width, default 260px
file2 Any content below the image, such as a second image or tabs
description Image caption
title1 Subheading for the first group, shown above rows 1–20; hidden when empty
1–20, T1–T20 First group: 1 is the field name, T1 its value, and so on
title2 Subheading for the second group, shown above rows 21–25; hidden when empty
21–25, T21–T25 Second group
background Kept for old pages; overrides the theme background. A custom light background makes text unreadable under dark themes, so avoid it on new pages
class Extra CSS classes
  • A row only appears when its field name (1, 2, ...) is filled in.
  • Worldview and Canon pages: write dates in S.C. or O., not the Gregorian calendar.
  • Real people in the Archive Area: no birthdays, social accounts or other personal details; school-level information only.

Example

{{info
|title=Plurimod Student Union
|file=PSU.jpg
|description=The logo of Plurimod Student Union
|title1=Information
|1=Alias
|T1=Chinese: Plurimod学生会
|2=Scale
|T2=Over ten members
|3=Leader
|T3=[[User:PlurimodSU|Marina Malinti (PlurimodSU account operator)]]
|4=Founder
|T4=[[User:PlurimodSU|Marina Malinti]], Akatsuki0702
|5=Founded
|T5=2023-06-07
|title2=Relations
|21=Allied group
|T21=[[Beijing Huijia Private School]]
}}
Plurimod Student Union
The logo of Plurimod Student Union
Information
AliasChinese: Plurimod学生会
ScaleOver ten members
LeaderMarina Malinti (PlurimodSU account operator)
FounderMarina Malinti, Akatsuki0702
Founded2023-06-07
Relations
Allied groupBeijing Huijia Private School