Template:Li/II: Difference between revisions
Appearance
copy template from Template:li/I; try to pass classname to icon |
m demo of template II - currently debugging code from icons to try to make it look better |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly><onlyinclude>{{#if:{{{start|}}}||</li>}}<li {{#if:{{{lang|}}}|lang{{=}}"{{{lang|}}}"}} {{#if:{{{II|}}}|{{Template:I{{{II|}}}/class}}}} {{#if:{{{class|}}}|class{{=}}"{{{class|}}}"}} | <includeonly><onlyinclude>{{#if:{{{start|}}}||</li>}}<li {{#if:{{{lang|}}}|lang{{=}}"{{{lang|}}}"}} {{#if:{{{II|}}}|{{Template:I{{{II|}}}/class|flag {{{class|}}}}}}} {{#if:{{{class|}}}|class{{=}}"{{{class|}}}"}} data-qid{{=}}"{{int:Hue-coordinate-friendly-Q{{{Q|}}}}}" value{{=}}"{{int:hue-coordinate-unfriendly-Q{{{Q|}}}}}" data-icon2="{{{II|}}}">{{#if:{{{II|}}}|{{Template:I{{{II|}}}|class={{Template:I{{{II|}}}/swatch|Q={{int:Hue-coordinate-friendly-Q{{{Q|}}}}}}}}}<span class="search-hint" aria-hidden="true">Q{{int:Hue-coordinate-friendly-Q{{{Q|}}}}}/Q{{int:Hue-coordinate-unfriendly-Q{{{Q|}}}}}}}</span>{{#if:{{{h4|}}}|<h4>{{{h4}}}</h4>}}{{#if:{{{PPPA|}}}|{{{PPPA|}}}|{{{1|}}}}}</includeonly></onlyinclude><!-- | ||
more readable version: | more readable version: | ||
{{#if:{{{start|}}}||</li>}} | {{#if:{{{start|}}}||</li>}} | ||
<li {{#if:{{{lang|}}}|lang{{=}}"{{{lang|}}}"}} | <li {{#if:{{{lang|}}}|lang{{=}}"{{{lang|}}}"}} | ||
{{#if:{{{II|}}}|{{Template:I{{{II|}}}/class}}}} {{#if:{{{class|}}}|class{{=}}"{{{class|}}}"}} | {{#if:{{{II|}}}|{{Template:I{{{II|}}}/class|flag {{{class|}}}}}}} {{#if:{{{class|}}}|class{{=}}"{{{class|}}}"}} | ||
data-qid{{=}}"{{int:hue-coordinate-friendly-Q{{{Q|}}}}}" value{{=}}"{{int:hue-coordinate-unfriendly-Q{{{Q|}}}}}" data-icon2="{{{II|}}}"> | |||
{{#if:{{{II|}}}|{{Template:I{{{II| | {{#if:{{{II|}}}|{{Template:I{{{II|}}}|class={{Template:I{{{II|}}}/swatch|Q={{int:Hue-coordinate-friendly-Q{{{Q|}}}}}}}}} | ||
{{ | <span class="search-hint" aria-hidden="true">Q{{int:hue-coordinate-friendly-Q{{{Q|}}}}}/Q{{int:hue-coordinate-unfriendly-Q{{{Q|}}}}}}}</span> | ||
{{#if:{{{h4|}}}|<h4>{{{h4}}}</h4>}} | {{#if:{{{h4|}}}|<h4>{{{h4}}}</h4>}} | ||
{{#if:{{{PPPA|}}}|{{{PPPA|}}}|{{{1|}}}}} | |||
-->== Description == | --> | ||
== Demo == | |||
=== II (v2) === | |||
<ol class="hue clean"> | |||
{{li|start=y|II=S1/Fy|Q=38,45}}{{TTS|Fy|Fiction}} / [[E:Q38,45|superstructural fantasy worlds]] | |||
</li></ol> | |||
<!-- currently generates this code: | |||
<ol class="hue clean"><li class="field_fantasy manual flag" data-dimension="S" data-qid="38,45" value="3845" data-icon2="S1/Fy"><span class="mix-match field_fantasy"><abbr class="figure item-dimension" data-icon="" title="S1 Signifier Item / fantasy, fiction, or arts / Item ID Q / main sense"><ins class="tts flag" data-title="" data-arg1="" data-tts=". (S)"><ruby><span class="visual" aria-hidden="true">S–</span><rp class="bracket" aria-hidden="true"> (</rp><rp class="help">pronounced </rp><rt data-lang="" class="aural">. (S)</rt><rp class="bracket" aria-hidden="true">)</rp></ruby></ins><ins class="tts swatch" data-title="" data-arg1="(Fantasy) (S):" data-tts=""><ruby><span class="visual" aria-hidden="true">[Fy] [S]</span><rp class="bracket" aria-hidden="true"> (</rp><rp class="help">pronounced </rp><rt data-lang="" class="aural">(Fantasy) (S):</rt><rp class="bracket" aria-hidden="true">)</rp></ruby></ins> </abbr><span class="spacer"> </span></span><ins class="field-tag"><span class="plainlinks"><a rel="nofollow" class="external text" href="https://research.moraleconomy.au/index.php?title=Ontology:"><abbr class="tts" title="fantasy, fiction, or arts" data-arg1="" data-tts="">Fy</abbr></a></span> / </ins><span class="search-hint" aria-hidden="true">Q38,45/Q3845</span><span class="tts" title="Fiction" data-arg1="Fiction" data-tts=""><ruby><span class="visual" aria-hidden="true">Fy</span><rp class="bracket" aria-hidden="true"> (</rp><rp class="help">pronounced </rp><rt data-lang="" class="aural">Fiction</rt><rp class="bracket" aria-hidden="true">)</rp></ruby></span> / <a href="/index.php?title=Ontology:Q38,45" title="Ontology:Q38,45">superstructural fantasy worlds</a></li></ol> | |||
--> | |||
=== I (v1) === | |||
<ol class="hue clean"> | |||
{{li|start=y|I=S1/Fy|Q=38,45|Q2=3845}}{{TTS|Fy|Fiction}} / [[E:Q38,45|superstructural fantasy worlds]] | |||
</li></ol> | |||
== Description == | |||
This is a template meant to mirror the HTML <code>li</code> tag. The purpose of it is to make prototype pages more readable and intuitive and less easy to make typos. As such, most of the parameters for the tag have to do with Hue Items. | This is a template meant to mirror the HTML <code>li</code> tag. The purpose of it is to make prototype pages more readable and intuitive and less easy to make typos. As such, most of the parameters for the tag have to do with Hue Items. | ||
| Line 25: | Line 34: | ||
* <code>start</code> - Must be used on the first Item in the list for correct rendering. (Though if it is omitted, browsers may ignore the bug anyway.) | * <code>start</code> - Must be used on the first Item in the list for correct rendering. (Though if it is omitted, browsers may ignore the bug anyway.) | ||
* <code> | * <code>II</code> - Icon Template, such as <code>S2/Fy</code>. It is assumed that you will supply the dimension and main classname in this argument. (This parameter was originally <code>I</code> but is now <code>II</code> on this template to reflect that it is the second version.) | ||
* <code>class</code> - For adding to the CSS classname applied to the tag. Optional. | |||
* <code>class</code> - For | |||
* <code>Q</code> - Item number with commas, for use in ordered lists. | * <code>Q</code> - Item number with commas, for use in ordered lists. | ||
* <code>Q2</code> - Item number without commas, for use in ordered lists. | * <code>Q2</code> - Item number without commas, for use in ordered lists. | ||
* <code>h4</code> - | * <code>h4</code> - Proposition title, to be bolded and shown on table of contents. Optional. | ||
* <code>lang</code> - Language of text inside list item. If not specified, this list item will probably be assumed to have the same language as the page or section that contains it. | * <code>lang</code> - Language of text inside list item. If not specified, this list item will probably be assumed to have the same language as the page or section that contains it. | ||
[[Category:Templates for markup]] {{ArticleTitle|NoContents=y}} | [[Category:Templates for markup]] {{ArticleTitle|NoContents=y}} | ||
Latest revision as of 03:20, 24 June 2026
Demo
II (v2)
I (v1)
Description
This is a template meant to mirror the HTML li tag. The purpose of it is to make prototype pages more readable and intuitive and less easy to make typos. As such, most of the parameters for the tag have to do with Hue Items.
Parameters
start- Must be used on the first Item in the list for correct rendering. (Though if it is omitted, browsers may ignore the bug anyway.)II- Icon Template, such asS2/Fy. It is assumed that you will supply the dimension and main classname in this argument. (This parameter was originallyIbut is nowIIon this template to reflect that it is the second version.)class- For adding to the CSS classname applied to the tag. Optional.Q- Item number with commas, for use in ordered lists.Q2- Item number without commas, for use in ordered lists.h4- Proposition title, to be bolded and shown on table of contents. Optional.lang- Language of text inside list item. If not specified, this list item will probably be assumed to have the same language as the page or section that contains it.