[ 
https://issues.apache.org/jira/browse/CAMEL-14958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17139084#comment-17139084
 ] 

ASF GitHub Bot commented on CAMEL-14958:
----------------------------------------

AemieJ commented on a change in pull request #398:
URL: https://github.com/apache/camel-website/pull/398#discussion_r441968840



##########
File path: antora-ui-camel/src/js/vendor/algoliasearch.bundle.js
##########
@@ -6,10 +6,13 @@
   window.addEventListener('load', () => {
     const client = algoliasearch('BH4D9OD16A', 
'16e3a9155a136e4962dc4c206f8278bd')
     const index = client.initIndex('apache_camel')
-    const search = document.querySelector('#search')
+    const condition = window.innerWidth < 1275
+    const search = condition ? document.querySelector('.search-small') : 
document.querySelector('.search')

Review comment:
       I don't know why it seems complex 'cause the ternary operator does make 
the code readable. And the reason that two searches are included is just for 
breakpoint differentiation is 'cause if we were to include the single search 
input that is present within the nav, it will be more complex to position it 
the way we want in the design ( I will give it a try though ). Also, in my 
opinion, the use of two different div for the search design for two breakpoints 
seems much readable and it's easier to differentiate them using CSS as well.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


> Suggestion on search bar within smaller screen width.
> -----------------------------------------------------
>
>                 Key: CAMEL-14958
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14958
>             Project: Camel
>          Issue Type: Improvement
>          Components: website
>            Reporter: Aemie
>            Priority: Major
>              Labels: outreachy2020, suggestions
>         Attachments: bootstrap-design-blog.png, 
> bootstrap-design-frontpage.png, design-frontpage.png, design-navbar.png, 
> inline-search.png, issue-facing.png, nav-search-icon-1220.png, 
> nav-searchbar-1220.png, nav-searchbar-414.png, navbar-search-414.png, 
> navbar-searchbar.png
>
>
> Within the small width screen, the setting is to only display the social icon 
> button as of now. However, I thought it would be a good idea to include the 
> search icon alongside the social button icons. On click of the social button 
> icons, we could include animation, for instance, a fade-in effect of the 
> search bar occupying the entire navbar. The user can do the search as 
> required. On the left side of the search bar, there will be back arrow, which 
> on click would give us the original navbar look with a fade-out effect.
> Before I start working on this, I would like an opinion about this idea.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to