Mini Shell

Direktori : /opt/bakmgr/lib/python3.6/site-packages/bakmgr/dash/templates/
Upload File :
Current File : //opt/bakmgr/lib/python3.6/site-packages/bakmgr/dash/templates/bootstrap_macros.html.jinja

{# vim: ts=2:sw=2:et:ft=jinja-html #}
{% macro header_card(header) %}
<div class="card">
  <div class="card-header">{{ header }}</div>
  <div class="card-body">
    {{ caller() }}
  </div>
</div>
{% endmacro %}

{% macro checkbox(id, label, checked, form_class="", onclick="") %}
<div class="form-check {{ form_class }}">
  <input class="form-check-input" {% if onclick %}onclick="{{ onclick }}"{% endif %} type="checkbox" value="" id="{{ id }}" {% if checked %}checked{% endif %}>
  <label class="form-check-label" for="{{ id }}">
    {{ label }}
  </label>
</div>
{% endmacro %}

{% macro header_input_group(label, help="", group_class="mb-3") %}
<div class="{{ group_class }}">
  <div class="input-group">
    <span class="input-group-text">{{ label }}</span>
    {{ caller() }}
  </div>
  {% if help %}
  <div class="form-text">{{ help }}</div>
  {% endif %}
</div>
{% endmacro %}

{% macro select(id, opts, selected, help="", group_class="mb-3") %}
<div class="{{ group_class }}">
  <select id="{{ id }}" class="form-select">
  {% for key in opts %}
    <option value="{{ key }}"{% if key == selected %} selected{% endif %}>
      {{ opts[key] if opts is mapping else key }}
    </option>
  {% endfor %}
  </select>
  {% if help %}
  <div class="form-text">{{ help }}</div>
  {% endif %}
</div>
{% endmacro %}

{% macro nav_item(name, url, page) %}
<li class="nav-item">
  {% if page.lower() == name.lower() %}
  <a class="nav-link active" href="{{ url }}"><strong>{{ name }}</strong></a>
  {% else %}
  <a class="nav-link" href="{{ url }}">{{ name }}</a>
  {% endif %}
</li>
{% endmacro %}

Zerion Mini Shell 1.0