-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the layout and style better for SaaS projects
- Loading branch information
Showing
9 changed files
with
103 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,60 @@ | ||
<header> | ||
<div class="container"> | ||
<nav class="navbar navbar-expand-lg navbar-light bg-faded"> | ||
<div class="container-fluid"> | ||
<a class="navbar-brand" href="{% url 'site_index' %}">{{ SITE_NAME }}</a> | ||
<button class="navbar-toggler" | ||
type="button" | ||
data-bs-toggle="collapse" | ||
data-bs-target="#navbarNav" | ||
aria-controls="navbarNav" | ||
aria-expanded="false" | ||
aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="collapse navbar-collapse" id="navbarNav"> | ||
<ul class="navbar-nav"> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="{% url 'site_index' %}">Home <span class="visually-hidden">(current)</span></a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#">About</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#">Contact</a> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="d-flex"> | ||
<ul class="navbar-nav"> | ||
{% if not user.is_authenticated %} | ||
<li class="nav-item"> | ||
<a class="nav-link" href="{% url 'account_login' %}">Sign In</a> | ||
<header class="container-fluid border-bottom border-bottom-1 mb-4"> | ||
<nav class="navbar navbar-expand-lg navbar-light bg-faded mb-0"> | ||
<a class="navbar-brand" href="{% url 'site_index' %}">{{ SITE_NAME }}</a> | ||
<button class="navbar-toggler" | ||
type="button" | ||
data-bs-toggle="collapse" | ||
data-bs-target="#navbarNav" | ||
aria-controls="navbarNav" | ||
aria-expanded="false" | ||
aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="collapse navbar-collapse" id="navbarNav"> | ||
<ul class="navbar-nav"> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="{% url 'site_index' %}">Home <span class="visually-hidden">(current)</span></a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#">About</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#">Contact</a> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="d-flex"> | ||
<ul class="navbar-nav navbar-nav--user-nav align-items-center"> | ||
{% if not user.is_authenticated %} | ||
<li class="nav-item"> | ||
<a class="nav-link" href="{% url 'account_login' %}">Sign In</a> | ||
</li> | ||
{% else %} | ||
{% include "blocks/color_mode_picker.html" %} | ||
<li class="nav-item dropdown"> | ||
<a class="nav-link dropdown-toggle" | ||
href="#" | ||
id="navbarScrollingDropdown" | ||
role="button" | ||
data-bs-toggle="dropdown" | ||
aria-expanded="false">{{ user.gravatar }}</a> | ||
<ul class="dropdown-menu dropdown-menu-end" | ||
aria-labelledby="navbarScrollingDropdown"> | ||
<li> | ||
<a class="dropdown-item" href="{% url 'account_change_name' %}">Account Settings</a> | ||
</li> | ||
{% else %} | ||
<li class="nav-item dropdown"> | ||
<a class="nav-link dropdown-toggle" | ||
href="#" | ||
id="navbarScrollingDropdown" | ||
role="button" | ||
data-bs-toggle="dropdown" | ||
aria-expanded="false">{% firstof user.get_short_name user.get_username %}</a> | ||
<ul class="dropdown-menu" aria-labelledby="navbarScrollingDropdown"> | ||
<li> | ||
<a class="dropdown-item" href="{% url 'account_change_name' %}">Account Settings</a> | ||
</li> | ||
{% if user.is_staff %} | ||
<li> | ||
<a class="dropdown-item" href="{% url 'admin:index' %}">Administration</a> | ||
</li> | ||
{% endif %} | ||
<li> | ||
<a class="dropdown-item" href="{% url 'account_logout' %}">Sign Out</a> | ||
</li> | ||
</ul> | ||
{% if user.is_staff %} | ||
<li> | ||
<a class="dropdown-item" href="{% url 'admin:index' %}">Administration</a> | ||
</li> | ||
{% endif %} | ||
<li> | ||
<a class="dropdown-item" href="{% url 'account_logout' %}">Sign Out</a> | ||
</li> | ||
{% endif %} | ||
{% include "blocks/color_mode_picker.html" %} | ||
</ul> | ||
</div> | ||
</div> | ||
</nav> | ||
</div> | ||
</ul> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
</div> | ||
</nav> | ||
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// User navigation menu | ||
.navbar-nav--user-nav { | ||
// remove dropdown caret | ||
.dropdown-toggle::after { | ||
display: none; | ||
} | ||
|
||
.nav-link { | ||
transition: opacity 0.4s ease; | ||
} | ||
|
||
.nav-link:hover { | ||
opacity: 0.5; | ||
} | ||
} | ||
|
||
// Medium max-width container | ||
.container--mw-md { | ||
max-width: 1000px; | ||
|
||
@extend .px-3; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
@import "~bootstrap/scss/bootstrap"; | ||
|
||
// color_mode_picker | ||
@import "main_nav"; | ||
@import "color_mode_picker"; | ||
|
||
.navbar { | ||
margin-bottom: 20px; | ||
} |