Editing Template:Marker

From The Fifth City Wiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
<includeonly><div
<div
     style = "
     style = "
        /* Allow hover events to pass through */
        pointer-events: none;
       
         /* Move marker on map */
         /* Move marker on map */
         position: absolute;
         position: absolute;
         transform: translate(calc({{{x|0}}}% * 4), calc({{{y|0}}}% * 4));
         transform: translate({{{x|0}}}%, {{{y|0}}}%);
          
          
         /* Transformation percentages take into account
         /* Transformation percentages take into account
Line 13: Line 10:
           a percentage of the parent element's size,
           a percentage of the parent element's size,
           this element must have the same size.        */
           this element must have the same size.        */
         width: calc(100% / 4);
         width: 100%;
         height: calc(100% / 4);
         height: 100%;
     "
     "
    class = "frontOnChildHover"
><!--
><!--
  --><div style = "
  --><div style = "
        pointer-events: all; /* Allow pointer events again */
         width: fit-content; /* Shrink to fit only the marker */
         width: fit-content; /* Shrink to fit only the marker */
         transform:
         transform:
Line 26: Line 21:
         ;
         ;
     "
     "
     class = "hastooltip hoverChild"
     class = "hastooltip frontOnChildHover"
     ><!--
     ><!--
          
          
         Marker top flair
         Marker top flair
     -->{{#switch:{{{flair|fallenlondon}}}
     --><div style = "
        |fallenlondon =
            image-rendering: pixelated;
            <div style = "
           
                image-rendering: pixelated;
            /* Move flair down a tad */
               
            position: relative;
                /* Move flair down a tad */
            top: 3px;
                position: relative;
           
                top: 3px;
            /* Center it */
               
            width: fit-content;
                /* Center it */
            margin-left: auto;
                width: fit-content;
            margin-right: auto;
                margin-left: auto;
        ">[[File:Border-fanciness-top.png|link=]]</div><!--
                margin-right: auto;
            ">[[File:Border-fanciness-top.png|link=]]</div>
        | }}<!--
          
          
         Marker
         Marker
     -->{{#if:{{{link|{{{name}}}}}}|{{!((}}{{{link|{{#replace:{{{name}}}|<br>|_}}}}}{{!}}}}<div style = "
     --><div style = "
             /* ~*Style*~ */
             /* ~*Style*~ */
            text-align: center;
             font-family: 'Roboto Slab', Georgia, Times, serif;
             font-family: 'Roboto Slab', Georgia, Times, serif;
            font-size: 0.85cqw;
             color: #fff;
             color: #fff;
             text-shadow: 0 0 .25cqw #000;
             text-shadow: 0 0 4px #000;
             background-color: rgb(111, 133, 134);
             background-color: rgb(111, 133, 134);
             padding: .2cqw .4cqw;
             padding: 4px 6px;
             border: .1cqw solid #fff;
             border: 1px solid #fff;
             border-radius: .2cqw;
             border-radius: 4px;
             box-shadow: 0 0 .3cqw 0 rgb(111, 133, 134);
             box-shadow: 0px 0px 5px 0px rgb(111, 133, 134);
         "
         "
         >{{{name|Unnamed Marker}}}</div>{{#if:{{{link|{{{name}}}}}}|{{))!}}}}<!--
        class = "childHover"
         >{{{name|Unnamed Marker}}}</div><!--
          
          
         Marker bottom flair
         Marker bottom flair
     -->{{#switch:{{{flair|fallenlondon}}}
     --><div style = "
        |fallenlondon =
            image-rendering: pixelated;
            <div style = "
           
                image-rendering: pixelated;
            /* Move flair up a tad */
               
            position: relative;
                /* Move flair up a tad */
            bottom: 7px;
                position: relative;
           
                bottom: 7px;
            /* Center it */
               
            width: fit-content;
                /* Center it */
            margin-left: auto;
                width: fit-content;
            margin-right: auto;
                margin-left: auto;
        ">[[File:Border-fanciness-bottom.png|link=]]</div><!--
                margin-right: auto;
            ">[[File:Border-fanciness-bottom.png|link=]]</div>
        | }}<!--
          
          
         Tooltip
         Tooltip
     --><div class = "tooltip" style = "
     --><div class = "tooltip" style = "
             {{#if:{{{1|{{{image|{{{header|}}}}}}}}}||display: none;}} <!-- Hide tooltip if it has no contents -->
             width: 150%; /* Width of tooltip in relation to marker */
           
            <!-- If the content contains text, use a set width. Otherwise, fit-content -->
            {{#if:{{{1|}}}
                |width: 25cqw;
                |width: fit-content;
            }}
           
             transform:
             transform:
                 translate(calc(-16.66cqw * {{{scale|0.75}}}), calc(-200% * (0.85 - {{{scale|0.75}}})))
                 translateX(-25%) /* Should be width/2 - 100%, centers tooltip */
                 scale({{#expr:1/{{{scale|0.75}}}}}) /* Undo scaling applied by marker to tooltip */
                 scale({{#expr:1/{{{scale|0.75}}}}}) /* Undo scaling applied by marker to tooltip */
             ;
             ;
Line 96: Line 77:
             text-align: left;
             text-align: left;
             padding: 10px;
             padding: 10px;
         "><!--
         ">
    -->{{#if:{{{header|}}}|[[File:{{{header|}}}]]}}<!--
    -->{{#if:{{{image|}}}|<div style = "width: 12.5cqw; clear: right; float: right">[[File:{{{image|}}}|right]]</div>}}<!--
    -->{{{1|}}}<!--
    --></div><!--
--></div>
</div>
</includeonly>
<noinclude>{{documentation}}</noinclude>
Please note that all contributions to The Fifth City Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see The Fifth City Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)
Preview page with this template