Template:DateALive:Toggle: Difference between revisions
No edit summary |
m Hijacked. Finished the 'Things to do' list with the outline already given, and tried to idiot-proof the master toggle with clear instructions and a defined box. Also, moved the noinclude tags so that spacing control is given to the target page. |
||
Line 6: | Line 6: | ||
==Code== | ==Code== | ||
<center><big>'''The Table of | |||
</noinclude><center><big>'''The Table of Contents may not redirect you unless you expand its section by clicking one of the boxes below.'''</big></center><br> | |||
<!--This opens/closes all the 'hiders'--> | <!--This opens/closes all the 'hiders'--> | ||
<big><div class="mw-customtoggle-Arc1 mw-customtoggle-Arc1Close mw-customtoggle-Arc1Open mw-customtoggle-Arc2 mw-customtoggle-Arc2Close mw-customtoggle-Arc2Open mw-customtoggle-Arc3 mw-customtoggle-Arc3Close mw-customtoggle-Arc3Open mw-customtoggle-Arc4 mw-customtoggle-Arc4Close mw-customtoggle-Arc4Open mw-customtoggle-Arc5 mw-customtoggle-Arc5Close mw-customtoggle-Arc5Open mw-customtoggle-Arc6 mw-customtoggle-Arc6Close mw-customtoggle-Arc6Open mw-customtoggle-Arc7 mw-customtoggle-Arc7Close mw-customtoggle-Arc7Open mw-customtoggle-Akihabara mw-customtoggle-AkihabaraClose mw-customtoggle-AkihabaraOpen mw-customtoggle-Encore mw-customtoggle-EncoreClose mw-customtoggle-EncoreOpen mw-customtoggle-PS3Special mw-customtoggle-PS3SpecialClose mw-customtoggle-PS3SpecialOpen mw-customtoggle-BluRaySpecials mw-customtoggle-BluRaySpecialsClose mw-customtoggle-BluRaySpecialsOpen mw-customtoggle-ShortStories mw-customtoggle-ShortStoriesClose mw-customtoggle-ShortStoriesOpen mw-customtoggle-RatatoskrsObservations mw-customtoggle-RatatoskrsObservationsClose mw-customtoggle-RatatoskrsObservationsOpen" style="width:100%;background:black;cursor:pointer;height:25px;padding-top:7px" align="center"> | <big><div class="mw-customtoggle-Arc1 mw-customtoggle-Arc1Close mw-customtoggle-Arc1Open mw-customtoggle-Arc2 mw-customtoggle-Arc2Close mw-customtoggle-Arc2Open mw-customtoggle-Arc3 mw-customtoggle-Arc3Close mw-customtoggle-Arc3Open mw-customtoggle-Arc4 mw-customtoggle-Arc4Close mw-customtoggle-Arc4Open mw-customtoggle-Arc5 mw-customtoggle-Arc5Close mw-customtoggle-Arc5Open mw-customtoggle-Arc6 mw-customtoggle-Arc6Close mw-customtoggle-Arc6Open mw-customtoggle-Arc7 mw-customtoggle-Arc7Close mw-customtoggle-Arc7Open mw-customtoggle-Akihabara mw-customtoggle-AkihabaraClose mw-customtoggle-AkihabaraOpen mw-customtoggle-Encore mw-customtoggle-EncoreClose mw-customtoggle-EncoreOpen mw-customtoggle-PS3Special mw-customtoggle-PS3SpecialClose mw-customtoggle-PS3SpecialOpen mw-customtoggle-BluRaySpecials mw-customtoggle-BluRaySpecialsClose mw-customtoggle-BluRaySpecialsOpen mw-customtoggle-ShortStories mw-customtoggle-ShortStoriesClose mw-customtoggle-ShortStoriesOpen mw-customtoggle-RatatoskrsObservations mw-customtoggle-RatatoskrsObservationsClose mw-customtoggle-RatatoskrsObservationsOpen" style="width:100%;background:black;cursor:pointer;height:25px;padding-top:7px" align="center"> | ||
<span style="color:white">''' | <span style="color:white">'''Click here to OPEN or CLOSE all sections'''</span></div></big> | ||
<!--This one opens/closes all the 'hiders' of the main story--> | <!--This one opens/closes all the 'hiders' of the main story--> | ||
<big><div class="divTable" style="display:table;width:100%"> | <big><div class="divTable" style="display:table;width:100%"> | ||
<div class="divRow" style="display:table-row;width:100%"> | <div class="divRow" style="display:table-row;width:100%"> | ||
<div class="mw-customtoggle-Arc1 mw-customtoggle-Arc1Close mw-customtoggle-Arc1Open mw-customtoggle-Arc2 mw-customtoggle-Arc2Close mw-customtoggle-Arc2Open mw-customtoggle-Arc3 mw-customtoggle-Arc3Close mw-customtoggle-Arc3Open mw-customtoggle-Arc4 mw-customtoggle-Arc4Close mw-customtoggle-Arc4Open mw-customtoggle-Arc5 mw-customtoggle-Arc5Close mw-customtoggle-Arc5Open mw-customtoggle-Arc6 mw-customtoggle-Arc6Close mw-customtoggle-Arc6Open mw-customtoggle-Arc7 mw-customtoggle-Arc7Close mw-customtoggle-Arc7Open" style="background:#fdf1b8;cursor:pointer;height:20px;padding-top:3px" align="center">'''''Date A Live'' - Main story'''</div></div> | <div class="mw-customtoggle-Arc1 mw-customtoggle-Arc1Close mw-customtoggle-Arc1Open mw-customtoggle-Arc2 mw-customtoggle-Arc2Close mw-customtoggle-Arc2Open mw-customtoggle-Arc3 mw-customtoggle-Arc3Close mw-customtoggle-Arc3Open mw-customtoggle-Arc4 mw-customtoggle-Arc4Close mw-customtoggle-Arc4Open mw-customtoggle-Arc5 mw-customtoggle-Arc5Close mw-customtoggle-Arc5Open mw-customtoggle-Arc6 mw-customtoggle-Arc6Close mw-customtoggle-Arc6Open mw-customtoggle-Arc7 mw-customtoggle-Arc7Close mw-customtoggle-Arc7Open" style="background:#fdf1b8;cursor:pointer;height:20px;padding-top:3px;border-style:solid;border-width:0 1px" align="center">'''''Date A Live'' - Main story'''</div></div> | ||
<!--This one opens/closes all the 'hiders' of the side stories--> | <!--This one opens/closes all the 'hiders' of the side stories--> | ||
<div class="divRow" style="display:table-row;width:100%"> | <div class="divRow" style="display:table-row;width:100%"> | ||
<div class="mw-customtoggle-Akihabara mw-customtoggle-AkihabaraClose mw-customtoggle-AkihabaraOpen mw-customtoggle-Encore mw-customtoggle-EncoreClose mw-customtoggle-EncoreOpen mw-customtoggle-PS3Special mw-customtoggle-PS3SpecialClose mw-customtoggle-PS3SpecialOpen mw-customtoggle-BluRaySpecials mw-customtoggle-BluRaySpecialsClose mw-customtoggle-BluRaySpecialsOpen mw-customtoggle-ShortStories mw-customtoggle-ShortStoriesClose mw-customtoggle-ShortStoriesOpen mw-customtoggle-RatatoskrsObservations mw-customtoggle-RatatoskrsObservationsClose mw-customtoggle-RatatoskrsObservationsOpen" style="background:#fdf1b8;cursor:pointer;height:20px;padding-top:3px" align="center">'''''Date A Live'' - Side stories'''</div></div> | <div class="mw-customtoggle-Akihabara mw-customtoggle-AkihabaraClose mw-customtoggle-AkihabaraOpen mw-customtoggle-Encore mw-customtoggle-EncoreClose mw-customtoggle-EncoreOpen mw-customtoggle-PS3Special mw-customtoggle-PS3SpecialClose mw-customtoggle-PS3SpecialOpen mw-customtoggle-BluRaySpecials mw-customtoggle-BluRaySpecialsClose mw-customtoggle-BluRaySpecialsOpen mw-customtoggle-ShortStories mw-customtoggle-ShortStoriesClose mw-customtoggle-ShortStoriesOpen mw-customtoggle-RatatoskrsObservations mw-customtoggle-RatatoskrsObservationsClose mw-customtoggle-RatatoskrsObservationsOpen" style="background:#fdf1b8;cursor:pointer;height:20px;padding-top:3px;border-style:solid;border-width:1px" align="center">'''''Date A Live'' - Side stories'''</div></div> | ||
</div></big> | </div></big><noinclude> | ||
==How to use it== | ==How to use it== | ||
Click one of the boxes to hide or unhide the section it names. Click again to undo the process. | |||
For the purposes of ''this'' kind of toggle, it doesn't matter where the trigger is placed on the page. | |||
===Add an arc=== | ===Add an arc=== | ||
To make a new hide/unhide trigger, wrap these pieces of code around whatever's supposed to be clicked: <code style="background:#dcdcc6"><nowiki><</nowiki>div class="mw-customtoggle-ArcX mw-customtoggle-ArcXClose mw-customtoggle-ArcXOpen" style="background:#9e6c38;cursor:pointer;height:20px;padding-top:3px" align="center"></code> and <code style="background:#dcdcc6"><nowiki><</nowiki>/div></code>. The <code style="background:#dcdcc6">ArcX</code> is the declared name of the object, and should be replaced with whatever's most appropriate ("Arc10", "Comiket", etc.). | |||
Then, add the piece of string referring to the new arc (<code style="background:#dcdcc6">mw-customtoggle-ArcX mw-customtoggle-ArcXClose mw-customtoggle-ArcXOpen</code>) to the master toggle on this page, once after the <code style="background:#dcdcc6"><div class="</code> for the all-sections-toggle trigger and once after the <code style="background:#dcdcc6"><div class="</code> for the main-story- or side-stories-sections-toggle trigger. | |||
Finally, wrap <code style="background:#dcdcc6"><nowiki><</nowiki>div class="mw-collapsible" style="text-align:left;margin:5px5pxclear:both;font-size:100%;background:transparent;width:100%;" id="mw-customcollapsible-ArcX"></code> and <code style="background:#dcdcc6"><nowiki><</nowiki>br style="clear:both"/></div></code> around the stuff you want to hide and unhide. Again, that little text <code style="background:#dcdcc6">ArcX</code> is the name you're assigning for the purpose of customtoggle. | |||
For example: | |||
<pre> | <pre> | ||
<div class="mw-customtoggle-ArcX mw-customtoggle-ArcXClose mw-customtoggle-ArcXOpen" style="background:#9e6c38;cursor:pointer;height:20px;padding-top:3px" align="center">''' | <div class="mw-customtoggle-ArcX mw-customtoggle-ArcXClose mw-customtoggle-ArcXOpen" style="background:#9e6c38;cursor:pointer;height:20px;padding-top:3px" align="center"><big>'''Volume X'''</big></div> | ||
<div | |||
<div class="mw-collapsible" style="text-align:left;margin:5px5pxclear:both;font-size:100%;background:transparent;width:100%;" | |||
id="mw-customcollapsible-ArcX"> | |||
[[File:DAL_v01_cover.jpg|thumb|x180px]] | [[File:DAL_v01_cover.jpg|thumb|x180px]] | ||
===Volume | ===Volume X - Dead End Tohka=== | ||
::*[[Date A Live:Volume 1 Illustrations|Novel Illustrations]] | ::*[[Date A Live:Volume 1 Illustrations|Novel Illustrations]] | ||
::*[[Date A Live:Volume 1 Prologue|Prologue: Chance Meeting -restart-]] | ::*[[Date A Live:Volume 1 Prologue|Prologue: Chance Meeting -restart-]] | ||
Line 49: | Line 59: | ||
</div> | </div> | ||
</pre> | </pre> | ||
<small>(Note: the <code style="background:#dcdcc6"><nowiki><</nowiki>br style="clear:both"/></code> shouldn't be that important - it's only giving a type of line break, I think, which shouldn't actually be part of the hiding process. On the other hand, I have no idea where the user's manual for the customtoggle is so for all I know it's a mandatory part of the function. Unless someone who knows for sure comes along and deletes my comment, include it just to be on the safe side.)</small> | |||
===Delete an arc=== | ===Delete an arc=== | ||
Remove the codes given in the section above. | |||
However, the only time you'll need to delete an arc is probably if for some reason the entire novel has to be removed, and the extra piece of code in the master toggle won't do anything if the declared name doesn't exist. So you can just delete the section needed to be deleted and leave it at that. Probably. | |||
=='Things to do' list== | =='Things to do' list== | ||
*Make the 'how to use it' section | *<s>Make the 'how to use it' section</s> | ||
*Fix all the mistakes my poor english caused | *<s>Fix all the mistakes my poor english caused</s> | ||
*That's all, I guess... | *That's all, I guess... | ||
</noinclude> | </noinclude> |
Revision as of 04:00, 16 March 2014
Here's a template used on the main page of Date A Live project.
Big thanks to OH&S for his Toaru template. This template (the DAL's one) is largely based on his work.
Code
How to use it
Click one of the boxes to hide or unhide the section it names. Click again to undo the process.
For the purposes of this kind of toggle, it doesn't matter where the trigger is placed on the page.
Add an arc
To make a new hide/unhide trigger, wrap these pieces of code around whatever's supposed to be clicked: <div class="mw-customtoggle-ArcX mw-customtoggle-ArcXClose mw-customtoggle-ArcXOpen" style="background:#9e6c38;cursor:pointer;height:20px;padding-top:3px" align="center">
and </div>
. The ArcX
is the declared name of the object, and should be replaced with whatever's most appropriate ("Arc10", "Comiket", etc.).
Then, add the piece of string referring to the new arc (mw-customtoggle-ArcX mw-customtoggle-ArcXClose mw-customtoggle-ArcXOpen
) to the master toggle on this page, once after the <div class="
for the all-sections-toggle trigger and once after the <div class="
for the main-story- or side-stories-sections-toggle trigger.
Finally, wrap <div class="mw-collapsible" style="text-align:left;margin:5px5pxclear:both;font-size:100%;background:transparent;width:100%;" id="mw-customcollapsible-ArcX">
and <br style="clear:both"/>
around the stuff you want to hide and unhide. Again, that little text ArcX
is the name you're assigning for the purpose of customtoggle.
For example:
<div class="mw-customtoggle-ArcX mw-customtoggle-ArcXClose mw-customtoggle-ArcXOpen" style="background:#9e6c38;cursor:pointer;height:20px;padding-top:3px" align="center"><big>'''Volume X'''</big></div> <div class="mw-collapsible" style="text-align:left;margin:5px5pxclear:both;font-size:100%;background:transparent;width:100%;" id="mw-customcollapsible-ArcX"> [[File:DAL_v01_cover.jpg|thumb|x180px]] ===Volume X - Dead End Tohka=== ::*[[Date A Live:Volume 1 Illustrations|Novel Illustrations]] ::*[[Date A Live:Volume 1 Prologue|Prologue: Chance Meeting -restart-]] ::*[[Date A Live:Volume 1 Chapter 1|Chapter 1: The Nameless Girl]] ::*[[Date A Live:Volume 1 Chapter 2|Chapter 2: {{Furigana|Training|Game}} Start]] ::*[[Date A Live:Volume 1 Chapter 3|Chapter 3: Your Name Is......]] ::*[[Date A Live:Volume 1 Chapter 4|Chapter 4: Surprise Date]] ::*[[Date A Live:Volume 1 Chapter 5|Chapter 5: Ruthless {{Furigana|Slaughterer|Sandalphon}}]] ::*[[Date A Live:Volume 1 Epilogue|Epilogue: Life With a Spirit]] ::*[[Date A Live:Volume 1 Afterword|Afterword]] <br style="clear:both"/> </div>
(Note: the <br style="clear:both"/>
shouldn't be that important - it's only giving a type of line break, I think, which shouldn't actually be part of the hiding process. On the other hand, I have no idea where the user's manual for the customtoggle is so for all I know it's a mandatory part of the function. Unless someone who knows for sure comes along and deletes my comment, include it just to be on the safe side.)
Delete an arc
Remove the codes given in the section above.
However, the only time you'll need to delete an arc is probably if for some reason the entire novel has to be removed, and the extra piece of code in the master toggle won't do anything if the declared name doesn't exist. So you can just delete the section needed to be deleted and leave it at that. Probably.
'Things to do' list
Make the 'how to use it' sectionFix all the mistakes my poor english caused- That's all, I guess...