Bot commit: Добавлен файл templates/articles.html
This commit is contained in:
parent
4fe7058376
commit
e22ddff3bc
96
templates/articles.html
Normal file
96
templates/articles.html
Normal file
@ -0,0 +1,96 @@
|
||||
{% macro section(news) -%}
|
||||
<section class="c_qx7jk">
|
||||
<h2 class="c_2e7ix">НОВОСТИ</h2>
|
||||
<div class="c_brfx5">
|
||||
{% for article in news %}
|
||||
<a href="/news/{{article._id}}">
|
||||
|
||||
|
||||
<article class="c_vt5xs">
|
||||
<div class="c_h9bsw">
|
||||
|
||||
<picture>
|
||||
<img loading="lazy" alt="{{ article.title }}" class="c_h9bsw" crossorigin="anonymous" fetchpriority="high"
|
||||
src="/b/news/{{article.media[0]}}">
|
||||
</picture>
|
||||
</div>
|
||||
<div class="c_11r47">
|
||||
<header class="c_38uav">
|
||||
<h2 class="c_124dx">{{article.title}}</h2>
|
||||
</header>
|
||||
<div class="c_ju2ew">
|
||||
<p class="c_66s36">{{ article.short_description }}</p>
|
||||
</div>
|
||||
<!-- <p class="c_mdq6e">Подробнее</p> -->
|
||||
<p class="c_wt1b0">{{ (article._id.generation_time.strftime('%d.%m.%Y')) if article._id else '' }}</p>
|
||||
</div>
|
||||
</article>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro style() -%}
|
||||
<style type="text/css">
|
||||
.c_qx7jk{margin: 100px 0;}
|
||||
.c_h9bsw{width: 100%;object-fit: scale-down;}
|
||||
@media (min-width: 901px) {
|
||||
.c_2e7ix { color: #5F1798; font-family: Inter; font-size: 42px; font-style: normal; font-weight: 700; line-height: normal; }
|
||||
.c_h9bsw { align-self: stretch; border-radius: 5px; }
|
||||
.c_124dx { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: #000; text-overflow: ellipsis; font-family: Inter; font-size: 24px; font-style: normal; font-weight: 700; line-height: normal; }
|
||||
.c_38uav { display: flex; align-items: center; }
|
||||
.c_66s36 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; color: #3A3A3A; text-overflow: ellipsis; font-family: Inter; font-size: 16px; font-style: normal; font-weight: 400; line-height: normal; }
|
||||
.c_ju2ew { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; align-self: stretch; }
|
||||
.c_mdq6e { align-self: stretch; color: #5F1798; font-family: Inter; font-size: 14px; font-style: normal; font-weight: 400; line-height: normal; }
|
||||
.c_wt1b0 { align-self: stretch; color: rgba(58, 58, 58, 0.75); text-align: right; font-family: Inter; font-size: 14px; font-style: normal; font-weight: 400; line-height: normal; }
|
||||
.c_11r47 { height: 162px; display: flex; padding: 10px 20px; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; align-self: stretch; }
|
||||
.c_vt5xs { display: flex; flex-direction: column; align-items: flex-start; border-radius: 5px; border: 1px solid #5F1798; background: #FDFAFF; box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25), 0 4px 20px 0 rgba(0, 0, 0, 0.20); }
|
||||
.c_1q6ua { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: #000; text-overflow: ellipsis; font-family: Inter; font-size: 24px; font-style: normal; font-weight: 700; line-height: normal; }
|
||||
.c_rsgdz { display: flex; justify-content: center; align-items: center; }
|
||||
.c_sqo80 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: #000; text-overflow: ellipsis; font-family: Inter; font-size: 24px; font-style: normal; font-weight: 700; line-height: normal; }
|
||||
.c_3ppy5 { display: flex; justify-content: center; align-items: center; }
|
||||
.c_brfx5 { display: flex; align-items: center; align-content: center; gap: 20px; align-self: stretch; flex-wrap: wrap; }
|
||||
.c_brfx5>a{width: 335px;}
|
||||
.c_qx7jk { display: flex; box-sizing: unset; padding-left: 100px; flex-direction: column; justify-content: center; align-items: flex-start; gap: 20px; background: #FFF; }
|
||||
}
|
||||
|
||||
@media (min-width: 700px) and (max-width: 900px) {
|
||||
.c_2e7ix { color: #5F1798; font-family: Inter; font-size: 42px; font-style: normal; font-weight: 700; line-height: normal; }
|
||||
.c_h9bsw { align-self: stretch; border-radius: 5px; }
|
||||
.c_124dx { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: #000; text-overflow: ellipsis; font-family: Inter; font-size: 24px; font-style: normal; font-weight: 700; line-height: normal; }
|
||||
.c_38uav { display: flex; align-items: center; }
|
||||
.c_66s36 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; color: #3A3A3A; text-overflow: ellipsis; font-family: Inter; font-size: 16px; font-style: normal; font-weight: 400; line-height: normal; }
|
||||
.c_ju2ew { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; align-self: stretch; }
|
||||
.c_mdq6e { align-self: stretch; color: #5F1798; font-family: Inter; font-size: 14px; font-style: normal; font-weight: 400; line-height: normal; }
|
||||
.c_wt1b0 { align-self: stretch; color: rgba(58, 58, 58, 0.75); text-align: right; font-family: Inter; font-size: 14px; font-style: normal; font-weight: 400; line-height: normal; }
|
||||
.c_11r47 { height: 162px; display: flex; padding: 10px 20px; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; align-self: stretch; }
|
||||
.c_vt5xs { display: flex; flex-direction: column; align-items: flex-start; border-radius: 5px; border: 1px solid #5F1798; background: #FDFAFF; box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25), 0 4px 20px 0 rgba(0, 0, 0, 0.20); }
|
||||
.c_1q6ua { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: #000; text-overflow: ellipsis; font-family: Inter; font-size: 24px; font-style: normal; font-weight: 700; line-height: normal; }
|
||||
.c_rsgdz { display: flex; justify-content: center; align-items: center; }
|
||||
.c_sqo80 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: #000; text-overflow: ellipsis; font-family: Inter; font-size: 24px; font-style: normal; font-weight: 700; line-height: normal; }
|
||||
.c_3ppy5 { display: flex; justify-content: center; align-items: center; }
|
||||
.c_brfx5>a{width: calc(50% - 10px);}
|
||||
.c_brfx5 { display: flex; align-items: center; align-content: center; gap: 20px; align-self: stretch; flex-wrap: wrap; }
|
||||
.c_qx7jk { display: flex; box-sizing: unset; padding: 0 50px; flex-direction: column; justify-content: center; align-items: flex-start; gap: 20px; background: #FFF; }
|
||||
}
|
||||
|
||||
@media (max-width: 699px) {
|
||||
.c_2e7ix { color: #5F1798; font-family: Inter; font-size: 42px; font-style: normal; font-weight: 700; line-height: normal; }
|
||||
.c_h9bsw { align-self: stretch; border-radius: 5px; }
|
||||
.c_124dx { color: #000; font-family: Inter; font-size: 24px; font-style: normal; font-weight: 700; line-height: normal; }
|
||||
.c_38uav { display: flex; align-items: center; }
|
||||
.c_66s36 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: #3A3A3A; text-overflow: ellipsis; font-family: Inter; font-size: 16px; font-style: normal; font-weight: 400; line-height: normal; }
|
||||
.c_ju2ew { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; align-self: stretch; }
|
||||
.c_mdq6e { align-self: stretch; color: #5F1798; font-family: Inter; font-size: 14px; font-style: normal; font-weight: 400; line-height: normal; }
|
||||
.c_wt1b0 { align-self: stretch; color: rgba(58, 58, 58, 0.75); text-align: right; font-family: Inter; font-size: 14px; font-style: normal; font-weight: 400; line-height: normal; }
|
||||
.c_11r47 { display: flex; padding: 10px 20px; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; align-self: stretch; }
|
||||
.c_vt5xs { display: flex; width: 100%; flex-direction: column; align-items: flex-start; border-radius: 5px; border: 1px solid #5F1798; background: #FDFAFF; box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25), 0 4px 20px 0 rgba(0, 0, 0, 0.20); }
|
||||
.c_1q6ua { height: 28px; flex: 1 0 0; color: #000; font-family: Inter; font-size: 24px; font-style: normal; font-weight: 700; line-height: normal; }
|
||||
.c_rsgdz { display: flex; justify-content: center; align-items: center; align-self: stretch; }
|
||||
.c_sqo80 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: #000; text-overflow: ellipsis; font-family: Inter; font-size: 24px; font-style: normal; font-weight: 700; line-height: normal; }
|
||||
.c_3ppy5 { display: flex; justify-content: center; align-items: center; }
|
||||
.c_brfx5 { display: flex; justify-content: center; align-items: flex-start; align-content: flex-start; gap: 20px; align-self: stretch; flex-wrap: wrap; }
|
||||
.c_qx7jk { display: flex; box-sizing: unset; padding: 0 20px; flex-direction: column; justify-content: center; align-items: flex-start; gap: 20px; background: #FFF; }
|
||||
}</style>
|
||||
{%- endmacro %}
|
||||
Loading…
Reference in New Issue
Block a user