Skip to content

Commit 97c0730

Browse files
PS-10073 [DOCs] Implement new Edit this page button (8.0) (#536)
* PS-10073 [DOCs] Implement new colors for Edit this page and View page buttons deleted: _resource/.icons/edit_page.png deleted: _resource/.icons/file-document-edit-outline.svg deleted: _resource/.icons/file-eye-outline.svg modified: docs/css/extra.css modified: mkdocs-base.yml * Update extra.css * Update mkdocs.yml * Update extra.css * Change the button location new file: _resourcepdf/overrides/partials/toc.html modified: docs/css/extra.css modified: mkdocs-base.yml * 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 * Add more text and center it modified: _resourcepdf/overrides/partials/edit.html modified: docs/css/extra.css * Change the banner location * Change the text * Fix the css * Change the banners location modified: _resourcepdf/overrides/main.html modified: docs/css/extra.css * Change the banner and link colours
1 parent 241e3bf commit 97c0730

File tree

9 files changed

+39
-12
lines changed

9 files changed

+39
-12
lines changed

_resource/.icons/edit_page.png

-4.24 KB
Binary file not shown.

_resource/.icons/file-document-edit-outline.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

_resource/.icons/file-eye-outline.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

_resourcepdf/overrides/main.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,14 @@
5050
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" {{ hidden }}>
5151
<div class="md-sidebar__scrollwrap">
5252
<div class="md-sidebar__inner">
53-
{% include "partials/toc.html" %}
53+
{% include "partials/edit.html" %}
5454
</div>
5555
<div class="md-sidebar__inner">
5656
{% include "partials/banner.html" %}
5757
</div>
58+
<div class="md-sidebar__inner">
59+
{% include "partials/toc.html" %}
60+
</div>
5861
</div>
5962
</div>
6063
{% endif %}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<div data-banner="data-banner">
22
<p><svg style="display:block;margin:-1em 0 0.75em" width="78" height="69" viewBox="0 0 78 69" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M56.7281 30.7666C62.6528 26.8938 64.5914 18.9942 61.0059 12.7854C59.2094 9.67113 56.3053 7.44082 52.8311 6.50951C49.6122 5.64535 46.2502 5.99872 43.2912 7.49366L39.251 0.5L30.8648 15.0245L11.4811 48.5937H67.021L56.7281 30.7666ZM51.881 10.0674C54.4064 10.7401 56.5079 12.3616 57.8168 14.6194C60.3895 19.0701 59.053 24.7153 54.8808 27.5665L45.1362 10.6905C47.2355 9.68104 49.6034 9.46087 51.881 10.0674ZM39.251 7.87125L60.6339 44.907H48.1228L32.9927 18.7102L39.2499 7.87235L39.251 7.87125ZM17.8682 44.907L30.8637 22.4035L43.8592 44.907H17.8682Z" fill="url(#paint0_linear_2899_1968)"></path><path style="fill:var(--md-typeset-color)" d="M4.981 64.943H3.157V68.207H.756V57.323H5.217C7.822 57.323 9.397 58.861 9.397 61.086V61.116C9.397 63.635 7.433 64.94 4.984 64.94L4.981 64.943V64.943ZM6.961 61.134C6.961 60.061 6.213 59.485 5.011 59.485H3.154V62.812H5.056C6.258 62.812 6.958 62.096 6.958 61.163V61.134H6.961ZM10.738 68.208V57.323H18.973V59.455H13.124V61.664H18.27V63.796H13.124V66.082H19.051V68.214H10.738V68.208 68.208ZM27.557 68.208 25.218 64.726H23.332V68.208H20.931V57.323H25.921C28.496 57.323 30.039 58.677 30.039 60.915V60.945C30.039 62.702 29.088 63.807 27.7 64.32L30.367 68.207H27.556L27.557 68.208ZM27.605 61.041C27.605 60.016 26.887 59.485 25.719 59.485H23.333V62.61H25.767C26.936 62.61 27.605 61.987 27.605 61.071V61.042 61.041ZM36.922 68.499C33.668 68.499 31.249 65.994 31.249 62.825V62.795C31.249 59.659 33.619 57.091 37.019 57.091 39.105 57.091 40.356 57.783 41.383 58.792L39.834 60.571C38.98 59.798 38.113 59.327 37.004 59.327 35.141 59.327 33.795 60.871 33.795 62.762V62.793C33.795 64.684 35.107 66.257 37.004 66.257 38.268 66.257 39.043 65.753 39.913 64.964L41.462 66.524C40.322 67.738 39.059 68.493 36.925 68.493L36.922 68.499ZM47.885 68.499C44.47 68.499 42.021 65.962 42.021 62.825V62.795C42.021 59.659 44.503 57.091 47.915 57.091 51.327 57.091 53.779 59.628 53.779 62.765V62.795C53.779 65.931 51.297 68.499 47.885 68.499ZM51.237 62.795C51.237 60.904 49.846 59.331 47.885 59.331 45.925 59.331 44.567 60.874 44.567 62.766V62.796C44.567 64.688 45.959 66.261 47.919 66.261 49.879 66.261 51.237 64.717 51.237 62.826V62.795 62.795ZM67.001 68.217 72.374 57.091 77.746 68.218H75.052L72.374 62.681 69.705 68.218H67.001V68.217ZM66.007 57.327V68.5L57.813 61.884V68.199H55.264V57.091L63.458 63.681V57.327H66.007Z"></path><defs><linearGradient id="paint0_linear_2899_1968" x1="18.1513" y1="44.7152" x2="61.4356" y2="20.9786" gradientUnits="userSpaceOnUse"><stop stop-color="#FC3519"></stop><stop offset="1" stop-color="#F0D136"></stop></linearGradient></defs></svg></p>
3-
<p>For help, click the link below to get free database assistance or contact our experts for personalized support.</p>
3+
<p>Get free database assistance or contact our experts for personalized support.</p>
44

55
<div class="actions">
66

7-
<a href="https://docs.percona.com/percona-server/8.0/get-help.html" style="color: var(--md-typeset-a-color);">Get help from Percona</a>
7+
<a href="https://docs.percona.com/percona-server/8.0/get-help.html" style="color: var(--md-typeset-a-color)">Get help from Percona</a>
88
</div>
99
</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="Edit 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" %}
7+
</span>
8+
<span class="edit-page-text">Edit this page on GitHub</span>
9+
</a>
10+
</div>
11+
</div>

docs/css/extra.css

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,22 @@
99
.md-sidebar__inner {
1010
font-size: 0.65rem; /* Font size */
1111
line-height: 1.6;
12-
}
12+
}
13+
14+
.edit-page-link {
15+
white-space: nowrap;
16+
display: inline-flex;
17+
align-items: center;
18+
gap: 0.5em;
19+
font-size: 1.2rem;
20+
font-weight: normal;
21+
color: var(--md-typeset-a-color);
22+
text-decoration: underline;
23+
}
24+
25+
.edit-page-icon svg {
26+
width: 1.40em;
27+
height: 1.40em;
28+
fill: currentColor;
29+
vertical-align: middle;
30+
}

mkdocs-base.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ theme:
1717
font:
1818
text: Roboto
1919
code: Roboto Mono
20-
icon:
21-
edit: material/file-edit-outline
22-
view: material/file-eye-outline
2320

2421
palette:
2522
- media: "(prefers-color-scheme)"
@@ -54,7 +51,7 @@ theme:
5451
- navigation.indexes
5552
- content.tooltips
5653
- content.tabs.link
57-
- content.action.edit
54+
# - content.action.edit
5855
- content.action.view
5956
- content.code.copy
6057
- content.code.annotate
@@ -79,7 +76,7 @@ markdown_extensions:
7976
toc:
8077
permalink: true
8178
title: On this page
82-
toc_depth: 3
79+
toc_depth: 2
8380
md_in_html: {}
8481
admonition: {}
8582
footnotes: {}

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ extra:
2626
name: This page could be improved
2727
data: 0
2828
note: >-
29-
Thanks for your feedback! Help us improve by following this <a href="https://docs.google.com/forms/d/1bkWACehjqlwA0AKf-qTJcXvYbOSYgze8iTPXjntqmNo/edit" target="_blank" rel="noopener">feedback form</a>.
29+
Thanks for your feedback! Want to improve this page? Click the <strong>Improve this page</strong> button above to submit a pull request!
3030

0 commit comments

Comments
 (0)