Compare commits
No commits in common. "24bc7816f1f3d982b13e670fa969d5ae25af503b" and "e94a856a081cfe1c59e9288c96a1b5edcba3edca" have entirely different histories.
24bc7816f1
...
e94a856a08
3 changed files with 4 additions and 43 deletions
|
@ -1,23 +1,19 @@
|
|||
from django.contrib.staticfiles.storage import staticfiles_storage
|
||||
from django.urls import reverse
|
||||
from jinja2 import Environment
|
||||
|
||||
from compressor.contrib.jinja2ext import CompressorExtension
|
||||
from django_activeurl.ext.django_jinja import ActiveUrl
|
||||
|
||||
from entries.kinds import all as entry_kinds
|
||||
from .utils import load_package_json
|
||||
|
||||
|
||||
def environment(**options):
|
||||
env = Environment(
|
||||
extensions=[ActiveUrl, CompressorExtension],
|
||||
extensions=[CompressorExtension],
|
||||
trim_blocks=True,
|
||||
lstrip_blocks=True,
|
||||
**options
|
||||
)
|
||||
env.globals.update({
|
||||
'entry_kinds': entry_kinds,
|
||||
'package': load_package_json(),
|
||||
'static': staticfiles_storage.url,
|
||||
'url': reverse,
|
||||
|
|
|
@ -31,43 +31,8 @@
|
|||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
{% activeurl %}<div class="collapse navbar-collapse" id="navbar">
|
||||
<ul class="navbar-nav">
|
||||
{% for kind in entry_kinds %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ kind.index }}">
|
||||
<i class="{{ kind.icon }} fa-fw" aria-hidden="true"></i>
|
||||
{{ kind.plural }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<ul class="navbar-nav">
|
||||
{% if request.user.is_authenticated %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url('admin:index') }}">
|
||||
<i class="fas fa-cog fa-fw" aria-hidden="true"></i>
|
||||
admin
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url('lemonauth:logout') }}">
|
||||
<i class="fas fa-sign-out-alt fa-fw" aria-hidden="true"></i>
|
||||
log out
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url('lemonauth:login') }}">
|
||||
<i class="fas fa-sign-in-alt fa-fw" aria-hidden="true"></i>
|
||||
log in
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>{% endactiveurl %}
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbar">
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "lemoncurry",
|
||||
"version": "1.9.8",
|
||||
"repository": "https://git.00dani.me/00dani/lemoncurry",
|
||||
"repository": "https://gitlab.com/00dani/lemoncurry",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"js-yaml": "^3.10.0",
|
||||
|
|
Loading…
Reference in a new issue