Expand navbar with protection

This commit is contained in:
Tim 2023-04-05 00:55:02 +02:00
parent 22735cf884
commit ccab49dd3c
4 changed files with 13 additions and 6 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@
/var/
/vendor/
###< symfony/framework-bundle ###
release.json

View File

@ -24,7 +24,7 @@ set('allow_anonymous_stats', false);
host('snips.loken.nl')
->setRemoteUser('www-data')
->set('branch', function () {
return input()->getOption('branch') ?: 'develop';
return input()->getOption('branch') ?: 'main';
})
->set('deploy_path', '~/snips.loken.nl');

View File

@ -11,9 +11,15 @@
<li class="nav-item">
<a class="nav-link" href="{{ path('home') }}">Home</a>
</li>
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
<li class="nav-item">
<a class="nav-link" href="{{ path('snip_index') }}">My snips</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ path('snip_new') }}">New snip</a>
</li>
{% endif %}
</ul>
<ul class="navbar-nav my-2 my-lg-0">
{% if app.environment == 'dev' %}

View File

@ -1,9 +1,9 @@
{% extends 'base/base.html.twig' %}
{% block title %}My snippets{% endblock %}
{% block title %}My snips{% endblock %}
{% block body %}
<h1>My snippets</h1>
<h1>My snips</h1>
<a class="btn btn-success" href="{{ path('snip_new') }}">
<i class="fa fa-plus"></i> Add
</a><br><br>