Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 1, 2024
1 parent e7ac7ff commit a023afa
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 0 deletions.
9 changes: 9 additions & 0 deletions example/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
{# djlint:off D018,H021,H031 #}
{% load django_simple_nav %}

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>

{% block title %}
django-simple-nav Demo
{% endblock title %}

</title>
<meta name="description" content="A demo of django-simple-nav" />
<meta name="author" content="Josh Thomas" />
<link rel="icon" href="https://fav.farm/📃" />

{% block extra_head %}
<script src="https://cdn.tailwindcss.com?plugins=typography"></script>
<style type="text/tailwindcss">
Expand All @@ -39,11 +43,15 @@
integrity="sha384-Rpe/8orFUm5Q1GplYBHxbuA8Az8O8C5sAoOsdbRWkqPjKFaxPgGZipj4zeHL7lxX"
crossorigin="anonymous"></script>
{% endblock extra_head %}

</head>
<body>

{% block nav %}
{% endblock nav %}

<main>

{% block content %}
<div class="prose"
style="margin-left: 1rem;
Expand Down Expand Up @@ -71,6 +79,7 @@ <h1 class="mt-8">
{% django_simple_nav "navigation.ExampleListNav" %}
</div>
{% endblock content %}

</main>
</body>
</html>
3 changes: 3 additions & 0 deletions example/templates/basic.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{% extends "base.html" %}

{% load django_simple_nav %}

{% block extra_head %}
<style>
.active {
font-weight: bold;
}
</style>
{% endblock extra_head %}

{% block nav %}
{% django_simple_nav "navigation.BasicNav" %}
{% endblock nav %}
3 changes: 3 additions & 0 deletions example/templates/bootstrap4.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{% extends "base.html" %}

{% load django_simple_nav %}

{% block extra_head %}
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
Expand All @@ -15,6 +17,7 @@
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
{% endblock extra_head %}

{% block nav %}
{% django_simple_nav "navigation.Bootstrap4Nav" %}
{% endblock nav %}
3 changes: 3 additions & 0 deletions example/templates/bootstrap5.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{% extends "base.html" %}

{% load django_simple_nav %}

{% block extra_head %}
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
Expand All @@ -9,6 +11,7 @@
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
{% endblock extra_head %}

{% block nav %}
{% django_simple_nav "navigation.Bootstrap5Nav" "navs/bootstrap5.html" %}
{% endblock nav %}
3 changes: 3 additions & 0 deletions example/templates/extra_context.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{% extends "base.html" %}

{% load django_simple_nav %}

{% block extra_head %}
<style>
[data-foo="bar"] {
background-color: red;
}
</style>
{% endblock extra_head %}

{% block nav %}
{% django_simple_nav "navigation.ExtraContextNav" %}
{% endblock nav %}
1 change: 1 addition & 0 deletions example/templates/navs/nested.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% load django_simple_nav %}

<nav>
<ul>
{% for item in items %}
Expand Down
1 change: 1 addition & 0 deletions example/templates/navs/tailwind_main.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{# djlint:off H006 #}
{% load django_simple_nav %}

<nav x-data="{ open: false }" x-menu class="bg-gray-800">
<div class="px-2 mx-auto max-w-7xl sm:px-6 lg:px-8">
<div class="flex relative justify-between items-center h-16">
Expand Down
3 changes: 3 additions & 0 deletions example/templates/nested.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{% extends "base.html" %}

{% load django_simple_nav %}

{% block extra_head %}
<style>
.active {
font-weight: bold;
}
</style>
{% endblock extra_head %}

{% block nav %}
{% django_simple_nav "navigation.NestedNav" %}
{% endblock nav %}
3 changes: 3 additions & 0 deletions example/templates/permissions.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{% extends "base.html" %}

{% load django_simple_nav %}

{% block extra_head %}
<style>
.active {
font-weight: bold;
}
</style>
{% endblock extra_head %}

{% block nav %}
{% django_simple_nav "navigation.PermissionsNav" %}
<h2>Select a permission to see the nav for it</h2>
Expand Down
3 changes: 3 additions & 0 deletions example/templates/picocss.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{% extends "base.html" %}

{% load django_simple_nav %}

{% block extra_head %}
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css" />
{% endblock extra_head %}

{% block nav %}
{% django_simple_nav "navigation.PicoCSSNav" "navs/picocss.html" %}
{% endblock nav %}
2 changes: 2 additions & 0 deletions example/templates/tailwind.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{% extends "base.html" %}

{% load django_simple_nav %}

{% block nav %}
{% django_simple_nav "navigation.TailwindMainNav" %}
{% endblock nav %}

0 comments on commit a023afa

Please sign in to comment.