easy-weather-npm
Version:
A JavaScript plugin for getting Weather information
660 lines (643 loc) • 16.7 kB
CSS
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&display=swap");
body, html {
margin: 0;
padding: 0;
}
.ew-weather {
font-family: "Open Sans", sans-serif;
font-size: 14px;
}
.ew-weather svg {
max-width: 100%;
display: inline-block;
width: 40px;
}
.ew-weather.ew-content {
line-height: 40px;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
}
.ew-weather.ew-flat-icon .ew-mist {
color: #D1D2D4;
}
.ew-weather.ew-flat-icon .ew-moon {
color: #E6E7E8;
}
.ew-weather.ew-flat-icon .ew-cloud {
color: #00AEEF;
}
.ew-weather.ew-flat-icon .ew-snow {
color: #4DC7E5;
}
.ew-weather.ew-flat-icon .ew-rain {
color: #3D77BC;
}
.ew-weather.ew-flat-icon .ew-light {
color: #F3A81D;
}
.ew-weather.ew-flat-icon .ew-sun, .ew-weather.ew-flat-icon .ew-sun-ray {
color: #F1A81E;
}
.ew-weather .ew-tab {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
margin: 0 -8px 16px;
}
.ew-weather .ew-tab .ew-tab__link {
text-decoration: none;
color: inherit;
padding-left: 8px;
padding-right: 8px;
font-weight: 600;
text-transform: uppercase;
}
.ew-weather .ew-tab .ew-tab__link:not(.active) {
opacity: 0.4;
}
.ew-weather .ew-tab-data {
display: none;
}
.ew-weather .ew-tab-data.show {
display: block;
}
.ew-temp-data::-webkit-scrollbar {
height: 4px;
}
.ew-temp-data::-webkit-scrollbar-thumb {
outline: none;
border-radius: 10px;
}
.ew-card,
.ew-full,
.ew-classic .ew-classic__body {
background-size: cover;
background-position: left top;
background-repeat: no-repeat;
background-attachment: fixed;
position: relative;
}
.ew-card:before,
.ew-full:before,
.ew-classic .ew-classic__body:before {
content: "";
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
z-index: 1;
}
.ew-card,
.ew-full {
color: #FFFFFF;
}
.ew-card.ew-mist,
.ew-full.ew-mist {
background-image: url(../images/background/large/mist.jpg);
}
.ew-card.ew-storm,
.ew-full.ew-storm {
background-image: url(../images/background/large/storm.jpg);
}
.ew-card.ew-day-clear,
.ew-full.ew-day-clear {
background-image: url(../images/background/large/day-clear.jpg);
}
.ew-card.ew-day-cloud,
.ew-full.ew-day-cloud {
background-image: url(../images/background/large/day-cloud.jpg);
}
.ew-card.ew-day-rain,
.ew-full.ew-day-rain {
background-image: url(../images/background/large/rain.jpg);
}
.ew-card.ew-day-snow,
.ew-full.ew-day-snow {
background-image: url(../images/background/large/snow.jpg);
}
.ew-card.ew-night-clear,
.ew-full.ew-night-clear {
background-image: url(../images/background/large/night-clear.jpg);
}
.ew-card.ew-night-cloud,
.ew-full.ew-night-cloud {
background-image: url(../images/background/large/night-cloud.jpg);
}
.ew-card.ew-night-rain,
.ew-full.ew-night-rain {
background-image: url(../images/background/large/rain.jpg);
}
.ew-card.ew-night-snow,
.ew-full.ew-night-snow {
background-image: url(../images/background/large/snow.jpg);
}
.ew-card .ew-main-icon .ew-temp,
.ew-classic .ew-classic__body .ew-main-icon .ew-temp {
font-size: 24px;
font-weight: 500;
}
.ew-card .ew-temp-data,
.ew-classic .ew-temp-data,
.ew-minimal .ew-temp-data {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
overflow: auto;
padding-bottom: 8px;
}
.ew-card .ew-temp-data .ew-temp-data__day,
.ew-classic .ew-temp-data .ew-temp-data__day,
.ew-minimal .ew-temp-data .ew-temp-data__day {
text-transform: uppercase;
}
.ew-card .ew-temp-data .ew-temp-data__temp,
.ew-classic .ew-temp-data .ew-temp-data__temp,
.ew-minimal .ew-temp-data .ew-temp-data__temp {
font-weight: 600;
}
.ew-card .ew-temp-data .ew-temp-data__icon,
.ew-classic .ew-temp-data .ew-temp-data__icon,
.ew-minimal .ew-temp-data .ew-temp-data__icon {
height: 32px;
margin-top: 8px;
margin-bottom: 8px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.ew-card .ew-temp-data .ew-temp-data__icon svg,
.ew-classic .ew-temp-data .ew-temp-data__icon svg,
.ew-minimal .ew-temp-data .ew-temp-data__icon svg {
max-height: 100%;
}
.ew-card .ew-temp-data .ew-temp-data__item,
.ew-classic .ew-temp-data .ew-temp-data__item,
.ew-minimal .ew-temp-data .ew-temp-data__item {
-webkit-box-flex: 0;
-ms-flex: 0 0 20%;
flex: 0 0 20%;
max-width: 20%;
font-size: 12px;
text-align: center;
}
.ew-card .ew-temp-data .ew-temp-data__card > *,
.ew-classic .ew-temp-data .ew-temp-data__card > *,
.ew-minimal .ew-temp-data .ew-temp-data__card > * {
display: block;
}
.ew-card .ew-date,
.ew-classic .ew-date {
font-weight: 700;
}
.ew-card .ew-temp-detail,
.ew-classic .ew-temp-detail,
.ew-compact .ew-temp-detail {
margin-bottom: -16px;
}
.ew-card .ew-temp-detail .ew-temp-detail__item,
.ew-card .ew-temp-list .ew-temp-list__item,
.ew-classic .ew-temp-detail .ew-temp-detail__item,
.ew-classic .ew-temp-list .ew-temp-list__item,
.ew-minimal .ew-temp-detail .ew-temp-detail__item,
.ew-minimal .ew-temp-list .ew-temp-list__item {
margin-bottom: 16px;
}
.ew-card .ew-temp-list,
.ew-card .ew-temp-detail,
.ew-classic .ew-temp-list,
.ew-classic .ew-temp-detail,
.ew-compact .ew-temp-list,
.ew-compact .ew-temp-detail,
.ew-minimal .ew-temp-list,
.ew-minimal .ew-temp-detail {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.ew-card .ew-temp-list .ew-temp-list__item,
.ew-classic .ew-temp-list .ew-temp-list__item,
.ew-compact .ew-temp-list .ew-temp-list__item,
.ew-minimal .ew-temp-list .ew-temp-list__item {
-webkit-box-flex: 0;
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}
.ew-card .ew-temp-list .ew-temp-list__item .ew-temp-list__item__text,
.ew-classic .ew-temp-list .ew-temp-list__item .ew-temp-list__item__text,
.ew-compact .ew-temp-list .ew-temp-list__item .ew-temp-list__item__text,
.ew-minimal .ew-temp-list .ew-temp-list__item .ew-temp-list__item__text {
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
}
.ew-card .ew-temp-detail .ew-temp-detail__item,
.ew-classic .ew-temp-detail .ew-temp-detail__item,
.ew-compact .ew-temp-detail .ew-temp-detail__item,
.ew-minimal .ew-temp-detail .ew-temp-detail__item {
-webkit-box-flex: 0;
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}
.ew-card .ew-temp-detail .ew-temp-detail__item .ew-temp-detail__title,
.ew-classic .ew-temp-detail .ew-temp-detail__item .ew-temp-detail__title,
.ew-compact .ew-temp-detail .ew-temp-detail__item .ew-temp-detail__title,
.ew-minimal .ew-temp-detail .ew-temp-detail__item .ew-temp-detail__title {
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
}
.ew-card .ew-temp-detail .ew-temp-detail__title,
.ew-classic .ew-temp-detail .ew-temp-detail__title,
.ew-compact .ew-temp-detail .ew-temp-detail__title,
.ew-minimal .ew-temp-detail .ew-temp-detail__title {
display: block;
}
.ew-card {
padding: 32px 16px;
}
.ew-card .ew-temp-data::-webkit-scrollbar {
background-color: rgba(255, 255, 255, 0.2);
}
.ew-card .ew-temp-data::-webkit-scrollbar-thumb {
background-color: rgba(255, 255, 255, 0.5);
}
.ew-card .ew-card__item {
position: relative;
z-index: 2;
background: rgba(0, 0, 0, 0.8);
border-radius: 8px;
padding: 24px 16px;
}
.ew-card .ew-card__item + .ew-card__item {
margin-top: 24px;
}
.ew-card .ew-card__item.ew-card__item--main {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.ew-card .ew-card__col {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
-ms-flex-preferred-size: 0;
flex-basis: 0;
}
.ew-card .ew-main-icon {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.ew-card .ew-main-icon > * {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
}
.ew-card .ew-main-icon .ew-temp {
margin-right: 16px;
}
.ew-card .ew-date,
.ew-card .ew-location {
display: block;
text-align: right;
}
.ew-card .ew-date {
margin-bottom: 8px;
}
.ew-card .ew-description {
display: block;
margin-top: 8px;
}
.ew-card .ew-title {
display: block;
font-weight: 600;
text-transform: uppercase;
margin-bottom: 16px;
}
.ew-card .ew-temp-list .ew-temp-list__item .ew-temp-list__item__text {
display: block;
}
.ew-classic {
background: #F5F6F7;
}
.ew-classic .ew-temp-data::-webkit-scrollbar {
background-color: rgba(0, 0, 0, 0.2);
}
.ew-classic .ew-temp-data::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.5);
}
.ew-classic.ew-mist .ew-classic__body {
background-image: url(../images/background/large/mist.jpg);
}
.ew-classic.ew-storm .ew-classic__body {
background-image: url(../images/background/large/storm.jpg);
}
.ew-classic.ew-day-clear .ew-classic__body {
background-image: url(../images/background/large/day-clear.jpg);
}
.ew-classic.ew-day-cloud .ew-classic__body {
background-image: url(../images/background/large/day-cloud.jpg);
}
.ew-classic.ew-day-rain .ew-classic__body {
background-image: url(../images/background/large/rain.jpg);
}
.ew-classic.ew-day-snow .ew-classic__body {
background-image: url(../images/background/large/snow.jpg);
}
.ew-classic.ew-night-clear .ew-classic__body {
background-image: url(../images/background/large/night-clear.jpg);
}
.ew-classic.ew-night-cloud .ew-classic__body {
background-image: url(../images/background/large/night-cloud.jpg);
}
.ew-classic.ew-night-rain .ew-classic__body {
background-image: url(../images/background/large/rain.jpg);
}
.ew-classic.ew-night-snow .ew-classic__body {
background-image: url(../images/background/large/snow.jpg);
}
.ew-classic .ew-classic__body {
color: #FFFFFF;
padding: 64px 32px 32px;
}
.ew-classic .ew-classic__body > * {
position: relative;
z-index: 2;
}
.ew-classic .ew-classic__body .ew-main-icon {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
margin-bottom: 8px;
}
.ew-classic .ew-classic__body .ew-main-icon .ew-temp {
margin-bottom: 16px;
}
.ew-classic .ew-classic__body .ew-classic__body__date {
margin-bottom: 16px;
}
.ew-classic .ew-classic__foot {
padding: 24px;
}
.ew-classic .ew-temp-list .ew-temp-list__item .ew-temp-list__item__title {
font-size: 16px;
}
.ew-classic .ew-temp-list .ew-temp-list__item .ew-temp-list__item__text {
opacity: 0.6;
}
.ew-compact .ew-temp-data .ew-temp-data__item + .ew-temp-data__item,
.ew-full .ew-temp-data .ew-temp-data__item + .ew-temp-data__item {
margin-top: 8px;
}
.ew-compact .ew-temp-data .ew-temp-data__card,
.ew-full .ew-temp-data .ew-temp-data__card {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.ew-compact .ew-temp-data .ew-temp-data__time,
.ew-compact .ew-temp-data .ew-temp-data__day,
.ew-full .ew-temp-data .ew-temp-data__time,
.ew-full .ew-temp-data .ew-temp-data__day {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
-ms-flex-preferred-size: 0;
flex-basis: 0;
}
.ew-compact .ew-temp-data .ew-temp-data__icon,
.ew-full .ew-temp-data .ew-temp-data__icon {
width: 32px;
}
.ew-compact .ew-temp-data .ew-temp-data__temp,
.ew-full .ew-temp-data .ew-temp-data__temp {
padding-left: 32px;
font-weight: 600;
}
.ew-compact {
padding: 32px 16px;
}
.ew-compact .ew-compact__main {
background: #F5F6F7;
padding: 24px 16px;
border-radius: 8px;
margin-bottom: 24px;
}
.ew-compact .ew-compact__main .ew-compact__main__head {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
margin-bottom: 8px;
}
.ew-compact .ew-compact__main .ew-compact__main__head .ew-main-icon {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-orient: horizontal;
-webkit-box-direction: reverse;
-ms-flex-direction: row-reverse;
flex-direction: row-reverse;
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
-ms-flex-preferred-size: 0;
flex-basis: 0;
padding-left: 24px;
}
.ew-compact .ew-compact__main .ew-compact__main__head .ew-main-icon .ew-temp {
margin-left: auto;
font-size: 20px;
font-weight: 500;
}
.ew-compact .ew-compact__main .ew-temp-list {
margin-top: 8px;
}
.ew-compact .ew-compact__main .ew-temp-detail .ew-temp-detail__item .ew-temp-detail__title,
.ew-compact .ew-compact__main .ew-temp-list .ew-temp-list__item .ew-temp-list__item__text {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
width: 50%;
}
.ew-compact .ew-compact__details {
padding-left: 24px;
padding-right: 24px;
}
.ew-full {
background-size: cover;
background-position: center;
height: 100vh;
}
.ew-full .ew-full__main {
position: fixed;
left: 5vw;
bottom: 15vh;
z-index: 1;
}
.ew-full .ew-full__main .ew-main-icon {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-orient: horizontal;
-webkit-box-direction: reverse;
-ms-flex-direction: row-reverse;
flex-direction: row-reverse;
-webkit-box-pack: end;
-ms-flex-pack: end;
justify-content: flex-end;
}
.ew-full .ew-full__main .ew-main-icon > * {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
}
.ew-full .ew-full__main .ew-main-icon .ew-temp {
margin-left: 16px;
font-size: 24px;
}
.ew-full .ew-full__main .ew-description {
display: block;
margin-top: 8px;
margin-bottom: 8px;
font-size: 20px;
}
.ew-full .ew-full__main .ew-temp-list {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.ew-full .ew-full__main .ew-temp-list .ew-temp-list__item {
-webkit-box-flex: 0;
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
margin-bottom: 4px;
}
.ew-full .ew-full__main .ew-temp-list .ew-temp-list__item .ew-temp-list__item__text {
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
}
.ew-full .ew-full__details {
position: absolute;
top: 0;
right: 0;
bottom: 0;
overflow: auto;
z-index: 1;
padding: 48px 24px;
width: 240px;
background-color: rgba(0, 0, 0, 0.8);
}
.ew-full .ew-full__details .ew-title {
display: block;
font-weight: 600;
text-transform: uppercase;
margin-bottom: 16px;
}
.ew-full .ew-full__details .ew-full__details__item + .ew-full__details__item {
margin-top: 24px;
padding-top: 24px;
border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.ew-full .ew-full__details .ew-temp-detail .ew-temp-detail__item {
margin-bottom: 8px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
}
.ew-minimal {
padding: 32px 16px;
}
.ew-minimal .ew-temp-data::-webkit-scrollbar {
background-color: rgba(0, 0, 0, 0.2);
}
.ew-minimal .ew-temp-data::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.5);
}
.ew-minimal .ew-date,
.ew-minimal .ew-temp {
display: block;
text-align: center;
}
.ew-minimal .ew-date {
margin-bottom: 8px;
}
.ew-minimal .ew-temp {
font-size: 24px;
font-weight: 500;
margin-bottom: 16px;
}
.ew-minimal .ew-minimal__details {
margin-top: 32px;
}
.ew-minimal .ew-temp-detail,
.ew-minimal .ew-temp-list {
padding: 16px 24px 0;
text-align: center;
}
.ew-minimal .ew-temp-detail {
border-bottom-left-radius: 24px;
border-bottom-right-radius: 24px;
background-color: #F5F6F7;
}
.ew-minimal .ew-temp-list {
border-top-left-radius: 24px;
border-top-right-radius: 24px;
background-color: #edeff0;
}
.ew-minimal .ew-temp-data .ew-temp-data__item + .ew-temp-data__item {
margin-left: 8px;
}
.ew-minimal .ew-temp-data .ew-temp-data__card {
padding: 24px 8px;
border-radius: 64px;
background-color: #4f48ec;
color: #fff;
}