diff --git a/local/include/body.php b/local/include/body.php index 1f3e5a6..591277c 100644 --- a/local/include/body.php +++ b/local/include/body.php @@ -2,9 +2,11 @@ global $USER; ?> -"> - $APPLICATION->IncludeComponent("bitrix:menu", "evolution", Array( - "ALLOW_MULTI_SELECT" => "N", // Разрешить несколько активных пунктов одновременно +"> + $APPLICATION->IncludeComponent("bitrix:menu", + "evolution", + Array( + "ALLOW_MULTI_SELECT" => "N", // Разрешить несколько активных пунктов одновременно "CHILD_MENU_TYPE" => "left", // Тип меню для остальных уровней "DELAY" => "N", // Откладывать выполнение шаблона меню "MAX_LEVEL" => "1", // Уровень вложенности меню @@ -16,10 +18,11 @@ "MENU_CACHE_USE_GROUPS" => "Y", // Учитывать права доступа "ROOT_MENU_TYPE" => "top", // Тип меню для первого уровня "USE_EXT" => "N", // Подключать файлы с именами вида .тип_меню.menu_ext.php + "ANNOUNCE_BUTTON_URL" => "https://www.evoleasing.ru/about/news/protsess-reorganizatsii/" ), false ); ?> -"> +"> $APPLICATION->ShowPanel(); ?> \ No newline at end of file diff --git a/local/templates/.default/components/bitrix/menu/evolution/script.js b/local/templates/.default/components/bitrix/menu/evolution/script.js new file mode 100644 index 0000000..50085f7 --- /dev/null +++ b/local/templates/.default/components/bitrix/menu/evolution/script.js @@ -0,0 +1,60 @@ +$(function() +{ + var w = 1310; + if(window.innerWidth >= 1360 && window.innerWidth <= 1420) + { + w = 1200; + } + if(window.innerWidth >= 1280 && window.innerWidth < 1360) + { + w = 1130; + } + var announce_panel_offset = (window.innerWidth - w) / 2; + console.log("window", announce_panel_offset, w); + + if(window.innerWidth > 1279) + { + $("#main_menu_announce").css("margin-left", '-'+announce_panel_offset+'px'); + $("#main_menu_announce").css("margin-right", '-'+announce_panel_offset+'px'); + $("#main_menu_announce_content").css("margin-left", announce_panel_offset+'px'); + $("#main_menu_announce_content").css("margin-right", announce_panel_offset+'px'); + } + else + { + $("#main_menu_announce").css("margin-left", '0px'); + $("#main_menu_announce").css("margin-right", '0px'); + $("#main_menu_announce_content").css("margin-left", '0px'); + $("#main_menu_announce_content").css("margin-right", '0px'); + } + + $(window).on("resize", function() + { + var w = 1310; + if(window.innerWidth >= 1360 && window.innerWidth <= 1420) + { + w = 1200; + } + if(window.innerWidth >= 1280 && window.innerWidth < 1360) + { + w = 1130; + } + var announce_panel_offset = (window.innerWidth - w) / 2; + console.log("window", announce_panel_offset, w); + + if(window.innerWidth > 1279) + { + $("#main_menu_announce").css("margin-left", '-'+announce_panel_offset+'px'); + $("#main_menu_announce").css("margin-right", '-'+announce_panel_offset+'px'); + $("#main_menu_announce_content").css("margin-left", announce_panel_offset+'px'); + $("#main_menu_announce_content").css("margin-right", announce_panel_offset+'px'); + //console.log("window", window.innerWidth); + } + else + { + $("#main_menu_announce").css("margin-left", '0px'); + $("#main_menu_announce").css("margin-right", '0px'); + $("#main_menu_announce_content").css("margin-left", '0px'); + $("#main_menu_announce_content").css("margin-right", '0px'); + } + }); +}); \ No newline at end of file diff --git a/local/templates/.default/components/bitrix/menu/evolution/style.css b/local/templates/.default/components/bitrix/menu/evolution/style.css index e69de29..f3aff56 100644 --- a/local/templates/.default/components/bitrix/menu/evolution/style.css +++ b/local/templates/.default/components/bitrix/menu/evolution/style.css @@ -0,0 +1,158 @@ +.page_header_announce { + height: 182px !important; + + @media all and (min-width: 1420px) and (max-width: 1600px) { + height: 163px !important; + } + + @media all and (min-width: 1280px) and (max-width: 1420px) { + height: 163px !important; + } + + @media all and (min-width: 769px) and (max-width: 1279px) { + height: 135px !important; + } + + @media all and (min-width: 768px) and (max-width: 768px) { + height: 84px !important; + } + + @media all and (max-width: 767px) { + height: 153px !important; + } +} + +.page_header_announce_container { + padding: 0px 0 105px 0 !important; + + @media all and (min-width: 1420px) and (max-width: 1600px) { + padding: 0px 0 100px 0 !important; + } + + @media all and (min-width: 1280px) and (max-width: 1420px) { + padding: 0px 0 100px 0 !important; + } + + @media all and (min-width: 769px) and (max-width: 1279px) { + padding: 0px 0 50px 0 !important; + } + + @media all and (min-width: 768px) and (max-width: 768px) { + padding: 0px 0 35px 0 !important; + } + + @media all and (max-width: 767px) { + padding: 0px 0 35px 0 !important; + height: 85px !important; + } +} + +#main_menu_announce { + background-color: #04A8A4; + margin-top: 0px; + margin-bottom: 10px; + height: 60px; + + @media all and (max-width: 1279px) { + position: absolute; + } + + @media all and (min-width: 769px) and (max-width: 1279px) { + position: absolute; + top: 45px; + left: -275px; + right: -180px; + + padding-left: 80px; + padding-right: 80px; + } + + @media all and (min-width: 768px) and (max-width: 768px) { + position: absolute; + top: 32px; + left: -80px; + right: -80px; + + padding-left: 80px; + padding-right: 80px; + } + + @media all and (max-width: 767px) { + top: 40px; + left: -80px; + right: -80px; + + padding-left: 80px; + padding-right: 80px; + } +} + +#main_menu_announce_content { + display: flex; + flex-direction: row; + align-items: center; + color: #fff; + font-weight: 300; + font-size: 22px; + height: 100%; + justify-content: space-between; + + @media all and (min-width: 1280px) and (max-width: 1420px) { + font-size: 21px; + line-height: 19px; + } + + @media all and (min-width: 900px) and (max-width: 1279px) { + font-size: 20px; + line-height: 19px; + } + + @media all and (min-width: 769px) and (max-width: 900px) { + font-size: 19px; + line-height: 19px; + } + + @media all and (min-width: 768px) and (max-width: 768px) { + font-size: 17px; + line-height: 19px; + } + + @media all and (min-width: 580px) and (max-width: 767px) { + font-size: 16px; + line-height: 18px; + } + + @media all and (min-width: 440px) and (max-width: 579px) { + font-size: 14px; + line-height: 16px; + } + + @media all and (max-width: 439px) { + font-size: 12px; + line-height: 13px; + } +} + +#main_menu_announce_content_text { + padding-right: 12px; +} + +.content_with_offset_announce { + padding-top: 222px !important; + + @media all and (min-width: 1280px) and (max-width: 1600px) { + padding-top: 202px !important; + } + + @media all and (min-width: 769px) and (max-width: 1279px) { + padding-top: 175px !important; + } + + @media all and (min-width: 768px) and (max-width: 768px) { + padding-top: 183px !important; + } + + @media all and (max-width: 767px) { + padding-top: 192px !important; + } +} \ No newline at end of file diff --git a/local/templates/.default/components/bitrix/menu/evolution/template.php b/local/templates/.default/components/bitrix/menu/evolution/template.php index 886d26c..fefe65a 100644 --- a/local/templates/.default/components/bitrix/menu/evolution/template.php +++ b/local/templates/.default/components/bitrix/menu/evolution/template.php @@ -1,6 +1,6 @@ - + @@ -15,6 +15,14 @@ + + + Больше преимуществ, больше возможностей: мы присоединяемся к «Совкомбанк Лизинг» + "> + Подробнее + + + $selected = "Главная"; foreach($arResult as $arItem) diff --git a/local/templates/evolution/css/main/style.css b/local/templates/evolution/css/main/style.css index 41ed7f6..0a5ad5d 100644 --- a/local/templates/evolution/css/main/style.css +++ b/local/templates/evolution/css/main/style.css @@ -7,16 +7,26 @@ } main { overflow-x: hidden; - padding-top: 112px; + padding-top: 182px !important; } -@media all and (max-width: 1600px) and (min-width: 1280px) { +@media all and (min-width: 1280px) and (max-width: 1600px) { main { - padding-top: 98px; + padding-top: 163px !important; } } -@media all and (max-width: 1279px) { +@media all and (min-width: 769px) and (max-width: 1279px) { main { - padding-top: 86px; + padding-top: 136px !important; + } +} +@media all and (min-width: 768px) and (max-width: 768px) { + main { + padding-top: 144px !important; + } +} +@media all and (max-width: 767px) { + main { + padding-top: 153px !important; } } main section.gray { diff --git a/local/templates/evolution/css/main/style.less b/local/templates/evolution/css/main/style.less index 4744632..509c95f 100644 --- a/local/templates/evolution/css/main/style.less +++ b/local/templates/evolution/css/main/style.less @@ -7,17 +7,25 @@ } main { - overflow-x: hidden; - padding-top: 112px; + overflow-x: hidden; + //padding-top: 112px; + padding-top: 182px !important; - @media all and (max-width: 1600px) and (min-width: 1280px) { - padding-top: 98px; + @media all and (min-width: 1280px) and (max-width: 1600px) { + padding-top: 163px !important; } - @media all and (max-width: 1279px) { - padding-top: 86px; + @media all and (min-width: 769px) and (max-width: 1279px) { + padding-top: 136px !important; } + @media all and (min-width: 768px) and (max-width: 768px) { + padding-top: 144px !important; + } + + @media all and (max-width: 767px) { + padding-top: 153px !important; + } section { //padding: 80px 0;