Skip to content

Commit

Permalink
add labels
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyfast committed May 27, 2023
1 parent bb0e798 commit 2e1151e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions nbconvert_html5/templates/semantic-forms/cell.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
{%- macro cell_execution_count(cell, nb, body) -%}
{%- set count = nb["cells"].index(cell)-%}{%- set ID = "/cells/" + str(count) -%}
{% if cell.cell_type == "code" %}
<output form={{ID}} for="{{ID}}/source" name=execution_count id="{{ID}}/execution_count" title="Execution count">Out: {{cell.execution_count or ""}}</output>
<label for="{{ID}}/source" name=execution_count id="{{ID}}/execution_count">Out: {{cell.execution_count or ""}}</label>
{% else %}
<output form={{ID}} for="{{ID}}/source" name=execution_count id="{{ID}}/execution_count" title="Execution count">Cell {{count}}</output>
<label for="{{ID}}/source" name=execution_count id="{{ID}}/execution_count">Cell {{count}}</label>
{% endif %}
{%- endmacro -%}

Expand Down
6 changes: 2 additions & 4 deletions nbconvert_html5/templates/semantic-forms/sections.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
{% block css %}
<style>
section.cell [role=toolbar]:has(button[type="submit"]:disabled),
section.cell :is(fieldset:empty, textarea:read-only),
section.cell fieldset:empty,
section.cell textarea:read-only,
section.markdown [name="execution_count"] {
display: none;
}
[name=execution_count] {
font-family: monospace;
}
section.cell > fieldset {
border: none;
}
</style>{% endblock css %}

{% block any_cell %}
Expand Down

0 comments on commit 2e1151e

Please sign in to comment.