Template:Doc: Difference between revisions
Jump to navigation
Jump to search

Consider discussing changes on the talk page before implementing them.
No edit summary |
No edit summary |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 2: | Line 2: | ||
{{todo|Exclude Sandbox subpage and other from this template. Also do some code cleanup.}} | {{todo|Exclude Sandbox subpage and other from this template. Also do some code cleanup.}} | ||
{{todo|Make this code less shitty.}} | {{todo|Make this code less shitty.}} | ||
{{doc}} | {{doc}} | ||
<includeonly> | <includeonly> | ||
<onlyinclude>{{Doc/templateusecategory}}{{#if:{{{content|}}}|[[Category:Documentation using content parameter]]}}{{ulf|all-lang=1}}{{#switch:{{{1|}}} | <onlyinclude>{{Doc/templateusecategory}}{{#if:{{{content|}}}|[[Category:Documentation using content parameter]]}}{{ulf|all-lang=1}}{{#switch:{{{1|}}} | ||
| #default = <div style="clear:both; margin-top:1em; border:1px solid # | | #default = <div style="clear:both; margin-top:1em; border:1px solid #4F4F4F; background-color:#323232; border-radius:.3em; scrollbar-color: #686868 #424242 !important;"><!-- | ||
--><div style="width:100%"><!-- | --><div style="width:100%"><!-- | ||
--><div style="display:flex; gap:8px; background:# | --><div style="display:flex; gap:8px; background:#4F4F4F; padding:.5em .55em .55em .8em; flex-direction:{{#switch:{{intlang}}|he=row-reverse| align=right|#default=row}}"><!-- | ||
--><div style="display:flex; flex-direction:{{#switch:{{intlang}}|he=row-reverse|#default=row}}; align-items:center; font-size:1.2em; color:#D8D8D8;"><!-- | --><div style="display:flex; flex-direction:{{#switch:{{intlang}}|he=row-reverse|#default=row}}; align-items:center; font-size:1.2em; color:#D8D8D8;"><!-- | ||
-->{{#switch:{{{pagespace|{{SUBJECTSPACE}}}}} | -->{{#switch:{{{pagespace|{{SUBJECTSPACE}}}}} | ||
| Line 33: | Line 32: | ||
------------------------------ Language button ------------------------------ | ------------------------------ Language button ------------------------------ | ||
--><div class="mw-customtoggle-language" style="display:inline-flex; justify-content:center; align-items:center; height:100%; box-sizing:border-box; background:#323232; border:1px solid rgba(255,255,255,.3); border-radius: | --><div class="mw-customtoggle-language" style="display:inline-flex; justify-content:center; align-items:center; height:100%; box-sizing:border-box; background:#323232; border:1px solid rgba(255,255,255,.3); border-radius:.3em; user-select:none; padding:0 4px">[[File:Icon-translate.png|link=|14px]] Available doc translations </div><!-- | ||
-->{{#switch:{{{tools|}}} | -->{{#switch:{{{tools|}}} | ||
| Line 43: | Line 42: | ||
-->{{#if:{{{content{{intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}} }}| }}} | -->{{#if:{{{content{{intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}} }}| }}} | ||
| | | | ||
| | |<!-- | ||
------------------------------ history button ------------------------------ | ------------------------------ history button ------------------------------ | ||
--><div style="display:inline-flex; justify-content:center; align-items:center; height:100%; box-sizing:border-box; background:#323232; border:1px solid rgba(255,255,255,.3); border-radius: | --><div style="display:inline-flex; justify-content:center; align-items:center; height:100%; box-sizing:border-box; background:#323232; border:1px solid rgba(255,255,255,.3); border-radius:.3em; user-select:none; padding:0 4px"><!-- | ||
--><div style="position: relative; top: -1.5px; "><!-- | --><div style="position: relative; top:-1.5px; "><!-- | ||
-->[[File:Icon-history.png|14px|link={{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}{{intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}} }}|action=history}}|{{int:history}}]]<!-- | -->[[File:Icon-history.png|14px|link={{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}{{intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}} }}|action=history}}|{{int:history}}]]<!-- | ||
--></div><!-- | --></div><!-- | ||
| Line 62: | Line 57: | ||
-->{{#switch:{{{tools|}}} | -->{{#switch:{{{tools|}}} | ||
| #default = <div class="mw-customtoggle-doctools" style="display:inline-flex; justify-content:center; align-items:center; height:100%; box-sizing:border-box; background:#323232; border:1px solid rgba(255,255,255,.3); border-radius: | | #default = <div class="mw-customtoggle-doctools" style="display:inline-flex; justify-content:center; align-items:center; height:100%; box-sizing:border-box; background:#323232; border:1px solid rgba(255,255,255,.3); border-radius:.3em; user-select:none; padding:0 4px">'''…'''</div> | ||
|1= | |1= | ||
}}<!-- ##### switch:TOOLS (2) ##### -- | }}<!-- ##### switch:TOOLS (2) ##### --> | ||
|0= | |0= | ||
}}<!-- ##### switch:TOOLS (1) ##### | }}<!-- ##### switch:TOOLS (1) ##### | ||
| Line 136: | Line 131: | ||
--------------- Doc transclusion --------------- | --------------- Doc transclusion --------------- | ||
The "if" should be on a new line, or some tags, like == header == wont appear as a header | The "if" should be on a new line, or some tags, like == header == wont appear as a header | ||
-->{{#if: {{{content{{intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}}}}|}}} | --> | ||
{{#if: {{{content{{intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}}}}|}}} | |||
| {{{content{{intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}}}}}}} | | {{{content{{intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}}}}}}} | ||
| {{#if: {{PROTECTIONEXPIRY:edit|{{{docpage|{{FULLPAGENAME}}/doc}}}{{intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}}}}}} | | {{#if: {{PROTECTIONEXPIRY:edit|{{{docpage|{{FULLPAGENAME}}/doc}}}{{intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}}}}}} | ||
| Line 168: | Line 164: | ||
}}<!-- ##### INTLANG ##### --> | }}<!-- ##### INTLANG ##### --> | ||
}}<!-- ##### if:PROTECTIONEXPIRY ##### --> | }}<!-- ##### if:PROTECTIONEXPIRY ##### --> | ||
|<div class="plainlinks" style="background:#323232; border:1px solid #505050; border-radius: | |<div class="plainlinks" style="background:#323232; border:1px solid #505050; border-radius:.3em; padding:0.4em 1em; margin-top:1em;"><!-- | ||
-->''{{Doc/strings|transcluded|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}}}''<!-- | -->''{{Doc/strings|transcluded|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}}}''<!-- | ||
--> <small>([{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}{{intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}} | --> <small>([{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}{{intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}} | ||
Latest revision as of 06:50, 14 October 2025
This template is used on approximately 1,800 pages and changes may be widely noticed.
Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage.Consider discussing changes on the talk page before implementing them.
Todo: Exclude Sandbox subpage and other from this template. Also do some code cleanup.
Todo: Make this code less shitty.
The above documentation is transcluded from Template:Doc/doc. (Edit | Page history)
Editors can experiment in this template's sandbox (edit) and testcases (edit) pages.
Editors can experiment in this template's sandbox (edit) and testcases (edit) pages.