Template:CodeBlock: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 6: | Line 6: | ||
--></div>}}<!-- | --></div>}}<!-- | ||
--><div style="width:100%"><div style="position:relative;width:100%;display:flex;max-height:{{{height|unset}}};overflow:auto"><!-- | --><div style="width:100%"><div style="position:relative;width:100%;display:flex;max-height:{{{height|unset}}};overflow:auto"><!-- | ||
-->{{#if:{{{lines|}}}|<div style="z-index:1;display:flex;position:sticky;left:0;height:100%;padding:.5em 0 .4em 0;background-color:{{#switch:{{{style|}}}|1=rgb( | -->{{#if:{{{lines|}}}|<div style="z-index:1;display:flex;position:sticky;left:0;height:100%;padding:.5em 0 .4em 0;background-color:{{#switch:{{{style|}}}|1=rgb(31,31,31)|rgb(24,24,24)}};border-right:1px solid rgb(48,48,48)"><ol start="{{{start|1}}}" style="text-align:right;pointer-events:none;white-space:nowrap;list-style-position:inside;margin-left:8px;margin-top:0;user-select:none;margin-right:-10px;text-indent:0">{{padright:|{{#expr:5 * {{{lines}}}}}|<li> }}{{#ifexpr:{{{lines}}} > 100 |{{padright:|{{#expr:5 * ({{{lines}}} - 100)}}|<li> }}}}{{#ifexpr:{{{lines}}} > 200 |{{padright:|{{#expr:5 * ({{{lines}}} - 200)}}|<li> }}}}{{#ifexpr:{{{lines}}} > 300 |{{padright:|{{#expr:5 * ({{{lines}}} - 300)}}|<li> }}}}{{#ifexpr:{{{lines}}} > 400 |{{padright:|{{#expr:5 * ({{{lines}}} - 400)}}|<li> }}}}</ol></div>}}<!-- | ||
--><div style="width:100%;text-indent:0;line-height:1.6em;white-space:pre;height:100%;tab-size:4;">{{#if:{{{lightamount1|{{{lightstart1|}}}}}}|<div style="position:sticky;z-index:0"><div style="width:100%;background:rgba(255,128,0,0.1);margin-top:calc((1.6em * ({{{lightstart1|1}}} - 1)) + .45em);margin-bottom:.45em;height:calc(1.6em * {{{lightamount1|1}}});position:absolute;left:0;user-select:none;pointer-events:none"></div></div>}}{{#if:{{{lightamount2|{{{lightstart2|}}}}}}|<div style="position:sticky;z-index:0"><div style="width:100%;background:rgba(255,128,0,0.1);margin-top:calc((1.6em * ({{{lightstart2|2}}} - 1)) + .45em);margin-bottom:.45em;height:calc(1.6em * {{{lightamount2|1}}});position:absolute;left:0;user-select:none;pointer-events:none"></div></div>}}{{#if:{{{lightamount3|{{{lightstart3|}}}}}}|<div style="position:sticky;z-index:0"><div style="width:100%;background:rgba(255,128,0,0.1);margin-top:calc((1.6em * ({{{lightstart3|3}}} - 1)) + .45em);margin-bottom:.45em;height:calc(1.6em * {{{lightamount3|1}}});position:absolute;left:0;user-select:none;pointer-events:none"></div></div>}}{{#if:{{{lightamount4|{{{lightstart4|}}}}}}|<div style="position:sticky;z-index:0"><div style="width:100%;background:rgba(255,128,0,0.1);margin-top:calc((1.6em * ({{{lightstart4|4}}} - 1)) + .45em);margin-bottom:.45em;height:calc(1.6em * {{{lightamount4|1}}});position:absolute;left:0;user-select:none;pointer-events:none"></div></div>}}<div style="padding:.45em .5em;position:relative">{{{1|}}}<span style=user-select:none></span></div></div><!-- | --><div style="width:100%;text-indent:0;line-height:1.6em;white-space:pre;height:100%;tab-size:4;">{{#if:{{{lightamount1|{{{lightstart1|}}}}}}|<div style="position:sticky;z-index:0"><div style="width:100%;background:rgba(255,128,0,0.1);margin-top:calc((1.6em * ({{{lightstart1|1}}} - 1)) + .45em);margin-bottom:.45em;height:calc(1.6em * {{{lightamount1|1}}});position:absolute;left:0;user-select:none;pointer-events:none"></div></div>}}{{#if:{{{lightamount2|{{{lightstart2|}}}}}}|<div style="position:sticky;z-index:0"><div style="width:100%;background:rgba(255,128,0,0.1);margin-top:calc((1.6em * ({{{lightstart2|2}}} - 1)) + .45em);margin-bottom:.45em;height:calc(1.6em * {{{lightamount2|1}}});position:absolute;left:0;user-select:none;pointer-events:none"></div></div>}}{{#if:{{{lightamount3|{{{lightstart3|}}}}}}|<div style="position:sticky;z-index:0"><div style="width:100%;background:rgba(255,128,0,0.1);margin-top:calc((1.6em * ({{{lightstart3|3}}} - 1)) + .45em);margin-bottom:.45em;height:calc(1.6em * {{{lightamount3|1}}});position:absolute;left:0;user-select:none;pointer-events:none"></div></div>}}{{#if:{{{lightamount4|{{{lightstart4|}}}}}}|<div style="position:sticky;z-index:0"><div style="width:100%;background:rgba(255,128,0,0.1);margin-top:calc((1.6em * ({{{lightstart4|4}}} - 1)) + .45em);margin-bottom:.45em;height:calc(1.6em * {{{lightamount4|1}}});position:absolute;left:0;user-select:none;pointer-events:none"></div></div>}}<div style="padding:.45em .5em;position:relative">{{{1|}}}<span style=user-select:none></span></div></div><!-- | ||
--></div></div><!-- | --></div></div><!-- | ||
--></div></includeonly></onlyinclude>{{Doc}} | --></div></includeonly></onlyinclude>{{Doc}} |
Revision as of 14:54, 19 February 2023
The above documentation is transcluded from Template:CodeBlock/doc. (Edit | Page history)
Editors can experiment in this template's sandbox (edit) and testcases (create) pages.
Editors can experiment in this template's sandbox (edit) and testcases (create) pages.