Styling with TailwindCSS

Styling our navigation bar with TailwindCSS

Want more?

This lesson for enrolled students only. Join the course to unlock it!

You can see the code changes implemented in this lecture below.

If you have purchased the course in a different platform, you still have access to the code changes per lecture here on Teclado. The lecture video and lecture notes remain locked.
Join course for $15

Modified files

templates/app/base.html
--- 
+++ 
@@ -12,19 +12,20 @@
 </head>
 <body>
   <nav class="px-10 py-4 border-b border-gray-300 shadow-md">
-    <ul>
-      <li><a href="{% url 'home' %}">Articles</a></li>
-      <li>
-        {% if user.is_authenticated %}
-          <form method="POST" action="{% url 'account_logout' %}">
-            {% csrf_token %}
-            <button type="submit">Log out</button>
-          </form>
-        {% else %}
-          <a href="{% url 'account_login' %}">Log in</a>
-        {% endif %}
-      </li>
-    </ul>
+    <div class="flex justify-end items-center gap-6 max-w-7x mx-auto">
+      {% if user.is_authenticated %}
+      <a class="button primary" href="{% url 'create_article' %}">Create new</a>
+      <a class="" href="{% url 'home' %}">Articles</a>
+      <a class="" href="{% url 'account_email' %}">Change email</a>
+        <form method="POST" action="{% url 'account_logout' %}">
+          {% csrf_token %}
+          <button type="submit">Log out</button>
+        </form>
+      {% else %}
+        <a class="button secondary text-sm" href="{% url 'account_login' %}">Log in</a>
+        <a class="button primary text-sm" href="{% url 'account_signup' %}">Sign up</a>
+      {% endif %}
+    </div>
   </nav>
   {% block content %}