Format:MapCoords: Diferență între versiuni

[versiune neverificată][versiune verificată]
 
(Nu s-au afișat 76 de versiuni intermediare efectuate de alți 3 utilizatori)
Linia 1: Linia 1:
<!-- Format:MapCoords -->
+
<div style="display: inline-block; position: relative;"> <!-- Centering and relative positioning -->
<div style="text-align: {{{align|center}}};"> <!-- This controls the overall alignment: left, right, or center -->
+
     <!-- Original wiki-style image format -->
     <div style="position: absolute;"> <!-- Inline-block keeps it centered in parent -->
+
    [[{{{image}}}|thumb]]
        {{{image}}} <!-- Image inclusion -->
 
  
        <!-- Point 1 -->
+
    <!-- Point 1 -->
        {{#if: {{{x1|}}}{{{y1|}}} |
+
    {{#if: {{{x1|}}}{{{y1|}}} |
         <div class="animated-point" style="top: {{{y1}}}px; left: {{{x1}}}px;"></div>
+
      {{#ifexpr: {{{width}}}>300
         }}
+
         |<div class="animated-point" style="position: absolute; top: calc(7px + {{{y1}}}px * 300/{{{width}}}); left: calc(37px + {{{x1}}}px * 300/{{{width}}});"></div>
 +
         |<div class="animated-point" style="position: absolute; top: calc(7px + {{{y1}}}px); left: calc(37px + {{{x1}}}px);"></div>
 +
      }}
 +
    }}
  
        <!-- Point 2 -->
+
    <!-- Point 2 -->
        {{#if: {{{x2|}}}{{{y2|}}} |
+
    {{#if: {{{x2|}}}{{{y2|}}} |
        <div class="animated-point" style="top: {{{y2}}}px; left: {{{x2}}}px;"></div>
+
      {{#ifexpr: {{{width}}} > 300
        }}
+
         |<div class="animated-point" style="position: absolute; top: calc(7px + {{{y2}}}px * 300/{{{width}}}); left: calc(37px + {{{x2}}}px * 300/{{{width}}});"></div>
 
+
         |<div class="animated-point" style="position: absolute; top: calc(7px + {{{y2}}}px); left: calc(37px + {{{x2}}}px);"></div>
        <!-- Repeat for the remaining points -->
+
      }}
         {{#if: {{{x3|}}}{{{y3|}}} |
+
    }}
        <div class="animated-point" style="top: {{{y3}}}px; left: {{{x3}}}px;"></div>
+
    <!-- Point 3 -->
        }}
+
    {{#if: {{{x3|}}}{{{y3|}}} |
 
+
      {{#ifexpr: {{{width}}} > 300
        {{#if: {{{x4|}}}{{{y4|}}} |
+
         |<div class="animated-point" style="position: absolute; top: calc(7px + {{{y3}}}px * 300/{{{width}}}); left: calc(37px + {{{x3}}}px * 300/{{{width}}});"></div>
         <div class="animated-point" style="top: {{{y4}}}px; left: {{{x4}}}px;"></div>
+
         |<div class="animated-point" style="position: absolute; top: calc(7px + {{{y3}}}px); left: calc(37px + {{{x3}}}px);"></div>
        }}
+
      }}
 
+
    }}
        {{#if: {{{x5|}}}{{{y5|}}} |
+
    <!-- Point 4 -->
        <div class="animated-point" style="top: {{{y5}}}px; left: {{{x5}}}px;"></div>
+
    {{#if: {{{x4|}}}{{{y4|}}} |
        }}
+
      {{#ifexpr: {{{width}}} > 300
 
+
         |<div class="animated-point" style="position: absolute; top: calc(7px + {{{y4}}}px * 300/{{{width}}}); left: calc(37px + {{{x4}}}px * 300/{{{width}}});"></div>
         {{#if: {{{x6|}}}{{{y6|}}} |
+
         |<div class="animated-point" style="position: absolute; top: calc(7px + {{{y4}}}px); left: calc(37px + {{{x4}}}px);"></div>
        <div class="animated-point" style="top: {{{y6}}}px; left: {{{x6}}}px;"></div>
+
      }}
        }}
+
     }}
 
 
        {{#if: {{{x7|}}}{{{y7|}}} |
 
         <div class="animated-point" style="top: {{{y7}}}px; left: {{{x7}}}px;"></div>
 
        }}
 
 
 
        {{#if: {{{x8|}}}{{{y8|}}} |
 
        <div class="animated-point" style="top: {{{y8}}}px; left: {{{x8}}}px;"></div>
 
         }}
 
 
 
        {{#if: {{{x9|}}}{{{y9|}}} |
 
        <div class="animated-point" style="top: {{{y9}}}px; left: {{{x9}}}px;"></div>
 
        }}
 
 
 
        {{#if: {{{x10|}}}{{{y10|}}} |
 
         <div class="animated-point" style="top: {{{y10}}}px; left: {{{x10}}}px;"></div>
 
        }}
 
     </div>
 
 
</div>
 
</div>

Versiunea curentă din 13 noiembrie 2024 14:22

   [[{{{image}}}|thumb]]