Difference between revisions of "Template:Doc"

From GodWiki
Jump to: navigation, search
m (Replaced 20px image icon with emoji that will scale correctly for various displays and be better for screen reader users)
m (Adding support for style parameter)
(Tags: Mobile edit, Mobile web edit)
 
Line 1: Line 1:
<includeonly> <div style="clear:both;background:#{{{bgcolor|F0F8FF}}};border:1px dotted #8BCBFF;padding:10px;margin-top:10px; height: auto;"> __NOEDITSECTION__ <!--
+
<includeonly> <div style="clear: both; background:#{{{bgcolor|F0F8FF}}}; border: 1px dotted #8BCBFF; padding: 10px; margin-top: 10px; height: auto; {{{style|}}};"> __NOEDITSECTION__ <!--
-->{{#if:{{{content|}}}||<div style="float:right;padding-right:1em;"> <span class=plainlinks style="font-size:11px">
+
-->{{#if:{{{content|}}}||<div style="float: right; padding-right: 1em;"> <span class="plainlinks" style="font-size: 85%;">
  
 
&#91;[[{{{1|{{SUBJECTPAGENAME}}/Documentation}}}|view]]&#93;&nbsp;&#91;[{{fullurl:{{{1|{{SUBJECTPAGENAME}}/Documentation}}}|action=edit}} edit]&#93;&nbsp;&#91;[{{fullurl:{{{1|{{SUBJECTPAGENAME}}/Documentation}}}|action=history}} history]&#93;&nbsp;&#91;[{{fullurl:{{FULLPAGENAMEE}}/Documentation|action=purge}} refresh]&#93;</span></div>}}<span style="font-size:11pt;line-height:11pt;">📚&nbsp;Documentation</span>
 
&#91;[[{{{1|{{SUBJECTPAGENAME}}/Documentation}}}|view]]&#93;&nbsp;&#91;[{{fullurl:{{{1|{{SUBJECTPAGENAME}}/Documentation}}}|action=edit}} edit]&#93;&nbsp;&#91;[{{fullurl:{{{1|{{SUBJECTPAGENAME}}/Documentation}}}|action=history}} history]&#93;&nbsp;&#91;[{{fullurl:{{FULLPAGENAMEE}}/Documentation|action=purge}} refresh]&#93;</span></div>}}<span style="font-size:11pt;line-height:11pt;">📚&nbsp;Documentation</span>

Latest revision as of 07:01, 3 December 2019

[view] [edit] [history] [refresh]
📚 Documentation

Adds documentation for the template.

Parameters

Normally (when called with no parameters), creates a documentation box and transcludes the contents of a /Documentation subpage of the current page as its contents.

{{doc|pagename}} — The first unnamed parameter can be set to a pagename to transclude the contents of pagename instead of the /Documentation subpage.

|content=Documentation content 
Optional: If set, display the provided content formatted as documentation, rather than transcluding the documentation from another page. Suppresses view/edit/history/purge links.

Example

This documentation box is an example of itself.

This wikicode:

{{doc|content=This is my documentation}}

results in

[view] [edit] [history] [refresh]
📚 Documentation
This is my documentation