Template:inlinecode: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
Line 1: Line 1:
<!-- inlinecode template - Created by Dominique Bauer, 2021-04-13 -->
<span style="background-color:#f9f9f9;border:1px solid #eee; border-radius:3px;padding:2px 4px 2px;font-family: monospace;font-size:95%;">{{{1}}}</span>
<span style="background-color:#f9f9f9;border:1px solid #eee; border-radius:3px;padding:2px 4px 2px;font-family: monospace;font-size:95%;">{{{1}}}</span>
<noinclude>
<noinclude>
<p>
    The "inlinecode" template was created by Dominique Bauer on 2021-04-13. Thank you for not deleting it, at least please contact me at dominique.bauer@etsmtl.net before doing so.
</p>
<p>
Usage:
Usage:
 
</p>
<p>
<p>
     The {{inlinecode|inlinecode}} template formats code without changing the line spacing too much when used inside a paragraph.
     The {{inlinecode|inlinecode}} template formats code without changing the line spacing too much when used inside a paragraph.
Line 16: Line 19:
<p>
<p>
{{Note|1=If the code includes an <div style="display:inline-block;">{{inlinecode|1==}}</div> sign, you can add <div style="display:inline-block;">{{inlinecode|1=1=}}</div> right at the start of the code.<br>
{{Note|1=If the code includes an <div style="display:inline-block;">{{inlinecode|1==}}</div> sign, you can add <div style="display:inline-block;">{{inlinecode|1=1=}}</div> right at the start of the code.<br>
See {https://www.mediawiki.org/wiki/Help:Templates#Anonymous_parameters} for more details.}}
See [https://www.mediawiki.org/wiki/Help:Templates#Anonymous_parameters MediaWiki:Templates] for more details.}}
</p>
</p>


</noinclude>
</noinclude>

Revision as of 22:31, 13 April 2021

{{{1}}}

The "inlinecode" template was created by Dominique Bauer on 2021-04-13. Thank you for not deleting it, at least please contact me at dominique.bauer@etsmtl.net before doing so.

Usage:

The inlinecode template formats code without changing the line spacing too much when used inside a paragraph.

It also allows the code to continue on the next line. For example:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae, consequat in, pretium a, enim. Pellentesque congue. Ut in risus volutpat libero pharetra tempor. Cras vestibulum bibendum augue. Praesent egestas leo in pede. Praesent blandit odio eu enim. Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum. Maecenas adipiscing ante non diam sodales hendrerit.

Note: If the code includes an
=
sign, you can add
1=
right at the start of the code.
See MediaWiki:Templates for more details.