Guest User

Untitled

a guest
Jul 25th, 2025
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.15 KB | None | 0 0
  1. <!--Links to the navbar css file-->
  2. <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='navbar.css') }}">
  3.  
  4. <!-- get the error message from wtf forms -->  
  5. {% from "_formhelpers.html" import render_field %}
  6. <header>
  7.     <div class="container"> <!-- better name? -->
  8.         <h1 class="title"> somewebsite.com </h1>
  9.         <h3 class="seccondary-title"> <p> A website for doing stuff and doing other stuff  </p>  </h3>
  10.     </div>
  11.    
  12.     <nav>
  13.         <ul>
  14.             <li>
  15.                 <a href="{{ url_for ('payment.donations') }}">Donations</a>
  16.             </li>
  17.             <li>
  18.                 <a href="{{ url_for ('main.home') }}">Home</a>
  19.             </li>    
  20.             <li>
  21.                 <a href="{{ url_for ('main.about') }}">About</a>
  22.             </li>
  23.             <!-- if the current user is logged in the code activates -->
  24.             {% if current_user.is_authenticated %}
  25.                 <li>              
  26.                     <a href="{{ url_for ('auth.logoff') }}">Logoff</a>
  27.                 </li>
  28.                 <li>
  29.                     <a href="{{ url_for ('postinfo.new_post')}}">New Posts</a>
  30.                 </li>
  31.                 <li>
  32.                     <a href="{{ url_for ('main.profile', username = current_user.username) }}"> Profile </a>
  33.                 </li>
  34.             <!-- if the current user is not logged in the code activates -->
  35.             {% else %}
  36.                 <li>
  37.                     <a href="{{ url_for ('auth.login') }}">Login</a>
  38.                 </li>
  39.                 <li>
  40.                     <a href="{{ url_for ('auth.register') }}">Register</a>
  41.                 </li>
  42.             {% endif %}
  43.                <li>
  44.                     <!-- redirected to /search when I fill out the form -->
  45.                     <form class="searchform" method="POST" action="{{ url_for('main.search') }}">
  46.                             {{ searchform.csrf_token }}
  47.                             {{ searchform.search_input(placeholder='search') }}
  48.                             {{ searchform.submit()}}
  49.                     </form>
  50.                 </li>
  51.         </ul>
  52.     </nav>
  53. </header>
  54.  
Advertisement
Add Comment
Please, Sign In to add comment