mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-06-25 19:46:52 +00:00
471 lines
9.0 KiB
SCSS
471 lines
9.0 KiB
SCSS
#components-page {
|
|
.filter-button-group {
|
|
label {
|
|
font-size: .75rem;
|
|
font-weight: 500;
|
|
letter-spacing: .005em;
|
|
color: $gray;
|
|
padding-top: 8px;
|
|
text-transform: uppercase;
|
|
}
|
|
}
|
|
|
|
.component-search {
|
|
margin-bottom: 24px;
|
|
min-height: 80px;
|
|
|
|
input {
|
|
width: 100%;
|
|
padding: 10px;
|
|
background-color: #fefefe;
|
|
border-radius: 8px;
|
|
border: 1px solid;
|
|
border-color: #7c7c7c #c3c3c3 #ddd;
|
|
}
|
|
}
|
|
|
|
.grid-filters {
|
|
@media only screen and (min-width: $desk-start) {
|
|
display: flex;
|
|
}
|
|
}
|
|
|
|
.integration-filter-radio {
|
|
display: flex;
|
|
border: none;
|
|
padding: 0;
|
|
grid-gap: 10px;
|
|
}
|
|
|
|
.filter-button {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 0;
|
|
width: fit-content;
|
|
font-size: 1rem;
|
|
box-shadow: none;
|
|
background-color: $blueDark;
|
|
color: white;
|
|
border-radius: 24px;
|
|
|
|
input {
|
|
appearance: none;
|
|
-webkit-appearance: none;
|
|
-moz-appearance: none;
|
|
padding-left: 16px;
|
|
display: block;
|
|
margin-left: 10px;
|
|
flex-shrink: 0;
|
|
height: 1rem;
|
|
width: 1rem;
|
|
border-radius: 100%;
|
|
border-color: transparent;
|
|
background-color: white;
|
|
|
|
&:checked {
|
|
background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22%23007fa8%22%20transform%3D%22rotate(90)%22%3E%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%223%22%2F%3E%3C%2Fsvg%3E");
|
|
}
|
|
}
|
|
|
|
label {
|
|
display: block;
|
|
width: 100%;
|
|
padding: 4px 16px 4px 10px;
|
|
}
|
|
}
|
|
|
|
.integration-filter.integration-filter-select {
|
|
position: relative;
|
|
|
|
&::after {
|
|
content: " ";
|
|
position: absolute;
|
|
top: 50%;
|
|
margin-top: 2px;
|
|
right: 8px;
|
|
width: 0;
|
|
height: 0;
|
|
border-left: 5px solid transparent;
|
|
border-right: 5px solid transparent;
|
|
border-top: 5px solid black;
|
|
}
|
|
|
|
.ha_category {
|
|
-webkit-appearance: none;
|
|
-moz-appearance: none;
|
|
appearance: none;
|
|
color: #222;
|
|
width: 100%;
|
|
margin-bottom: 15px;
|
|
text-align-last: center;
|
|
font-size: 16px;
|
|
line-height: 24px;
|
|
border: 2px solid $blueDark;
|
|
border-top-right-radius: 0px;
|
|
border-top-left-radius: 0px;
|
|
border-bottom-right-radius: 5px;
|
|
border-bottom-left-radius: 5px;
|
|
border-top: 0;
|
|
position: relative;
|
|
top: -2px;
|
|
padding: 5px 5px 2px;
|
|
|
|
&:focus-visible {
|
|
outline: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
.filter-title {
|
|
background: $blueDark;
|
|
color: white;
|
|
text-align: center;
|
|
border-top-right-radius: 5px;
|
|
border-top-left-radius: 5px;
|
|
padding: 5px;
|
|
margin-top: 0;
|
|
margin-bottom: -2px;
|
|
text-transform: capitalize;
|
|
font-size: 18px;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.active-filter {
|
|
margin: 10px 5px 0px 0px;
|
|
padding: 5px 10px;
|
|
min-width: 100px;
|
|
background-color: $blueDark;
|
|
border-radius: 28px;
|
|
border: none;
|
|
color: white;
|
|
font-size: 14px;
|
|
letter-spacing: 0.5px;
|
|
text-transform: capitalize;
|
|
line-height: 18px;
|
|
|
|
span {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
iconify-icon {
|
|
display: inline-block;
|
|
margin-left: 5px;
|
|
}
|
|
}
|
|
|
|
select {
|
|
font-family: $sans-serif;
|
|
border: 0;
|
|
background-color: $grayLighter;
|
|
border-radius: 16px;
|
|
padding: 4px 16px;
|
|
}
|
|
.category_select {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
|
|
// styles for the cards
|
|
.hass-option-cards {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
|
|
gap: 24px;
|
|
|
|
div.alert, p.alert-content {
|
|
width: 100%;
|
|
}
|
|
|
|
div.alert {
|
|
text-align: center;
|
|
}
|
|
|
|
.option-card {
|
|
flex: 0 0 auto;
|
|
aspect-ratio: 1;
|
|
display: inline-block;
|
|
background-color: #f8f8f8;
|
|
border-radius: 8px;
|
|
border: 1px solid rgba(0, 0, 0, .12);
|
|
padding: 8px;
|
|
text-align: center;
|
|
text-decoration: none;
|
|
align-content: center;
|
|
transition: box-shadow .33s;
|
|
|
|
.img-container {
|
|
height: 64px;
|
|
margin: 12px 16px;
|
|
font: 0/0 a;
|
|
border-radius: 0;
|
|
|
|
&:before {
|
|
/* create a full-height inline block pseudo=element */
|
|
content: " ";
|
|
display: inline-block;
|
|
vertical-align: middle; /* vertical alignment of the inline element */
|
|
height: 100%;
|
|
}
|
|
|
|
img {
|
|
max-width: 100%;
|
|
max-height: 64px;
|
|
box-shadow: none;
|
|
border: none;
|
|
border-radius: 0;
|
|
vertical-align: middle;
|
|
}
|
|
}
|
|
|
|
.title {
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
|
|
text-decoration: none;
|
|
font-size: 16px;
|
|
color: #000;
|
|
line-height: 1.25em;
|
|
height: 40px;
|
|
margin-top: 20px;
|
|
padding: 0 8px;
|
|
}
|
|
}
|
|
|
|
// fade-in animation
|
|
&.show-items .option-card {
|
|
opacity: 0;
|
|
-webkit-animation: new-item-animation 0.2s linear forwards;
|
|
-o-animation: new-item-animation 0.2s linear forwards;
|
|
animation: new-item-animation 0.2s linear forwards;
|
|
}
|
|
|
|
// fade-out animation
|
|
&.remove-items .option-card {
|
|
-webkit-animation: removed-item-animation 0.2s
|
|
cubic-bezier(0.55, -0.04, 0.91, 0.94) forwards;
|
|
-o-animation: removed-item-animation 0.2s
|
|
cubic-bezier(0.55, -0.04, 0.91, 0.94) forwards;
|
|
animation: removed-item-animation 0.2s cubic-bezier(0.55, -0.04, 0.91, 0.94)
|
|
forwards;
|
|
}
|
|
}
|
|
|
|
a.option-card:hover {
|
|
z-index: 2;
|
|
box-shadow: 0 -2px 4px hsla(180, 100%, 50%, .05), 0 12px 24px hsla(207, 100%, 10%, 0.25);
|
|
}
|
|
|
|
@for $i from 1 through 40 {
|
|
.option-card:nth-child(#{$i}) {
|
|
animation-delay: #{$i * 0.025}s !important;
|
|
@media only screen and (max-width: $palm-end) {
|
|
animation-delay: #{$i * 0.05}s !important;
|
|
}
|
|
}
|
|
}
|
|
|
|
@media only screen and (max-width: $palm-end) {
|
|
.hass-option-cards {
|
|
grid-template-columns: 1fr;
|
|
|
|
.option-card {
|
|
width: 100% !important;
|
|
flex-direction: row;
|
|
display: flex;
|
|
align-items: center;
|
|
height: 80px;
|
|
|
|
.img-container {
|
|
margin: 8px;
|
|
|
|
img {
|
|
max-width: 48px;
|
|
max-height: 48px;
|
|
}
|
|
}
|
|
|
|
.title {
|
|
height: auto;
|
|
margin: 8px;
|
|
}
|
|
}
|
|
}
|
|
#components-page {
|
|
.hass-option-cards {
|
|
.option-card {
|
|
|
|
}
|
|
}
|
|
.category_select {
|
|
display: block;
|
|
}
|
|
.category_list {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
@media only screen and (max-width: $lap-end) {
|
|
#components-page {
|
|
.filter-button-group {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 16px;
|
|
align-items: flex-end;
|
|
gap: 8px;
|
|
|
|
&>div {
|
|
margin-right: 8px;
|
|
}
|
|
|
|
.btn {
|
|
display: inline-block;
|
|
margin-right: 4px;
|
|
margin-bottom: 0;
|
|
padding: 4px 16px;
|
|
font-size: 1rem;
|
|
background: $grayLighter;
|
|
box-shadow: none;
|
|
color: $link-color;
|
|
|
|
&.active {
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
}
|
|
.category_select {
|
|
display: block;
|
|
}
|
|
.category_list {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
@media only screen and (min-width: $desk-start) {
|
|
#components-page {
|
|
|
|
.filter-button-group {
|
|
.active {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.featured {
|
|
margin: 12px 0;
|
|
}
|
|
|
|
.version_select {
|
|
margin: 12px 0 12px 0;
|
|
}
|
|
|
|
.version_select > select {
|
|
width: 100%;
|
|
}
|
|
|
|
.btn {
|
|
font-size: 1rem;
|
|
display: block;
|
|
background: 0;
|
|
color: black;
|
|
box-shadow: none;
|
|
text-shadow: none;
|
|
padding: 4px 0;
|
|
border-radius: 0;
|
|
|
|
&.current {
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// animations for fade-in and fade-out effects of option-cards
|
|
@keyframes new-item-animation {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
-webkit-transform: scale(1);
|
|
-ms-transform: scale(1);
|
|
-o-transform: scale(1);
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
@-webkit-keyframes new-item-animation {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
-webkit-transform: scale(1);
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
@-o-keyframes new-item-animation {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
-o-transform: scale(1);
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
// space blocker animation
|
|
@keyframes openspace {
|
|
to {
|
|
height: auto;
|
|
}
|
|
}
|
|
|
|
@-webkit-keyframes openspace {
|
|
to {
|
|
height: auto;
|
|
}
|
|
}
|
|
@-o-keyframes openspace {
|
|
to {
|
|
height: auto;
|
|
}
|
|
}
|
|
|
|
// removal animation
|
|
@keyframes removed-item-animation {
|
|
from {
|
|
opacity: 1;
|
|
-webkit-transform: scale(1);
|
|
-ms-transform: scale(1);
|
|
-o-transform: scale(1);
|
|
transform: scale(1);
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
@-webkit-keyframes removed-item-animation {
|
|
from {
|
|
opacity: 1;
|
|
-webkit-transform: scale(1);
|
|
transform: scale(1);
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
@-o-keyframes removed-item-animation {
|
|
from {
|
|
opacity: 1;
|
|
-o-transform: scale(1);
|
|
transform: scale(1);
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
} |