new file: index.html new file: package-lock.json new file: package.json new file: script.js new file: server.js new file: style.css
293 lines
4.8 KiB
CSS
293 lines
4.8 KiB
CSS
body {
|
|
font-family: 'Inter', sans-serif;
|
|
background-color: #f8f9fb;
|
|
color: #333;
|
|
margin: 0;
|
|
padding: 20px;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.container {
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
background-color: white;
|
|
border-radius: 16px;
|
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
|
padding: 40px;
|
|
}
|
|
|
|
header {
|
|
text-align: center;
|
|
margin-bottom: 40px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 2.5rem;
|
|
font-weight: 600;
|
|
color: #333;
|
|
margin: 0;
|
|
}
|
|
|
|
.city-selector {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
margin-bottom: 40px;
|
|
padding: 24px;
|
|
background-color: #eef0f4;
|
|
border-radius: 12px;
|
|
}
|
|
|
|
label {
|
|
font-weight: 500;
|
|
margin-bottom: 10px;
|
|
color: #555;
|
|
}
|
|
|
|
select {
|
|
padding: 12px 16px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 8px;
|
|
font-size: 1rem;
|
|
background-color: white;
|
|
margin-bottom: 15px;
|
|
min-width: 200px;
|
|
}
|
|
|
|
button {
|
|
padding: 12px 24px;
|
|
background-color: #3b82f6;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 1rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: background-color 0.3s ease;
|
|
}
|
|
|
|
button:hover {
|
|
background-color: #2563eb;
|
|
}
|
|
|
|
.weather-info {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 40px;
|
|
}
|
|
|
|
.timelapse-container {
|
|
display: flex;
|
|
flex-direction: row;
|
|
overflow-x: scroll;
|
|
padding: 10px 0;
|
|
scrollbar-width: thin;
|
|
scrollbar-color: #ccc transparent;
|
|
}
|
|
|
|
.timelapse-item {
|
|
flex-shrink: 0;
|
|
width: 140px;
|
|
margin-right: 15px;
|
|
background-color: #eef0f4;
|
|
padding: 20px;
|
|
border-radius: 12px;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
text-align: center;
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
.timelapse-item:hover {
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.timelapse-item h3 {
|
|
margin: 0 0 8px 0;
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
color: #333;
|
|
}
|
|
|
|
.timelapse-item p {
|
|
margin: 4px 0;
|
|
font-size: 0.9rem;
|
|
color: #666;
|
|
}
|
|
|
|
.timelapse-item .temp {
|
|
font-size: 1.2rem;
|
|
font-weight: 500;
|
|
color: #3b82f6;
|
|
}
|
|
|
|
.timelapse-item .desc {
|
|
font-weight: 500;
|
|
}
|
|
|
|
.timelapse-item .prec {
|
|
margin: 4px 0;
|
|
font-size: 0.8rem;
|
|
color: #777;
|
|
}
|
|
|
|
.weather-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
gap: 20px;
|
|
}
|
|
|
|
.weather-item {
|
|
background-color: #eef0f4;
|
|
padding: 16px;
|
|
border-radius: 12px;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
text-align: center;
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
.weather-item:hover {
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.weather-item h3 {
|
|
margin: 0 0 8px 0;
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
color: #333;
|
|
}
|
|
|
|
.weather-item p {
|
|
margin: 4px 0;
|
|
font-size: 0.9rem;
|
|
color: #666;
|
|
}
|
|
|
|
.weather-item .temp {
|
|
font-size: 1.2rem;
|
|
font-weight: 500;
|
|
color: #3b82f6;
|
|
}
|
|
|
|
.weather-item .desc {
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* Медиа-запросы для адаптивности */
|
|
|
|
/* Планшеты и небольшие десктопы */
|
|
@media (min-width: 768px) {
|
|
.weather-info {
|
|
flex-direction: row;
|
|
}
|
|
|
|
.hourly-weather, .daily-weather {
|
|
flex: 1;
|
|
}
|
|
|
|
.container {
|
|
padding: 50px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 3rem;
|
|
}
|
|
}
|
|
|
|
/* Большие экраны */
|
|
@media (min-width: 1200px) {
|
|
.container {
|
|
max-width: 1600px;
|
|
padding: 60px;
|
|
}
|
|
|
|
.timelapse-item {
|
|
width: 160px;
|
|
margin-right: 20px;
|
|
padding: 24px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 3.5rem;
|
|
}
|
|
|
|
.timelapse-item h3 {
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.timelapse-item .temp {
|
|
font-size: 1.4rem;
|
|
}
|
|
}
|
|
|
|
/* Сверхбольшие экраны */
|
|
@media (min-width: 1440px) {
|
|
.container {
|
|
max-width: 1800px;
|
|
padding: 80px;
|
|
}
|
|
|
|
.timelapse-item {
|
|
width: 180px;
|
|
margin-right: 25px;
|
|
padding: 28px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 4rem;
|
|
}
|
|
|
|
.timelapse-item h3 {
|
|
font-size: 1.3rem;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.timelapse-item .temp {
|
|
font-size: 1.6rem;
|
|
margin: 8px 0;
|
|
}
|
|
|
|
.timelapse-item .desc {
|
|
font-size: 1rem;
|
|
margin: 6px 0;
|
|
}
|
|
|
|
.timelapse-item .prec {
|
|
font-size: 0.9rem;
|
|
margin: 6px 0;
|
|
}
|
|
}
|
|
|
|
/* Ультра-широкие экраны */
|
|
@media (min-width: 1920px) {
|
|
.container {
|
|
max-width: 2200px;
|
|
padding: 100px;
|
|
}
|
|
|
|
.timelapse-item {
|
|
width: 200px;
|
|
margin-right: 30px;
|
|
padding: 32px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 4.5rem;
|
|
}
|
|
|
|
.city-selector {
|
|
padding: 30px;
|
|
margin-bottom: 50px;
|
|
}
|
|
|
|
select {
|
|
padding: 16px 20px;
|
|
font-size: 1.1rem;
|
|
min-width: 250px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
button {
|
|
padding: 16px 32px;
|
|
font-size: 1.1rem;
|
|
}
|
|
} |