Modèle:Filtre : Différence entre versions

[version non vérifiée][version vérifiée]
 
(20 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=position: relative; display: flex; align-items: center; flex-wrap: nowrap; height: 35px; font-size: 1.1em; margin: 15px auto; width: 500px; max-width: 100%;|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|data=category+{{{category|}}}|content=
{{Input|id=filter-name|name=filterName|style=grid-area: 1 / -1; width: 100%; height: 100%; padding: 3px 20px 3px 46px; margin: 0; border-radius: 999px 0 0 999px;|labelStyle=height: 100%; flex-grow: 1; padding: 0; margin: 0; display: grid; align-items: center;|placeholder={{{placeholder|}}}|text={{Svg|style=grid-area: 1 / -1; z-index: 10; padding-left: 12px;|height=24|viewBox=0 -960 960 960|width=24|data=search}}}}
+
{{FiltreModule
{{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</div>
+
|placeholder=Rechercher par nom
 +
|Type=Text
 +
}}
 +
{{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|t=477|title=Filtrer}} <span data-t="477">Filtrer</span><span id="filter-counter" style="color: #007B33;font-size: 12px;"></span></div>
 
}}
 
}}
 
<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="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: 10px;">
+
<div style="display: flex;  flex-direction: column; gap: 10px; max-height: inherit; overflow-y: auto; padding-right: 5px;">
{{#if:{{{Niveau|}}}|<div style="font-weight: bold;">Intervalle de niveau</div>
+
{{#if:{{{Niveau|}}}|
<div style="display: flex; align-items: center; gap: 3px 0;">
 
{{Input|id={{FiltreCorrespondance|Niveau}}-min|name=levelMin|type=number|min=1|max={{{maxLevel|135}}}|value=1|style=margin-right: 0;|labelStyle=display: block; padding-left: 0;|data=filter+level|data2=value+min}}
 
<div style="font-family: system-ui; padding: 0 10px;">&mdash;</div>
 
{{Input|id={{FiltreCorrespondance|Niveau}}-max|name=levelMax|type=number|min=1|max={{{maxLevel|135}}}|value={{{maxLevel|135}}}|labelStyle=display: block; padding-left: 0;|data=filter+level|data2=value+max}}
 
</div>}} {{#if:{{{Rang|}}}|<div style="font-weight: bold;">Rang</div>
 
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; padding: 0 5px;">
 
 
{{FiltreModule
 
{{FiltreModule
 +
|name=<span data-t="472">Intervalle de niveau</span>
 +
|id={{FiltreCorrespondance|Niveau}}
 +
|maxLevel={{{maxLevel|135}}}
 +
|Type=Range
 +
}}
 +
}} {{#if:{{{Rang|}}}|
 +
{{FiltreModule
 +
|name=<span data-t="478">Rang</span>
 
|id={{FiltreCorrespondance|Rang}}
 
|id={{FiltreCorrespondance|Rang}}
 
|span=<span class="counter" style="color: rgb(159, 159, 159); font-size: 12px; margin-left: auto;"></span>
 
|span=<span class="counter" style="color: rgb(159, 159, 159); font-size: 12px; margin-left: auto;"></span>
|Type=Checkbox2
+
|Type=Checkbox
  
|text1=<span style="text-overflow: ellipsis; overflow: hidden;>1</span>
+
|text1=<span style="text-overflow: ellipsis; overflow: hidden;">1</span>
 
|value1=1
 
|value1=1
  
|text2=<span style="text-overflow: ellipsis; overflow: hidden;>2</span>
+
|text2=<span style="text-overflow: ellipsis; overflow: hidden;">2</span>
 
|value2=2
 
|value2=2
  
|text3=<span style="text-overflow: ellipsis; overflow: hidden;>3</span>
+
|text3=<span style="text-overflow: ellipsis; overflow: hidden;">3</span>
 
|value3=3
 
|value3=3
  
|text4=<span style="text-overflow: ellipsis; overflow: hidden;>4</span>
+
|text4=<span style="text-overflow: ellipsis; overflow: hidden;">4</span>
 
|value4=4
 
|value4=4
  
|text5=<span style="text-overflow: ellipsis; overflow: hidden;>Boss 🌟</span>
+
|text5=<span style="text-overflow: ellipsis; overflow: hidden;"><span data-t="473">Boss</span> 🌟</span>
 
|value5=boss
 
|value5=boss
  
|text6=<span style="text-overflow: ellipsis; overflow: hidden;>5 🌟🌟</span>
+
|text6=<span style="text-overflow: ellipsis; overflow: hidden;">5 🌟🌟</span>
 
|value6=5
 
|value6=5
 
}}
 
}}
</div>}} {{#if:{{{Élément|}}}|<div style="font-weight: bold;">Élément</div>
+
}} {{#if:{{{Élément|}}}|
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; padding: 0 5px;">
 
 
{{FiltreModule
 
{{FiltreModule
 +
|name=<span data-t="479">Élément</span>
 
|id={{FiltreCorrespondance|Élément}}
 
|id={{FiltreCorrespondance|Élément}}
 
|span=<span class="counter" style="color: rgb(159, 159, 159); font-size: 12px; margin-left: auto;"></span>
 
|span=<span class="counter" style="color: rgb(159, 159, 159); font-size: 12px; margin-left: auto;"></span>
|Type=Checkbox2
+
|Type=Checkbox
  
|text1=[[Image:Elementfeu.png|25px|link=]]<span style="text-overflow: ellipsis; overflow: hidden;>Feu</span>
+
|text1=<span style="text-overflow: ellipsis; overflow: hidden;">[[Image:Elementfeu.png|25px|link=]] <span data-t="482">Feu</span></span>
 
|value1=feu
 
|value1=feu
  
|text2=[[Image:Elementglace.png|25px|link=]]<span style="text-overflow: ellipsis; overflow: hidden;>Glace</span>
+
|text2=<span style="text-overflow: ellipsis; overflow: hidden;">[[Image:Elementglace.png|25px|link=]] <span data-t="483">Glace</span></span>
 
|value2=glace
 
|value2=glace
  
|text3=[[Image:Elementfoudre.png|25px|link=]]<span style="text-overflow: ellipsis; overflow: hidden;>Foudre</span>
+
|text3=<span style="text-overflow: ellipsis; overflow: hidden;">[[Image:Elementfoudre.png|25px|link=]] <span data-t="484">Foudre</span></span>
 
|value3=foudre
 
|value3=foudre
  
|text4=[[Image:Elementvent.png|25px|link=]]<span style="text-overflow: ellipsis; overflow: hidden;>Vent</span>
+
|text4=<span style="text-overflow: ellipsis; overflow: hidden;">[[Image:Elementvent.png|25px|link=]] <span data-t="485">Vent</span></span>
 
|value4=vent
 
|value4=vent
  
|text5=[[Image:Elementobscurite.png|25px|link=]]<span style="text-overflow: ellipsis; overflow: hidden;>Obscurité</span><span style="color: rgb(159, 159, 159); font-size: 12px; margin-left: auto;"></span>
+
|text5=<span style="text-overflow: ellipsis; overflow: hidden;">[[Image:Elementobscurite.png|25px|link=]] <span data-t="486">Obscurité</span></span>
 
|value5=obscurite
 
|value5=obscurite
  
|text6=[[Image:Elementterre.png|25px|link=]]<span style="text-overflow: ellipsis; overflow: hidden;>Terre</span>
+
|text6=<span style="text-overflow: ellipsis; overflow: hidden;">[[Image:Elementterre.png|25px|link=]] <span data-t="487">Terre</span></span>
 
|value6=terre
 
|value6=terre
  
|text7=<span style="text-overflow: ellipsis; overflow: hidden;>Aucun</span>
+
|text7=<span style="text-overflow: ellipsis; overflow: hidden;" data-t="488">Aucun</span>
 
|value7=aucun
 
|value7=aucun
 
}}
 
}}
</div>}} {{#if:{{{Type|}}}|<div style="font-weight: bold;">Type</div>
+
}} {{#if:{{{Type|}}}|
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; padding: 0 5px;">
 
 
{{FiltreModule
 
{{FiltreModule
 +
|name=<span data-t="480">Type</span>
 
|id={{FiltreCorrespondance|Type}}
 
|id={{FiltreCorrespondance|Type}}
 
|span=<span class="counter" style="color: rgb(159, 159, 159); font-size: 12px; margin-left: auto;"></span>
 
|span=<span class="counter" style="color: rgb(159, 159, 159); font-size: 12px; margin-left: auto;"></span>
|Type=Checkbox2
+
|Type=Checkbox
  
|text1=<span style="text-overflow: ellipsis; overflow: hidden;>Demi-humain</span>
+
|text1=<span style="text-overflow: ellipsis; overflow: hidden;" data-t="489">Demi-humain</span>
 
|value1=demi-humain
 
|value1=demi-humain
  
|text2=<span style="text-overflow: ellipsis; overflow: hidden;>Mal</span>
+
|text2=<span style="text-overflow: ellipsis; overflow: hidden;" data-t="490">Mal</span>
 
|value2=mal
 
|value2=mal
  
|text3=<span style="text-overflow: ellipsis; overflow: hidden;>Désert</span>
+
|text3=<span style="text-overflow: ellipsis; overflow: hidden;" data-t="491">Désert</span>
 
|value3=desert
 
|value3=desert
  
|text4=<span style="text-overflow: ellipsis; overflow: hidden;>Animal</span>
+
|text4=<span style="text-overflow: ellipsis; overflow: hidden;" data-t="492">Animal</span>
 
|value4=animal
 
|value4=animal
  
|text5=<span style="text-overflow: ellipsis; overflow: hidden;>Orc</span>
+
|text5=<span style="text-overflow: ellipsis; overflow: hidden;" data-t="493">Orc</span>
 
|value5=orc
 
|value5=orc
  
|text6=<span style="text-overflow: ellipsis; overflow: hidden;>Mystique</span>
+
|text6=<span style="text-overflow: ellipsis; overflow: hidden;" data-t="494">Mystique</span>
 
|value6=mystique
 
|value6=mystique
  
|text7=<span style="text-overflow: ellipsis; overflow: hidden;>Mort-vivant</span>
+
|text7=<span style="text-overflow: ellipsis; overflow: hidden;" data-t="495">Mort-vivant</span>
 
|value7=mort-vivant
 
|value7=mort-vivant
  
|text8=<span style="text-overflow: ellipsis; overflow: hidden;>Insecte</span>
+
|text8=<span style="text-overflow: ellipsis; overflow: hidden;" data-t="496">Insecte</span>
 
|value8=insecte
 
|value8=insecte
  
|text9=<span style="text-overflow: ellipsis; overflow: hidden;>Zodiaque</span>
+
|text9=<span style="text-overflow: ellipsis; overflow: hidden;" data-t="497">Zodiaque</span>
 
|value9=zodiaque
 
|value9=zodiaque
  
|text10=<span style="text-overflow: ellipsis; overflow: hidden;>Aucun</span>
+
|text10=<span style="text-overflow: ellipsis; overflow: hidden;" data-t="488">Aucun</span>
 
|value10=aucun
 
|value10=aucun
 
}}
 
}}
</div>}} {{#if:{{{Dégâts|}}}|<div style="font-weight: bold;">Dégâts</div>
+
}} {{#if:{{{Dégâts|}}}|
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; padding: 0 5px;">
 
 
{{FiltreModule
 
{{FiltreModule
 +
|name=<span data-t="481">Dégâts</span>
 
|id={{FiltreCorrespondance|Dégât}}
 
|id={{FiltreCorrespondance|Dégât}}
 
|span=<span class="counter" style="color: rgb(159, 159, 159); font-size: 12px; margin-left: auto;"></span>
 
|span=<span class="counter" style="color: rgb(159, 159, 159); font-size: 12px; margin-left: auto;"></span>
|Type=Checkbox2
+
|Type=Checkbox
  
|text1=🗡️<span style="text-overflow: ellipsis; overflow: hidden;>Mêlée</span>
+
|text1=<span style="text-overflow: ellipsis; overflow: hidden;">🗡️ <span data-t="498">Mêlée</span></span>
 
|value1=melee
 
|value1=melee
  
|text2=🏹<span style="text-overflow: ellipsis; overflow: hidden;>Flèche</span>
+
|text2=<span style="text-overflow: ellipsis; overflow: hidden;">🏹 <span data-t="499">Flèche</span></span>
 
|value2=fleche
 
|value2=fleche
  
|text3=🧙<span style="text-overflow: ellipsis; overflow: hidden;>Magique</span>
+
|text3=<span style="text-overflow: ellipsis; overflow: hidden;">🧙 <span data-t="500">Magique</span></span>
 
|value3=magique
 
|value3=magique
  
|text4=<span style="text-overflow: ellipsis; overflow: hidden;>Compétence</span>
+
|text4=<span style="text-overflow: ellipsis; overflow: hidden;">✨ <span data-t="501">Compétence</span></span>
 
|value4=dc
 
|value4=dc
 
}}
 
}}
</div>}}
+
}}
 
</div>
 
</div>
 
</div>
 
</div>
 
}}<noinclude>[[Catégorie:Nouveaux modèles]]</noinclude>
 
}}<noinclude>[[Catégorie:Nouveaux modèles]]</noinclude>

Version actuelle datée du 6 mars 2025 à 13:25

Filtrer
Filtrer