<button class="hotspot" aria-controls="hotspot" aria-expanded="true" style="left: 50%; top: 50%;">
<div class="hotspot__inner">
<div class="hotspot__label">Hotspot</div>
<div class="hotspot__dot">
<span class="hotspot__icon hotspot__icon--plus">
<svg class="icon " focusable="false">
<use xlink:href="#icon-plus"></use>
</svg>
</span>
<span class="hotspot__icon hotspot__icon--minus">
<svg class="icon " focusable="false">
<use xlink:href="#icon-minus"></use>
</svg>
</span>
</div>
</div>
</button>
<button class="hotspot" aria-controls="{{ id }}" aria-expanded="{{expanded}}" style="left: {{ coords.x }}; top: {{ coords.y }};">
<div class="hotspot__inner">
<div class="hotspot__label">{{ label }}</div>
<div class="hotspot__dot">
<span class="hotspot__icon hotspot__icon--plus">
{{> @icon id="plus"}}
</span>
<span class="hotspot__icon hotspot__icon--minus">
{{> @icon id="minus"}}
</span>
</div>
</div>
</button>
{
"id": "hotspot",
"label": "Hotspot",
"expanded": true,
"coords": {
"x": "50%",
"y": "50%"
},
"theme": "air-academy-dusk"
}
.hotspot {
cursor: pointer;
position: absolute;
transform: translateX(-50%) translateY(-50%);
@include breakpoint($l) {
transform: translateX(-50%) translateY(calc(-50% - #{size(2.375)}));
}
}
.hotspot__label {
display: none;
color: $color-green-dark;
padding: size(1.75) size(2.5);
border: 2px solid $color-green-dark;
border-radius: 25px;
background-color: $color-white;
font-weight: $font-weight-bold;
@include color-theme {
color: $arg-theme-color;
border-color: $arg-theme-color;
}
@include breakpoint($l) {
display: block;
}
.hotspot[aria-expanded='true'] & {
background-color: $color-green-pale;
@include color-theme {
background-color: rgba($arg-theme-color, 0.15);
@if $arg-theme-color ==$color-swegon-blue {
background-color: $color-swegon-blue-2;
}
@if $arg-theme-color ==$color-blue-2 {
background-color: $color-blue-3;
border-color: $arg-theme-color;
}
@if $arg-theme-color ==$color-red {
background-color: $color-red-light;
border-color: $arg-theme-color;
}
}
}
}
.hotspot__dot {
position: relative;
background-color: $color-green-pale;
border: 2px solid $color-green-dark;
border-radius: 100%;
width: size(3);
height: size(3);
@include color-theme {
background-color: rgba($arg-theme-color, 0.15);
border-color: $arg-theme-color;
@if $arg-theme-color ==$color-swegon-blue {
background-color: $color-swegon-blue-2;
border-color: $arg-theme-color;
}
@if $arg-theme-color ==$color-blue-2 {
background-color: $color-blue-3;
border-color: $arg-theme-color;
}
@if $arg-theme-color ==$color-red {
background-color: $color-red-light;
border-color: $arg-theme-color;
}
}
@include breakpoint($l) {
margin: size(-1.25) auto 0;
width: size(4);
height: size(4);
}
}
.hotspot__icon {
&--minus {
display: none;
background-color: $color-green-dark;
width: size(2);
height: size(2);
border-radius: 100%;
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
@include color-theme {
background-color: $arg-theme-color;
}
@include breakpoint($l) {
width: size(2.5);
height: size(2.5);
}
}
.hotspot[aria-expanded='true'] & {
&--plus {
display: none;
}
&--minus {
display: block;
}
}
}
.hotspot__icon svg {
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
fill: $color-green-dark;
width: 60%;
height: 60%;
@include color-theme {
fill: $arg-theme-color;
}
}
.hotspot__icon--minus svg {
fill: $color-white;
@include color-theme {
@if $arg-theme-color ==$color-swegon-blue {
fill: $color-swegon-blue-2;
}
@if $arg-theme-color ==$color-blue-2 OR $arg-theme-color ==$color-red {
fill: white;
}
}
}
No notes defined.