From 88df6f806b6b4e3146e1916209ae04546c13a8f2 Mon Sep 17 00:00:00 2001 From: Tony Fast Date: Thu, 29 Jun 2023 13:26:54 -0700 Subject: [PATCH] use region landmark for cells (#69) * wrap the cell in a region and remove form label * mv label outside region and data to region * modify css for new format --- .../templates/semantic-forms/smol.html.j2 | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/nbconvert_html5/templates/semantic-forms/smol.html.j2 b/nbconvert_html5/templates/semantic-forms/smol.html.j2 index 0996681e..f78cb04d 100644 --- a/nbconvert_html5/templates/semantic-forms/smol.html.j2 +++ b/nbconvert_html5/templates/semantic-forms/smol.html.j2 @@ -25,12 +25,12 @@ padding-right: 16px; } - label[id$=\/form_label], + label[id$=\/cell_label], fieldset[name=input]:disabled~ul[role=toolbar], fieldset[name=input]>legend, fieldset[name=outputs]>legend, - article>form[action=markdown]~fieldset[name=input]:disabled, - article[data-outputs="0"]>fieldset[name=outputs] { + section>form[action=markdown]~fieldset[name=input]:disabled, + section[data-outputs="0"]>fieldset[name=outputs] { display: none; } @@ -41,7 +41,7 @@ padding: var(--cell-padding); } - [role=feed]>article>[name=input] { + fieldset[name=input] { border: none; } @@ -100,21 +100,23 @@ {% if cell.cell_type == "raw" %}{{cell.source}}{% endif %}
-
-
- + -
- In {{cell.execution_count or ""}} - - -
- {# things need to follow this input in dom order so that we can use css selectors off fieldset:disabled #} - {{ cell_toolbars(cell, nb, [cell_submit(cell, nb), cell_type(cell, nb)]) }} - {{ cell_output(cell, nb) }} +
+ {# the form doubles as an anchor #} +
+
+
+ In {{cell.execution_count or ""}} + + +
+ {# things need to follow this input in dom order so that we can use css selectors off fieldset:disabled #} + {{ cell_toolbars(cell, nb, [cell_submit(cell, nb), cell_type(cell, nb)]) }} + {{ cell_output(cell, nb) }} +
{% endblock any_cell %}