⌚ OpenOpeningstijden main server application
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

home.erb 1.1KB

1234567891011121314151617181920212223242526272829303132
  1. <%
  2. js = "horsey(document.getElementById('search-input'), {
  3. source (data, done) { bragi(data.input, done, '#{bragi_url}'); },
  4. getText: 'label',
  5. getValue: 'id',
  6. predictNextSearch(info) { handleHorseyInsert(info) },
  7. renderItem: function(li, suggestion) {
  8. var image = `<img class=\"inline-icon\" src=\"/images/${suggestion.type}.svg\" alt=\"${suggestion.type} icon\">`;
  9. var type = `<small>${suggestion.poi_types.join(',')}</small>`;
  10. var label = `${suggestion.label}`;
  11. var city = `<small>${suggestion.city}</small>`;
  12. li.innerHTML = `${image} ${label} ${city} ${type}`;
  13. }
  14. });"
  15. set_content_for(:closing_js, js)
  16. %>
  17. <div class="bg-image"></div>
  18. <section class="container" id="home">
  19. <div class="col justify-content-center">
  20. <h1 class="mb-4">Openingstijden</h1>
  21. <form action="/search" method="get">
  22. <input autocomplete="off"
  23. id="search-input"
  24. name="q"
  25. tabindex="1"
  26. class="form-control form-control-lg"
  27. type="search"
  28. placeholder="bijv. Fietsenstalling, Nijmegen"
  29. aria-label="Search for Places"/>
  30. </form>
  31. </div>
  32. </section>