Template:ConsoleCommand: Difference between revisions
Template page
More actions
Created page with "<includeonly>{{#if: {{{name|}}}| <div style="font-family: 'Consolas', 'Lucida Console', 'DejaVu Sans Mono', monospace; background-color: #0D0D0D; background: linear-gradient(180deg, #141414 0%, #0A0A0A 100%); color: #E0E0E0; padding: 10px 14px; border-radius: 6px; border: 1px solid #2A2A2A; box-shadow: 0 0 0 1px #1F1F1F, 0 4px 12px rgba(0,0,0,0.6); margin: 14px 0; overflow: hidden;"> <div style="display: flex; align-items: center; margin-bottom: 6px; border-bottom: 1px..." |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly>{{#if: {{{name|}}}| | <includeonly>{{#if: {{{name|}}}| | ||
<div style=" | <div style="margin:16px 0;background:#1c1c20;border:1px solid #2e2e35;border-radius:8px;overflow:hidden;font-family:-apple-system,'Segoe UI',Roboto,sans-serif;"> | ||
<div style="background:#141417;padding:9px 14px;border-bottom:1px solid #2e2e35;display:flex;align-items:center;gap:8px;">● <span style="font-family:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;font-size:15px;font-weight:600;color:#f0f0f2;">{{{name}}}</span>{{#if:{{{aliases|}}}| <span style="font-size:12px;color:#6b7280;">(also {{{aliases}}})</span>}}{{#if:{{{note|}}}| <span style="font-size:12px;color:#6b7280;">{{{note}}}</span>}}</div> | |||
{{#if:{{{args|}}}|<div style="padding:7px 14px;border-bottom:1px solid #2e2e35;background:#111114;font-family:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;font-size:13px;"><span style="color:#6b7280;">$</span> <span style="color:#f0f0f2;font-weight:600;">{{{name}}}</span> <span style="color:#67e8f9;">{{{args}}}</span></div>}} | |||
<div style="padding:11px 14px;font-size:14px;line-height:1.6;color:#c9cdd4;">{{{desc|''No description provided.''}}}</div> | |||
{{#if:{{{tag_launch|}}}{{{tag_game|}}}{{{tag_creative|}}}{{{tag_host|}}}{{{tag_mp|}}}{{{tag_sp|}}}|<div style="padding:6px 14px 10px;border-top:1px solid #2e2e35;display:flex;flex-wrap:wrap;gap:5px;align-items:center;"><span style="font-size:11px;color:#4b5563;margin-right:2px;">tags:</span>{{#if:{{{tag_launch|}}}|<span style="font-size:11px;font-weight:500;padding:2px 9px;border-radius:999px;background:#14532d;color:#86efac;border:1px solid #166534;">launch</span>}}{{#if:{{{tag_game|}}}|<span style="font-size:11px;font-weight:500;padding:2px 9px;border-radius:999px;background:#1e3a5f;color:#93c5fd;border:1px solid #1d4ed8;">requires game</span>}}{{#if:{{{tag_creative|}}}|<span style="font-size:11px;font-weight:500;padding:2px 9px;border-radius:999px;background:#3b1f6e;color:#d8b4fe;border:1px solid #7c3aed;">creative only</span>}}{{#if:{{{tag_host|}}}|<span style="font-size:11px;font-weight:500;padding:2px 9px;border-radius:999px;background:#451a03;color:#fcd34d;border:1px solid #b45309;">host / sp only</span>}}{{#if:{{{tag_mp|}}}|<span style="font-size:11px;font-weight:500;padding:2px 9px;border-radius:999px;background:#4a0d2e;color:#f9a8d4;border:1px solid #be185d;">multiplayer</span>}}{{#if:{{{tag_sp|}}}|<span style="font-size:11px;font-weight:500;padding:2px 9px;border-radius:999px;background:#064e3b;color:#6ee7b7;border:1px solid #059669;">singleplayer</span>}}</div>}} | |||
</div> | </div> | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
== | == Template:ConsoleCommand == | ||
Renders a console command as a dark terminal-style card. | |||
=== Parameters === | === Parameters === | ||
{| class="wikitable" | |||
|- | |||
! Parameter !! Required !! Description | |||
|- | |||
| <code>name</code> || '''Yes''' || Command name, e.g. <code>unstuck</code> | |||
|- | |||
| <code>args</code> || No || Argument syntax, e.g. <code><x1> <y1> <z1></code> | |||
|- | |||
| <code>desc</code> || No || Description text. Supports wikitext (links, bold, <code><code></code>, etc.) | |||
|- | |||
| <code>aliases</code> || No || Alternate names shown in the header | |||
|- | |||
| <code>note</code> || No || Short note shown in the header (e.g. "Added with the Terrain Update") | |||
|- | |||
| <code>tag_launch</code> || No || Set to <code>1</code> to show the '''launch''' badge | |||
|- | |||
| <code>tag_game</code> || No || Set to <code>1</code> to show the '''requires game''' badge | |||
|- | |||
| <code>tag_creative</code> || No || Set to <code>1</code> to show the '''creative only''' badge | |||
|- | |||
| <code>tag_host</code> || No || Set to <code>1</code> to show the '''host / sp only''' badge | |||
|- | |||
| <code>tag_mp</code> || No || Set to <code>1</code> to show the '''multiplayer''' badge | |||
|- | |||
| <code>tag_sp</code> || No || Set to <code>1</code> to show the '''singleplayer''' badge | |||
|} | |||
=== Example === | === Example === | ||
<pre> | <pre> | ||
{{ConsoleCommand | {{ConsoleCommand | ||
|name= | |name=copy (example command) | ||
|args= | |aliases=cp | ||
|desc= | |note=I am a note | ||
| | |args=<x1> <y1> <z1> <x2> <y2> <z2> | ||
| | |desc=Copies the area defined by [[pos1]] and [[pos2]] into the clipboard. Paste with <code>paste</code>. | ||
|tag_game=1 | |||
|tag_creative=1 | |||
|tag_host=1 | |||
}} | }} | ||
</pre> | </pre> | ||
{{ConsoleCommand | {{ConsoleCommand | ||
|name= | |name=copy (example command) | ||
|args= | |aliases=cp | ||
|desc= | |note=I am a note | ||
| | |args=<x1> <y1> <z1> <x2> <y2> <z2> | ||
| | |desc=Copies the area defined by [[pos1]] and [[pos2]] into the clipboard. Paste with <code>paste</code>. | ||
|tag_game=1 | |||
|tag_creative=1 | |||
|tag_host=1 | |||
}} | }} | ||
[[Category:Templates]] | [[Category:Templates]] | ||
[[Category:Formatting templates]] | |||
</noinclude> | </noinclude> | ||
Latest revision as of 00:10, 8 June 2026
Template:ConsoleCommand
Renders a console command as a dark terminal-style card.
Parameters
| Parameter | Required | Description |
|---|---|---|
name |
Yes | Command name, e.g. unstuck
|
args |
No | Argument syntax, e.g. <x1> <y1> <z1>
|
desc |
No | Description text. Supports wikitext (links, bold, <code>, etc.)
|
aliases |
No | Alternate names shown in the header |
note |
No | Short note shown in the header (e.g. "Added with the Terrain Update") |
tag_launch |
No | Set to 1 to show the launch badge
|
tag_game |
No | Set to 1 to show the requires game badge
|
tag_creative |
No | Set to 1 to show the creative only badge
|
tag_host |
No | Set to 1 to show the host / sp only badge
|
tag_mp |
No | Set to 1 to show the multiplayer badge
|
tag_sp |
No | Set to 1 to show the singleplayer badge
|
Example
{{ConsoleCommand
|name=copy (example command)
|aliases=cp
|note=I am a note
|args=<x1> <y1> <z1> <x2> <y2> <z2>
|desc=Copies the area defined by [[pos1]] and [[pos2]] into the clipboard. Paste with <code>paste</code>.
|tag_game=1
|tag_creative=1
|tag_host=1
}}