Skip to content

Commit 3cebc5f

Browse files
Change the banner location
1 parent 74ba877 commit 3cebc5f

File tree

3 files changed

+19
-36
lines changed

3 files changed

+19
-36
lines changed

_resourcepdf/overrides/main.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@
5353
{% include "partials/toc.html" %}
5454
</div>
5555
<div class="md-sidebar__inner">
56-
{% include "partials/edit.html" %}
56+
{% include "partials/banner.html" %}
5757
</div>
5858
<div class="md-sidebar__inner">
59-
{% include "partials/banner.html" %}
59+
{% include "partials/edit.html" %}
6060
</div>
6161
</div>
6262
</div>
Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
<div data-banner="data-banner">
22
<div class="actions">
3-
<a href="{{ page.edit_url }}" title="Improve the page on GitHub" class="edit-page-link">
4-
<span class="edit-page-line1">
5-
<span class="edit-page-icon">
6-
{% set icon = config.theme.icon.edit or "material/file-edit-outline" %}
7-
{% include ".icons/" ~ icon ~ ".svg" %}
8-
</span>
9-
<span class="edit-page-text">
10-
Improve the page
11-
</span>
3+
<a href="{{ page.edit_url }}" title="Improve this page on GitHub" class="edit-page-link">
4+
<span class="edit-page-icon">
5+
{% set icon = config.theme.icon.edit or "material/file-edit-outline" %}
6+
{% include ".icons/" ~ icon ~ ".svg" %}
127
</span>
13-
<span class="edit-page-line2">
14-
on GitHub
15-
</span>
16-
</a>
8+
<span class="edit-page-text">Improve this page on GitHub</span>
9+
</a>
1710
</div>
1811
</div>

docs/css/extra.css

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,25 @@
1111
line-height: 1.6;
1212
}
1313

14+
/* Style the link */
1415
.edit-page-link {
15-
display: inline-block; /* shrink to content width */
16+
display: inline-flex;
17+
align-items: center;
18+
gap: 0.8em;
1619
text-decoration: none;
1720
color: var(--md-typeset-a-color);
18-
cursor: pointer;
19-
font-size: 1.25rem;
21+
font-size: 1.35rem;
2022
font-weight: 500;
2123
line-height: 1.4;
22-
text-align: left; /* align left inside container */
23-
}
24-
25-
/* First line: icon + text inline */
26-
.edit-page-line1 {
27-
padding-left: calc(0.5em);
28-
display: flex;
29-
align-items: center;
30-
gap: 0.4em;
24+
transition: color 0.2s ease;
25+
cursor: pointer;
3126
}
3227

28+
/* Bigger icon, aligned with text */
3329
.edit-page-icon svg {
34-
width: 2em; /* Bigger width */
35-
height: 2em; /* Bigger height */
30+
width: 1.4em;
31+
height: 1.4em;
3632
fill: currentColor;
37-
display: block;
38-
padding-left: calc(0.5em);
33+
vertical-align: middle;
3934
}
4035

41-
.edit-page-line2 {
42-
padding-left: calc(4.5em);
43-
line-height: 1.2;
44-
white-space: nowrap;
45-
}

0 commit comments

Comments
 (0)