Skip to content

Commit

Permalink
#105 added select_theme template for bootstrap4
Browse files Browse the repository at this point in the history
  • Loading branch information
ephes committed Sep 2, 2023
1 parent a74e039 commit b464678
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cast/templates/cast/bootstrap4/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{% block additionalheaders %}{% endblock additionalheaders %}
</head>

<body>
<body hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
{% block bodystart %}{% endblock bodystart %}
{% block navigation %}
<div class="m-b-1">
Expand Down
23 changes: 23 additions & 0 deletions cast/templates/cast/bootstrap4/select_theme.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<li class="nav-item">
<div class="dropdown">
<a class="btn btn-secondary dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-expanded="false">
Select Theme ({{ template_base_dir }})
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-bootstrap" viewBox="0 0 16 16">
<path d="M5.062 12h3.475c1.804 0 2.888-.908 2.888-2.396 0-1.102-.761-1.916-1.904-2.034v-.1c.832-.14 1.482-.93 1.482-1.816 0-1.3-.955-2.11-2.542-2.11H5.062V12zm1.313-4.875V4.658h1.78c.973 0 1.542.457 1.542 1.237 0 .802-.604 1.23-1.764 1.23H6.375zm0 3.762V8.162h1.822c1.236 0 1.887.463 1.887 1.348 0 .896-.627 1.377-1.811 1.377H6.375z"/>
<path d="M0 4a4 4 0 0 1 4-4h8a4 4 0 0 1 4 4v8a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4zm4-3a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V4a3 3 0 0 0-3-3H4z"/>
</svg>
</a>
<div class="dropdown-menu">
{% for theme_slug, theme_name in template_base_dir_choices %}
<a class="dropdown-item"
hx-post="{% url 'cast:select-theme' %}"
hx-vals='{"template_base_dir": "{{ theme_slug }}", "next": "{{ next_url }}"}'
hx-trigger="click"
href="#"
>
{{ theme_name }}
</a>
{% endfor %}
</div>
</div>
</li>

0 comments on commit b464678

Please sign in to comment.