|
| 1 | +<style> |
| 2 | + {% if configuration.AFFICHAGE_LABEL_SIDEBAR %} |
| 3 | + @media (min-width: 768px) { |
| 4 | + #sidebar_menu { |
| 5 | + width: 100px; |
| 6 | + li { |
| 7 | + height: unset !important; |
| 8 | + |
| 9 | + > a { |
| 10 | + padding: 1rem 0.5rem !important; |
| 11 | + } |
| 12 | + |
| 13 | + .short_title { |
| 14 | + padding-top: 0.5rem; |
| 15 | + font-size: 0.8rem; |
| 16 | + font-weight: bold; |
| 17 | + text-transform: uppercase; |
| 18 | + } |
| 19 | + } |
| 20 | + } |
| 21 | + main { |
| 22 | + margin-left: 100px; |
| 23 | + } |
| 24 | + } |
| 25 | + @media (max-width: 768px) { |
| 26 | + #sidebar_menu { |
| 27 | + li { |
| 28 | + .short_title { |
| 29 | + display: none; |
| 30 | + } |
| 31 | + } |
| 32 | + } |
| 33 | + } |
| 34 | + {% else %} |
| 35 | + .sidebar-brand > a { |
| 36 | + justify-content: center; |
| 37 | + } |
| 38 | + {% endif %} |
| 39 | +</style> |
| 40 | + |
1 | 41 | <ul id="sidebar_menu" class="sidebar-nav"> |
2 | 42 |
|
3 | 43 | <li class="sidebar-brand"> |
4 | 44 | <a href="{{ url_for('main.index') }}" id="menu-toggle" |
5 | | - class="d-flex justify-content-center align-items-center p-3 w-100 h-100" |
| 45 | + class="d-flex align-items-center flex-column p-3 w-100 h-100" |
6 | 46 | data-bs-toggle="tooltip" |
7 | 47 | title="{{ _('back.to.home') }}" |
8 | 48 | data-bs-placement="right"> |
9 | 49 | <span id="main_icon" class="fa fa-home"></span> |
| 50 | + {% if configuration.AFFICHAGE_LABEL_SIDEBAR %} |
| 51 | + <div class="short_title">{{ _("home") | upper }}</div> |
| 52 | + {% endif %} |
10 | 53 | </a> |
11 | 54 | </li> |
12 | 55 |
|
13 | 56 | {% for page_key, page_values in configuration.STATIC_PAGES.items()|sort(attribute='1.order') %} |
14 | 57 | {% if 'url' in page_values %} |
15 | 58 | <li class="sidebar-brand"> |
16 | 59 | <a href="{{ page_values.url }}" target="_blank" |
17 | | - class="d-flex justify-content-center align-items-center p-3 w-100 h-100" |
| 60 | + class="d-flex align-items-center flex-column p-3 w-100 h-100" |
18 | 61 | data-bs-toggle="tooltip" |
19 | 62 | title="{{ page_values.title }}" |
20 | 63 | data-bs-placement="right"> |
|
25 | 68 | {% else %} |
26 | 69 | <span class="fas {{ page_values.picto }}"></span> |
27 | 70 | {% endif %} |
| 71 | + {% if configuration.AFFICHAGE_LABEL_SIDEBAR and 'label' in page_values %} |
| 72 | + <div class="short_title">{{ page_values.short_title }}</div> |
| 73 | + {% endif %} |
28 | 74 | </a> |
29 | 75 | </li> |
30 | 76 | {% else %} |
31 | 77 | <li class="sidebar-brand"> |
32 | 78 | <a href="{{ url_for('main.get_staticpages', page=page_key) }}" |
33 | | - class="d-flex justify-content-center align-items-center p-3 w-100 h-100" |
| 79 | + class="d-flex flex-column align-items-center p-3 w-100 h-100" |
34 | 80 | data-bs-toggle="tooltip" |
35 | 81 | title="{{ page_values.title }}" |
36 | 82 | data-bs-placement="right"> |
|
41 | 87 | {% else %} |
42 | 88 | <span class="fas {{ page_values.picto }}"></span> |
43 | 89 | {% endif %} |
| 90 | + {% if configuration.AFFICHAGE_LABEL_SIDEBAR and 'short_title' in page_values %} |
| 91 | + <div class="short_title">{{ page_values.short_title }}</div> |
| 92 | + {% endif %} |
44 | 93 | </a> |
45 | 94 | </li> |
46 | 95 | {% endif %} |
47 | 96 | {% endfor %} |
48 | 97 | {% if configuration.AFFICHAGE_RECHERCHE_AVANCEE %} |
49 | 98 | <li class="sidebar-brand"> |
50 | 99 | <a href="{{ url_for('main.advanced_search') }}" |
51 | | - class="d-flex justify-content-center align-items-center p-3 w-100 h-100" |
| 100 | + class="d-flex flex-column align-items-center p-3 w-100 h-100" |
52 | 101 | data-bs-toggle="tooltip" |
53 | 102 | title="{{ _('advanced_search') }}" |
54 | 103 | data-bs-placement="right"> |
55 | 104 | <span class="fa fa-search"></span> |
| 105 | + {% if configuration.AFFICHAGE_LABEL_SIDEBAR %} |
| 106 | + <div class="short_title">{{ _("advanced_search") | upper }}</div> |
| 107 | + {% endif %} |
56 | 108 | </a> |
57 | 109 | </li> |
58 | 110 | {% endif %} |
59 | 111 |
|
60 | 112 | <li class="sidebar-brand"> |
61 | 113 | <a href="{{ url_for('main.photos') }}" |
62 | | - class="d-flex justify-content-center align-items-center p-3 w-100 h-100" |
| 114 | + class="d-flex flex-column align-items-center p-3 w-100 h-100" |
63 | 115 | data-bs-toggle="tooltip" |
64 | 116 | title="{{ _('gallery.title') }}" |
65 | 117 | data-bs-placement="right"> |
66 | 118 | <span class="fa fa-camera"></span> |
| 119 | + {% if configuration.AFFICHAGE_LABEL_SIDEBAR %} |
| 120 | + <div class="short_title">{{ _("photos") | upper }}</div> |
| 121 | + {% endif %} |
67 | 122 | </a> |
68 | 123 | </li> |
69 | 124 |
|
|
0 commit comments