Difference between revisions of "User:Tsutomu25/sandbox/Cover3"

From Detective Conan Wiki
Line 12: Line 12:
 
/* Styles for the buttons */
 
/* Styles for the buttons */
 
.button-{{{1}}}{
 
.button-{{{1}}}{
display: flex;
+
  display: flex;
 
  justify-content: center;
 
  justify-content: center;
 
  align-items: center;
 
  align-items: center;
 
  position: absolute;
 
  position: absolute;
  bottom: calc(100% + 0.43rem);
+
  bottom: calc(100% + 7px);
 
  left: 50%;
 
  left: 50%;
 
  transform: translateX(-50%);
 
  transform: translateX(-50%);
  width: 5.62rem;
+
  width: 90px;
  height: 1.25rem;
+
  height: 20px;
 
  background-color: white;
 
  background-color: white;
 
  background-clip: content-box;
 
  background-clip: content-box;
 
  border: solid black;
 
  border: solid black;
  border-width: 0.06rem 0.12rem 0.12rem 0.06rem;
+
  border-width: 1px 2px 2px 1px;
  border-radius: 0.31rem;
+
  border-radius: 5px;
 
  text-wrap: nowrap;
 
  text-wrap: nowrap;
 
  text-decoration: none;
 
  text-decoration: none;
 
  color: black;
 
  color: black;
  font-size: 0.75rem;
+
  font-size: 9pt;
 
  transition: 0.3s;
 
  transition: 0.3s;
 
  transition-delay: 0.1s;
 
  transition-delay: 0.1s;

Revision as of 07:54, 23 August 2025

It hides the given input of spoiler text and reveals them when the user clicks on them. It takes two values. One is the name of the spoiler and another one is the actual spoiler text. Every time the template is used, every element has to have a unique id and class. Hence spoiler name is required.

Usage

The following is a list of required parameters:

{{User:Tsutomu25/sandbox/Cover3|<spoiler name>|<spoiler text>}}

Limitations

  • When the template is used multiple times on the same page, only one spoiler can remain visible at a time. If the user reveals another spoiler, the previously opened one will automatically be hidden.
  • If the page is refreshed while a spoiler is revealed, that spoiler will remain open even after the page reloads.

Examples

Result: Show SpoilersHide SpoilersThe weapon is Knife

Result: Show SpoilersHide SpoilersThe culprit wore Orange clothes

Result: Show SpoilersHide SpoilersThe culprit is Gosho Aoyama