search.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435
  1. {% set search_box_value = query %}
  2. {% set page_title = query + ' - Search' %}
  3. {% extends "base.html" %}
  4. {% import "common_elements.html" as common_elements %}
  5. {% block style %}
  6. <link href="/youtube.com/static/message_box.css" rel="stylesheet">
  7. <link href="/youtube.com/static/search.css" rel="stylesheet">
  8. {% endblock style %}
  9. {% block main %}
  10. <div class="result-info" id="result-info">
  11. <div id="number-of-results">Approximately {{ '{:,}'.format(estimated_results) }} results ({{ '{:,}'.format(estimated_pages) }} pages)</div>
  12. {% if corrections['type'] == 'showing_results_for' %}
  13. <div>Showing results for <a>{{ common_elements.text_runs(corrections['corrected_query_text']) }}</a></div>
  14. <div>Search instead for <a href="{{ corrections['original_query_url'] }}">{{ corrections['original_query_text'] }}</a></div>
  15. {% elif corrections['type'] == 'did_you_mean' %}
  16. <div>Did you mean <a href="{{ corrections['corrected_query_url'] }}">{{ common_elements.text_runs(corrections['corrected_query_text']) }}</a></div>
  17. {% endif %}
  18. </div>
  19. <!-- video item -->
  20. <div class="video-container">
  21. {% for info in results %}
  22. {{ common_elements.item(info, description=true) }}
  23. {% endfor %}
  24. </div>
  25. <hr/>
  26. <!-- /video item -->
  27. <footer class="pagination-container">
  28. <nav class="pagination-list">
  29. {{ common_elements.page_buttons(estimated_pages, '/https://www.youtube.com/results', parameters_dictionary) }}
  30. </nav>
  31. </footer>
  32. {% endblock main %}