File tree Expand file tree Collapse file tree 3 files changed +56
-33
lines changed
_resourcepdf/overrides/partials Expand file tree Collapse file tree 3 files changed +56
-33
lines changed Original file line number Diff line number Diff line change
1
+ {% if page.toc %}
2
+ < nav class ="md-nav md-nav--secondary ">
3
+ < label class ="md-nav__title " for ="__toc "> Table of contents</ label >
4
+ < ul class ="md-nav__list " data-md-scrollfix >
5
+ {% for toc_item in page.toc %}
6
+ {% include "partials/toc-item.html" with context %}
7
+ {% endfor %}
8
+ </ ul >
9
+
10
+ {# Edit this page link below the TOC #}
11
+ {% if page.edit_url %}
12
+ < div class ="md-source-file ">
13
+ < a href ="{{ page.edit_url }} " title ="Improve this page " class ="edit-page-box ">
14
+ < span class ="edit-page-icon ">
15
+ {% set icon = config.theme.icon.edit or "material/file-edit-outline" %}
16
+ {% include ".icons/" ~ icon ~ ".svg" %}
17
+ </ span >
18
+ < span class ="edit-page-text "> Improve this page</ span >
19
+ </ a >
20
+ </ div >
21
+ {% endif %}
22
+ </ nav >
23
+ {% endif %}
Original file line number Diff line number Diff line change 11
11
line-height : 1.6 ;
12
12
}
13
13
14
- .md-content__button .md-icon {
15
- color : # 127ae8 !important ; /* Example: deep orange */
14
+ .edit-page-icon svg {
15
+ width : 1.7em ;
16
+ height : 1.7em ;
17
+ margin-right : 0.4em ;
18
+ fill : currentColor; /* Makes icon match text color */
16
19
}
17
20
18
- /* Optional: hover effect */
19
- .md-content__button .md-icon : hover {
20
- color : # 439eff !important ;
21
- }
22
-
23
- .md-content__button .md-icon svg {
24
- width : 34px ;
25
- height : 34px ;
26
- }
27
-
28
- .md-content__button .md-icon [href *= "/edit/" ] {
29
- display : inline-flex; /* make the button a flex container */
30
- flex-direction : column; /* stack children vertically */
31
- align-items : center; /* center them horizontally */
32
- margin-top : -4px ;
33
- }
34
-
35
- .md-content__button .md-icon [href *= "/edit/" ] svg {
36
- width : 34px ;
37
- height : 34px ;
21
+ .edit-page-box {
22
+ display : inline-flex;
23
+ align-items : center;
24
+ justify-content : center;
25
+ padding : 0.5em 1em ;
26
+ min-width : 260px ;
27
+ border : 2px solid # 127ae8 ;
28
+ border-radius : 6px ;
29
+ font-weight : bold;
30
+ font-size : 1.1em ;
31
+ color : # 127ae8 ;
32
+ background-color : transparent;
33
+ text-decoration : none;
34
+ min-width : 250px ;
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 : 1rem ;
41
+ cursor : pointer;
38
42
}
39
43
40
- .md-content__button .md-icon [href *= "/edit/" ]::after {
41
- content : "Improve this page" ;
42
- margin-top : 2px ;
43
- font-size : 0.7rem ;
44
- color : # 2C323E ;
45
- text-align : center;
46
- display : block;
47
- width : 100% ;
48
- font-weight : bold;
44
+ .edit-page-box : hover {
45
+ background-color : # 439eff ;
46
+ color : white;
47
+ transform : translateY (-2px );
48
+ box-shadow : 0 4px 10px rgba (0 , 0 , 0 , 0.1 );
49
49
}
50
50
Original file line number Diff line number Diff line change 51
51
- navigation.indexes
52
52
- content.tooltips
53
53
- content.tabs.link
54
- - content.action.edit
55
- # - content.action.view
54
+ # - content.action.edit
55
+ - content.action.view
56
56
- content.code.copy
57
57
- content.code.annotate
58
58
- toc.follow
You can’t perform that action at this time.
0 commit comments