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.contrib.staticfiles.storage import staticfiles_storage
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from jinja2 import Environment
|
from jinja2 import Environment
|
||||||
|
|
||||||
from compressor.contrib.jinja2ext import CompressorExtension
|
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
|
from .utils import load_package_json
|
||||||
|
|
||||||
|
|
||||||
def environment(**options):
|
def environment(**options):
|
||||||
env = Environment(
|
env = Environment(
|
||||||
extensions=[ActiveUrl, CompressorExtension],
|
extensions=[CompressorExtension],
|
||||||
trim_blocks=True,
|
trim_blocks=True,
|
||||||
lstrip_blocks=True,
|
lstrip_blocks=True,
|
||||||
**options
|
**options
|
||||||
)
|
)
|
||||||
env.globals.update({
|
env.globals.update({
|
||||||
'entry_kinds': entry_kinds,
|
|
||||||
'package': load_package_json(),
|
'package': load_package_json(),
|
||||||
'static': staticfiles_storage.url,
|
'static': staticfiles_storage.url,
|
||||||
'url': reverse,
|
'url': reverse,
|
||||||
|
|
|
@ -31,43 +31,8 @@
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{% activeurl %}<div class="collapse navbar-collapse" id="navbar">
|
<div class="collapse navbar-collapse" id="navbar">
|
||||||
<ul class="navbar-nav">
|
</div>
|
||||||
{% 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 %}
|
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "lemoncurry",
|
"name": "lemoncurry",
|
||||||
"version": "1.9.8",
|
"version": "1.9.8",
|
||||||
"repository": "https://git.00dani.me/00dani/lemoncurry",
|
"repository": "https://gitlab.com/00dani/lemoncurry",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"js-yaml": "^3.10.0",
|
"js-yaml": "^3.10.0",
|
||||||
|
|
Loading…
Reference in a new issue