[WIP] Rewrite navbar #1154
Labels
No Label
🔍🤖 Search Engines
approved
dependencies
duplicate
feedback wanted
high priority
I2P
iOS
low priority
OS
Self-contained networks
Social media
stale
streaming
todo
Tor
WIP
wontfix
XMPP
[m]
₿ cryptocurrency
ℹ️ help wanted
↔️ file sharing
⚙️ web extensions
✨ enhancement
❌ software removal
💬 discussion
🤖 Android
🐛 bug
💢 conflicting
📝 correction
🆘 critical
📧 email
🔒 file encryption
📁 file storage
🦊 Firefox
💻 hardware
🌐 hosting
🏠 housekeeping
🔐 password managers
🧰 productivity tools
🔎 research required
🌐 Social News Aggregators
🆕 software suggestion
👥 team chat
🔒 VPN
🌐 website issue
🚫 Windows
👁️ browsers
🖊️ digital notebooks
🗄️ DNS
🗨️ instant messaging (im)
🇦🇶 translations
No Milestone
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: privacyguides/privacytools.io#1154
Loading…
Reference in New Issue
No description provided.
Delete Branch "navfix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #877, Fixes #872, Closes #1195.
No Javascript needed, that's why I even started it :)
Deploy preview for privacytools-io ready!
Built with commit
3a785fd18b
https://deploy-preview-1154--privacytools-io.netlify.com
I don't understand the code, but it seems to work even if it's a bit funny how everything can be opened simultaneously.
EDIT: GitHub doesn't like my Markdown, so you can check example there
with
output
text with arrow next to it:https://gitlab.com/dawidpotocki/policense#add-email-e-email
Now, how I made this thing ^ work like a dropdown? I had to first create
a
<span>
after</summary> and make
position: absoluteso it would "fly" and not show itself in the navbar, which would destroy everything. Next to fix bug with "Services" dropdown being cut of, I had to set
to
positon: relativeso dropdown is shown next to it and then
right: 0` to the dropdown so it would go to the left side.It's pretty simple, considering that one from BS4 is using Javascript
for the same thing and everything you need is builtin to the HTML!
Small suggestion, since we're using SASS could we use color variables for these new classes to allow the colors to be re-usable? I think like this:
This is really cool! Though I think we'll need
Hide dropdown when clicking anything else
to be resolved; the usability without it isn't great.I don't think that there is need for that as it probably will not be used anywhere else.
It was the color used before in navbar, that was probably built-in to BS4.
But if you want, I can do that.
Ah, that makes sense. I suppose we can make the colors re-usable if we need to reference them again in the future somewhere else.
Got it working with JS. I don't believe it is possible without it. But at least navbar dropdowns sort of work, which was not the case before.
This
:hover
color seemingly does not apply to navbar items without dropdowns (i.e. the home button, participate link, and donate link).The actual old navbar color is
rgba(255,255,255,0.5)
, FYIIt is because I renamed
.nav-link
to.nav-anchor
, because it wasalready defined by Bootstrap, so I renamed it and forgot to update it.
Should be good now.
(if you got the same reply to your email twice, sorry but GitHub does not like me replying to these comments with email :C)
W3.CSS does nice navbars with no JS.
https://www.w3schools.com/w3css/w3css_navigation.asp
They are on hover, this one is on click. The collapsing one is using
JavaScript, so it's not really useful.
They do have clickable ones too. The menu on that website itself is a clickable menu, so can be used as an example.
They. Require. JavaScript.
This is coming along great! I wonder if you would be able to push the dropdown box down a bit...
Old:
Current in PR:
For some reason that dropdown being so close to the navbar text is unsettling to me. Also, want to make sure changing the color of an active dropdown to white is on your to-do list. I would imagine
summary:focus
would do the trick, maybe not perfectly but good enough, unless you have other plans.Yeah, I'm planning to do that, but my priority is making a mobile
hamburger ui now. I'm trying to implement it without JavaScript and it
seems to be possible, all the possible ways are weird hacks, but
whatever.
Where do you see that? I am using it just fine without JS.
https://invidio.us/watch?v=mNttgpgNFS4
If you insist on having clickable menus (on desktop) then yes JS in needed for that one feature. But I thought you wanted this to be JS free? Are hoverable menus that bad? Those do not require JS. Also the hoverable menus from W3 are actually clickable on mobile devices.
BTW W3 is just a framework of standard CSS attributes, just makes it easier to do what you want. You are probably doing the exact same with with your straight CSS if you are able to get hoverable menus without JS. So it's a decision you and the site owners need to make- use JS to get clickable menus or drop JS and have menus be hoverable on desktop (clickable on mobiles).
Edit:
Also consider usability of the website for people who choose to disable JS in their browser.
But. I. Implemented. Them. In. This. Pull. Request. Without. JavaScript.
Ah, OK your last update from yesterday indicated you were having to use "weird hacks" to do it without JS. If you got it working, great!
Everything is finished.
I think.
I am staying with my previous comment:
And clarify that everything cannot be opened simultaneously unless scripts are blocked with µMatrix
This... appears to work.