feat(main-page): redesign using new components#24
Conversation
oostap1985
commented
Jun 1, 2026
- add redesigned base layout and includes
- add new navigation and external links data
- add art slider script
- update arts JSON and templates (exploding-head, mushroom)
- add new icons and fonts
- update global styles
- add redesigned base layout and includes - add new navigation and external links data - add art slider script - update arts JSON and templates (exploding-head, mushroom) - add new icons and fonts - update global styles
e7e4a2e to
b81a3ff
Compare
There was a problem hiding this comment.
Нет смысла создавать подобные отдельный файлы на редизайн, может только в некоторых местах. Тут просто ссылки: их набор никак не влияет
| contentContainer: "D-f Jc-c Ai-c" | ||
| } | ||
|
|
||
| href=`href=${it.url}` |
There was a problem hiding this comment.
Тут что-то странное: переменная без let/const
| --ml-blueGray:rgb(236, 240, 246,0.5); | ||
| --ml-gray200:#d1d5db; | ||
| --ml-gray350:#cacacaa0; | ||
| // redesign |
There was a problem hiding this comment.
В таких переменных нет смысла - меняем существующией
There was a problem hiding this comment.
Пока не понял, зачем новый базовый шаблон
There was a problem hiding this comment.
Отдельный базовый шаблон не нужен. Можно просто пока часть старых переменных оставить, чтобы другие страницы совсем не сломались
There was a problem hiding this comment.
Шрифты лучше с google fonts подключать, по крайне мере пока
| } | ||
| %> | ||
| <div class="Ctnt-s M7u;a;0 H100p Apcr1 Plci-c;c Plcc-c D-f -ExplodingOrangeA#ee980d -ExplodingOrangeB#f8c829 -ExplodingBrownA#662800 -ExplodingBrownB#6f2810 -ExplodingBrownC#9c2a00 -ExplodingBrownD#934800 -ExplodingBrownE#9b3c18 -ExplodingBrownF#a24b0b -ExplodingBrownG#f7ae48 -ExplodingBrownH#d2a55a -ExplodingBrownI#efd3ac"> | ||
| <!-- изменил у первого div M7u;a;0 --> |
There was a problem hiding this comment.
Комменты для ревьювера надо тут писать, а не в коде)
| @@ -0,0 +1,28 @@ | |||
| <% | |||
| const css = { | |||
| buttonShape:"-Sz100p D-f Jc-c Ai-c P10 Fns16 Bdrd8 Ts-$shortTs Bd1;s;$brand", | |||
There was a problem hiding this comment.
Pixel perfect нам не нужен, поэтому в большинстве мест лучше u использовать для размеров
| <% | ||
| const css = { | ||
| buttonShape:"-Sz100p D-f Jc-c Ai-c P10 Fns16 Bdrd8 Ts-$shortTs Bd1;s;$brand", | ||
| contentContainer: "D-f Jc-c Ai-c" |
| %> | ||
| <<%= it.tag %> <%= href %> | ||
| class="btn <%= css.buttonShape %> <%= css.buttonColors %>"> | ||
| <span class="<%= css.span %>"> |
|
|
||
| <a | ||
| href="<%= it.link %>" | ||
| alt="Link to <%= it.name %>" |
| :c:+_Bgc-$brand :c:+_Bdc-$brand :c:+_Bgc-$reAccent900_af,b :c:+_Bxsd0;1.5u;0;0;$reAccent900_af :c:+_Bdc-n"> | ||
| </label> | ||
|
|
||
| <label id="overlay" for="menu-toggle" |
There was a problem hiding this comment.
2 лейбла на 1 инпут - это что-то странное
There was a problem hiding this comment.
Меняем основной хедер, отдельный шаблон не нужен
There was a problem hiding this comment.
На мобильном не соответствует макету + логотип надо чуть побольше: 64px хотя бы
| <header class=" D-f Jc-sb Ai-c P15u;4u;2u md_P0;5.5p Bgc-$core950 Bcf -Blr0.4 Ps-f H-$headerH W100p C-$headerC Zi20"> | ||
|
|
||
| <%# Logo %> | ||
| <div class="W40 H16 md_W83 md_H34"> |
There was a problem hiding this comment.
Это наоборот делается: указываем размеры изображения, от которых зависит контейнер
There was a problem hiding this comment.
Ширину логотипа сделать 116, высоту: auto
| <%# Logo %> | ||
| <div class="W40 H16 md_W83 md_H34"> | ||
| <a href="/" id="header-logo" class="D-f Jc-c Ai-c -Sz100p <%= it.cssHeaderLogoVisibility %> Ts-O;$shortTs"> | ||
| <svg class="-Sz100p" alt="mlut logo"> |
There was a problem hiding this comment.
Если логотип не перекрашивается, то его лучше просто img делать. И посмотри как сейчас href у лого реализован - надо так же
| %> | ||
|
|
||
| <header class=" D-f Jc-sb Ai-c P15u;4u;2u md_P0;5.5p Bgc-$core950 Bcf -Blr0.4 Ps-f H-$headerH W100p C-$headerC Zi20"> | ||
|
|
There was a problem hiding this comment.
Много пустых строк - не надо так. Пусть будут только между крупными блоками
| </li> | ||
| <% }%> | ||
| </ul> | ||
| <script type="module"> |
| document.head.appendChild(link); | ||
| } | ||
|
|
||
| class ArtsSliderComponent extends HTMLElement { |
| <div class="D-f Fld-c Ai-c Gap4u W100p md_W80p md_Mxw350 lg_Mxw504"> | ||
| <div class="<%= heroCSS.gradient %> md_D-n"></div> | ||
|
|
||
| <h1 class="D Fnf-SNPro Fns6u Fnw-b Lnh100p Lts0 M3.5u;0 Txt C-$brand Ps Zi2 md_D-n">Make CSS exciting again!</h1> |
There was a problem hiding this comment.
Это не h1. Посмотри, какая сейчас разметка в hero секции
There was a problem hiding this comment.
И отступы (margin) по дефолту только с 1 стороны делаем: низ или верх
| <use href="/assets/img/icons.svg#twoTriangle"></use> | ||
| </svg> | ||
| <div class="D-n md_D-f md_Fld-c Gap8"> | ||
| <h1 class="Fnf-SNPro Fns48 M17;0 Fnw-b Lnh100p Lts0 Txt C-$brand">Make CSS exciting again!</h1> |
There was a problem hiding this comment.
Надо попробовать сверстать без дублирования контента. Такое только в крайнем случае делается
| <div class="D-n Ps-a W80p H150p T-195 L50p Tf -Tr-50p;0 <%= heroCSS.dradientDescTop %> <%= heroCSS.dradientDescBot %> md_D-f"> | ||
| <div class="Ps-a W80p Apcr1 T0 L10p Bdrd100p -Gdl180d,$reCore400;0,$reCore450;100p Ft -Blr100"></div> | ||
| </div> | ||
| <div class="D-f Fld-c Ai-c Gap4u W100p md_W80p md_Mxw350 lg_Mxw504"> |
There was a problem hiding this comment.
Кажется, что тут часть декора можно псевдоэлементами сделать
| <arts-slider class="D-f Ai-fs Fl1 W100p"> | ||
| <button class="prev W48 Apcr1 Mr40 As-c Bgc-tp Bd-n P0 Cs lg_Mr80"> | ||
| <svg class="Tf -Rt180d C-$brand C-$reBrand500_h C-$reBrand600_a Ts-$shortTs" width="17" height="29"> | ||
| <use href="/assets/img/icons.svg#arrow-slider"></use> |
There was a problem hiding this comment.
Для декоративных svg лучше отдельный спрайт сделать
| </svg> | ||
| </button> | ||
| </arts-slider> | ||
| <span class="Fns16 Fnw-l Lnh150p Lts0 C-$reAccent850 md_Ps-a md_L50p md_B-43 md_Tf md_-Tr-50p;0">Yes, this is CSS</span> |
There was a problem hiding this comment.
| <span class="Fns16 Fnw-l Lnh150p Lts0 C-$reAccent850 md_Ps-a md_L50p md_B-43 md_Tf md_-Tr-50p;0">Yes, this is CSS</span> | |
| <span class="Fns16 Fnw-l Lnh150p Lts0 C-$reAccent850 md_Ps-a md_L50p md_B-43 md_Tf md_-Tr-50p;0">Yes, this is pure CSS</span> |
|
|
||
| <h1 class="D Fnf-SNPro Fns6u Fnw-b Lnh100p Lts0 M3.5u;0 Txt C-$brand Ps Zi2 md_D-n">Make CSS exciting again!</h1> | ||
| <div class="D-f Fld-c Ai-c Gap2u Bgc-tp W100p Ps Zi2"> | ||
| <arts-slider class="D-f Ai-fs Fl1 W100p"> |
There was a problem hiding this comment.
Декоративные элементы лучше не в сам art-slider, а в контейнер выше
mr150
left a comment
There was a problem hiding this comment.
Чуть позже будут еще комменты
|
|
||
| <%- include('./burger.ejs') %> | ||
|
|
||
| <div class="Bgc-$core950 Ps-a R0 T-$headerH Ts-$longTs Tf -Trx101p Bd1;s;$brand Bdr-n Bdtlr3u Bdblr3u Mxw50u ^burger:c:~_-Trx0 W50vw P10u;0 md_All-ust @:h<420_P3u;0"> |
There was a problem hiding this comment.
@:h<420 странное решение, при чем тут высота?
There was a problem hiding this comment.
md_All-ust тоже выглядит сомнительно
| </div> | ||
| </div> | ||
| <button class="next W48 Apcr1 Ml40 As-c Bgc-tp Bd-n P0 Cs lg_Ml80"> | ||
| <svg class="C-$brand C-$reBrand500_h C-$reBrand600_a Ts-$shortTs" width="17" height="29"> |
There was a problem hiding this comment.
Кнопки надо чуть покрупнее на десктопе, а то они местами сливаются с декором
| <% for (let decor of Object.values(decorCSSArts)) { %> | ||
| <div class="D-n md_D <%= decor %>"></div> | ||
| <% } %> | ||
| <div class="W100p P0 Bxz-bb md_P16 md_Bdrd1u md_Bgc-$artFrameColorSmall md_Bxsd0;0;0;0.5u;$artFrameBorderSmall"> |
There was a problem hiding this comment.
Почему тут рамка через box-shadow, а не border?
There was a problem hiding this comment.
Bxz-bb - нет смысла, он уже у всех стоит. border-radius тут у рамки не нужен. padding пусть 2u будет, больше не надо
There was a problem hiding this comment.
Border "толстый" и забирал много пространства внутри блока, поэтому сделал через box-shadow.
| <use href="/assets/img/icons.svg#arrow-slider"></use> | ||
| </svg> | ||
| </button> | ||
| <div class="Ps Fl1 P0 Mnw0 md_P44 md_Bdrd1u md_Bgc-$artFrameColor md_Bxsd0;0;0;2u;$artFrameBorder"> |
There was a problem hiding this comment.
padding на десктопе пусть 32px будет
There was a problem hiding this comment.
И на md ширине попробуй не целиком рамку, а просто какую-то подложку делать
| </div> | ||
| </div> | ||
| </div> | ||
| <button class="next W48 Apcr1 Ml40 As-c Bgc-tp Bd-n P0 Cs lg_Ml80"> |
There was a problem hiding this comment.
Отступ у кнопок на lg:xl лучше от вьюпорта сделать, а то на планшете слишком далеко от основной части
|
|
||
| <%# Hero-section %> | ||
|
|
||
| <div class="Ps D-f Fld-c Ai-c Mt-$headerH W100p P6u;4u;10u Bgc-$reCore800 Ov-h <%= heroCSS.vertical %> <%= heroCSS.horizontal %> md_Fld-rr md_Jc-sb md_P11p;5.5p;7p"> |
There was a problem hiding this comment.
На md разрешении отступы и размеры недостаточно адаптированы - слишком большие. Как минимум, можно поля, часть отступов уменьшить и чуть размер заголовка
There was a problem hiding this comment.
Еще раз: отдельные файлы с данными для редизайна не нужны