Skip to content

Commit 74ba877

Browse files
Add more text and center it
modified: _resourcepdf/overrides/partials/edit.html modified: docs/css/extra.css
1 parent 98daa10 commit 74ba877

File tree

2 files changed

+35
-17
lines changed

2 files changed

+35
-17
lines changed
Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
<div data-banner="data-banner">
22
<div class="actions">
3-
<a href="{{ page.edit_url }}" title="Improve this page" 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" %}
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>
712
</span>
8-
<span class="edit-page-text">Improve this page</span>
9-
</a>
13+
<span class="edit-page-line2">
14+
on GitHub
15+
</span>
16+
</a>
1017
</div>
1118
</div>

docs/css/extra.css

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

14-
/* Style the link */
1514
.edit-page-link {
16-
display: inline-flex;
17-
align-items: center;
18-
gap: 0.6em;
15+
display: inline-block; /* shrink to content width */
1916
text-decoration: none;
2017
color: var(--md-typeset-a-color);
18+
cursor: pointer;
2119
font-size: 1.25rem;
2220
font-weight: 500;
2321
line-height: 1.4;
24-
transition: color 0.2s ease;
25-
cursor: pointer;
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;
2631
}
2732

28-
/* Bigger icon, aligned with text */
2933
.edit-page-icon svg {
30-
width: 1.4em;
31-
height: 1.4em;
34+
width: 2em; /* Bigger width */
35+
height: 2em; /* Bigger height */
3236
fill: currentColor;
33-
vertical-align: middle;
34-
}
37+
display: block;
38+
padding-left: calc(0.5em);
39+
}
40+
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)