base.html 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <link rel="stylesheet" href="{{ url_for('.static', filename='tachyons.min.css') }}">
  7. <script src="{{ url_for('.static', filename='htmx.js') }}"></script>
  8. <script src="{{ url_for('.static', filename='sweetalert2.js') }}"></script>
  9. {% block head %}
  10. <title>{{ title | default('No Title') }}</title>
  11. {% endblock %}
  12. <link rel="stylesheet" href="{{ url_for('.static', filename='theme/base.css') }}">
  13. <link rel="stylesheet" href="{{ url_for('.static', filename='theme/user-14520320.css') }}">
  14. <script>
  15. const Toast = Swal.mixin({
  16. toast: true,
  17. position: 'top-end',
  18. showConfirmButton: false,
  19. timer: 3000,
  20. timerProgressBar: true,
  21. didOpen: (toast) => {
  22. toast.addEventListener('mouseenter', Swal.stopTimer)
  23. toast.addEventListener('mouseleave', Swal.resumeTimer)
  24. }
  25. })
  26. </script>
  27. </head>
  28. <body>
  29. <!--
  30. Flexbox makes logical sense but we'll go with a table-based display
  31. -->
  32. <div class="nav" style="position: fixed; width: 25%">
  33. <ul>
  34. {% if twitter_user %}
  35. <li><a href="{{ url_for('.get_timeline_home_html') }}">Latest Tweets</a></li>
  36. <li><a href="{{ url_for('.get_conversations_html') }}">DMs</a></li>
  37. <li><a hx-push-url="/mentions.html?me={{ me }}" hx-get="/twitter/data/mentions/{{ twitter_user.id }}?me={{ me }}" hx-target="#tweets" hx-swap="outerHTML">Mentions</a></li>
  38. <!--
  39. <li><a hx-get="/twitter/data/thread/1592514352690900992?me={{ me }}" hx-target="#tweets" hx-swap="outerHTML">Test Thread</a></li>
  40. <li><a hx-get="/twitter/data/conversation/1592596557009801216?me={{ me }}" hx-target="#tweets" hx-swap="outerHTML">Test Conversation</a></li>
  41. <li><a hx-get="/twitter/data/tweets?ids=1592637236147027970,1592474342289330176&amp;me={{ me }}" hx-target="#tweets" hx-swap="outerHTML">Test Tweets</a></li>
  42. -->
  43. <li><a href="{{ url_for('.get_bookmarks_html') }}">Bookmarks</a></li>
  44. <li><a href="{{ url_for('.get_collection_html', collection_id='swipe-all2') }}">Test Collection</a></li>
  45. <li><a href="{{ url_for('twitter_v2_facade.oauth2_login.get_logout_html') }}">Logout ({{me}})</a></li
  46. {% endif %}
  47. {% if mastodon_user %}
  48. <li><a href="{{ url_for('.get_timeline_home_html', me=me) }}">Public Timeline</a></li>
  49. <li><a href="{{ url_for('.get_bookmarks_html', me=me) }}">Bookmarks</a></li>
  50. {% endif %}
  51. <li><a href="javascript:document.body.classList.toggle('theme-dark')">Toggle Dark Mode</a></li>
  52. <li><a href="javascript:document.location.reload()">Refresh</a></li>
  53. </ul>
  54. {% if twitter_user or mastodon_user %}
  55. {% include "partial/compose-form.html" %}
  56. {% endif %}
  57. {% if False %}
  58. <!--
  59. {% include "partial/media-upload-form.html" %}
  60. -->
  61. {% endif %}
  62. {% include "partial/user-picker.html" %}
  63. {% if add_account_enabled %}
  64. <a href="{{ url_for('get_login_html') }}">Add account</a>
  65. {% endif %}
  66. </div>
  67. <div style="width: 75%; left:25%; position: absolute">
  68. {% block content %}{% endblock %}
  69. </div>
  70. <footer style="position: absolute; bottom: -300px; right: 0; width: 100px;">
  71. <p>
  72. Powered by <a href="https://glitch.com/~hogumathi">Hogumathi</a>. Give a gift to the author with <a href="https://venmo.com/harlanji">Venmo</a> or become a <a href="https://patreon.com/harlanji">patron</a> for gifts
  73. like early access and coupon codes for software on <a href="https://harlanji.gumroad.com">Gumroad</a>.
  74. </p>
  75. </footer>
  76. </body>
  77. </html>