Template:Responsive two-column

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Template documentationview · edit · history · purge ]

This template can be used to create a two-column layout (“desktop layout”) that collapses into one column on narrower screens (“mobile layout”, less than 1000px wide viewport). The template takes script directionality of the page language into account: the main content is always displayed on the primary side (i.e. left for left-to-right and right for right-to-left languages) in desktop layout.

Usage

{{Responsive two-column
 |main =
 |additional =
}}

Template parameters

ParameterDescriptionDefaultStatus
mainmain textText of the main section. Shown on the left for left-to-right languages and right for right-to-left languages in desktop layout; on the top in mobile layoutLorem ipsum dolor sit amet…required
additionaladditional textText of the secondary section. Shown on the right for left-to-right languages and left for right-to-left languages in desktop layout; on the bottom in mobile layoutLorem ipsum dolor sit amet…required
margin-sideinner marginLength of the inner margin (between the two columns); has no impact in mobile layout2.8075emoptional
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

This template can be used to create a two-column layout (“desktop layout”) that collapses into one column on narrower screens (“mobile layout”, less than 1000px wide viewport). The template takes script directionality of the page language into account: the main content is always displayed on the primary side (i.e. left for left-to-right and right for right-to-left languages) in desktop layout.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
additional textadditional

Text of the secondary section. Shown on the right for left-to-right languages and left for right-to-left languages in desktop layout; on the bottom in mobile layout

Default
Lorem ipsum dolor sit amet…
Contentrequired
main textmain

Text of the main section. Shown on the left for left-to-right languages and right for right-to-left languages in desktop layout; on the top in mobile layout

Default
Lorem ipsum dolor sit amet…
Contentrequired
inner marginmargin-side

Length of the inner margin (between the two columns); has no impact in mobile layout

Default
2.8075em
Lineoptional

Additional information

The template is intended to be used in the following namespaces: no namespace specified

The template is intended to be used by the following user groups: no user group specified

Localization

This template is not intended to be localized.