Last active
February 12, 2024 09:42
-
-
Save Postnov/29758002bbe281d04415c16d187cf57d to your computer and use it in GitHub Desktop.
Panel about redesign GetCourse. Панель про обновление Геткурса.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
(function() { | |
$(() => { | |
if ($('#gcAccountUserMenu').length) { | |
let messageText = 'Скоро оформление школы изменится. Если что-то будет отображаться некорректно, зайдите через 15 минут или попробуйте очистить кэш.<a href="https://yandex.ru/support/common/browsers-settings/cache.html">Инструкция по очистке кэша</a>'; | |
let a = $(`<div class="message-wrapper"><div class="message-text">${messageText}</div></div>`); | |
let b = $(`<button class="message-btn">Закрыть</button>`); | |
let c = localStorage.getItem("redesignPopupView"); | |
null == c && (a.append(b), $("body").append(a), b.click(function() { | |
localStorage.setItem("redesignPopupView", !0), | |
a.addClass("fadeOut"), | |
setTimeout(function(){ a.remove() }, 1e3) | |
})); | |
} | |
}); | |
})(); | |
</script> | |
<style> | |
@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700;800;900&display=swap'); | |
:root { | |
/* Цвета */ | |
--redesign-background-color: #333; | |
--redesign-text-color: #FFFFFF; | |
--redesign-link-color: #FFFFFF; | |
--redesign-button-background-color: #fff; | |
--redesign-button-background-color-hover: #222; | |
--redesign-button-color: #333; | |
--redesign-button-color-hover: #fff; | |
/* Шрифт */ | |
--redesign-panel-font: 'Golos', 'Jost', 'Lato', Helvetica, Arial, sans-serif; | |
} | |
.message-wrapper{width:100%;position:fixed;left:50%;bottom:50px;background:var(--redesign-background-color);border-radius:50px;display:flex;flex-direction:row;align-items:center;padding:20px 40px;z-index:10000;max-width:1000px;animation:fadeIn .3s linear 1 forwards 5s;transform:translate(-50%,10px);opacity:0}.message-wrapper.fadeOut{animation:fadeOut .3s linear 1 forwards}.message-text,.message-btn{font-family:var(--redesign-panel-font),sans-serif;font-style:normal;font-weight:400;font-size:16px;line-height:140%;color:var(--redesign-text-color)}.message-text{padding-right:20px}.message-btn{border:none;cursor:pointer;background:var(--redesign-button-background-color);border-radius:30px;padding:20px 89px;transition:.3s all;color:var(--redesign-button-color)}.message-btn:hover{background-color:var(--redesign-button-background-color-hover);color:var(--redesign-button-color-hover)}.message-text a{border-bottom:1px solid var(--redesign-link-color);text-decoration:none;color:var(--redesign-link-color)!important}@media (max-width:991px){.message-wrapper{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;border-radius:20px}.message-text{margin-bottom:30px;margin-right:0;padding-right:0}}@keyframes fadeIn{0%{transform:translate(-50%,10px);opacity:0}100%{transform:translate(-50%,0);opacity:1}}@keyframes fadeOut{0%{transform:translate(-50%,0);opacity:1}100%{transform:translate(-50%,10px);opacity:0}} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
$(() => { | |
if ($('#gcAccountUserMenu').length) { | |
let messageText = 'Если в дизайне школе что-то отображается некорректно, зайдите через 15 минут или попробуйте очистить кэш.<a href="https://yandex.ru/support/common/browsers-settings/cache.html">Инструкция по очистке кэша</a>'; | |
let a = $(`<div class="message-wrapper"><div class="message-text">${messageText}</div></div>`); | |
let b = $(`<button class="message-btn">Закрыть</button>`); | |
let c = localStorage.getItem("redesignPopupView"); | |
null == c && (a.append(b), $("body").append(a), b.click(function() { | |
localStorage.setItem("redesignPopupView", !0), | |
a.addClass("fadeOut"), | |
setTimeout(function(){ a.remove() }, 1e3) | |
})); | |
} | |
}); | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700;800;900&display=swap'); | |
:root { | |
/* Цвета */ | |
--redesign-background-color: #333; | |
--redesign-text-color: #FFFFFF; | |
--redesign-link-color: #FFFFFF; | |
--redesign-button-background-color: #fff; | |
--redesign-button-background-color-hover: #222; | |
--redesign-button-color: #333; | |
--redesign-button-color-hover: #fff; | |
/* Шрифт */ | |
--redesign-panel-font: 'Golos', 'Jost', 'Lato', Helvetica, Arial, sans-serif; | |
} | |
/* Обёртка, фон */ | |
.message-wrapper { | |
width: 100%; | |
position: fixed; | |
left: 50%; | |
bottom: 50px; | |
background: var(--redesign-background-color); | |
border-radius: 50px; | |
display: flex; | |
flex-direction: row; | |
align-items: center; | |
padding: 20px 40px; | |
z-index: 10000; | |
max-width: 1000px; | |
animation: fadeIn .3s linear 1 forwards 5s; | |
transform: translate(-50%, 10px); | |
opacity: 0; | |
} | |
/* Анимация появления */ | |
.message-wrapper.fadeOut { | |
animation: fadeOut .3s linear 1 forwards; | |
} | |
/* Стили текста и кнопки */ | |
.message-text, | |
.message-btn { | |
font-family: var(--redesign-panel-font), sans-serif; | |
font-style: normal; | |
font-weight: 400; | |
font-size: 16px; | |
line-height: 140%; | |
color: var(--redesign-text-color); | |
} | |
/* Стиль текста */ | |
.message-text { | |
padding-right: 20px; | |
} | |
/* Стиль кнопки */ | |
.message-btn { | |
border: none; | |
cursor: pointer; | |
background: var(--redesign-button-background-color); | |
border-radius: 30px; | |
padding: 20px 89px; | |
transition: .3s all; | |
color: var(--redesign-button-color) | |
} | |
/* Стиль кнопки при ховере */ | |
.message-btn:hover { | |
background-color: var(--redesign-button-background-color-hover); | |
color: var(--redesign-button-color-hover); | |
} | |
/* Стиль ссылки */ | |
.message-text a { | |
border-bottom: 1px solid var(--redesign-link-color); | |
text-decoration: none; | |
color: var(--redesign-link-color) !important; | |
} | |
/* Адаптив */ | |
@media (max-width: 991px) { | |
.message-wrapper { | |
display: flex; | |
flex-direction: column; | |
justify-content: center; | |
align-items: center; | |
padding: 20px; | |
border-radius: 20px; | |
} | |
.message-text { | |
margin-bottom: 30px; | |
margin-right: 0; | |
padding-right: 0; | |
} | |
} | |
/* Анимация появления и скрытия */ | |
@keyframes fadeIn { | |
0% { | |
transform: translate(-50%, 10px); | |
opacity: 0; | |
} | |
100% { | |
transform: translate(-50%, 0); | |
opacity: 1; | |
} | |
} | |
@keyframes fadeOut { | |
0% { | |
transform: translate(-50%, 0); | |
opacity: 1; | |
} | |
100% { | |
transform: translate(-50%, 10px); | |
opacity: 0; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700;800;900&display=swap'); | |
:root { | |
/* Цвета */ | |
--redesign-background-color: #333; | |
--redesign-text-color: #FFFFFF; | |
--redesign-link-color: #FFFFFF; | |
--redesign-button-background-color: #fff; | |
--redesign-button-background-color-hover: #222; | |
--redesign-button-color: #333; | |
--redesign-button-color-hover: #fff; | |
/* Шрифт */ | |
--redesign-panel-font: 'Golos', 'Jost', 'Lato', Helvetica, Arial, sans-serif; | |
} | |
.message-wrapper{width:100%;position:fixed;left:50%;bottom:50px;background:var(--redesign-background-color);border-radius:50px;display:flex;flex-direction:row;align-items:center;padding:20px 40px;z-index:10000;max-width:1000px;animation:fadeIn .3s linear 1 forwards 5s;transform:translate(-50%,10px);opacity:0}.message-wrapper.fadeOut{animation:fadeOut .3s linear 1 forwards}.message-text,.message-btn{font-family:var(--redesign-panel-font),sans-serif;font-style:normal;font-weight:400;font-size:16px;line-height:140%;color:var(--redesign-text-color)}.message-text{padding-right:20px}.message-btn{border:none;cursor:pointer;background:var(--redesign-button-background-color);border-radius:30px;padding:20px 89px;transition:.3s all;color:var(--redesign-button-color)}.message-btn:hover{background-color:var(--redesign-button-background-color-hover);color:var(--redesign-button-color-hover)}.message-text a{border-bottom:1px solid var(--redesign-link-color);text-decoration:none;color:var(--redesign-link-color)!important}@media (max-width:991px){.message-wrapper{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;border-radius:20px}.message-text{margin-bottom:30px;margin-right:0;padding-right:0}}@keyframes fadeIn{0%{transform:translate(-50%,10px);opacity:0}100%{transform:translate(-50%,0);opacity:1}}@keyframes fadeOut{0%{transform:translate(-50%,0);opacity:1}100%{transform:translate(-50%,10px);opacity:0}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment