index.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <title>Rural Dictionary{% if term %}: {{ term }}{% endif %}</title>
  5. <meta charset="utf-8" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1" />
  7. <meta name="robots" content="index, follow" />
  8. <link rel="stylesheet" href="{{ url_for('static', path='css/main.css') }}" />
  9. <link rel="icon" type="image/png" href="{{ url_for('static', path='img/favicon.png') }}" />
  10. </head>
  11. <body>
  12. <div style="text-align: center">
  13. <a href="/">
  14. <img src="{{ url_for('static', path='img/logo.png') }}" />
  15. </a>
  16. <form id="search" role="search" method="get" action="/define.php">
  17. <input
  18. autocomplete="off"
  19. type="search"
  20. id="term"
  21. name="term"
  22. placeholder="Search"
  23. autofocus
  24. />
  25. <button>Go</button>
  26. </form>
  27. <a href="/random.php">Random</a>
  28. <br />
  29. <a href="https://git.vern.cc/cobra/rural-dict">Source Code</a>
  30. </div>
  31. <br />
  32. {% for definition_id, word, meaning, example, contributor, thumbs_up, thumbs_down in results %}
  33. <div data-id="{{ definition_id }}">
  34. <a href="/define.php?term={{ word }}">
  35. <h2>{{ word }}</h2>
  36. </a>
  37. <p>{{ meaning|safe }}</p>
  38. <p><i>{{ example|safe }}</i></p>
  39. <div>{{ contributor|safe }}</div>
  40. {% if thumbs_up and thumbs_down %}
  41. <p>
  42. <span title="thumbs up">👍{{ thumbs_up|safe }}</span>
  43. <span title="thumbs down">👎{{ thumbs_down|safe }}</span>
  44. </p>
  45. {% endif %}
  46. </div>
  47. <br />
  48. {% endfor %} {% if pagination %}{{ pagination|safe }} {% endif %}
  49. </body>
  50. </html>