index.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Rural Dictionary{% if term %}: {{ term }}{% endif %}</title>
  5. <meta charset="UTF-8">
  6. <meta name="viewport" content="width=device-width">
  7. <link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
  8. <link rel="icon" type="image/png" href="{{ url_for('static', filename='img/favicon.png') }}">
  9. </head>
  10. <body>
  11. <center>
  12. <a href="/">
  13. <img src="{{ url_for('static', filename='img/logo.png') }}">
  14. </a>
  15. <form id="search" role="search" method="get" action="/define.php">
  16. <input type="search" id="term" name="term" placeholder="Search" autofocus>
  17. <button>Go</button>
  18. </form>
  19. <a href=/random.php>Random</a>
  20. <br>
  21. <a href="https://git.vern.cc/cobra/rural-dict">Source Code</a>
  22. </center>
  23. <br>
  24. {% for defid, word, definition, example, author, thumbs_up, thumbs_down in data[0] %}
  25. <div class="{{ defid }}">
  26. <a href="/define.php?term={{ word }}">
  27. <h2>{{ word }}</h2>
  28. </a>
  29. <p>{{ definition|safe }}</p>
  30. <p><i>{{ example|safe }}</i></p>
  31. <p>{{ author|safe }}</p>
  32. {% if thumbs_up and thumbs_down %}
  33. <p>{{ thumbs_up|safe }}<span title="thumbs up">👍</span> {{ thumbs_down|safe }}<span title="thumbs down">👎</span></p>
  34. {% endif %}
  35. </div>
  36. <br>
  37. {% endfor %}
  38. {{ data[1]|safe }}
  39. </body>
  40. </html>