-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ченджлог на главной: первое приближение #1286
base: main
Are you sure you want to change the base?
Changes from 8 commits
a7e05d8
9b5b11e
7a866c8
2d1b25a
14aee60
999bf0b
46f5551
d8483dc
c49ea7e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<div class="changelog"> | ||
<h2 class="visually-hidden">Новые статьи</h2> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
<ul class="changelog-list"> | ||
{% for item in changeLog %} | ||
<li class="changelog-list__item"> | ||
<div class="changelog-list__link changelog-item"> | ||
<time datetime="{{ item.date }}" class="changelog-item__time font-theme--code" data-mobile="{{ item.mobileDate }}">{{ item.shortDate }}</time> | ||
<a href="{{ item.url }}" class="changelog-item__title link">{{ item.title | safe }}</a> | ||
<div class="changelog-item__author"> | ||
{% for author in item.authors %} | ||
{% if loop.index0 !== 0 %}, {% endif %}<a href="{{ author.url }}" class="changelog-item__author-link font-theme--code link">{{ author.name }}</a> | ||
{% endfor %} | ||
</div> | ||
Comment on lines
+10
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Возможно, добавим условие, что если авторов несколько, то помещаем их в список |
||
</div> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
<div class="changelog-footer"> | ||
<p class="changelog-footer__item">Новые материалы в <a href="https://github.com/doka-guide/content/blob/main/CHANGELOG.md" class="link changelog-footer__link">ченджлоге</a></p> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
<p class="changelog-footer__item">Станьте автором! Выберите тему в 🔥 <a href="https://github.com/doka-guide/content/milestone/22" class="link changelog-footer__link">Бэклоге</a></p> | ||
</div> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
.changelog { | ||
padding-block-end: clamp(40px, 4.8%, 80px); | ||
} | ||
|
||
.changelog-list { | ||
margin: 0; | ||
padding: 0; | ||
list-style: none; | ||
line-height: 1.3; | ||
} | ||
|
||
.changelog-list__item:not(:last-child) { | ||
margin-block-end: 20px; | ||
} | ||
|
||
.changelog-item { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: baseline; | ||
} | ||
|
||
.changelog-item__time, | ||
.changelog-item__author { | ||
display: flex; | ||
align-items: baseline; | ||
font-size: 28px; | ||
} | ||
|
||
.changelog-item__time::after, | ||
.changelog-item__author::before { | ||
content: ''; | ||
flex: 1 1 auto; | ||
border-block-end: 5px dotted var(--color-text); | ||
opacity: 0.3; | ||
margin-inline: 18px; | ||
} | ||
|
||
.changelog-item__time { | ||
gap: 18px; | ||
flex-shrink: 0; | ||
inline-size: 30%; | ||
font-family: var(--font-family); | ||
} | ||
|
||
.changelog-item__title { | ||
margin: 0; | ||
font-weight: normal; | ||
font-size: 24px; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
} | ||
|
||
.changelog-item__author { | ||
flex-wrap: wrap; | ||
flex: 1 0 25%; | ||
justify-content: end; | ||
} | ||
|
||
.changelog-item__author-link { | ||
font-family: var(--font-family); | ||
} | ||
|
||
.changelog-item__author-link:not(:first-child) { | ||
margin-inline-start: 1ch; | ||
} | ||
|
||
.changelog-footer { | ||
display: flex; | ||
justify-content: space-between; | ||
margin-block-start: 45px; | ||
} | ||
|
||
.changelog-footer::before { | ||
content: ""; | ||
flex-basis: 30%; | ||
} | ||
|
||
.changelog-footer__item { | ||
margin: 0; | ||
} | ||
|
||
.changelog-footer__item:last-child { | ||
flex-grow: 1; | ||
text-align: end; | ||
} | ||
|
||
@media (width <= 1024px) { | ||
.changelog-item { | ||
flex-wrap: wrap; | ||
} | ||
|
||
.changelog-item__time { | ||
inline-size: 100%; | ||
justify-content: end; | ||
} | ||
|
||
.changelog-item__time::after { | ||
display: none; | ||
} | ||
|
||
.changelog-item__title { | ||
max-inline-size: 55%; | ||
font-size: 18px; | ||
} | ||
|
||
.changelog-item__author::before { | ||
border-block-end-width: 3px; | ||
} | ||
|
||
.changelog-item__time, | ||
.changelog-item__author { | ||
font-size: 22px; | ||
} | ||
|
||
.changelog-footer { | ||
flex-direction: column; | ||
font-size: 18px; | ||
} | ||
|
||
.changelog-footer::before { | ||
display: none; | ||
} | ||
|
||
.changelog-footer__item:last-child { | ||
text-align: start; | ||
} | ||
} | ||
|
||
@media (width <= 768px) { | ||
.changelog-item { | ||
flex-direction: column; | ||
justify-content: start; | ||
} | ||
|
||
.changelog-item__time { | ||
inline-size: fit-content; | ||
justify-content: start; | ||
text-indent: -9999px; | ||
line-height: 0; | ||
} | ||
|
||
.changelog-item__time::before { | ||
content: attr(data-mobile); | ||
display: block; | ||
text-indent: 0; | ||
line-height: initial; | ||
} | ||
|
||
.changelog-item__title { | ||
max-inline-size: 90dvw; | ||
font-size: 20px; | ||
} | ||
|
||
.changelog-item__author { | ||
flex: 0 0 auto; | ||
justify-content: start; | ||
} | ||
|
||
.changelog-item__author::before { | ||
display: none; | ||
} | ||
|
||
.changelog-item__time, | ||
.changelog-item__author { | ||
font-size: 20px; | ||
} | ||
|
||
.changelog-footer { | ||
margin-block-start: 30px; | ||
font-size: 17px; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
У нас есть заголовок, и эта часть выглядит, как отдельная смысловая. Может выделим её в
section
?