Skip to content

Commit d98f755

Browse files
authored
Обновляет футер на сайте (#1161)
* Растягивает футер по ширине страницы * Осмысливает имеющиеся бордеры * Добавляет рамку и отступы * Добавляет ссылки и стили * Приводит в чувства переключатель на странице поиска * Удаляет дублёра * Добавляет соцсети * Просит скринридер не читать SVG * Направленные --> Логические * Убирает order * Добавляет ховер по образу и подобию * Прибавляет паддинги
1 parent f241f2d commit d98f755

File tree

12 files changed

+131
-66
lines changed

12 files changed

+131
-66
lines changed

src/includes/blocks/footer.njk

Lines changed: 63 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,68 @@
55
<span class="footer__theme-toggle-label" aria-hidden="true">Тема:</span>
66
{% include "blocks/theme-toggle.njk" %}
77
</fieldset>
8-
<ul class="footer__list footer-list font-theme font-theme--code base-list">
9-
<li class="footer-list__item">
10-
<a class="footer-list__link link" href="{{ constants.dokaOrgLink }}">GitHub</a>
11-
</li>
12-
<li class="footer-list__item">
13-
<a class="footer-list__link link" href="/about/">О проекте</a>
14-
</li>
15-
<li class="footer-list__item">
16-
<a class="footer-list__link link" href="/licenses/">Лицензии</a>
17-
</li>
18-
</ul>
8+
<div class="footer__lists">
9+
<ul class="footer__list footer-list footer__list_social font-theme font-theme--code base-list">
10+
<li class="footer-list__item">
11+
<a class="footer-list__link footer-list__link_social link" href="https://www.youtube.com/@doka-guide">
12+
<svg aria-hidden="true" class="footer-list__icon footer-list__icon--invertible" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 19 14" width="19" height="14">
13+
<path fill="#000" fill-rule="evenodd" d="M18.6031 2.43813c-.2185-.81747-.8623-1.461255-1.6797-1.679702C15.4415.361328 9.5.361328 9.5.361328s-5.94146 0-7.42335.3971C1.25933.976875.615442 1.62066.396942 2.43813 3.1e-7 3.91987 0 7.01143 0 7.01143s3.1e-7 3.09147.396942 4.57307c.2185.8175.862388 1.4614 1.679708 1.6799 1.48189.3969 7.42335.3969 7.42335.3969s5.9415 0 7.4234-.3969c.8174-.2185 1.4612-.8624 1.6797-1.6799C19 10.1029 19 7.01143 19 7.01143s0-3.09156-.3969-4.5733ZM7.59989 9.86149V4.16138l4.93631 2.85005-4.93631 2.85006Z" clip-rule="evenodd"/>
14+
</svg>
15+
<span class="visually-hidden">YouTube</span>
16+
</a>
17+
</li>
18+
<li class="footer-list__item">
19+
<a class="footer-list__link footer-list__link_social link" href="https://t.me/doka_guide">
20+
<svg aria-hidden="true" class="footer-list__icon footer-list__icon--invertible" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 17" width="18" height="17">
21+
<path fill="#000" d="M14.2812 15.5523c.2041.0182.4076-.0416.5695-.1673s.2702-.308.3031-.5103l2.8438-13.60292c.0081-.08767-.0043-.17604-.0364-.25804-.0321-.081997-.0829-.155355-.1484-.214212-.114-.108125-.2639-.170288-.4209-.174528-.0548 0-5.7115 2.09091-16.970301 6.27274-.127057.04053-.237183.12187-.31329.23139-.0761071.10952-.11394078.2411-.10763026.37432.00716485.12439.05384586.24324.13324626.33926.0794.09602.187376.16419.308207.19459L4.54867 9.31033 6.20155 14.269c.04319.1351.13029.2519.24747.3319.11718.08.25772.1185.39931.1095.07663-.0002.15243-.0158.22295-.0458.07052-.0299.13434-.0737.1877-.1287l2.33046-2.2175 4.19896 3.0799c.1463.0971.3172.1505.4928.154Zm-7.50473-2.505L5.53424 8.94074C11.5024 5.14219 14.507 3.24292 14.5481 3.24292c.154 0 .2361 0 .2361.16426.0035.02039.0035.04121 0 .0616 0 0-2.5768 2.36126-7.72028 6.98112l-.28745 2.5974Z"/>
22+
</svg>
23+
<span class="visually-hidden">Telegram</span>
24+
</a>
25+
</li>
26+
<li class="footer-list__item">
27+
<a class="footer-list__link footer-list__link_social link" href="https://twitter.com/doka_guide">
28+
<svg aria-hidden="true" class="footer-list__icon footer-list__icon--invertible" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 19 16" width="19" height="16">
29+
<path fill="#000" fill-rule="evenodd" d="M6.1475 15.4241c6.7969 0 10.5134-5.63216 10.5134-10.51341 0-.1609 0-.32185-.0077-.4751.7203-.52105 1.3487-1.1724 1.8468-1.9157-.659.2912-1.3717.49045-2.1226.5824.7663-.4598 1.3486-1.1801 1.6245-2.046-.7126.42145-1.5019.728-2.3448.89655-.6744-.7203-1.6322-1.164754-2.6973-1.164754-2.0384 0-3.6935 1.655204-3.6935 3.693504 0 .2912.03065.5747.0996.8429-3.0728-.15325-5.7931-1.6245-7.61685-3.86205-.3142.54405-.4981 1.18005-.4981 1.8544 0 1.2797.65135 2.4138 1.6475 3.0728-.60535-.01535-1.1724-.1839-1.6705-.4598v.046c0 1.7931 1.27205 3.2797 2.96555 3.6245-.3065.0843-.636.1303-.9732.1303-.23755 0-.4674-.023-.6973-.069.46745 1.47126 1.8314 2.53636 3.44825 2.56706-1.26435.9885-2.8582 1.5785-4.59 1.5785-.29885 0-.59005-.0153-.88125-.0536 1.61685 1.0575 3.5632 1.6705 5.6475 1.6705Z" clip-rule="evenodd"/>
30+
</svg>
31+
<span class="visually-hidden">Twitter</span>
32+
</a>
33+
</li>
34+
<li class="footer-list__item">
35+
<a class="footer-list__link footer-list__link_social link" href="https://discord.gg/NjaevcW8k8">
36+
<svg aria-hidden="true" class="footer-list__icon footer-list__icon--invertible" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 16" width="20" height="16">
37+
<path fill="#000" d="M6.85916 7.48759c.9489 0 1.7175.71082 1.70011 1.57961 0 .86878-.74963 1.5796-1.70011 1.5796-.93307 0-1.70168-.71082-1.70168-1.5796 0-.86879.75121-1.57961 1.70168-1.57961Zm6.08554 0c.9505 0 1.7017.71082 1.7017 1.57961 0 .86878-.7512 1.5796-1.7017 1.5796-.933 0-1.7001-.71082-1.7001-1.5796 0-.86879.7497-1.57961 1.7001-1.57961Zm1.5768 7.44471c3.5947-.1153 4.9785-2.5211 4.9785-2.5211 0-5.34063-2.3438-9.67034-2.3438-9.67034-2.3406-1.789696-4.5705-1.74073-4.5705-1.74073l-.2277.26538c2.766.86246 4.0502 2.1072 4.0502 2.1072-1.5102-.84985-3.1746-1.39111-4.8963-1.59225-1.0921-.1232-2.19521-.11259-3.28475.03159-.09805 0-.18029.01738-.27676.03317-.56933.05055-1.95314.26538-3.69277 1.0457-.60097.28118-.95997.48179-.95997.48179s1.3506-1.31108 4.27793-2.17355l-.1629-.19903S5.18437.951164 2.84218 2.74244c0 0-2.34218 4.32813-2.34218 9.66876 0 0 1.36641 2.4042 4.96113 2.5211 0 0 .60096-.7456 1.09123-1.3758-2.06701-.6319-2.84668-1.9588-2.84668-1.9588s.16131.1169.45388.2828c.01582.0158.03163.0332.06484.049.04903.0347.09806.0505.14708.0837.40645.2322.81289.4138 1.18612.5639.66739.2654 1.46446.5307 2.39279.714 1.39063.2722 2.82041.2776 4.21311.0158.8111-.1446 1.6025-.3837 2.358-.7124.5693-.2164 1.2035-.5324 1.8709-.9794 0 0-.8129 1.3601-2.9448 1.9745.4887.6303 1.0755 1.3427 1.0755 1.3427h-.0016Z"/>
38+
</svg>
39+
<span class="visually-hidden">Discord</span>
40+
</a>
41+
</li>
42+
</ul>
43+
<ul class="footer__list footer-list font-theme font-theme--code base-list">
44+
<li class="footer-list__item">
45+
<a class="footer-list__link link" href="{{ constants.dokaOrgLink }}">GitHub</a>
46+
</li>
47+
<li class="footer-list__item">
48+
<a class="footer-list__link link" href="/subscribe/">Рассылка</a>
49+
</li>
50+
</ul>
51+
<ul class="footer__list footer-list font-theme font-theme--code base-list">
52+
<li class="footer-list__item">
53+
<a class="footer-list__link link" href="/about/">О проекте</a>
54+
</li>
55+
<li class="footer-list__item">
56+
<a class="footer-list__link link" href="https://dream-job.doka.guide">Спецпроекты</a>
57+
</li>
58+
<li class="footer-list__item">
59+
<a class="footer-list__link link" href="/people/">Участники</a>
60+
</li>
61+
</ul>
62+
<ul class="footer__list footer-list font-theme font-theme--code base-list">
63+
<li class="footer-list__item">
64+
<a class="footer-list__link link" href="/licenses/">Лицензии</a>
65+
</li>
66+
<li class="footer-list__item">
67+
<a class="footer-list__link link" href="https://github.com/doka-guide/content/tree/main/docs">Документация</a>
68+
</li>
69+
</ul>
70+
</div>
1971
</footer>
2072
{% endmacro %}

src/styles/blocks/doc.css

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,9 @@
5858
max-width: 672px;
5959
}
6060

61-
.doc__footer {
62-
position: relative;
63-
z-index: 0;
64-
margin-top: 50px;
65-
margin-top: clamp(20px, 4.5%, 50px);
66-
padding-left: 0;
67-
padding-right: 0;
68-
max-width: 100%;
69-
}
70-
7161
.doc__linked-articles {
72-
margin-block-start: 102px;
7362
margin-block-start: min(102px, 26%);
63+
margin-block-end: min(102px, 26%);
7464
display: flex;
7565
gap: var(--offset, 20px);
7666
}
@@ -86,6 +76,8 @@
8676
.doc__linked-articles {
8777
flex-direction: column;
8878
gap: 13px;
79+
margin-block-start: 30px;
80+
margin-block-end: 0;
8981
}
9082
}
9183

src/styles/blocks/footer.css

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
.footer {
2+
border-block-start: 1px solid hsl(var(--color-base-text) / 0.3);
23
padding: 20px 10px;
34
display: flex;
45
gap: 30px;
5-
align-items: center;
6+
align-items: flex-start;
67
justify-content: space-between;
78
flex-wrap: wrap;
89
}
@@ -18,16 +19,44 @@
1819
border: 0;
1920
}
2021

21-
.footer__list {
22+
.footer__lists {
2223
display: flex;
2324
flex-wrap: wrap;
2425
gap: 30px;
26+
}
27+
28+
.footer__list {
29+
display: flex;
30+
flex-direction: column;
31+
flex-wrap: wrap;
32+
gap: 5px;
2533
font-family: var(--font-family);
26-
font-size: var(--font-size-m);
27-
line-height: var(--font-line-height-m);
34+
font-size: var(--font-size-s);
35+
line-height: var(--font-line-height-s);
2836
letter-spacing: var(--letter-spacing);
2937
}
3038

39+
.footer__list_social {
40+
flex-direction: row;
41+
gap: 5px;
42+
}
43+
44+
.footer-list__icon {
45+
vertical-align: middle;
46+
}
47+
48+
.footer-list__link_social {
49+
padding: 5px;
50+
}
51+
52+
.footer-list__link_social:hover {
53+
opacity: 0.7;
54+
}
55+
56+
.footer-list__icon--invertible {
57+
filter: invert(var(--is-dark-theme-on));
58+
}
59+
3160
@media (min-width: 1024px) {
3261
.footer {
3362
padding: 20px;
@@ -38,6 +67,11 @@
3867
.footer {
3968
align-items: flex-start;
4069
flex-direction: column;
70+
padding-block-start: 30px;
71+
}
72+
73+
.footer__lists {
74+
flex-direction: column;
4175
}
4276

4377
.footer__theme-toggle,
@@ -46,11 +80,22 @@
4680
}
4781

4882
.footer__list {
49-
gap: 8px;
83+
gap: 11px;
5084
}
5185

5286
.footer__theme-toggle {
5387
gap: 4px;
5488
order: 1;
5589
}
90+
91+
.footer__list_social {
92+
flex-direction: row;
93+
gap: 10px;
94+
}
95+
}
96+
97+
@media (min-width: 768px) and (max-width: 1366px) {
98+
.footer__list {
99+
line-height: 18px;
100+
}
56101
}

src/styles/blocks/index-block.css

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
align-items: center;
6565
justify-content: center;
6666
gap: var(--offset, 20px);
67-
border-top: 1px solid;
67+
border-block-start: 1px solid hsl(var(--color-base-text) / 0.3);
6868
font-size: var(--font-size-m);
6969
line-height: var(--font-line-height-m);
7070
}
@@ -118,9 +118,4 @@
118118
grid-column: 2;
119119
grid-row: 1;
120120
}
121-
122-
.index-block__footer {
123-
grid-column: 2;
124-
align-self: end;
125-
}
126121
}

src/styles/blocks/person-page.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,6 @@
9898
padding-bottom: 30px;
9999
}
100100

101-
.person-page__footer {
102-
grid-area: footer;
103-
align-self: end;
104-
}
105-
106101
@media (min-width: 320px) {
107102
.person-page__main {
108103
grid-template-columns: 100%;

src/styles/blocks/search-page.css

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@
8080

8181
.search-page__empty {}
8282

83-
.search-page__footer {
84-
align-self: end;
85-
}
86-
8783
@media not all and (min-width: 1024px) {
8884
.search-page {
8985
display: grid;
@@ -118,10 +114,6 @@
118114
grid-area: main;
119115
margin-inline: auto;
120116
}
121-
122-
.search-page__footer {
123-
grid-area: footer;
124-
}
125117
}
126118

127119
@media not all and (min-width: 768px) {
@@ -240,11 +232,6 @@
240232
grid-column: 2/-1;
241233
justify-self: center;
242234
}
243-
244-
.search-page__footer {
245-
grid-column-start: 2;
246-
grid-column-end: -1;
247-
}
248235
}
249236

250237
@media (min-width: 1240px) {

src/styles/blocks/search-tag.css

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
border: 0;
55
display: flex;
66
justify-content: center;
7+
font-size: var(--font-size-s);
8+
line-height: var(--font-line-height-s);
79
}
810

911
.search-tag__legend {}
1012

11-
.search-tag__switch {
12-
font-size: var(--font-size-s);
13-
line-height: var(--font-line-height-s);
14-
}
13+
.search-tag__switch {}
1514

1615
@media not all and (min-width: 1024px) {
1716
.search-tag__legend {

src/styles/blocks/standalone-page.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
.standalone-page__header {
1313
padding: var(--offset);
1414
padding-top: clamp(20px, 8%, 130px);
15-
border-bottom: 1px solid;
15+
border-bottom: 1px solid hsl(var(--color-base-text) / 0.3);
1616
}
1717

1818
.standalone-page__title {

src/views/article-index.njk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
</main>
102102
</div>
103103

104-
{{ footer(class="index-block__footer") }}
105-
{% include "subscribe-popup.njk" %}
106104
</div>
105+
106+
{{ footer() }}
107+
{% include "subscribe-popup.njk" %}

src/views/doc.njk

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@
142142
</div>
143143
</main>
144144

145-
<div class="doc__footer doc__wrapper">
146-
{{ footer() }}
147-
</div>
148-
{% include "subscribe-popup.njk" %}
149145
</div>
146+
147+
{{ footer() }}
148+
{% include "subscribe-popup.njk" %}

0 commit comments

Comments
 (0)