-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for search query in URL #648
Comments
[Edit] Although it is possible, it doesn't work with A pure JS solution is probably preferable. |
After some fiddling I wasn't able to get it working properly, the closest I got was the snippet below but this doesn't hide icons before the selected icon: .grid-item:target {
display: block;
}
.grid-item:target ~ .grid-item {
display: none;
} Another problem with this approach would be that you cannot share a query that gives back multiple results, although (if someone can get your suggestion working) we could use it as a fallback method, but that can still be a point of confusion... |
@ericcornelissen See the edit of my previous comment. While it is possible, it brings way too many cons along with it 馃槥 |
Can you elaborate on that @birjolaxew? As far as I know I guess what you are looking for is the (I only tested this in Chrome)
That problem can be solved by using Sass via Jekyll, as they do in the codepen example. |
@ericcornelissen As for the back button, imagine this scenario: you google for icons and stumble upon our site. You search for an icon. Then you search for another. Then you search for a third. You repeat this a few times. Then you want to go back to google. If you use Regardless, a purely JS-based solution is definitely the best. This would also allow us to do partial searches (i.e. the hash is always equal to the search string, so that e.g. |
This is pretty normal behavior nowadays. The solution is the hold the back button and you can see your browsing history. Then you can select Google to jump back to Google if you wish or however far back you want to go. |
@styfle Even if some consider it normal, which I disagree with, it's still very much bad practice and hated by many. It's called back button hijacking. |
@birjolaxew, thanks for the example now I get what you're trying to say, and I agree that is not desirable. And indeed, as you said a purely JS approach is better because it allows for partial searches. But, this discussion did give me an idea to solve to confusion problem described before 馃帀 We can use a |
@ericcornelissen I think a better way to do that would be to use the Note that if we use |
@birjolaxew Good points 馃憤 Edit: oops |
Not hugely important, but might be nice to have 馃槑
What I mean by this is to allow for URLs such as
https://simpleicons.org/?q=angular
(or a similar format), which would result in the browser initializing the page as follows:DISCLAIMER: Given the nature of Jekyll, as far as I know it is not possible to implement this using HTTP get request. Hence, it must be implemented using JavaScript on top of the existing search feature. This will require manipulating the browser history to update the URL in the users browser, which is only supported by modern browsers (but I expect this is not a problem given our target audience).
Another issue is related to #649 where user A sharing a query-link with user B that has JavaScript disabled might cause some confusing between these two users.
Thoughts?
The text was updated successfully, but these errors were encountered: