Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

58 rindas
2.0KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>Flask Auth Example</title>
  8. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.2/css/bulma.min.css" />
  9. </head>
  10. <body>
  11. <section class="hero is-primary is-fullheight">
  12. <div class="hero-head">
  13. <nav class="navbar">
  14. <div class="container">
  15. <div id="navbarMenuHeroA" class="navbar-menu">
  16. <div class="navbar-end">
  17. <a href="{{ url_for('main.index') }}" class="navbar-item">
  18. Home
  19. </a>
  20. {% if current_user.is_authenticated %}
  21. <a href="{{ url_for('main.profile') }}" class="navbar-item">
  22. Profile
  23. </a>
  24. {% endif %}
  25. {% if not current_user.is_authenticated %}
  26. <a href="{{ url_for('auth.login') }}" class="navbar-item">
  27. Login
  28. </a>
  29. <a href="{{ url_for('auth.signup') }}" class="navbar-item">
  30. Sign Up
  31. </a>
  32. {% endif %}
  33. {% if current_user.is_authenticated %}
  34. <a href="{{ url_for('auth.logout') }}" class="navbar-item">
  35. Logout
  36. </a>
  37. {% endif %}
  38. </div>
  39. </div>
  40. </div>
  41. </nav>
  42. </div>
  43. <div class="hero-body">
  44. <div class="container has-text-centered">
  45. {% block content %}
  46. {% endblock %}
  47. </div>
  48. </div>
  49. </section>
  50. </body>
  51. </html>