Prullen in de marge
This commit is contained in:
@@ -146,6 +146,57 @@
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_seamless_table(headers, rows) %}
|
||||
{% macro render_integrated_table(headers, data) %}
|
||||
<div class="table-responsive">
|
||||
<table class="table align-items-center mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
{% for header in headers %}
|
||||
<th class="text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">{{ header }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entry in data %}
|
||||
{% if entry.is_group and entry.sub_rows %}
|
||||
{% for sub_row in entry.sub_rows %}
|
||||
<tr>
|
||||
{% for cell in sub_row %}
|
||||
{% if cell %}
|
||||
<td class="{{ cell.class }}">
|
||||
{% if cell.type == 'text' %}
|
||||
<p class="text-xs {{ cell.text_class }}">{{ cell.value }}</p>
|
||||
{% else %}
|
||||
{{ cell.value }}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% else %}
|
||||
<td></td>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
{% for cell in entry %}
|
||||
<td class="{{ cell.class }}">
|
||||
{% if cell.type == 'text' %}
|
||||
<p class="text-xs {{ cell.text_class }}">{{ cell.value }}</p>
|
||||
{% else %}
|
||||
{{ cell.value }}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_pagination(pagination, endpoint) %}
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
|
||||
@@ -323,8 +323,9 @@ def prepare_document_data(docs):
|
||||
|
||||
languages_rows.append(lang_row)
|
||||
|
||||
doc_row.append({'is_group': True, 'colspan': '4',
|
||||
doc_row.append({'is_group': True, 'colspan': '5',
|
||||
'headers': ['Language', 'Latest Version', 'URL', 'File Name', 'Type'],
|
||||
'sub_rows': languages_rows})
|
||||
rows.append(doc_row)
|
||||
return rows
|
||||
|
||||
|
||||
Reference in New Issue
Block a user