Skip to content

Commit 98daa10

Browse files
Changing from the button into a banner
modified: _resourcepdf/overrides/main.html new file: _resourcepdf/overrides/partials/edit.html deleted: _resourcepdf/overrides/partials/toc.html modified: docs/css/extra.css
1 parent 0d2196c commit 98daa10

File tree

4 files changed

+30
-55
lines changed

4 files changed

+30
-55
lines changed

_resourcepdf/overrides/main.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
<div class="md-sidebar__inner">
5353
{% include "partials/toc.html" %}
5454
</div>
55+
<div class="md-sidebar__inner">
56+
{% include "partials/edit.html" %}
57+
</div>
5558
<div class="md-sidebar__inner">
5659
{% include "partials/banner.html" %}
5760
</div>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<div data-banner="data-banner">
2+
<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" %}
7+
</span>
8+
<span class="edit-page-text">Improve this page</span>
9+
</a>
10+
</div>
11+
</div>

_resourcepdf/overrides/partials/toc.html

Lines changed: 0 additions & 23 deletions
This file was deleted.

docs/css/extra.css

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

14-
.edit-page-icon svg {
15-
width: 1.7em;
16-
height: 1.7em;
17-
margin-right: 0.4em;
18-
fill: currentColor;
19-
}
20-
21-
.edit-page-box {
22-
display: flex;
14+
/* Style the link */
15+
.edit-page-link {
16+
display: inline-flex;
2317
align-items: center;
24-
justify-content: center;
25-
padding: 0.5em 1em;
26-
border: 2px solid #127ae8;
27-
border-radius: 6px;
28-
font-weight: bold;
29-
font-size: 1.1em;
30-
color: #127ae8;
31-
background-color: transparent;
18+
gap: 0.6em;
3219
text-decoration: none;
33-
width: 100%;
34-
max-width: 100%;
35-
transition:
36-
background-color 0.25s ease,
37-
color 0.25s ease,
38-
transform 0.2s ease,
39-
box-shadow 0.2s ease;
40-
margin-top: 0rem;
20+
color: var(--md-typeset-a-color);
21+
font-size: 1.25rem;
22+
font-weight: 500;
23+
line-height: 1.4;
24+
transition: color 0.2s ease;
4125
cursor: pointer;
4226
}
4327

44-
.edit-page-box:hover {
45-
background-color: transparent;
46-
color: #439eff;
47-
transform: translateY(-2px);
48-
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
49-
}
50-
28+
/* Bigger icon, aligned with text */
29+
.edit-page-icon svg {
30+
width: 1.4em;
31+
height: 1.4em;
32+
fill: currentColor;
33+
vertical-align: middle;
34+
}

0 commit comments

Comments
 (0)