This is a documentation for Board Game Arena: play board games online !

Template:Hex: Difference between revisions

From Board Game Arena
Jump to navigation Jump to search
m (replace text-shadow with -webkit-text-stroke)
m (parameters)
 
Line 13: Line 13:
100% 33.2%,99.2% 29.7%,97.3% 26.2%,94.6% 23.1%,91.3% 20.7%,
100% 33.2%,99.2% 29.7%,97.3% 26.2%,94.6% 23.1%,91.3% 20.7%,
58.7% 4.33%,54.6% 3.11%,50% 2.67%,45.4% 3.11%,41.3% 4.33%
58.7% 4.33%,54.6% 3.11%,50% 2.67%,45.4% 3.11%,41.3% 4.33%
);c{{{rounded|l}}}ip-path:polygon(0 50%,50% -50%,100% 50%,50% 150%);{{{|c}}}{{{rounded|l}}}ip-path:polygon(-50% 50%,50% 100%,150% 50%,50% 0);background:{{{bg|#ddd}}};"><div style="grid-area:1/1;">{{{1|&ZeroWidthSpace;}}}</div><div style="grid-area:1/1;rotate:calc({{{r|0}}}*-30deg);color:{{{textColor|#fff}}};font-family:Roboto,Arial,sans-serif;font-weight:900;font-size:28px;-webkit-text-stroke:1.2px #000;">{{{2|&ZeroWidthSpace;}}}</div></div><noinclude>
);c{{{rounded|l}}}ip-path:polygon(0 50%,50% -50%,100% 50%,50% 150%);{{{|c}}}{{{rounded|l}}}ip-path:polygon(-50% 50%,50% 100%,150% 50%,50% 0);background:{{{bg|#ddd}}};"><div style="grid-area:1/1;">{{{1|&ZeroWidthSpace;}}}</div><div style="grid-area:1/1;rotate:calc({{{r|0}}}*-30deg);color:{{{textColor|#fff}}};font-family:Roboto,Arial,sans-serif;font-weight:900;font-size:28px;-webkit-text-stroke:1.2px {{{textOutline|#000}}};">{{{2|&ZeroWidthSpace;}}}</div></div><noinclude>


== Parameters ==
== Parameters ==


<div style="display:grid;grid-template-columns:5rem min-content 18rem min-content 1fr;gap:0.25rem;overflow:auto;text-overflow:ellipsis;">
<div style="display:grid;grid-template-columns:min-content min-content 18rem min-content 1fr;gap:0.25rem;overflow:auto;text-overflow:ellipsis;">
   <div style="font-weight:bold;width:8rem;">Parameter</div>
   <div style="font-weight:bold;width:8rem;">Parameter</div>
   <div style="font-weight:bold;width:8rem;">Default value</div>
   <div style="font-weight:bold;width:8rem;">Default value</div>
Line 33: Line 33:
   <div>{{hex | |1 }}</div>
   <div>{{hex | |1 }}</div>
   <div>'''''Optional:''''' specify a text value.</div>
   <div>'''''Optional:''''' specify a text value.</div>
  <div><code>textColor</code></div>
  <div><code>#fff</code> (white)</div>
  <div><code><nowiki>{{hex | |1 |textColor=green }}</nowiki></code></div>
  <div>{{hex | |1 |textColor=green }}</div>
  <div>'''''Optional:''''' specify the text color as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS color].</div>
  <div><code>textOutline</code></div>
  <div><code>#000</code> (black)</div>
  <div><code><nowiki>{{hex | |1 |textOutline=green }}</nowiki></code></div>
  <div>{{hex | |1 |textOutline=green }}</div>
  <div>'''''Optional:''''' specify the text outline color as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS color].</div>
   <div><code>bg</code></div>
   <div><code>bg</code></div>
   <div><code>#ddd</code></div>
   <div><code>#ddd</code></div>

Latest revision as of 16:34, 30 May 2024

Parameters

Parameter
Default value
Example
Result
Description
1
&ZeroWidthSpace;
{{hex |{{TaluvaClearing}} }}
Clearing
Optional: specify a Template:GameIcon image.
2
&ZeroWidthSpace;
{{hex | |1 }}
1
Optional: specify a text value.
textColor
#fff (white)
{{hex | |1 |textColor=green }}
1
Optional: specify the text color as a CSS color.
textOutline
#000 (black)
{{hex | |1 |textOutline=green }}
1
Optional: specify the text outline color as a CSS color.
bg
#ddd
{{hex |bg=green }}
Optional: specify the background as a CSS color.
rounded
n/a
{{hex |rounded= }}
Optional: rounded corners.
w
67.195
{{hex |w=50 }}
Optional: specify the width of the hex.
x
1
{{hex |x=3 }}
Optional: specify the x co-ordinate of the hex on a Template:HexMap.
y
1
{{hex |y=2 }}
Optional: specify the y co-ordinate of the hex on a Template:HexMap.
z
null
{{hex |z=2 }}
Optional: specify the z-axis position.
r
0
{{hex |r=1 |🡅 }}
🡅
Optional: specify the rotation in units of 30° (0-11).
null
n/a
{{hex |= |🡅 }}
🡅
Optional: transform to a flat-top hex.