Skip to content

Commit

Permalink
Add badge on header template
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Jun 12, 2023
1 parent 0f00f98 commit e8213fc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions app/Resources/views/_partial/header.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@
{% endif %}
<nav class="main-navigation" role="navigation" style="background-color: {{ main_color }}">
<div class="nav-wrapper container">
<a id="logo-container" href="{{ path('homepage') }}" class="brand-logo hide-on-med-and-down">{{ site_name }}</a>
<a id="logo-container" href="{{ path('homepage') }}" class="brand-logo hide-on-large-only">{{ project_name }}</a>
<a id="logo-container" href="{{ path('homepage') }}" class="brand-logo hide-on-med-and-down">
{{ site_name }}
{% include "admin/openinghour/_partial/open_closed_badge.html.twig" with { float_unset: true } %}
</a>
<a id="logo-container" href="{{ path('homepage') }}" class="brand-logo hide-on-large-only">
{{ project_name }}
{% include "admin/openinghour/_partial/open_closed_badge.html.twig" with { float_unset: true } %}
</a>
<ul id="nav-desktop" class="right hide-on-med-and-down">
{% if is_granted("ROLE_ADMIN_PANEL") %}
<li class="highlight">
Expand All @@ -44,7 +50,7 @@
{% endif %}
<li>
<a href="{{ path('fos_user_security_logout') }}">
<i class="material-icons small right">exit_to_app</i>
<i class="material-icons small">exit_to_app</i>
</a>
</li>
{% else %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

{% if not opening_hour_service.isEmpty %}
{% if opening_hour_service.isOpen %}
<span class="badge green white-text" style="{% if float_unset %}float:unset;{% endif %}">Ouvert</span>
<span class="badge green white-text" style="font-family:'Raleway',sans-serif;{% if float_unset %}float:unset;{% endif %}">Ouvert</span>
{% else %}
<span class="badge red white-text" style="{% if float_unset %}float:unset;{% endif %}">Fermé</span>
<span class="badge red white-text" style="font-family:'Raleway',sans-serif;{% if float_unset %}float:unset;{% endif %}">Fermé</span>
{% endif %}
{% endif %}

0 comments on commit e8213fc

Please sign in to comment.