Advertisement
akonrad

Module 3 base.html navbar

Feb 23rd, 2020
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.65 KB | None | 0 0
  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.     <title>Python Thinkers</title>
  7.     {% load static %}
  8.     <link rel="stylesheet" type="text/css" href="{% static 'share/bulma-0.8.0/css/bulma.css' %}"/>
  9.     <link href="https://use.fontawesome.com/releases/v5.0.6/css/all.css" rel="stylesheet">
  10.     <link rel="stylesheet" type="text/css" href="{% static 'share/main.css' %}"/>
  11. </head>
  12.  
  13. <body>
  14. <nav class="navbar is-primary" role="navigation" aria-label="main navigation">
  15.     <div class="navbar-brand">
  16.         <a class="navbar-item" href="{% url 'share:index' %}">
  17.             <img src="{% static 'share/images/thinking-face.png' %}" alt=" icon" width="40" height="60">
  18.             Python <br>Thinkers
  19.         </a>
  20.         </a class="navbar-item">
  21.  
  22.       <!--   https://bulma.io/documentation/components/navbar/  for responsive sites-->
  23.       <a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarData">
  24.        <span aria-hidden="true"></span>
  25.        <span aria-hidden="true"></span>
  26.        <span aria-hidden="true"></span>
  27.      </a>
  28.  
  29.     </div>
  30.  
  31.     <div id="navbarData" class="navbar-menu is-active" >
  32.       <!-- navbar-menu hidden in mobile devices -->
  33.       <!-- is-actice makes id show in mobile devices -->
  34.    <div class="navbar-start">
  35.  
  36.      <a class="navbar-item" href="{% url 'share:dashboard' %}">My Dashboard</a>
  37.  
  38.     <div class="navbar-item has-dropdown is-hoverable">
  39.        <a class="navbar-link">
  40.          More
  41.        </a>
  42.  
  43.        <div class="navbar-dropdown">
  44.           <a class="navbar-item" href="{% url 'share:index' %}">All Problems</a>
  45.           <a class="navbar-item" href="{% url 'share:publish_problem' %}">Post a Problem</a>
  46.           <a class="navbar-item"> More items later </a>
  47.  
  48.        </div>
  49.  
  50.      </div>
  51.    </div>
  52.  
  53.    <div class="navbar-end">
  54.          <div class="navbar-item">
  55.            <div class="buttons">
  56.  
  57.              {% if request.path == "/login" or request.path == "/loguser" %}
  58.              <a class="button is-primary" href="{% url 'share:signup' %}">Signup</a>
  59.  
  60.               {% elif request.path == "/signup"  %}
  61.  
  62.               <a class="button is-primary" href="{% url 'share:login' %}">Login</a>
  63.  
  64.              {% else   %}
  65.              <a class="button is-primary" href="{% url 'share:logout' %}">Logout</a>
  66.  
  67.              {% endif %}
  68.  
  69.            </div>
  70.          </div>
  71.        </div>
  72.      </div>
  73.    </nav>
  74.  
  75. <section class="section">
  76.     <div class="container">
  77.         {% block content %}{% endblock content %}
  78.     </div>
  79. </section>
  80.  
  81. </body>
  82. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement