This commit is contained in:
Eden Kirin
2024-04-06 12:16:22 +02:00
parent 4e05dc15a5
commit ae2612cfd6
19 changed files with 148 additions and 10 deletions

View File

@ -6,7 +6,7 @@
content="width=100%, user-scalable=yes, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<script src="https://unpkg.com/htmx.org@1.9.11" integrity="sha384-0gxUXCCR8yv9FM2b+U3FDbsKthCI66oH5IA9fHppQq9DDMHuMauqq1ZHBpJxQ0J0" crossorigin="anonymous"></script>
<title>Django-html demo</title>
<title>{{ title or "Django-html demo" }}</title>
</head>
<body>
{% block body_content %}{% endblock %}

View File

@ -1,7 +0,0 @@
{% extends "main/base/base.html" %}
{% block body_content %}
<div class="container">
{% block content %}{% endblock %}
</div>
{% endblock %}

View File

@ -0,0 +1,20 @@
{% extends "main/base/base.html" %}
{% from "main/components/nav.html" import nav %}
{% block body_content %}
<div class="container">
<h1 class="mt-5 mb-5 pb-3 border-bottom border-dark">
{{ title }}
</h1>
<div class="row">
<div class="col-md-3">
{{ nav(active_section=active_section) }}
</div>
<div class="col-md-9">
{% block content %}{% endblock %}
</div>
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,8 @@
{% extends "main/base/layout.html" %}
{% block content %}
<p>
This is some complex form content bellow.
</p>
{% endblock %}

View File

@ -0,0 +1,18 @@
{% macro nav(active_section) %}
{% macro render_item(title, link) %}
<a
href="{{ url(link) }}"
class="list-group-item list-group-item-action {% if active_section == link %}active{% endif %}"
>
{{ title }}
</a>
{% endmacro %}
<div class="list-group list-group-flush">
{{ render_item("Swap Content", "swap-content") }}
{{ render_item("Form Validation", "form-validation") }}
{{ render_item("Complex Form", "complex-form") }}
{{ render_item("Filter List", "filter-list") }}
{{ render_item("Table Inline Edit", "table-inline-edit") }}
</div>
{% endmacro %}

View File

@ -0,0 +1,8 @@
{% extends "main/base/layout.html" %}
{% block content %}
<p>
This is some filter list content bellow.
</p>
{% endblock %}

View File

@ -0,0 +1,8 @@
{% extends "main/base/layout.html" %}
{% block content %}
<p>
This is some form validation content bellow.
</p>
{% endblock %}

View File

@ -25,7 +25,7 @@
</ul>
<h4 class="mt-5">
<a href="#">
<a href="{{ url("swap-content") }}">
Start demo
</a>
</h4>

View File

@ -0,0 +1,8 @@
{% extends "main/base/layout.html" %}
{% block content %}
<p>
This is some swappable content bellow.
</p>
{% endblock %}

View File

@ -0,0 +1,8 @@
{% extends "main/base/layout.html" %}
{% block content %}
<p>
This is some table inline edit content bellow.
</p>
{% endblock %}