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:
us...@infra.apache.org


Reply via email to