main.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. {% extends "base.html" %}
  2. {% block announce %}
  3. <style>
  4. div[data-md-component="announce"] {
  5. z-index: 10;
  6. }
  7. div[data-md-component="announce"] a {
  8. color: white;
  9. }
  10. div[data-md-component="announce"] a:hover, div[data-md-component="announce"] a:focus {
  11. transition: ease-in 150ms;
  12. color: #ccc;
  13. }
  14. div[data-md-component="announce"] .md-banner__button {
  15. color: #ccc;
  16. }
  17. div[data-md-component="announce"] .md-banner.hidden {
  18. display: none;
  19. }
  20. div[data-md-component="announce"] .twemoji {
  21. margin-top: 2px;
  22. }
  23. </style>
  24. <button id="announce-bar-close" class="md-banner__button md-icon" aria-label="Don't show this again">
  25. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
  26. <path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z"></path>
  27. </svg>
  28. </button>
  29. If you like ntfy, please consider sponsoring me via <a target="_blank" href="https://github.com/sponsors/binwiederhier"><strong>GitHub Sponsors</strong></a>
  30. or <a target="_blank" href="https://en.liberapay.com/ntfy/"><strong>Liberapay</strong></a>
  31. <svg xmlns="http://www.w3.org/2000/svg" role="img" viewBox="0 0 36 36" class="twemoji md-footer-custom-text">
  32. <path fill="#DD2E44" d="M35.885 11.833c0-5.45-4.418-9.868-9.867-9.868-3.308 0-6.227 1.633-8.018 4.129-1.791-2.496-4.71-4.129-8.017-4.129-5.45 0-9.868 4.417-9.868 9.868 0 .772.098 1.52.266 2.241C1.751 22.587 11.216 31.568 18 34.034c6.783-2.466 16.249-11.447 17.617-19.959.17-.721.268-1.469.268-2.242z"/>
  33. </svg>, or subscribing to <a target="_blank" href="https://ntfy.sh/app"><strong>ntfy Pro</strong></a>.
  34. <script>
  35. announceBarKey = 'announce-bar-closed-sponsor';
  36. document.getElementById('announce-bar-close').addEventListener('click', (e) => {
  37. localStorage.setItem(announceBarKey, 'true');
  38. document.querySelector('div[data-md-component="announce"] .md-banner').style.display = 'none';
  39. });
  40. if (localStorage.getItem(announceBarKey) === 'true') {
  41. document.querySelector('div[data-md-component="announce"] .md-banner').style.display = 'none';
  42. }
  43. </script>
  44. {% endblock %}