Difference between revisions of "Template:Ansreq/Sandbox"

From Pathfinder Wiki
(changed the width setting so it uses CSS. The other way is outdated; moved the toggle butten into the table. looks cleaner)
Line 1: Line 1:
 
<noinclude><translate><!--T:1-->
 
<noinclude><translate><!--T:1-->
 
</noinclude>
 
</noinclude>
<noinclude>This is a Sandbox of the template, to test out new stuff. So if it should be used, it needs to be copied without the dummy content.
+
<noinclude>This is a Sandbox of the template, to test out new stuff. So if it should be used, it needs to be copied without the dummy content.</noinclude>
Also there is a problem with the uniqueness of the ID of the customcollapsible and the CLASS of the custom toggle button. I (DesignerThan) want to include the "num"-argument into the CSS ID and CLASS but I was not able to do that because the string gets implemented as it is and won't be replaced. Maybe some body can help with that.</noinclude>
 
 
<!--close the collapsible box from previous requirement-->
 
<!--close the collapsible box from previous requirement-->
 
{{#ifeq:{{{num|1}}}|1
 
{{#ifeq:{{{num|1}}}|1
Line 21: Line 20:
 
<b><font size=3 color=#202020>{{:{{#titleparts:{{{page}}}|3|1}}/Requirement/{{{num}}}{{#switch:{{SUBPAGENAME}}|es=/es|fr=/fr}}}}</font></b>
 
<b><font size=3 color=#202020>{{:{{#titleparts:{{{page}}}|3|1}}/Requirement/{{{num}}}{{#switch:{{SUBPAGENAME}}|es=/es|fr=/fr}}}}</font></b>
 
</td>
 
</td>
<td bgcolor=#c0c0ff style="text-align: right; padding:0 0.5em; white-space:nowrap;">
+
<td bgcolor=#c0c0ff style="text-align: right; padding:0 0.5em; white-space:nowrap;">{{CustomToggleButton|text={{#switch:{{SUBPAGENAME}}|es=Mostrar/ocultar Respuesta|fr= Afficher/Masquer Réponse|Show/Hide Answer}}|name=ansreq-{{{num|1}}}}}
<span class="mw-customtoggle-ansReq">[<span style="text-decoration: underline; color: blue; cursor: pointer;">{{#switch:{{SUBPAGENAME}}|es=Mostrar/ocultar Respuestas|fr= Afficher/Masquer Réponses|Show/Hide Answers}}</span>]</span>
 
 
</td>
 
</td>
 
</tr>
 
</tr>
 
</table>
 
</table>
 
<!--create collapsible box for the answers-->
 
<!--create collapsible box for the answers-->
<div class="toccolours mw-collapsible" id="mw-customcollapsible-ansReq">
+
<div class="toccolours mw-collapsible" id="mw-customcollapsible-ansreq-{{{num|1}}}">
<div class="mw-collapsible-content">
 
 
Test Content
 
Test Content
</div>
 
 
</div>
 
</div>
 
<noinclude></translate></noinclude>
 
<noinclude></translate></noinclude>

Revision as of 00:10, 9 November 2020

This is a Sandbox of the template, to test out new stuff. So if it should be used, it needs to be copied without the dummy content.


Requirement {{{num}}}

{{:{{{page}}}/Requirement/{{{num}}}}}

[Show/Hide Answer]

Test Content