User:Sky/Rarity: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(modify css)
(add itemlink class just because i can)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#lvardef:rarity|{{#replace:{{{1}}}|<nowiki> </nowiki>|-}} }}{{#lvardef:margin|{{#expr:0.02 * {{{2|40}}} }} }}{{#lvardef:marginhalf|{{#expr:0.01 * {{{2|40}}} }} }}<span class="itemicon-wrapper" style="
<includeonly>{{#lvardef:rarity|{{#replace:{{{1}}}|<nowiki> </nowiki>|-}} }}{{#lvardef:margin|{{#expr:0.02 * {{{2|40}}} }} }}{{#lvardef:marginhalf|{{#expr:0.01 * {{{2|40}}} }} }}<span class="bg3wiki-itemicon-wrapper" style="
  text-align: center;
   margin: auto {{#lvar:marginhalf}}rem"><span class="bg3wiki-itemicon bg3wiki-itemicon-{{#lvar:rarity}}">{{#cargo_query:
  white-space: nowrap;
   margin: auto {{#lvar:marginhalf}}rem"><span class="itemicon" style="background: linear-gradient(var(--bg-main), var(--rarity-{{#lvar:rarity}}-bck));border: solid 1px var(--rarity-{{#lvar:rarity}}); display: inline-block">{{#cargo_query:
tables=item_icon
tables=item_icon
|fields=TRIM(icon),CONCAT('', '{{{2|40}}}')
|fields=TRIM(icon),CONCAT('', '{{{2|40}}}')
Line 12: Line 10:
|format=template
|format=template
|template=ItemIcon Internal
|template=ItemIcon Internal
}}</span><span style="margin-left: {{#lvar:margin}}rem;">[[Potion of Healing]]</span></span></includeonly><noinclude>
}}</span><span class="bg3wiki-itemicon-link" style="margin-left: {{#lvar:margin}}rem;">[[Potion of Healing]]</span></span></includeonly><noinclude>
<div style="
  --rarity-common: #48484899;
  --rarity-common-bck: #48484820;
  --rarity-uncommon: #01BD3999;
  --rarity-uncommon-bck: #01BD3920;
  --rarity-rare: #01BFFF99;
  --rarity-rare-bck: #01BFFF20;
  --rarity-very-rare: #D1017B99;
  --rarity-very-rare-bck: #D1017B20;
  --rarity-legendary: #B7861D99;
  --rarity-legendary-bck: #B7861D20;
  --rarity-story: #FF590199;
  --rarity-story-bck: #FF590120;
">
* {{User:Sky/Rarity|common}}
* {{User:Sky/Rarity|common}}
* {{User:Sky/Rarity|uncommon}}
* {{User:Sky/Rarity|uncommon}}
Line 43: Line 27:


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tristique ligula vitae turpis varius ullamcorper. Ut sagittis {{User:Sky/Rarity|uncommon|24}} eu dolor accumsan venenatis. Maecenas sit amet ante at ligula efficitur fermentum. Suspendisse ac neque pretium nisi finibus euismod. Suspendisse varius ipsum lorem, vitae consectetur metus mattis sit amet. Proin ornare orci turpis, non blandit lorem scelerisque a. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. {{User:Sky/Rarity|legendary|24}} in luctus arcu. Proin aliquet lorem quis lacus lacinia molestie. Suspendisse iaculis venenatis nibh, et dapibus augue varius a.  
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tristique ligula vitae turpis varius ullamcorper. Ut sagittis {{User:Sky/Rarity|uncommon|24}} eu dolor accumsan venenatis. Maecenas sit amet ante at ligula efficitur fermentum. Suspendisse ac neque pretium nisi finibus euismod. Suspendisse varius ipsum lorem, vitae consectetur metus mattis sit amet. Proin ornare orci turpis, non blandit lorem scelerisque a. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. {{User:Sky/Rarity|legendary|24}} in luctus arcu. Proin aliquet lorem quis lacus lacinia molestie. Suspendisse iaculis venenatis nibh, et dapibus augue varius a.  
</div>


== CSS ==
== CSS ==
<syntaxhighlight lang="css">
<syntaxhighlight lang="css">
body {
body {
   --rarity-common: #48484899;
   --bg3wiki-itemicon-common: #48484899;
   --rarity-common-bck: #48484820;
   --bg3wiki-itemicon-common-bg: #48484820;
   --rarity-uncommon: #01BD3999;
   --bg3wiki-itemicon-uncommon: #01BD3999;
   --rarity-uncommon-bck: #01BD3920;
   --bg3wiki-itemicon-uncommon-bg: #01BD3920;
   --rarity-rare: #01BFFF99;
   --bg3wiki-itemicon-rare: #01BFFF99;
   --rarity-rare-bck: #01BFFF20;
   --bg3wiki-itemicon-rare-bg: #01BFFF20;
   --rarity-very-rare: #D1017B99;
   --bg3wiki-itemicon-very-rare: #D1017B99;
   --rarity-very-rare-bck: #D1017B20;
   --bg3wiki-itemicon-very-rare-bg: #D1017B20;
   --rarity-legendary: #B7861D99;
   --bg3wiki-itemicon-legendary: #B7861D99;
   --rarity-legendary-bck: #B7861D20;
   --bg3wiki-itemicon-legendary-bg: #B7861D20;
   --rarity-story: #FF590199;
   --bg3wiki-itemicon-story: #FF590199;
   --rarity-story-bck: #FF590120;
   --bg3wiki-itemicon-story-bg: #FF590120;
}
}


body .itemicon-wrapper {
body .bg3wiki-itemicon-wrapper {
   text-align: center;
   text-align: center;
   white-space: nowrap;
   white-space: nowrap;
}
body .bg3wiki-itemicon-wrapper .bg3wiki-itemicon {
  display: inline-block;
}
body .bg3wiki-itemicon-wrapper .bg3wiki-itemicon-common {
  background: linear-gradient(var(--bg-main), var(--bg3wiki-itemicon-common));
  border: solid 1px var(--bg3wiki-rarity-common);
}
body .bg3wiki-itemicon-wrapper .bg3wiki-itemicon-uncommon {
  background: linear-gradient(var(--bg-main), var(--bg3wiki-itemicon-uncommon-bg));
  border: solid 1px var(--bg3wiki-itemicon-uncommon);
}
body .bg3wiki-itemicon-wrapper .bg3wiki-itemicon-rare {
  background: linear-gradient(var(--bg-main), var(--bg3wiki-itemicon-rare-bg));
  border: solid 1px var(--bg3wiki-itemicon-rare);
}
body .bg3wiki-itemicon-wrapper .bg3wiki-itemicon-very-rare {
  background: linear-gradient(var(--bg-main), var(--bg3wiki-itemicon-very-rare-bg));
  border: solid 1px var(--bg3wiki-itemicon-very-rare);
}
body .bg3wiki-itemicon-wrapper .bg3wiki-itemicon-legendary {
  background: linear-gradient(var(--bg-main), var(--bg3wiki-itemicon-legendary-bg));
  border: solid 1px var(--bg3wiki-itemicon-legendary);
}
body .bg3wiki-itemicon-wrapper .bg3wiki-itemicon-story {
  background: linear-gradient(var(--bg-main), var(--bg3wiki-itemicon-story-bg));
  border: solid 1px var(--bg3wiki-itemicon-story);
}
}
</syntaxhighlight>
</syntaxhighlight>
</noinclude>
</noinclude>

Latest revision as of 06:28, 9 September 2023


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tristique ligula vitae turpis varius ullamcorper. Ut sagittis Potion of Healing eu dolor accumsan venenatis. Maecenas sit amet ante at ligula efficitur fermentum. Suspendisse ac neque pretium nisi finibus euismod. Suspendisse varius ipsum lorem, vitae consectetur metus mattis sit amet. Proin ornare orci turpis, non blandit lorem scelerisque a. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Potion of Healing in luctus arcu. Proin aliquet lorem quis lacus lacinia molestie. Suspendisse iaculis venenatis nibh, et dapibus augue varius a.

CSS[edit | edit source]

body {
  --bg3wiki-itemicon-common: #48484899;
  --bg3wiki-itemicon-common-bg: #48484820;
  --bg3wiki-itemicon-uncommon: #01BD3999;
  --bg3wiki-itemicon-uncommon-bg: #01BD3920;
  --bg3wiki-itemicon-rare: #01BFFF99;
  --bg3wiki-itemicon-rare-bg: #01BFFF20;
  --bg3wiki-itemicon-very-rare: #D1017B99;
  --bg3wiki-itemicon-very-rare-bg: #D1017B20;
  --bg3wiki-itemicon-legendary: #B7861D99;
  --bg3wiki-itemicon-legendary-bg: #B7861D20;
  --bg3wiki-itemicon-story: #FF590199;
  --bg3wiki-itemicon-story-bg: #FF590120;
}

body .bg3wiki-itemicon-wrapper {
  text-align: center;
  white-space: nowrap;
}

body .bg3wiki-itemicon-wrapper .bg3wiki-itemicon {
  display: inline-block;
}

body .bg3wiki-itemicon-wrapper .bg3wiki-itemicon-common {
  background: linear-gradient(var(--bg-main), var(--bg3wiki-itemicon-common));
  border: solid 1px var(--bg3wiki-rarity-common);
}
body .bg3wiki-itemicon-wrapper .bg3wiki-itemicon-uncommon {
  background: linear-gradient(var(--bg-main), var(--bg3wiki-itemicon-uncommon-bg));
  border: solid 1px var(--bg3wiki-itemicon-uncommon);
}

body .bg3wiki-itemicon-wrapper .bg3wiki-itemicon-rare {
  background: linear-gradient(var(--bg-main), var(--bg3wiki-itemicon-rare-bg));
  border: solid 1px var(--bg3wiki-itemicon-rare);
}

body .bg3wiki-itemicon-wrapper .bg3wiki-itemicon-very-rare {
  background: linear-gradient(var(--bg-main), var(--bg3wiki-itemicon-very-rare-bg));
  border: solid 1px var(--bg3wiki-itemicon-very-rare);
}

body .bg3wiki-itemicon-wrapper .bg3wiki-itemicon-legendary {
  background: linear-gradient(var(--bg-main), var(--bg3wiki-itemicon-legendary-bg));
  border: solid 1px var(--bg3wiki-itemicon-legendary);
}

body .bg3wiki-itemicon-wrapper .bg3wiki-itemicon-story {
  background: linear-gradient(var(--bg-main), var(--bg3wiki-itemicon-story-bg));
  border: solid 1px var(--bg3wiki-itemicon-story);
}