Template:Screenshot: Difference between revisions
No edit summary |
No edit summary |
||
| (6 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly><templatestyles src="Template:Screenshot/styles.css" /><div class="screenshot-wrapper"><div class="screenshot" role="figure" aria-label="{{#if:{{{4|}}}|Figure: {{{4}}}|Screenshot: {{{3|}}}}}"><div class="screenshot__image">[[File:{{{1}}}|frameless|{{{2|600px}}}|alt={{{3|}}}]]</div>{{#if:{{{4|}}}|<div class="screenshot__caption"><strong>Figure:</strong> {{{4}}}</div>}}</div></div></includeonly><noinclude> | ||
<div role="figure" aria-label="{{#if:{{{4|}}}|Figure: {{{4}}}|Screenshot: {{{3|}}}}} | |||
<div | |||
[[File:{{{1}}}|{{{2|600px}}}|alt={{{3|}}}]] | |||
{{#if:{{{4|}}}| | |||
<div | |||
<strong>Figure:</strong> {{{4}}} | |||
</div> | |||
}} | |||
</div> | |||
</div> | |||
</includeonly> | |||
<noinclude> | |||
== Screenshot Template == | == Screenshot Template == | ||
Creates a consistently styled screenshot with optional caption text. | Creates a responsive, consistently styled screenshot with optional caption text. | ||
=== Usage === | === Usage === | ||
<pre> | <pre> | ||
{{Screenshot | {{Screenshot|File.png|600px|Alternative text|Optional caption}} | ||
}} | |||
</pre> | </pre> | ||
=== Parameters === | === Parameters === | ||
# '''File name''' — | # '''File name''' — Required. | ||
# '''Width''' — | # '''Width''' — Optional; defaults to <code>600px</code>. | ||
# '''Alternative text''' — | # '''Alternative text''' — Required for meaningful screenshots. | ||
# '''Caption''' — | # '''Caption''' — Optional; the template automatically adds <code>Figure:</code>. | ||
=== Example === | === Example === | ||
<pre> | <pre> | ||
{{Screenshot | {{Screenshot|DrupalMySites.png|500px|Screenshot showing the My Sites menu in the Drupal toolbar.|The Drupal toolbar after a successful login.}} | ||
}} | |||
</pre> | </pre> | ||
</noinclude> | </noinclude> | ||
Latest revision as of 15:18, 10 July 2026
Screenshot Template
Creates a responsive, consistently styled screenshot with optional caption text.
Usage
{{Screenshot|File.png|600px|Alternative text|Optional caption}}
Parameters
- File name — Required.
- Width — Optional; defaults to
600px. - Alternative text — Required for meaningful screenshots.
- Caption — Optional; the template automatically adds
Figure:.
Example
{{Screenshot|DrupalMySites.png|500px|Screenshot showing the My Sites menu in the Drupal toolbar.|The Drupal toolbar after a successful login.}}