Modèle:Filtre : Différence entre versions

[version vérifiée][version vérifiée]
(Annulation des modifications 105521 de Ankhseram (discussion))
(Balise : Annuler)
 
(14 révisions intermédiaires par 2 utilisateurs non affichées)
Ligne 1 : Ligne 1 :
 
{{LoadJavascript|Script=element}} {{LoadJavascript|Script=filter}}
 
{{LoadJavascript|Script=element}} {{LoadJavascript|Script=filter}}
{{Form|style=display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; user-select: none;|id=filter-form|content=
+
{{Form|style=position: relative; display: flex; align-items: center; flex-wrap: nowrap; height: 35px; font-size: 1.1em; margin: 15px auto; width: 520px; max-width: 100%;|id=filter-form|content=
{{#if:{{{Nom|}}}|
 
<div style="position: relative;">
 
 
{{FiltreModule
 
{{FiltreModule
 +
|placeholder={{{placeholder|}}}
 
|Type=Text
 
|Type=Text
|id=filter-name
 
|placeholder=Rechercher un monstre
 
 
}}
 
}}
</div>
+
{{Button|type=button|id=open-filter|style=height: 100%; padding: 0 10px; border-bottom-width: 1px; margin-left: -1px;|text=<div style="display: flex; align-items: flex-end; gap: 5px;">{{Svg|class=svg-icon|height=24|viewBox=0 -960 960 960|width=24|data=filter|title=Filtrer les monstres}} Filtrer<span id="filter-counter" style="color: #007B33;font-size: 12px;"></span></div>
}} {{#if:{{{Niveau|}}}|
+
}}
<div style="position: relative;">
+
<div style="position: absolute; top: calc(100% + 5px); left: 0; right: 0; background: white; border: 1px solid #ccc; padding: 10px 0 10px 10px; border-radius: 8px; text-align: left; z-index: 10; max-height: 400px;">
 +
<div style="display: flex;  flex-direction: column; gap: 10px; max-height: inherit; overflow-y: auto; padding-right: 5px;">
 +
{{#if:{{{Niveau|}}}|
 
{{FiltreModule
 
{{FiltreModule
 +
|name=Intervalle de niveau
 +
|id={{FiltreCorrespondance|Niveau}}
 +
|maxLevel={{{maxLevel|135}}}
 
|Type=Range
 
|Type=Range
|id={{FiltreCorrespondance|Niveau}}
 
|Nom=Niveau
 
|min=1
 
|max=135
 
|param=levels
 
 
}}
 
}}
</div>
 
 
}} {{#if:{{{Rang|}}}|
 
}} {{#if:{{{Rang|}}}|
<div style="position: relative;">
 
 
{{FiltreModule
 
{{FiltreModule
 +
|name=Rang
 +
|id={{FiltreCorrespondance|Rang}}
 +
|span=<span class="counter" style="color: rgb(159, 159, 159); font-size: 12px; margin-left: auto;"></span>
 
|Type=Checkbox
 
|Type=Checkbox
|id={{FiltreCorrespondance|Rang}}
 
|Nom=Rang
 
|param=levels
 
  
|Checkbox1=1
+
|text1=<span style="text-overflow: ellipsis; overflow: hidden;>1</span>
|Checkbox2=2
+
|value1=1
|Checkbox3=3
+
 
|Checkbox4=4
+
|text2=<span style="text-overflow: ellipsis; overflow: hidden;>2</span>
|Checkbox5=Boss
+
|value2=2
|Checkbox6=5
+
 
 +
|text3=<span style="text-overflow: ellipsis; overflow: hidden;>3</span>
 +
|value3=3
 +
 
 +
|text4=<span style="text-overflow: ellipsis; overflow: hidden;>4</span>
 +
|value4=4
 +
 
 +
|text5=<span style="text-overflow: ellipsis; overflow: hidden;>Boss 🌟</span>
 +
|value5=boss
 +
 
 +
|text6=<span style="text-overflow: ellipsis; overflow: hidden;>5 🌟🌟</span>
 +
|value6=5
 
}}
 
}}
</div>
 
 
}} {{#if:{{{Élément|}}}|
 
}} {{#if:{{{Élément|}}}|
<div style="position: relative;">
 
 
{{FiltreModule
 
{{FiltreModule
 +
|name=Élément
 +
|id={{FiltreCorrespondance|Élément}}
 +
|span=<span class="counter" style="color: rgb(159, 159, 159); font-size: 12px; margin-left: auto;"></span>
 
|Type=Checkbox
 
|Type=Checkbox
|id={{FiltreCorrespondance|Élément}}
 
|Nom=Élément
 
|param=elem
 
  
|Checkbox1=Feu
+
|text1=<span style="text-overflow: ellipsis; overflow: hidden;>[[Image:Elementfeu.png|25px|link=]] <span>Feu</span></span>
|Checkbox2=Glace
+
|value1=feu
|Checkbox3=Foudre
+
 
|Checkbox4=Vent
+
|text2=<span style="text-overflow: ellipsis; overflow: hidden;>[[Image:Elementglace.png|25px|link=]] <span>Glace</span></span>
|Checkbox5=Obscurité
+
|value2=glace
|Checkbox6=Terre
+
 
|Checkbox7=Aucun
+
|text3=<span style="text-overflow: ellipsis; overflow: hidden;>[[Image:Elementfoudre.png|25px|link=]] <span>Foudre</span></span>
 +
|value3=foudre
 +
 
 +
|text4=<span style="text-overflow: ellipsis; overflow: hidden;>[[Image:Elementvent.png|25px|link=]] <span>Vent</span></span>
 +
|value4=vent
 +
 
 +
|text5=<span style="text-overflow: ellipsis; overflow: hidden;>[[Image:Elementobscurite.png|25px|link=]] <span>Obscurité</span></span>
 +
|value5=obscurite
  
|id5=obscurite
+
|text6=<span style="text-overflow: ellipsis; overflow: hidden;>[[Image:Elementterre.png|25px|link=]] <span>Terre</span></span>
 +
|value6=terre
  
 +
|text7=<span style="text-overflow: ellipsis; overflow: hidden;>Aucun</span>
 +
|value7=aucun
 
}}
 
}}
</div>
 
 
}} {{#if:{{{Type|}}}|
 
}} {{#if:{{{Type|}}}|
<div style="position: relative;">
 
 
{{FiltreModule
 
{{FiltreModule
 +
|name=Type
 +
|id={{FiltreCorrespondance|Type}}
 +
|span=<span class="counter" style="color: rgb(159, 159, 159); font-size: 12px; margin-left: auto;"></span>
 
|Type=Checkbox
 
|Type=Checkbox
|id={{FiltreCorrespondance|Type}}
 
|Nom=Type
 
|param=replace__type
 
  
|Checkbox1=Demi-humain
+
|text1=<span style="text-overflow: ellipsis; overflow: hidden;>Demi-humain</span>
|Checkbox2=Mal
+
|value1=demi-humain
|Checkbox3=Désert
+
 
|Checkbox4=Animal
+
|text2=<span style="text-overflow: ellipsis; overflow: hidden;>Mal</span>
|Checkbox5=Orc
+
|value2=mal
|Checkbox6=Mystique
+
 
|Checkbox7=Mort-vivant
+
|text3=<span style="text-overflow: ellipsis; overflow: hidden;>Désert</span>
|Checkbox8=Insecte
+
|value3=desert
|Checkbox9=Zodiaque
+
 
|Checkbox10=Aucun
+
|text4=<span style="text-overflow: ellipsis; overflow: hidden;>Animal</span>
 +
|value4=animal
 +
 
 +
|text5=<span style="text-overflow: ellipsis; overflow: hidden;>Orc</span>
 +
|value5=orc
 +
 
 +
|text6=<span style="text-overflow: ellipsis; overflow: hidden;>Mystique</span>
 +
|value6=mystique
 +
 
 +
|text7=<span style="text-overflow: ellipsis; overflow: hidden;>Mort-vivant</span>
 +
|value7=mort-vivant
 +
 
 +
|text8=<span style="text-overflow: ellipsis; overflow: hidden;>Insecte</span>
 +
|value8=insecte
  
|id3=desert
+
|text9=<span style="text-overflow: ellipsis; overflow: hidden;>Zodiaque</span>
 +
|value9=zodiaque
  
 +
|text10=<span style="text-overflow: ellipsis; overflow: hidden;>Aucun</span>
 +
|value10=aucun
 
}}
 
}}
</div>
+
}} {{#if:{{{Dégâts|}}}|
}} {{#if:{{{Dégât|}}}|
 
<div style="position: relative;">
 
 
{{FiltreModule
 
{{FiltreModule
 +
|name=Dégâts
 +
|id={{FiltreCorrespondance|Dégât}}
 +
|span=<span class="counter" style="color: rgb(159, 159, 159); font-size: 12px; margin-left: auto;"></span>
 
|Type=Checkbox
 
|Type=Checkbox
|id={{FiltreCorrespondance|Dégât}}
 
|Nom=Dégât
 
|param=replace_+_
 
  
|Checkbox1=Mêlée
+
|text1=<span style="text-overflow: ellipsis; overflow: hidden;>🗡️ <span>Mêlée</span></span>
|Checkbox2=Flèche
+
|value1=melee
|Checkbox3=Magique
+
 
|Checkbox4=Compétence
+
|text2=<span style="text-overflow: ellipsis; overflow: hidden;>🏹 <span>Flèche</span></span>
 +
|value2=fleche
  
|id1=melee
+
|text3=<span style="text-overflow: ellipsis; overflow: hidden;>🧙 <span>Magique</span></span>
|id2=fleche
+
|value3=magique
|id4=dc
 
  
 +
|text4=<span style="text-overflow: ellipsis; overflow: hidden;>✨ <span>Compétence</span></span>
 +
|value4=dc
 +
}}
 
}}
 
}}
 
</div>
 
</div>
}} {{#if:{{{Inverser|}}}|
+
</div>
{{Input|id=filter-reverse|type=checkbox|style=width: 20px; height: 20px; border: 1px solid #ccc; border-radius: 3px; margin-left: 0;|labelStyle=flex-direction: row; align-items: center; gap: 5px;|text=Inverser la sélection}}
 
}}
 
 
}}<noinclude>[[Catégorie:Nouveaux modèles]]</noinclude>
 
}}<noinclude>[[Catégorie:Nouveaux modèles]]</noinclude>

Version actuelle datée du 22 décembre 2024 à 15:51

Filtrer les monstres
Filtrer