[gi-docgen] template: Replace table with dl for struct members
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gi-docgen] template: Replace table with dl for struct members
- Date: Sat, 13 Aug 2022 00:02:14 +0000 (UTC)
commit 75c98d3af257a873dc01ab51b1baf239aebb80af
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Aug 12 22:37:45 2022 +0100
template: Replace table with dl for struct members
Just like we did for callable arguments. Tables behave very badly on
smaller screens.
gidocgen/templates/basic/class.html | 14 ++++----------
gidocgen/templates/basic/struct.html | 10 ++++------
2 files changed, 8 insertions(+), 16 deletions(-)
---
diff --git a/gidocgen/templates/basic/class.html b/gidocgen/templates/basic/class.html
index e60842a..c17cb8e 100644
--- a/gidocgen/templates/basic/class.html
+++ b/gidocgen/templates/basic/class.html
@@ -622,18 +622,12 @@
<div class="docblock">
<h6>Class members</h6>
- <table class="members">
+ <dl class="members">
{% for field in class.class_fields %}
- <tr>
- <td style="vertical-align:top"><code>{{ field.name }}</code></td>
- <td style="vertical-align:top"><pre><code>{{ field.type_cname }}</code></pre></td>
- </tr>
- <tr>
- <td> </td>
- <td style="vertical-align:top">{{ field.description }}</td>
- </td>
+ <dt><code>{{ field.name }}: {{ field.type_cname }}</code></dt>
+ <dd>{{ field.description }}</dd>
{% endfor %}
- </table>
+ </dd>
</div>
{% endif %}
</div>
diff --git a/gidocgen/templates/basic/struct.html b/gidocgen/templates/basic/struct.html
index 843ab81..c2343a9 100644
--- a/gidocgen/templates/basic/struct.html
+++ b/gidocgen/templates/basic/struct.html
@@ -102,14 +102,12 @@
</h6>
<div class="docblock">
- <table>
+ <dl>
{% for field in struct.fields %}
- <tr>
- <td><code>{{ field.name }}</code></td>
- <td>{{ field.description }}</td>
- </tr>
+ <dt><code>{{ field.name }}</code></dt>
+ <dd>{{ field.description }}</dd>
{% endfor %}
- </table>
+ </dl>
</div>
</div>
{% endif %}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]