Skip to content

Commit c7bde13

Browse files
committed
fix(docs-infra): fix placement of "Edit source" button on errors and diagnostics pages
This commit aligns the layout of errors and extended diagnostics pages more closely with other docs pages to ensure that the "Edit source" button is displayed correctly even when the heading is too long to fit on a single line. For error pages, in particular, this ensures that the button is not obscured by the error video. **Before:** ![error-pages before][1] **After:** ![error-pages after][2] [1]: https://user-images.githubusercontent.com/8604205/163408291-7aebd029-891c-4045-8fa2-a8e2b2b06dab.png [2]: https://user-images.githubusercontent.com/8604205/163408296-40e6df8e-aadc-4a82-978a-ab4d902b6f6e.png
1 parent 000363e commit c7bde13

2 files changed

Lines changed: 34 additions & 25 deletions

File tree

aio/tools/transforms/templates/error/error.template.html

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
11
{% import "lib/githubLinks.html" as github -%}
22

3-
<h1>{$ doc.code $}: {$ doc.shortDescription $}</h1>
43
<div class="github-links">
54
{$ github.githubEditLink(doc, versionInfo) $}
65
</div>
76

8-
{% if doc.videoUrl.length %}
9-
<div class="video-container">
10-
<iframe
11-
src="{$ doc.videoUrl $}"
12-
frameborder="0"
13-
allow="accelerometer; encrypted-media; gyroscope; picture-in-picture"
14-
allowfullscreen></iframe>
15-
</div>
16-
{% endif%}
17-
18-
{% block content %}
197
<div class="content">
20-
<h2>Description</h2>
21-
{$ doc.description | marked $}
22-
</div>
23-
<br>
24-
<div class="debugging">
25-
<h2>Debugging the error</h2>
26-
{$ doc.debugging | marked $}
8+
9+
<h1>{$ doc.code $}: {$ doc.shortDescription $}</h1>
10+
11+
{% if doc.videoUrl.length %}
12+
<div class="video-container">
13+
<iframe
14+
src="{$ doc.videoUrl $}"
15+
frameborder="0"
16+
allow="accelerometer; encrypted-media; gyroscope; picture-in-picture"
17+
allowfullscreen></iframe>
18+
</div>
19+
{% endif%}
20+
21+
<div class="error-description">
22+
<h2>Description</h2>
23+
{$ doc.description | marked $}
24+
</div>
25+
26+
<br>
27+
28+
<div class="debugging">
29+
<h2>Debugging the error</h2>
30+
{$ doc.debugging | marked $}
31+
</div>
32+
2733
</div>
28-
{% endblock %}

aio/tools/transforms/templates/extended-diagnostic/extended-diagnostic.template.html

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
{% import "lib/githubLinks.html" as github -%}
22

3-
<h1>{$ doc.code $}: {$ doc.name $}</h1>
43
<div class="github-links">
54
{$ github.githubEditLink(doc, versionInfo) $}
65
</div>
7-
{% block content %}
6+
87
<div class="content">
9-
<h2>Description</h2>
10-
{$ doc.description | marked $}
8+
9+
<h1>{$ doc.code $}: {$ doc.name $}</h1>
10+
11+
<div class="diagnostic-description">
12+
<h2>Description</h2>
13+
{$ doc.description | marked $}
14+
</div>
15+
1116
</div>
12-
{% endblock %}

0 commit comments

Comments
 (0)