Difference between revisions of "Template:NPCs"

From XilePK - Ragnarok Online Server
Jump to navigation Jump to search
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
<div class="npc-grid-container">
+
<div class="mainpage-contents tile-row npc-container">
 
{{{1|}}}
 
{{{1|}}}
 
{{{2|}}}
 
{{{2|}}}
Line 21: Line 21:
 
</div>
 
</div>
 
<style>
 
<style>
.npc-grid-container {
+
.npc-container {
 
   display: flex;
 
   display: flex;
 
   flex-wrap: wrap;
 
   flex-wrap: wrap;
 
   justify-content: flex-start;
 
   justify-content: flex-start;
  align-items: flex-start;
 
  margin: -5px;  /* Compensate for item margins */
 
 
}
 
}
  
.npc-grid-container > .mainpage-contents.tile-row {
+
.npc-container > .mainpage-contents.tile-row {
   width: 150px;
+
   flex: 0 0 auto;
   margin: 5px;
+
   margin: 0 0.9rem 0.9rem 0;
   flex: 0 0 150px;
+
   min-width: 150px;
   box-sizing: border-box;
+
   max-width: 200px;
 +
  width: auto;
 +
  display: block; /* Garante que cada NPC seja tratado como um bloco único */
 
}
 
}
  
/* Ensure content alignment */
+
.npc-container > .mainpage-contents.tile-row > .contents-equipment.tile-halves {
.npc-grid-container .contents-equipment.tile-halves {
+
  margin-right: 0;
 
   width: 100%;
 
   width: 100%;
  text-align: center;
 
}
 
 
/* Remove nested containers that could cause layout issues */
 
.npc-grid-container .mainpage-contents.tile-row .mainpage-contents.tile-row {
 
  width: 100%;
 
  margin: 0;
 
  flex: none;
 
}
 
 
/* Ensure images are centered */
 
.npc-grid-container .tile-top.tile-image {
 
  display: flex;
 
  justify-content: center;
 
 
}
 
}
 
</style>
 
</style>
 
__NOTOC__
 
__NOTOC__
 
</includeonly><noinclude>
 
</includeonly><noinclude>
Este template serve como um contêiner para exibir vários NPCs lado a lado em linhas.
+
Este template serve como um contêiner para exibir vários NPCs lado a lado.
 
Use-o da seguinte forma:
 
Use-o da seguinte forma:
 
{{NPCs|
 
{{NPCs|
Line 64: Line 50:
 
{{NPC|Weapon_shop.gif|weapon-shop|Weapon Shop|Armas Poderosas}}
 
{{NPC|Weapon_shop.gif|weapon-shop|Weapon Shop|Armas Poderosas}}
 
}}
 
}}
Certifique-se de separar cada {{NPC}} com um pipe (|) e não adicionar pipe após o último NPC.
+
Você pode adicionar até 18 NPCs no mesmo contêiner. Eles serão exibidos lado a lado até o limite da tela e depois continuarão na próxima linha.
 
[[Categoria: Predefinições]]
 
[[Categoria: Predefinições]]
 
</noinclude>
 
</noinclude>

Revision as of 13:25, 2 May 2025

Este template serve como um contêiner para exibir vários NPCs lado a lado. Use-o da seguinte forma:


Expression error: Unexpected > operator.











<style> .npc-container {

 display: flex;
 flex-wrap: wrap;
 justify-content: flex-start;

}

.npc-container > .mainpage-contents.tile-row {

 flex: 0 0 auto;
 margin: 0 0.9rem 0.9rem 0;
 min-width: 150px;
 max-width: 200px;
 width: auto;
 display: block; /* Garante que cada NPC seja tratado como um bloco único */

}

.npc-container > .mainpage-contents.tile-row > .contents-equipment.tile-halves {

 margin-right: 0;
 width: 100%;

} </style>


Você pode adicionar até 18 NPCs no mesmo contêiner. Eles serão exibidos lado a lado até o limite da tela e depois continuarão na próxima linha. Categoria: Predefinições