-
Notifications
You must be signed in to change notification settings - Fork 2
feat(main-page): redesign using new components #24
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
b81a3ff
280bf58
844ee23
f19a9ec
c907410
44d5b0f
fb7f50e
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 |
|---|---|---|
| @@ -1,38 +1,47 @@ | ||
| [ | ||
| { | ||
| "artId":"ghost", | ||
| "bgColor":"Bgc-$artGhost" | ||
| "bgColor":"Bgc-$artGhost", | ||
| "showSlider": true | ||
| }, | ||
| { | ||
| "artId":"flushed-emoji", | ||
| "bgColor":"Bgc-$artFlushedEmoji" | ||
| "bgColor":"Bgc-$artFlushedEmoji", | ||
| "showSlider": true | ||
| }, | ||
| { | ||
| "artId":"penrose-triangle", | ||
| "bgColor":"Bgc-$artPenroseTriangle" | ||
| "bgColor":"Bgc-$artPenroseTriangle", | ||
| "showSlider": true | ||
| }, | ||
| { | ||
| "artId":"exploding-head", | ||
| "bgColor":"Bgc-$artExplodingHead" | ||
| "bgColor":"Bgc-$artExplodingHead", | ||
| "showSlider": true | ||
| }, | ||
| { | ||
| "artId":"clown-emoji", | ||
| "bgColor":"Bgc-$artClownEmoji" | ||
| "bgColor":"Bgc-$artClownEmoji", | ||
| "showSlider": true | ||
| }, | ||
| { | ||
| "artId":"mushroom", | ||
| "bgColor":"Bgc-$artMushroom" | ||
| "bgColor":"Bgc-$artMushroom", | ||
| "showSlider": true | ||
| }, | ||
| { | ||
| "artId":"robot-hare", | ||
| "bgColor":"Bgc-$artRobotHare" | ||
| "bgColor":"Bgc-$artRobotHare", | ||
| "showSlider": true | ||
| }, | ||
| { | ||
| "artId":"funny-cake", | ||
| "bgColor":"Bgc-$artFunnyCake" | ||
| "bgColor":"Bgc-$artFunnyCake", | ||
| "showSlider": false | ||
| }, | ||
| { | ||
| "artId":"cat", | ||
| "bgColor":"Bgc-$artCat" | ||
| "bgColor":"Bgc-$artCat", | ||
| "showSlider": false | ||
| } | ||
| ] | ||
|
Contributor
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. Нет смысла создавать подобные отдельный файлы на редизайн, может только в некоторых местах. Тут просто ссылки: их набор никак не влияет
Contributor
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. Еще раз: отдельные файлы с данными для редизайна не нужны |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| [ | ||
| { | ||
| "name":"X", | ||
| "icon":"xcom", | ||
| "link":"https://x.com/mlutcss" | ||
| }, | ||
| { | ||
| "name":"Github", | ||
| "icon":"github", | ||
| "link":"https://github.com/mlutcss/mlut" | ||
| } | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| [ | ||
| { | ||
| "link":"#0", | ||
| "text":"Features" | ||
| }, | ||
| { | ||
| "link":"/arts", | ||
| "text":"Art" | ||
| }, | ||
| { | ||
| "link":"#0", | ||
| "text":"Showcase" | ||
| }, | ||
| { | ||
| "link":"https://docs.mlut.style/", | ||
| "text":"Docs" | ||
| }, | ||
| { | ||
| "link":"https://play.mlut.style/", | ||
| "text":"Sandbox" | ||
| } | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <% | ||
| const css = { | ||
| buttonShape:"-Sz100p D-f Jc-c Ai-c P10 Fns16 Bdrd8 Ts-$shortTs Bd1;s;$brand", | ||
|
Contributor
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. Pixel perfect нам не нужен, поэтому в большинстве мест лучше
Collaborator
Author
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. Исправил |
||
| contentContainer: "D-f Jc-c Ai-c" | ||
|
Contributor
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. Не используется
Collaborator
Author
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. Исправил |
||
| } | ||
|
|
||
| href=`href=${it.url}` | ||
|
Contributor
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. Тут что-то странное: переменная без
Collaborator
Author
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. Исправил |
||
|
|
||
| if (it.variant === 'brand') { | ||
| css.buttonColors = "Bgc-$brand Bgc-$reBrand500_h Bgc-$reBrand600_a"; | ||
| css.span = "Lnh100p Lts0 C#fff"; | ||
| } else { | ||
| css.buttonColors = "Bgc-$btnBg100 Bgc-$btnBg200_h Bgc-$btnBg300_a"; | ||
| css.span = "Lnh100p Lts0 C#22141A"; | ||
| } | ||
|
|
||
| if (!it.tag) { | ||
| it.tag = 'a' | ||
| } else { | ||
| href = '' | ||
| } | ||
| %> | ||
| <<%= it.tag %> <%= href %> | ||
| class="btn <%= css.buttonShape %> <%= css.buttonColors %>"> | ||
| <span class="<%= css.span %>"> | ||
|
Contributor
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. Зачем этот span?
Collaborator
Author
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. Исправил |
||
| <%= it.text %> | ||
| </span> | ||
| </<%= it.tag %>> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| <% | ||
| if(it.name === "X") { | ||
| css.width = "24", | ||
| css.height = "24" | ||
| } else { | ||
| css.width = "26", | ||
| css.height = "26" | ||
| } | ||
| %> | ||
|
|
||
| <a | ||
| href="<%= it.link %>" | ||
| alt="Link to <%= it.name %>" | ||
|
Contributor
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. Ссылке не нужен alt
Collaborator
Author
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. Исправил |
||
| target="_blank" | ||
| class="-Ctx-logo Ps -Sz32 D-f Jc-c Ai-c" | ||
| > | ||
| <svg | ||
| class="Fi-$reAccent900 Fio1 ^logo:h:_Fi-$brand Ts-$shortTs" | ||
| width="<%= css.width %>" | ||
| height="<%= css.height %>" | ||
| > | ||
| <use href="/assets/img/icons.svg#<%= it.icon %>"></use> | ||
| </svg> | ||
| </a> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <input type="checkbox" id="menu-toggle" hidden | ||
| class="-Ctx-burger Zi5 md_D-n"> | ||
|
|
||
| <label for="menu-toggle" | ||
| class="D md_D-n P1u Bd-n Bdrd1u H90p Apcr1 Ps-r Bgc-n Zi5 Tsd-$transD | ||
| D_af,b Ct_af,b W4u_af,b H0.5u_af,b M0;0;1u_af,b Bgc-$reAccent900_af,b Zi10_af,b Bdrd2u_af,b | ||
| Bxsd0;1.5u;0;0;$reAccent900_af | ||
| :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" | ||
|
Contributor
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. 2 лейбла на 1 инпут - это что-то странное
Contributor
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. Не исправлено |
||
| class="Ps-a W100vw Tsd-$transD H100vh T0 R0 D-n Bgc-n :c:~_D :c:~_Bgc#000*60p md_D-n"> | ||
| </label> | ||
|
Contributor
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. Меняем основной хедер, отдельный шаблон не нужен
Contributor
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. На мобильном не соответствует макету + логотип надо чуть побольше: 64px хотя бы
Collaborator
Author
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. Исправил |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| <% | ||
| const css = { | ||
| navLinkDesktop: "md_Txd-n md_C-$brand_h Ts-$shortTs", | ||
| navLinkMobile: "C-$reAccent900 Txd-n C-$brand_a Pb2u Bdb1;s;$brand md_Bdb-n", | ||
| navLi: "md_Pb0 md_Bd-n md_M10" | ||
| } | ||
| %> | ||
|
|
||
| <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"> | ||
|
|
||
|
Contributor
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. Много пустых строк - не надо так. Пусть будут только между крупными блоками |
||
| <%# Logo %> | ||
| <div class="W40 H16 md_W83 md_H34"> | ||
|
Contributor
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. Это наоборот делается: указываем размеры изображения, от которых зависит контейнер
Contributor
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. Ширину логотипа сделать 116, высоту: auto
Collaborator
Author
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. Исправил |
||
| <a href="/" id="header-logo" class="D-f Jc-c Ai-c -Sz100p <%= it.cssHeaderLogoVisibility %> Ts-O;$shortTs"> | ||
| <svg class="-Sz100p" alt="mlut logo"> | ||
|
Contributor
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. Если логотип не перекрашивается, то его лучше просто img делать. И посмотри как сейчас href у лого реализован - надо так же
Collaborator
Author
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. Исправил |
||
| <use href="/assets/img/icons.svg#header-logo"></use> | ||
| </svg> | ||
| </a> | ||
| </div> | ||
|
|
||
| <%# Menu %> | ||
| <div class="D-f Fld-r Jc-fe md_D-f md_Jc-e md_Gap8u md_Fns-$headerFns"> | ||
|
|
||
| <%- 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"> | ||
|
Contributor
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.
Contributor
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.
|
||
| <nav class="M0;0;9u md_M0"> | ||
| <h2 class="P0;5u M0;0;7u Txa-r C-$brand md_D-n @:h<420_M0;0;4u"> Menu </h2> | ||
| <ul id="nav-menu" class="C-$reAccent900 H40p D-f Jc-c Fld-c Gap6u P0;5u Txa-r Fns4u Lsst-n M0 md_Fld-r md_Jc-sb md_P0 md_H100p md_Gap8u md_Txa-c md_Fns3u @:h<420:w<gMd_Fld-r @:h<420:w<gMd_Flw-w @:h<420:w<gMd_Jc-fe"> | ||
| <% for (let navLink of it.navLinksRedesign) {%> | ||
| <li class=" <%= css.navLi %>"> | ||
| <a href="<%= navLink.link %>" class="<%= css.navLinkMobile %> <%= css.navLinkDesktop %>"> | ||
| <%= navLink.text %> | ||
| </a> | ||
| </li> | ||
| <% }%> | ||
| </ul> | ||
| <script type="module"> | ||
|
Contributor
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. Это легаси - убираем)
Collaborator
Author
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. Убрал |
||
| if(window.location.href.includes('productradar')) { | ||
| const navMenu = document.getElementById('nav-menu'); | ||
| const newItem = navMenu.lastElementChild.cloneNode(true); | ||
| const link = newItem.firstElementChild; | ||
|
|
||
| link.textContent = 'Вебинар'; | ||
| link.href = 'https://forms.gle/GjneTZGWHkeCavev5'; | ||
| link.setAttribute('target', 'blank'); | ||
| link.classList.add('Fnw-b'); | ||
| navMenu.appendChild(newItem); | ||
| } | ||
| </script> | ||
| </nav> | ||
|
|
||
| <%# External links %> | ||
| <div> | ||
| <h2 class="P0;5u Txa-r M0;0;3u C-$brand md_D-n @:h<420_M0;0;4u"> Find us</h2> | ||
| <div class="D-f Fld-r Jc-fe Ai-c Gap3u P0;5u H8u md_D-n"> | ||
| <% for (let extLink of it.extLinksRedesign) {%> | ||
| <%- include('../components/sm-link.ejs',{ | ||
| icon: `${extLink.icon}`, | ||
| link: `${extLink.link}`, | ||
| name: `${extLink.name}` | ||
| }) %> | ||
| <% }%> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <%# Desktop links %> | ||
| <div class="Ai-c Jc-sb P1u;2.5u D-n md_D-f md_Gap8u md_P0"> | ||
| <% for (let extLink of it.extLinksRedesign) { %> | ||
| <%- include('../components/sm-link.ejs',{ | ||
| icon: `${extLink.icon}`, | ||
| link: `${extLink.link}`, | ||
| name: `${extLink.name}` | ||
| }) %> | ||
| <% } %> | ||
| </div> | ||
| </div> | ||
|
|
||
| </header> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,8 @@ | |
| artLayer: "W100p Apcr1 Bdrd100p Ps-a" | ||
| } | ||
| %> | ||
| <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 --> | ||
|
Contributor
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. Комменты для ревьювера надо тут писать, а не в коде)
Collaborator
Author
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 class="Ctnt-s H100p Apcr1 M1u;a;0 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"> | ||
| <!-- Head --> | ||
| <div class="Apcr1 Bdrd100p @c:apcr>=1/1_H80p @c:apcr<=1/1_W80p M-a Ps-r"> | ||
| <!-- Back of the head parts --> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.