Cleanup template styles

This commit is contained in:
Igor Scheller 2023-12-16 03:07:16 +01:00 committed by msquare
parent cc160e3e20
commit 8833506e04
5 changed files with 30 additions and 16 deletions

View File

@ -47,7 +47,7 @@
<p>This may be due to</p>
<ul>
<li>Archangels closing the gates of heaven.</li>
<li>The gates of heaven were closed.</li>
<li>Someone tried to do a simple maintenance task which did not go as planned.</li>
<li>DHCP decided to give me another ip address.</li>
<li>Somebody's stolen the power chord and now the battery is empty.</li>

View File

@ -2,7 +2,7 @@
<div class="col-md-12">
<hr/>
<div class="text-center footer" style="margin-bottom: 10px;">
<div class="text-center footer mb-3">
{% block eventinfo %}
{% if config('name') %}
{% if config('event_start') and config('event_end') %}

View File

@ -133,11 +133,19 @@ Also adds buttons to increment / decrement the value.
@param {bool} [opt.required] - Whether to add the "required" attribute. Defaults to false.
@param {int} [opt.rows=0] - Optional value of the "rows" attriute. Defaults to 0.
@param {string} [opt.value=""] - Optional value to set. Defaults to empty string.
@param {string} [opt.label_hidden=true] - Optionaly hide the label. Defaults to false.
@param {string} [opt.no_div=false] - Optionaly don't add a div. Defaults to false.
#}
{% macro textarea(name, label, opt) %}
{% if not opt.no_div|default(false) -%}
<div class="mb-3">
{% endif -%}
{% if label -%}
<label class="form-label" for="{{ name }}">{{ label }}</label>
<label class="form-label
{%- if opt.label_hidden|default(false) %} visually-hidden{% endif -%}
" for="{{ name }}">
{{ label }}
</label>
{% if opt.required_icon|default(false) %}
{{ _self.entry_required() }}
{% endif %}
@ -149,7 +157,9 @@ Also adds buttons to increment / decrement the value.
{%- if opt.required|default(false) %} required{%- endif -%}
{%- if opt.rows|default(0) %} rows="{{ opt.rows }}"{%- endif -%}
>{{ opt.value|default('') }}</textarea>
{% if not opt.no_div|default(false) -%}
</div>
{%- endif %}
{%- endmacro %}
{#

View File

@ -48,8 +48,11 @@
{{ csrf() }}
<div class="input-group">
<label for="message" class="visually-hidden">{{ __('message.message') }}</label>
<textarea class="form-control" id="message" name="text" required="" rows="3"></textarea>
{{ f.textarea(
'text',
__('message.message'),
{'required': true, 'rows': 3, 'label_hidden': true, 'no_div': true}
) }}
{{ f.submit(m.icon('send-fill')) }}
</div>
</form>

View File

@ -34,7 +34,7 @@
</div>
</div>
</div>
<div class="form-group d-print-none" style="margin-top: .5em">
<div class="form-group d-print-none mt-2">
<div class="btn-group mb-1" role="group">
<button type="button" class="btn btn-secondary set-date" data-days="-1">%set_yesterday%</button>
<button type="button" class="btn btn-secondary set-date" data-days="0">%set_today%</button>
@ -55,7 +55,7 @@
</div>
<div class="row d-print-none">
<div class="col-md-12">
<button class="btn btn-primary" type="submit" style="width:100%; margin: 1em 0">%filter%</button>
<button class="btn btn-primary mt-3 mb-3 w-100" type="submit">%filter%</button>
</div>
</div>
</div>
@ -73,11 +73,12 @@
<div class="col col-12 col-sm-5 col-md-12 col-lg-7 col-xl-5 col-xxl-4">%type_select%</div>
<div class="col col-12 col-sm-3 col-md-12 col-lg-5 col-xl-3 col-xxl-4">%filled_select%</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 d-print-none d-md-none">
<button class="btn btn-primary" type="submit" style="width:100%; margin: 1em 0">%filter%</button>
<button class="btn btn-primary mb-3 w-100" type="submit">%filter%</button>
</div>
</div>
</div>
</div>
</div>
</form>