|
10 | 10 | crossorigin="anonymous" |
11 | 11 | referrerpolicy="no-referrer" /> |
12 | 12 |
|
13 | | -<div class="disco-devbar{% if banner_data.hasError %} disco-devbar-error{% endif %}"> |
| 13 | +<div class="disco-devbar{% if banner_data.hasError %} disco-devbar-error{% endif %}" style="--bg-color-light: {{ banner_data.bgColorLight }}; --bg-color-dark: {{ banner_data.bgColorDark }}"> |
14 | 14 | <div class="disco-devbar-content"> |
15 | 15 | {% if banner_data.hasError %} |
16 | 16 | <div class="disco-devbar-container-left"> |
|
30 | 30 | {% if not loop.first %} |
31 | 31 | <span class="disco-devbar-separator">·</span> |
32 | 32 | {% endif %} |
33 | | - <span class="disco-devbar-widget {% if widget.expand %}disco-devbar-widget-expand{% endif %}"> |
34 | | - <a href="{{ widget.url }}" |
35 | | - class="disco-devbar-link" |
36 | | - {% if widget.target %}target="{{ widget.target }}"{% endif %} |
37 | | - {% if widget.title %}title="{{ widget.title }}"{% endif %}> |
38 | | - <span class="disco-devbar-link-content"> |
39 | | - {% if widget.icon %} |
40 | | - {% if widget.iconType.value == 'fa' %} |
41 | | - <i class="fa-solid {{ widget.icon }}"></i> |
42 | | - {% else %} |
43 | | - {{ widget.icon }} |
| 33 | + {% if widget.type == 'close' %} |
| 34 | + <span class="disco-devbar-widget"> |
| 35 | + <a href="#" class="disco-devbar-link" onclick="document.querySelector('.disco-devbar').remove(); return false;" title="Close DevBar"> |
| 36 | + <span class="disco-devbar-link-content">✕</span> |
| 37 | + </a> |
| 38 | + </span> |
| 39 | + {% else %} |
| 40 | + <span class="disco-devbar-widget {% if widget.expand %}disco-devbar-widget-expand{% endif %}"> |
| 41 | + <a href="{{ widget.url }}" |
| 42 | + class="disco-devbar-link" |
| 43 | + {% if widget.target %}target="{{ widget.target }}"{% endif %} |
| 44 | + {% if widget.title %}title="{{ widget.title }}"{% endif %}> |
| 45 | + <span class="disco-devbar-link-content"> |
| 46 | + {% if widget.icon %} |
| 47 | + {% if widget.iconType.value == 'fa' %} |
| 48 | + <i class="fa-solid {{ widget.icon }}"></i> |
| 49 | + {% else %} |
| 50 | + {{ widget.icon }} |
| 51 | + {% endif %} |
44 | 52 | {% endif %} |
45 | | - {% endif %} |
46 | | - {% if widget.text %}{{ widget.text }}{% endif %} |
47 | | - </span> |
48 | | - </a> |
49 | | - </span> |
| 53 | + {% if widget.text %}{{ widget.text }}{% endif %} |
| 54 | + </span> |
| 55 | + </a> |
| 56 | + </span> |
| 57 | + {% endif %} |
50 | 58 | {% endfor %} |
51 | 59 | </div> |
52 | 60 | <div class="disco-devbar-container-right {% if banner_data.rightExpand %}disco-devbar-container-expand{% endif %}"> |
53 | 61 | {% for widget in banner_data.right %} |
54 | 62 | {% if not loop.first %} |
55 | 63 | <span class="disco-devbar-separator">·</span> |
56 | 64 | {% endif %} |
57 | | - <span class="disco-devbar-widget {% if widget.expand %}disco-devbar-widget-expand{% endif %}"> |
58 | | - <a href="{{ widget.url }}" |
59 | | - class="disco-devbar-link" |
60 | | - {% if widget.target %}target="{{ widget.target }}"{% endif %} |
61 | | - {% if widget.title %}title="{{ widget.title }}"{% endif %}> |
62 | | - <span class="disco-devbar-link-content"> |
63 | | - {% if widget.icon %} |
64 | | - {% if widget.iconType.value == 'fa' %} |
65 | | - <i class="fa-solid {{ widget.icon }}"></i> |
66 | | - {% else %} |
67 | | - {{ widget.icon }} |
| 65 | + {% if widget.type == 'close' %} |
| 66 | + <span class="disco-devbar-widget"> |
| 67 | + <a href="#" class="disco-devbar-link" onclick="document.querySelector('.disco-devbar').remove(); return false;" title="Close DevBar"> |
| 68 | + <span class="disco-devbar-link-content">✕</span> |
| 69 | + </a> |
| 70 | + </span> |
| 71 | + {% else %} |
| 72 | + <span class="disco-devbar-widget {% if widget.expand %}disco-devbar-widget-expand{% endif %}"> |
| 73 | + <a href="{{ widget.url }}" |
| 74 | + class="disco-devbar-link" |
| 75 | + {% if widget.target %}target="{{ widget.target }}"{% endif %} |
| 76 | + {% if widget.title %}title="{{ widget.title }}"{% endif %}> |
| 77 | + <span class="disco-devbar-link-content"> |
| 78 | + {% if widget.icon %} |
| 79 | + {% if widget.iconType.value == 'fa' %} |
| 80 | + <i class="fa-solid {{ widget.icon }}"></i> |
| 81 | + {% else %} |
| 82 | + {{ widget.icon }} |
| 83 | + {% endif %} |
68 | 84 | {% endif %} |
69 | | - {% endif %} |
70 | | - {% if widget.text %}{{ widget.text }}{% endif %} |
71 | | - </span> |
72 | | - </a> |
73 | | - </span> |
| 85 | + {% if widget.text %}{{ widget.text }}{% endif %} |
| 86 | + </span> |
| 87 | + </a> |
| 88 | + </span> |
| 89 | + {% endif %} |
74 | 90 | {% endfor %} |
75 | 91 | </div> |
76 | 92 | {% endif %} |
|
0 commit comments