First container working
This commit is contained in:
73
src/styles/containers/WeatherAndTime.module.css
Normal file
73
src/styles/containers/WeatherAndTime.module.css
Normal file
@ -0,0 +1,73 @@
|
||||
.container {
|
||||
grid-area: date-weather;
|
||||
display: grid;
|
||||
grid-template-areas:
|
||||
"time currentIcon currentTemp"
|
||||
"date currentCondition currentCondition"
|
||||
"forecast forecast forecast";
|
||||
grid-template-columns: auto min-content min-content;
|
||||
grid-template-rows: min-content min-content auto;
|
||||
column-gap: 1vw;
|
||||
row-gap: 0;
|
||||
align-items: stretch;
|
||||
justify-content: stretch;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#clock {
|
||||
grid-area: time;
|
||||
font-size: 14vh;
|
||||
}
|
||||
|
||||
#weatherIcon {
|
||||
grid-area: currentIcon;
|
||||
height: 15vh;
|
||||
}
|
||||
|
||||
.container svg {
|
||||
height: 100%;
|
||||
fill: var(--iconColor);
|
||||
}
|
||||
|
||||
#temperature {
|
||||
grid-area: currentTemp;
|
||||
font-size: 12vh;
|
||||
}
|
||||
|
||||
#date {
|
||||
grid-area: date;
|
||||
font-size: 2.5vh;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
#currentWeatherInfos {
|
||||
grid-area: currentCondition;
|
||||
font-size: 2.5vh;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
#futureWeatherInfos {
|
||||
border-top: 1px solid var(--iconColor);
|
||||
grid-area: forecast;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#futureWeatherInfos th {
|
||||
text-align: center;
|
||||
font-size: 3vh;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#futureWeatherInfos .futureWeatherHighTemp,
|
||||
#futureWeatherInfos .futureWeatherLowTemp {
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
vertical-align: middle;
|
||||
font-size: 3.5vh;
|
||||
}
|
||||
|
||||
#futureWeatherInfos td {
|
||||
padding-right: 5px;
|
||||
}
|
57
src/styles/global.css
Normal file
57
src/styles/global.css
Normal file
@ -0,0 +1,57 @@
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:root, :root[data-theme="day"] {
|
||||
--containerBg: rgba(255,255,255,0.5);
|
||||
--textColor: #000000;
|
||||
color: #000000;
|
||||
--iconColor: #000000;
|
||||
}
|
||||
:root[data-theme="night"] {
|
||||
--containerBg: rgba(20,20,20,0.8);
|
||||
--textColor: #b0b0b0;
|
||||
color: #b0b0b0;
|
||||
--iconColor: #b0b0b0;
|
||||
}
|
||||
|
||||
body, main {
|
||||
background: #000;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
main {
|
||||
display: grid;
|
||||
grid-template-areas:
|
||||
"date-weather date-weather calendar"
|
||||
"date-weather date-weather calendar"
|
||||
"map dvb news"
|
||||
"map spotify news";
|
||||
grid-template-columns: 28vw auto 28vw;
|
||||
grid-template-rows: 18vh 19vh 19vh 19vh;
|
||||
column-gap: 3vw;
|
||||
row-gap: 5vh;
|
||||
padding: 5vh 3vw;
|
||||
align-items: stretch;
|
||||
justify-content: stretch;
|
||||
max-width: 100%;
|
||||
font-family: Arial;
|
||||
transition: background-image 1s linear;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center center;
|
||||
}
|
||||
:root[data-theme="night"] main {
|
||||
background-image: url("../images/bg/3.jpg") !important;
|
||||
}
|
||||
|
||||
.container {
|
||||
box-shadow: 0 0 1rem 0 rgba(0, 0, 0, .2);
|
||||
border-radius: 10px;
|
||||
background: var(--containerBg);
|
||||
backdrop-filter: blur(5px);
|
||||
padding:10px;
|
||||
overflow:hidden;
|
||||
}
|
Reference in New Issue
Block a user