Farmbot-Web-App/frontend/css/farm_designer/farm_designer.scss

726 lines
13 KiB
SCSS

.farm-designer {
position: relative;
height: 100vh;
overflow-y: hidden;
.garden-map-legend {
@media screen and (max-width: 450px) {
&.panel-open {
display: none;
}
&.short-panel {
top: 35rem;
}
&.panel-closed {
top: 15rem;
}
}
}
}
.farm-designer-map {
display: inline-block;
min-width: 100%;
padding: 16rem 2rem 2rem 2rem; // at zoom = 1.0: 160px 20px 20px 20px
height: 100%;
overflow: auto;
&.panel-open {
padding: 11rem 2rem 2rem 31.8rem; // at zoom = 1.0: 110px 20px 20px 318px
}
&.short-panel {
padding: 35rem 2rem 2rem 2rem; // at zoom = 1.0: 350px 20px 20px 20px
}
transition: 0.2s ease;
&::-webkit-scrollbar {
display: none;
}
}
.drop-area {
svg {
width: 100%;
height: 100%;
overflow: visible;
text {
pointer-events: none;
}
text::selection {
background: none;
}
}
}
.drop-area-svg {
width: 100%;
height: 100%;
overflow: visible;
}
.drop-area-background a {
cursor: default !important;
}
.crop-drag-info-image {
width: 100% !important;
}
.plant-catalog-image {
width: 100%;
background-position: center center !important;
background-size: 158% !important;
background-color: $translucent;
height: 12rem;
}
.crop-search-result-wrapper {
max-height: calc(100vh - 19rem);
overflow-y: auto;
overflow-x: hidden;
margin-right: -10px;
padding-bottom: 5rem;
.plant-catalog-tile {
position: relative;
cursor: pointer;
&:nth-child(4n),
&:nth-child(4n-1) {
margin-bottom: 2rem;
}
&:nth-child(4n-2),
&:nth-child(4n-3) {
margin-bottom: 2rem;
}
label {
position: absolute;
left: 15px;
bottom: -5px;
right: 15px;
margin-top: 0 !important;
padding: 0.4rem 0.6rem 0.2rem;
background: rgba(0, 0, 0, 0.5);
color: $white;
font-size: 1.2rem !important;
}
}
}
.crop-info-overlay {
display: flex;
position: relative;
bottom: 3rem;
z-index: 2;
background-color: $dark_gray;
font-style: italic;
color: $off_white;
justify-content: center;
/* align horizontal */
align-items: center;
/* align vertical */
height: 3rem;
width: 100%;
}
.thin-search-wrapper {
width: 100%;
.text-input-wrapper {
position: relative;
margin: 1rem;
border-bottom: 1px solid $dark_gray;
&:before,
&:after {
content: "";
position: absolute;
bottom: 0;
background: $dark_gray;
width: 1px;
height: 3px;
}
&:before {
left: 0;
}
&:after {
right: 0;
}
i {
font-size: 1.5rem;
}
.fa-search {
position: absolute;
top: 0.8rem;
left: 1rem;
cursor: default !important;
}
}
input {
background: transparent;
box-shadow: none !important;
padding-left: 3rem !important;
font-size: 1.4rem !important;
&:active,
&:focus {
background: transparent !important;
}
&::-webkit-input-placeholder {
color: $placeholder_gray;
}
}
}
.panel-content {
.select-results-container {
top: 4rem;
margin-bottom: 12rem;
max-height: none;
}
.select-result {
padding: 0;
margin-bottom: 1rem;
background: transparent;
border-bottom: none;
transition: all 0.4s ease;
&:last-child {
margin-bottom: 14rem;
}
&:hover {
background: rgba(0, 0, 0, 0.1);
transition: all 0.2s ease;
}
}
%panel-item-base {
text-align: right;
font-size: 1rem;
padding-right: 1rem;
line-height: 3rem;
float: right;
}
.plant-search-item,
.group-search-item {
cursor: pointer;
padding: 0.5rem 1rem;
img {
margin-right: 0.5rem;
height: 3rem;
width: 3rem;
}
&.quick-del {
&:hover {
background: lighten($red, 10%) !important;
&:after {
content: "x";
margin-left: 1rem;
color: $darkest_red;
font-weight: bold;
}
}
}
}
.plant-search-item-age {
@extend %panel-item-base;
}
.group-item-count {
@extend %panel-item-base;
padding-top: 0.6rem;
line-height: 1rem;
}
.plant-search-item-name {
display: inline-block;
vertical-align: middle;
white-space: nowrap;
width: 8em;
overflow: hidden;
text-overflow: ellipsis;
margin-left: 1rem;
}
.weed-search-item,
.point-search-item {
cursor: pointer;
padding: 0.5rem 1rem;
.saucer {
display: inline-block;
height: 3rem;
width: 3rem;
vertical-align: middle;
margin-right: 0.25rem;
}
}
.weed-search-item-info,
.point-search-item-info {
text-align: right;
font-size: 1rem;
padding-right: 1rem;
line-height: 3rem;
float: right;
}
.weed-search-item-name,
.point-search-item-name {
display: inline-block;
vertical-align: middle;
white-space: nowrap;
width: 40%;
overflow: hidden;
text-overflow: ellipsis;
margin-left: 1.25rem;
}
.tool-search-item,
.tool-slot-search-item {
line-height: 4rem;
cursor: pointer;
.row {
margin-left: 0;
margin-right: 0;
}
.tool-slot-search-item-name {
margin-left: -1rem;
}
p {
font-size: 1rem;
line-height: 4rem;
&.tool-status,
&.tool-slot-position {
float: right;
}
}
svg {
vertical-align: middle;
}
.tool-slot-position-info {
padding: 0;
padding-right: 1.75rem;
}
}
}
.thin-search {
.spinner-container {
position: absolute;
top: 0;
right: 0;
width: 2rem;
height: 2rem;
padding: 0;
margin-right: 1rem;
}
}
.hovered-plant-copy {
cursor: pointer;
transform-origin: center;
transform-box: fill-box;
}
.plant-link-wrapper {
&.is-chosen-true.is-editing-true {
cursor: -webkit-grab !important;
&:active {
cursor: -webkit-grabbing !important;
}
}
}
.plant-indicator.is-chosen-true {
&.animate {
animation: plant-selection-pop 0.2s 1 cubic-bezier(0, 0, 0, 0.9), pulse-and-rotate 4s 0.2s infinite linear;
}
transform-origin: center;
transform-box: fill-box;
}
.map-point {
cursor: pointer !important;
stroke-width: 2;
stroke-opacity: 0.3;
fill-opacity: 0.1;
}
.map-weed {
cursor: pointer !important;
}
.weed-image,
.plant-image {
transform-origin: bottom;
transform-box: fill-box;
&.animate {
animation: plant-growth 0.25s cubic-bezier(0, 0, 0, 1.4);
}
}
.bug {
z-index: 10;
transform-origin: bottom;
transform-box: fill-box;
&.animate {
animation: plant-growth 0.25s cubic-bezier(0, 0, 0, 1.4);
}
&.dead {
z-index: 5;
pointer-events: none;
}
}
.soil-cloud {
animation: soil-poof 0.5s cubic-bezier(0, 0, 0, 1);
transform-origin: center;
transform-box: fill-box;
}
.spread {
transform-origin: center;
transform-box: fill-box;
pointer-events: none;
&.animate {
animation: spread-pop 0.2s cubic-bezier(0, 0, 0, 1);
}
}
.zones-layer {
[id*="zones-1D-"] {
stroke: $black;
stroke-width: 5;
}
[id*="zones-"] {
opacity: 0.1;
&.current {
opacity: 0.25;
fill: $white;
stroke: $white;
}
&:hover {
opacity: 0.15;
}
}
}
.virtual-bot-trail,
.virtual-peripherals {
pointer-events: none;
}
.water-spray {
&.animate {
animation-duration: 3s;
animation-iteration-count: infinite;
animation-name: water-spray-animation;
transform-origin: center;
transform-box: fill-box;
opacity: 0;
}
}
.delay-1 {
animation-delay: 1s;
}
.delay-2 {
animation-delay: 2s;
}
@keyframes water-spray-animation {
0% {
transform: scale(0.7) rotate(0deg);
opacity: 0;
}
50% {
opacity: 1;
}
100% {
transform: scale(1.1) rotate(10deg);
opacity: 0;
}
}
.vacuum {
&.animate {
animation-duration: 3s;
animation-iteration-count: infinite;
animation-name: vacuum-animation;
transform-origin: center;
transform-box: fill-box;
opacity: 0;
}
}
@keyframes vacuum-animation {
0% {
transform: scale(1);
opacity: 0;
}
100% {
transform: scale(0);
opacity: 1;
}
}
.saved-garden-indicator {
position: fixed;
top: 80px;
left: 50%;
z-index: 3;
padding: 2rem;
background: rgba(255, 255, 255, .75);
border-radius: 5px;
box-shadow: 0px 1px 4px #555;
text-align: center;
label {
display: block;
}
button {
margin: 0.5rem;
float: unset;
}
}
.garden-snapshot {
button {
&.pseudo-disabled {
cursor: not-allowed;
}
}
}
.saved-garden-list {
.saved-garden-search-item {
padding: 0.25rem;
button {
margin-bottom: 1rem;
}
.saved-garden-info div {
height: 3rem;
line-height: 3rem;
cursor: pointer;
padding-right: 0;
span {
margin: 0;
pointer-events: none;
margin-left: 1rem;
}
p {
float: right;
line-height: 3rem;
text-align: center;
margin-right: 1rem;
}
}
}
}
.garden-map-legend {
position: fixed;
top: 110px;
right: -120px;
z-index: 3;
transition: all 0.4s ease;
box-shadow: 0px 1px 4px #555;
max-width: 120px;
&.active {
transform: translateX(-140px);
}
.content {
display: flex;
flex-direction: column;
flex-wrap: wrap;
background: rgba(255, 255, 255, .75);
padding: 10px;
border-radius: 5px;
>*+* {
margin-top: 1rem;
}
label {
display: flex;
flex-direction: column;
align-items: center;
}
}
.toggle-buttons {
display: flex;
flex-direction: column;
align-items: center;
fieldset {
width: 100%;
}
label {
margin-bottom: 0;
}
button {
float: none;
margin-bottom: 0.5rem;
margin-left: 2rem;
}
}
.caret-menu-button {
display: inline;
margin-left: 0.25rem;
font-weight: bold;
font-size: medium;
cursor: pointer;
}
.more-bugs,
.move-to-mode {
button {
margin-right: 1rem;
}
p {
text-align: center;
padding-top: 2rem;
}
}
.menu-pullout {
position: absolute;
left: -4.5rem;
color: $white;
cursor: pointer;
transition: all 0.4s ease;
text-shadow: 0px 1px 1px #555;
&.active {
left: -4.5rem;
transform: rotate(180deg);
text-shadow: 1px 0px 0px #555;
&:hover {
left: -4.5rem;
span {
opacity: 0;
}
}
}
&:hover {
left: -5rem;
span {
opacity: 1;
}
}
span {
position: absolute;
top: 0.6rem;
left: -4.6rem;
transition-delay: 0.6s;
transition: all 0.4s ease;
opacity: 0;
}
}
.map-rotate-button {
text-align: center;
.fb-button {
float: none;
}
}
}
.farmbot-origin {
margin: auto;
width: 120px;
.quadrants {
display: flex;
flex-wrap: wrap;
border: 1px solid $dark_gray;
}
.quadrant {
display: inline-block;
position: relative;
background-image: linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px), linear-gradient(rgba(0, 0, 0, 0.05) 2px, transparent 2px), linear-gradient(90deg, rgba(0, 0, 0, 0.05) 2px, transparent 2px);
background-size: 4px 4px, 4px 4px, 100px 100px, 100px 100px;
cursor: pointer;
border: 1px solid $dark_gray;
width: 50%;
height: 24px;
transition: all 0.2s ease-in-out;
&:hover {
background-color: rgba(0, 0, 0, 0.1);
}
&.selected {
box-shadow: inset 0 0 8px $dark_gray;
} // Quadrant 1
&:nth-child(2) {
&:before {
top: 0;
right: 0;
}
&:after {
top: 8px;
right: 16px;
}
} // Quadrant 2
&:nth-child(1) {
&:before {
top: 0;
left: 0;
}
&:after {
top: 8px;
left: 16px;
}
} // Quadrant 3
&:nth-child(3) {
&:before {
left: 0;
bottom: 0;
}
&:after {
left: 16px;
bottom: 8px;
}
} // Quadrant 4
&:nth-child(4) {
&:before {
bottom: 0;
right: 0;
}
&:after {
bottom: 8px;
right: 16px;
}
}
&:before {
content: "";
position: absolute;
background: $black;
width: 8px;
height: 8px;
border-radius: 50%;
}
&:after {
content: "";
position: absolute;
background: $green;
width: 8px;
height: 8px;
border-radius: 50%;
}
}
}
.map-points-submenu {
display: flex;
flex-direction: column;
align-items: center;
fieldset {
display: flex;
margin-top: 1rem;
flex-direction: column;
align-items: center;
}
label {
margin-top: 0.75rem;
}
button {
margin: auto;
}
}
.image-filter-menu {
width: 32rem;
th {
text-align: center;
}
.bp3-slider {
margin-left: 3rem;
margin-top: 1rem;
width: 25rem;
}
.bp3-slider-label {
white-space: nowrap;
text-align: center;
}
input {
background: $white;
}
}