mirror of
https://github.com/flarum/framework.git
synced 2025-02-27 00:07:39 +08:00
Mobile
This commit is contained in:
parent
039109559d
commit
127393b778
@ -58,10 +58,13 @@ export default class DiscussionPage extends Page {
|
||||
const scrollListener = new ScrollListener((top) => {
|
||||
const $hero = $('.DiscussionHero');
|
||||
if ($hero.offset()) {
|
||||
$hero.toggleClass('DiscussionHero--floating', top > 92);
|
||||
const container = $('.DiscussionHero').children('.container');
|
||||
const containerPadding = parseInt(container.css('padding-top')) + parseInt(container.css('padding-bottom'));
|
||||
|
||||
$hero.toggleClass('DiscussionHero--floating', top > 22 + containerPadding);
|
||||
$('.DiscussionPage-discussion')
|
||||
.children('.container')
|
||||
.toggleClass('scrolled', top > 92);
|
||||
.toggleClass('scrolled', top > 22 + containerPadding);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -27,6 +27,14 @@
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
|
||||
@media @desktop-up {
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
@media (max-width: @screen-tablet-max) {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
> .container {
|
||||
padding-top: 10px !important;
|
||||
}
|
||||
|
@ -153,11 +153,19 @@
|
||||
}
|
||||
|
||||
.DiscussionPage-discussion {
|
||||
> .container.scrolled {
|
||||
padding-top: ~"calc(90px + @{header-height})";
|
||||
@media @desktop-up {
|
||||
.container.scrolled {
|
||||
padding-top: ~"calc(90px + @{header-height})";
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: @screen-tablet-max) {
|
||||
.container.scrolled {
|
||||
padding-top: ~"calc(50px + @{header-height})";
|
||||
}
|
||||
}
|
||||
|
||||
.DiscussionPage-nav {
|
||||
margin-top: -1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user