Skip to content
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

Improved: global view: mobile view #5297

Merged
merged 12 commits into from
Apr 15, 2023
2 changes: 1 addition & 1 deletion app/views/index/global.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@

<div id="overlay">
<a class="close" href="#"><?= _i('close') ?></a>
<div id="panel"<?= FreshRSS_Context::$user_conf->display_posts ? '' : ' class="hide_posts"' ?>>
</div>
<div id="panel"<?= FreshRSS_Context::$user_conf->display_posts ? '' : ' class="hide_posts"' ?>>
</div>
2 changes: 2 additions & 0 deletions p/scripts/global_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function load_panel(link) {

document.getElementById('overlay').classList.add('visible');
panel.classList.add('visible');
document.documentElement.classList.add('slider-active');

// Force the initial scroll to the top.
// Without it, if one scrolls down in a category (for instance)
Expand Down Expand Up @@ -70,6 +71,7 @@ function init_close_panel() {
panel.innerHTML = '';
panel.classList.remove('visible');
document.getElementById('overlay').classList.remove('visible');
document.documentElement.classList.remove('slider-active');
return false;
};
document.addEventListener('keydown', ev => {
Expand Down
6 changes: 3 additions & 3 deletions p/themes/Alternative-Dark/adark.css
Original file line number Diff line number Diff line change
Expand Up @@ -1050,22 +1050,22 @@ kbd {
}

.aside .toggle_aside,
#panel .close,
#overlay .close,
.dropdown-menu .toggle_aside,
#slider .toggle_aside {
background: var(--background-color-light);
border-bottom-color: var(--border-color-dark);
}

.aside .toggle_aside:hover,
#panel .close:hover,
#overlay .close:hover,
.dropdown-menu .toggle_aside:hover,
#slider .toggle_aside:hover {
background-color: var(--background-color-hover);
}

.aside .toggle_aside:hover .icon,
#panel .close:hover .icon,
#overlay .close:hover .icon,
.dropdown-menu .toggle_aside:hover .icon {
filter: brightness(2);
}
Expand Down
6 changes: 3 additions & 3 deletions p/themes/Alternative-Dark/adark.rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -1050,22 +1050,22 @@ kbd {
}

.aside .toggle_aside,
#panel .close,
#overlay .close,
.dropdown-menu .toggle_aside,
#slider .toggle_aside {
background: var(--background-color-light);
border-bottom-color: var(--border-color-dark);
}

.aside .toggle_aside:hover,
#panel .close:hover,
#overlay .close:hover,
.dropdown-menu .toggle_aside:hover,
#slider .toggle_aside:hover {
background-color: var(--background-color-hover);
}

.aside .toggle_aside:hover .icon,
#panel .close:hover .icon,
#overlay .close:hover .icon,
.dropdown-menu .toggle_aside:hover .icon {
filter: brightness(2);
}
Expand Down
9 changes: 8 additions & 1 deletion p/themes/Ansum/_mobile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}

.aside .toggle_aside,
#panel .close,
#overlay .close,
.dropdown-menu .toggle_aside,
#slider .toggle_aside {
background-color: variables.$main-first;
Expand Down Expand Up @@ -52,6 +52,13 @@
height: calc(100% - 8rem);
}

#panel {
top: 0;
right: 0;
bottom: 0;
left: 0;
}

.post {
padding-left: 1rem;
padding-right: 1rem;
Expand Down
12 changes: 9 additions & 3 deletions p/themes/Ansum/ansum.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions p/themes/Ansum/ansum.rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -1188,19 +1188,19 @@ main.prompt {
padding: 0.5rem 1rem;
}
.aside .toggle_aside,
#panel .close,
#overlay .close,
.dropdown-menu .toggle_aside,
#slider .toggle_aside {
background-color: #ca7227;
}
.aside .toggle_aside:hover,
#panel .close:hover,
#overlay .close:hover,
.dropdown-menu .toggle_aside:hover,
#slider .toggle_aside:hover {
background-color: #b7641d;
}
.aside .toggle_aside .icon,
#panel .close .icon,
#overlay .close .icon,
.dropdown-menu .toggle_aside .icon,
#slider .toggle_aside .icon {
filter: grayscale(100%) brightness(2.5);
Expand All @@ -1216,6 +1216,12 @@ main.prompt {
#global {
height: calc(100% - 8rem);
}
#panel {
top: 0;
left: 0;
bottom: 0;
right: 0;
}
.post {
padding-right: 1rem;
padding-left: 1rem;
Expand Down
2 changes: 1 addition & 1 deletion p/themes/BlueLagoon/BlueLagoon.css
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ a.btn {
}

.aside .toggle_aside,
#panel .close,
#overlay .close,
.dropdown-menu .toggle_aside,
#slider .toggle_aside {
background: #171717;
Expand Down
2 changes: 1 addition & 1 deletion p/themes/BlueLagoon/BlueLagoon.rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ a.btn {
}

.aside .toggle_aside,
#panel .close,
#overlay .close,
.dropdown-menu .toggle_aside,
#slider .toggle_aside {
background: #171717;
Expand Down
2 changes: 1 addition & 1 deletion p/themes/Dark/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ kbd {

@media (max-width: 840px) {
.aside .toggle_aside,
#panel .close,
#overlay .close,
.dropdown-menu .toggle_aside {
background-color: var(--dark-background-color1);
border-bottom: 1px solid var(--dark-border-color3);
Expand Down
2 changes: 1 addition & 1 deletion p/themes/Dark/dark.rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ kbd {

@media (max-width: 840px) {
.aside .toggle_aside,
#panel .close,
#overlay .close,
.dropdown-menu .toggle_aside {
background-color: var(--dark-background-color1);
border-bottom: 1px solid var(--dark-border-color3);
Expand Down
2 changes: 1 addition & 1 deletion p/themes/Flat/flat.css
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ a.btn {
}

.aside .toggle_aside,
#panel .close,
#overlay .close,
.dropdown-menu .toggle_aside {
background: #2c3e50;
}
Expand Down
2 changes: 1 addition & 1 deletion p/themes/Flat/flat.rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ a.btn {
}

.aside .toggle_aside,
#panel .close,
#overlay .close,
.dropdown-menu .toggle_aside {
background: #2c3e50;
}
Expand Down
9 changes: 8 additions & 1 deletion p/themes/Mapco/_mobile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}

.aside .toggle_aside,
#panel .close,
#overlay .close,
.dropdown-menu .toggle_aside,
#slider .toggle_aside {
background-color: variables.$main-first;
Expand Down Expand Up @@ -53,6 +53,13 @@
height: calc(100% - 8rem);
}

#panel {
top: 0;
right: 0;
bottom: 0;
left: 0;
}

main.prompt {
max-width: 100%;
min-width: auto;
Expand Down
12 changes: 9 additions & 3 deletions p/themes/Mapco/mapco.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions p/themes/Mapco/mapco.rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -1202,19 +1202,19 @@ main.prompt {
padding: 0.5rem 1rem;
}
.aside .toggle_aside,
#panel .close,
#overlay .close,
.dropdown-menu .toggle_aside,
#slider .toggle_aside {
background-color: #36c;
}
.aside .toggle_aside:hover,
#panel .close:hover,
#overlay .close:hover,
.dropdown-menu .toggle_aside:hover,
#slider .toggle_aside:hover {
background-color: #25c;
}
.aside .toggle_aside .icon,
#panel .close .icon,
#overlay .close .icon,
.dropdown-menu .toggle_aside .icon,
#slider .toggle_aside .icon {
filter: grayscale(100%) brightness(2.5);
Expand All @@ -1230,6 +1230,12 @@ main.prompt {
#global {
height: calc(100% - 8rem);
}
#panel {
top: 0;
left: 0;
bottom: 0;
right: 0;
}
main.prompt {
max-width: 100%;
min-width: auto;
Expand Down
17 changes: 4 additions & 13 deletions p/themes/Nord/nord.css
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,10 @@ option {
position: relative;
}

#overlay {
background-color: var(--accent-bg);
}

.notification {
top: 0;
left: 0;
Expand All @@ -1029,19 +1033,6 @@ option {
width: 100%;
}

#panel {
top: 25px; bottom: 30px;
left: 0; right: 0;
}

#panel .close {
top: 0; right: 0;
left: auto; bottom: auto;
display: inline-block;
width: 30px;
height: 30px;
}

#slider.active {
left: 0;
top: 50px;
Expand Down
17 changes: 4 additions & 13 deletions p/themes/Nord/nord.rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,10 @@ option {
position: relative;
}

#overlay {
background-color: var(--accent-bg);
}

.notification {
top: 0;
right: 0;
Expand All @@ -1029,19 +1033,6 @@ option {
width: 100%;
}

#panel {
top: 25px; bottom: 30px;
right: 0; left: 0;
}

#panel .close {
top: 0; left: 0;
right: auto; bottom: auto;
display: inline-block;
width: 30px;
height: 30px;
}

#slider.active {
right: 0;
top: 50px;
Expand Down