Skip to content
Snippets Groups Projects
Commit 2d0c796a authored by Ron Lucke's avatar Ron Lucke
Browse files

Loginseite: FAQ-Box kann beliebig hoch werden

Closes #4998

Merge request studip/studip!3753
parent faa44101
No related branches found
No related tags found
No related merge requests found
...@@ -122,6 +122,7 @@ $gap-between-boxes: calc($login-page-margin / 2); ...@@ -122,6 +122,7 @@ $gap-between-boxes: calc($login-page-margin / 2);
#login-faq-content-wrapper { #login-faq-content-wrapper {
height: calc(100% - 32px); height: calc(100% - 32px);
max-height: 430px;
} }
.login-box-header { .login-box-header {
......
...@@ -137,6 +137,28 @@ $enable_news = Config::get()->LOGIN_NEWS_VISIBILITY && count($news_entries) > 0; ...@@ -137,6 +137,28 @@ $enable_news = Config::get()->LOGIN_NEWS_VISIBILITY && count($news_entries) > 0;
}); });
// --> // -->
<? if ($enable_faq) : ?>
STUDIP.domReady(() => {
const loginBox = document.getElementById('loginbox');
const faqContent = document.getElementById('login-faq-content-wrapper');
const htmlTag = document.documentElement;
const adjustFaqHeight = () => {
if (!htmlTag.classList.contains('responsive-display')) {
const loginBoxHeight = loginBox.offsetHeight;
const maxAllowedHeight = loginBoxHeight - 100;
faqContent.style.maxHeight = `${Math.max(maxAllowedHeight, 0)}px`;
}
};
adjustFaqHeight();
window.addEventListener('resize', adjustFaqHeight);
});
<? endif ?>
<? if ($enable_faq && $enable_news): ?> <? if ($enable_faq && $enable_news): ?>
const faqButton = document.getElementById('show-faq'); const faqButton = document.getElementById('show-faq');
const newsButton = document.getElementById('hide-faq'); const newsButton = document.getElementById('hide-faq');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment