Format:MapCoords: Diferență între versiuni

[în așteptarea revizuirii][în așteptarea revizuirii]
m
 
(Nu s-au afișat 37 de versiuni intermediare efectuate de alți 2 utilizatori)
Linia 1: Linia 1:
<!-- Format:MapCoords -->
+
<div style="display: inline-block; position: relative;"> <!-- Centering and relative positioning -->
<div style="display: inline-block;"> <!-- Controls overall alignment -->
+
     <!-- Original wiki-style image format -->
     <div style="position: relative"> <!-- Keeps the content centered -->
+
    [[{{{image}}}|thumb]]
        [[{{{image}}}|thumb]] <!-- Keep thumb but add a class for custom styling -->
 
  
        <!-- Point 1 -->
+
    <!-- Point 1 -->
        {{#if: {{{x1|}}}{{{y1|}}} |
+
    {{#if: {{{x1|}}}{{{y1|}}} |
         <div class="animated-point" style="position: absolute; top: calc({{{y1}}}px * + 10px); left: calc({{{x1}}}px * 0.2929 + 37px);"></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>
        {{#if: {{{x2|}}}{{{y2|}}} |
+
        |<div class="animated-point" style="position: absolute; top: calc(7px + {{{y1}}}px); left: calc(37px + {{{x1}}}px);"></div>
         <div class="animated-point" style="position: absolute; top: calc({{{y2}}}px + 10px); left: calc({{{x2}}}px + 37px);"></div>
+
      }}
         }}
+
    }}
    </div>
+
 
 +
    <!-- Point 2 -->
 +
    {{#if: {{{x2|}}}{{{y2|}}} |
 +
      {{#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>
 +
      }}
 +
    }}
 +
    <!-- Point 2 -->
 +
    {{#if: {{{x3|}}}{{{y3|}}} |
 +
      {{#ifexpr: {{{width}}} > 300
 +
        |<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="position: absolute; top: calc(7px + {{{y3}}}px); left: calc(37px + {{{x3}}}px);"></div>
 +
      }}
 +
    }}
 
</div>
 
</div>

Versiunea curentă din 28 septembrie 2024 10:53

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