@c8y/style
Version:
Styles for Cumulocity IoT applications
328 lines (279 loc) • 6.7 kB
text/less
@import "../../mixins/_vendor-prefixes.less";
// Override marker paths with correct relative paths for this file location
@critical-marker: '../../../img/critical-marker-icon.png';
@major-marker: '../../../img/major-marker-icon.png';
@minor-marker: '../../../img/minor-marker-icon.png';
@warning-marker: '../../../img/warning-marker-icon.png';
@normal-marker: '../../../img/normal-marker-icon.png';
// Keyframe animation for touch warning overlay (defined once globally)
@keyframes leaflet-touch-warning-fadein {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
// Shared mixin for leaflet touch warning overlay
.leaflet-touch-warning-overlay() {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 461;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
align-items: center;
justify-content: center;
padding: 15px;
background: rgba(0, 0, 0, 0.5);
color: @component-background-default;
animation: leaflet-touch-warning-fadein 0.8s backwards;
pointer-events: none;
}
.c8y-map {
position: relative;
z-index: 11;
height: 100%;
> div {
height: 100%;
&:after {
.leaflet-touch-warning-overlay();
}
.touch-warning:after {
animation: leaflet-touch-warning-fadein 0.8s forwards;
}
&.touch-warning:after {
content: attr(data-touch-warning-content);
}
.leaflet-div-icon {
background: none;
border: 0;
}
.c8y-map-marker-icon > div {
> i, > span {
position: absolute;
left: 50%;
top: 12px;
padding: 2px;
width: 20px;
text-align: center;
border-radius: 50%;
transform: translate(-50%, 0);
font-size: 14px;
background-color: @component-background-default;
&.more-than-99 {
font-size: 10px;
line-height: 16px;
height: 20px;
}
}
.popover .arrow{
transform-origin: top center;
scale: .6;
}
font-size: 50px;
position: absolute;
left: 50%;
bottom: 0;
transform: translate(-50%, 0);
}
.c8y-map-marker-count {
border-radius: 50%;
width: 50px;
height: 50px;
line-height: 50px;
text-align: center;
background-color: @component-background-default;
border: 2px solid @component-border-color;
cursor: pointer;
opacity: 0.8;
transition: opacity 0.3s;
&:before {
content: attr(data-count);
}
&:hover {
opacity: 1;
outline: 3px solid var(--navigator-border-active, var(--c8y-navigator-border-selected));
outline-offset: -3px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
display: inline-block;
font-family: dlt-c8y-icons ;
font-style: normal;
font-variant: normal;
font-weight: 400;
text-transform: none;
&:before {
content: '\eaef';
}
}
}
}
}
.c8y-map-status {
position: absolute;
top: 16px;
right: 16px;
z-index: 210;
c8y-global-context-widget-wrapper{
display: contents;
form{
display:contents;
}
c8y-auto-refresh-control{
min-width: 0;
}
.toggle-countdown{
padding:0;
width: 30px;
min-width: 0;
}
.btn{
padding: 0;
}
}
}
.c8y-map-internal {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
&:after {
.leaflet-touch-warning-overlay();
}
.touch-warning:after {
animation: leaflet-touch-warning-fadein 0.8s forwards;
}
&.touch-warning:after {
content: attr(data-touch-warning-content);
}
}
.container-fluid .fullpage-map {
position: relative;
margin: -24px -24px 0;
min-height: calc(~'100vh - @{headerHeight}');
.leaflet-top.leaflet-left {
top: 50px;
}
.leaflet-top.leaflet-right {
left: auto;
padding-right: 0;
padding-left: 30px;
min-height: 50px;
background-color: transparent;
box-shadow: none;
> .leaflet-control {
.btn-link {
overflow: hidden;
padding: 8px 10px;
width: 36px;
height: 36px;
border-radius: 4px;
background-color: @component-background-default;
box-shadow: 0 1px 2px 1px @component-border-color ;
color: @component-color-default;
i {
margin-right: 20px;
}
}
}
}
.legend {
padding: 5px;
border-radius: 5px;
background-color: rgba(255, 255, 255, 0.8);
font-size: 12px;
}
.legend > * {
margin-bottom: 1px;
}
.legend i {
float: left;
width: 18px;
height: 18px;
background-size: contain;
background-repeat: no-repeat;
&.critical {
background-image: url(@critical-marker);
}
&.major {
background-image: url(@major-marker);
}
&.minor {
background-image: url(@minor-marker);
}
&.warning {
background-image: url(@warning-marker);
}
&.normal {
background-image: url(@normal-marker);
}
}
.leaflet-marker-icon {
&.blink {
.animation(blink 0.5s ease-in-out infinite alternate);
}
}
.leaflet-top.leaflet-left {
top: 0;
}
}
// Tracker selection added here just for reference
.tracker-selection {
.radio + .radio {
margin-top: 0;
}
.radio label {
display: block;
margin-bottom: 10px;
padding: 30px 22px;
background-color: white;
color: @gray-40;
box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
input[type='radio'] {
position: absolute;
top: 50%;
left: 21px;
margin: 0;
margin-top: -8px;
&:checked ~ span {
color: var(--brand-primary, var(--c8y-brand-primary));
&:before {
position: absolute;
top: 50%;
left: 17px;
margin-top: -11px;
width: 22px;
height: 22px;
border: 3px solid var(--brand-primary, var(--c8y-brand-primary));
border-radius: 50%;
background: var(--brand-primary, var(--c8y-brand-primary));
content: '';
}
&:after {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 2px solid var(--brand-primary, var(--c8y-brand-primary));
content: '';
}
}
+ span {
display: inline-block;
margin-left: 110px;
}
}
&[data-tracker-model] {
position: relative;
background-position: 35px;
background-size: contain;
background-repeat: no-repeat;
}
}
}