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

Template:HexMap: Difference between revisions

From Board Game Arena
Jump to navigation Jump to search
(Created page with "<div style="position:relative;display:grid;grid:auto-flow calc(0.75*{{{x|67.195}}}px/cos(30deg))/repeat(auto-fit,calc(0.5*{{{x|67.195}}}px));width:fit-content;background:{{{bg|#ddd4}}};border-radius:8px;padding:16px 16px calc(16px + (0.25*{{{x|67.195}}}px/cos(30deg))) 16px;margin-top:8px;white-space:nowrap;"><div style="position:absolute;top:8px;left:16px;color:#fffc;font-family:Roboto,Arial,sans-serif;font-weight:700;font-size:24px;text-shadow:1px 1px 5px #000;">{{{n|}}...")
 
m ({{{w|auto-fit}}})
Line 1: Line 1:
<div style="position:relative;display:grid;grid:auto-flow calc(0.75*{{{x|67.195}}}px/cos(30deg))/repeat(auto-fit,calc(0.5*{{{x|67.195}}}px));width:fit-content;background:{{{bg|#ddd4}}};border-radius:8px;padding:16px 16px calc(16px + (0.25*{{{x|67.195}}}px/cos(30deg))) 16px;margin-top:8px;white-space:nowrap;"><div style="position:absolute;top:8px;left:16px;color:#fffc;font-family:Roboto,Arial,sans-serif;font-weight:700;font-size:24px;text-shadow:1px 1px 5px #000;">{{{n|}}}</div>{{{1|}}}</div><noinclude>
<div style="position:relative;display:grid;grid:auto-flow calc(0.75*{{{x|67.195}}}px/cos(30deg))/repeat({{{w|auto-fit}}},calc(0.5*{{{x|67.195}}}px));width:fit-content;background:{{{bg|#ddd4}}};border-radius:8px;padding:16px 16px calc(16px + (0.25*{{{x|67.195}}}px/cos(30deg))) 16px;margin-top:8px;white-space:nowrap;"><div style="position:absolute;top:8px;left:16px;color:#fffc;font-family:Roboto,Arial,sans-serif;font-weight:700;font-size:24px;text-shadow:1px 1px 5px #000;">{{{n|}}}</div>{{{1|}}}</div><noinclude>


A map for '''[[Template:Hex]]es'''.
A map for '''[[Template:Hex]]es'''.
Line 123: Line 123:
   <div><code><nowiki>{{hexMap |x=80 }}</nowiki></code></div>
   <div><code><nowiki>{{hexMap |x=80 }}</nowiki></code></div>
   <div>'''''Optional:''''' specify the grid hex width in px units.</div>
   <div>'''''Optional:''''' specify the grid hex width in px units.</div>
  <div><code>w</code></div>
  <div><code>auto-fit</code></div>
  <div><code><nowiki>{{hexMap |w=20 }}</nowiki></code></div>
  <div>'''''Optional:''''' specify the grid width in hexes.</div>
   <div><code>bg</code></div>
   <div><code>bg</code></div>
   <div><code>#ddd</code></div>
   <div><code>#ddd</code></div>

Revision as of 00:25, 11 May 2024

A map for Template:Hexes.

Example

1
Sand
red meeple
Sand
Sand
Sand
Jungle
green meeple
Jungle
Jungle
Sand
Jungle
Clearing
blue meeple
Clearing
red meeple
Sand
green meeple
Jungle
Clearing
blue meeple
Clearing
2
Sand
red meeple
Sand
Sand
Sand
red meeple
Jungle
green meeple
Jungle
green meeple
Jungle
Sand
Jungle
Clearing
blue meeple
Clearing
red meeple
Sand
green meeple
Jungle
Clearing
blue meepleblue meeple
Clearing
{{hexMap |bg=deepskyblue |n=1 |
{{hex |x=3 |y=1 |{{TaluvaSand}} |{{meeple|red}}
}}
{{hex |x=5 |y=1 |{{TaluvaSand}}
}}
{{hex |x=7 |y=1 |{{TaluvaSand}}
}}
{{hex |x=2 |y=2 |{{TaluvaSand}}
}}
{{hex |x=4 |y=2 |{{TaluvaJungle}} |{{meeple|green}}
}}
{{hex |x=6 |y=2 |{{TaluvaJungle}}
}}
{{hex |x=8 |y=2 |{{TaluvaJungle}}
}}
{{hex |x=1 |y=3 |{{TaluvaSand}}
}}
{{hex |x=3 |y=3 |{{TaluvaJungle}}
}}
{{hex |x=5 |y=3 |{{TaluvaClearing}} |{{meeple|blue}}
}}
{{hex |x=7 |y=3 |{{TaluvaClearing}} |{{meeple|red}}
}}
{{hex |x=2 |y=4 |{{TaluvaSand}} |{{meeple|green}}
}}
{{hex |x=4 |y=4 |{{TaluvaJungle}}
}}
{{hex |x=6 |y=4 |{{TaluvaClearing}} |{{meeple|blue}}
}}
{{hex |x=8 |y=4 |{{TaluvaClearing}}
}}
}}

Parameters

Parameter
Default value
Example
Description
1
null
{{HexMap |{{hex}} }}
Optional: place Template:Hex tiles on the map.
x
67.195
{{hexMap |x=80 }}
Optional: specify the grid hex width in px units.
w
auto-fit
{{hexMap |w=20 }}
Optional: specify the grid width in hexes.
bg
#ddd
{{hexMap |bg=green }}
Optional: specify the background as a CSS color.
n
null
{{HexMap |n=1 }}
Optional: specify text in the top left corner of the map.