I am trying to get the entire upper mobile menu to remain in focus. Does anyone know where the code is located for this? I imagine I have to change it from relative to absolute or sticky somewhere. See picture for which menu I'm referring to...
Made a small component in response to this query. TopbarFocusizer!
Many thanks for your kind thoughts Z man! I will look into the how-to pages more now. I hadn't really thought to use them much. Was hoping that this innovation would be like the privacy changer and that y'all would run with it and hopefully make it a standard feature for OSSN. Will see if I can get it to work and perhaps introduce it as a component. If not, I will put my findings here.
Thoughts? For sure yes.
Why, for example, not much more use is made of the how-to pages on this forum. There's the https://www.opensource-socialnetwork.org/wiki/view/1137/how-to-find-something-a-word-pattern-in-the-source-code page, which shows how to find page elements, and there's the https://www.opensource-socialnetwork.org/component/view/167/hello-world component, which explains how and where to add javascript. Is that just asking too much to look at these guides, or are the explanations just awful?
Ok so I found some Javascript code that may work to make the upper menu disappear when you scroll down but then reappear the moment you scroll up. The only question is, where do I put it? Here it is... (pretty sure you have to change navbar to topbar)
/* When the user scrolls down, hide the navbar. When the user scrolls up, show the navbar */
var prevScrollpos = window.pageYOffset;
window.onscroll = function() {
var currentScrollPos = window.pageYOffset;
if (prevScrollpos > currentScrollPos) {
document.getElementById("navbar").style.top = "0";
} else {
document.getElementById("navbar").style.top = "-50px";
}
prevScrollpos = currentScrollPos;
}
Also, you have to edit the themes default css for the topbar to make this work. You'll have to add the following...
to .topbar
position: fixed; /* Make it stick/fixed /
top: 0; / Stay on top /
width: 100%; / Full width /
transition: top 0.3s; / Transition effect when sliding down (and up) */
Any thoughts?
I would hope that someone in the Community knows the answer to this. I've answered plenty of questions here. I've got little money for a CSS developer at this time. Thanks though!
You need to consult a css developer for this as mentioned in my initial reply it requires many changes to fit the fixed
condition.
Got the menu to stay focused but lost the SEARCH button functionality for mobile users. Needing help there. Also, had to change the top bar logo image to 0px height to get it to go away. Any thoughts on how to get the top bar logo image to collapse upwardly or maybe have the entire menu collapse upwardly as well?
Ok, so change the setting to fixed. I've found the code for the leftwise menu and the search function. Now just needing to find the rest of the code. Where is it?
You need to change to position fixed
with more changes in css other than fixed to adjust pages.
Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.
$199 (Life Time)