Skip to content

Commit e32f3ba

Browse files
DOCS-211 Add info about how to contribute to documentation (15) (#912)
This PR adds a link to the right side of the docs website which takes the user to the GitHub docs contributing guide.
1 parent c054ee2 commit e32f3ba

2 files changed

Lines changed: 76 additions & 18 deletions

File tree

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1-
<div data-banner="data-banner">
2-
<div class="actions">
1+
<div data-banner="data-banner" class="edit-contrib-banner">
2+
<div class="banner-content">
3+
<!-- Edit link centered -->
34
<a href="{{ page.edit_url }}" title="Edit this page on GitHub" class="edit-page-link">
45
<span class="edit-page-icon">
56
{% set icon = config.theme.icon.edit or "material/file-edit-outline" %}
67
{% include ".icons/" ~ icon ~ ".svg" %}
78
</span>
89
<span class="edit-page-text">Edit this page on GitHub</span>
910
</a>
11+
12+
<!-- Divider line -->
13+
<div class="banner-divider"></div>
14+
15+
<!-- Contributing Guide below, smaller -->
16+
<a href="https://github.com/percona/postgresql-docs/blob/15/CONTRIBUTING.md"
17+
title="Contributing guide"
18+
class="contrib-link"
19+
target="_blank"
20+
rel="noopener">
21+
Contributing guide
22+
</a>
1023
</div>
11-
</div>
24+
</div>

docs/css/extra.css

Lines changed: 60 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,65 @@
1111
line-height: 1.6;
1212
}
1313

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;
14+
/* Banner container */
15+
.edit-contrib-banner {
16+
display: flex;
17+
justify-content: center; /* center horizontally */
18+
padding: 0.7rem 0; /* top and bottom spacing of the banner */
19+
background-color: transparent;
2320
}
2421

25-
.edit-page-icon svg {
26-
width: 1.40em;
27-
height: 1.40em;
28-
fill: currentColor;
29-
vertical-align: middle;
30-
}
22+
/* Inner content stacked vertically */
23+
.edit-contrib-banner .banner-content {
24+
display: flex;
25+
flex-direction: column; /* stack vertically */
26+
align-items: center; /* center horizontally */
27+
gap: 0.3rem; /* Banner container */
28+
.edit-contrib-banner {
29+
display: flex;
30+
justify-content: center; /* center horizontally */
31+
padding: 0.7rem 0; /* top and bottom spacing of the banner */
32+
background-color: transparent;
33+
}
34+
35+
/* Inner content stacked vertically */
36+
.edit-contrib-banner .banner-content {
37+
display: flex;
38+
flex-direction: column; /* stack vertically */
39+
align-items: center; /* center horizontally */
40+
gap: 0.3rem; /* small vertical gap between elements */
41+
}
42+
43+
/* Edit link styling */
44+
.edit-contrib-banner .edit-page-link {
45+
white-space: nowrap;
46+
display: inline-flex;
47+
align-items: center;
48+
gap: 0.5em;
49+
font-size: 1.2rem;
50+
font-weight: normal;
51+
color: var(--md-typeset-a-color);
52+
}
53+
54+
/* Icon inside edit link */
55+
.edit-contrib-banner .edit-page-icon svg {
56+
width: 1.4em;
57+
height: 1.4em;
58+
fill: currentColor;
59+
vertical-align: middle;
60+
}
61+
62+
/* Divider line with small spacing */
63+
.edit-contrib-banner .banner-divider {
64+
width: 40%; /* width of the line */
65+
border-top: 1px solid var(--md-typeset-a-color);
66+
opacity: 0.3; /* subtle line */
67+
margin: 0.2rem 0; /* smaller space above and below the line */
68+
}
69+
70+
/* Contributing Guide smaller and below */
71+
.edit-contrib-banner .contrib-link {
72+
font-size: 0.6rem !important; /* smaller font */
73+
color: var(--md-typeset-a-color);
74+
}
75+

0 commit comments

Comments
 (0)