add files
This commit is contained in:
100
src/styles/newslist.css
Executable file
100
src/styles/newslist.css
Executable file
@@ -0,0 +1,100 @@
|
||||
.news-block {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1rem;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.news-item {
|
||||
flex: 1 1 calc(33.333% - 1rem);
|
||||
min-width: 250px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* Стандартный формат - заполняет всю ширину с обрезкой */
|
||||
.post-thumbnail {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.post-thumbnail a {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.post-thumbnail img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-position: center;
|
||||
}
|
||||
|
||||
/* Портретный формат для всех остальных рубрик (витрина книг) */
|
||||
body.image-portrait .post-thumbnail {
|
||||
height: 300px;
|
||||
background: #f5f5f5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
body.image-portrait .post-thumbnail a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
body.image-portrait .post-thumbnail img {
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.news-item-title {
|
||||
font-size: medium;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.news-item-info {
|
||||
margin-top: 8px;
|
||||
font-size: medium;
|
||||
}
|
||||
|
||||
.news-item-info-part a {
|
||||
color: #909294;
|
||||
}
|
||||
|
||||
/* Планшет - 2 карточки */
|
||||
@media (max-width: 1024px) {
|
||||
.news-item {
|
||||
flex: 1 1 calc(50% - 1rem);
|
||||
}
|
||||
|
||||
body.image-portrait .post-thumbnail {
|
||||
height: 350px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Мобильные - 1 карточка */
|
||||
@media (max-width: 768px) {
|
||||
.h-telega {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.news-item {
|
||||
flex: 1 1 100%;
|
||||
min-width: unset;
|
||||
}
|
||||
|
||||
.post-thumbnail {
|
||||
height: 250px;
|
||||
}
|
||||
|
||||
body.image-portrait .post-thumbnail {
|
||||
height: 400px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user