Skip to content

Commit eac1335

Browse files
authored
Merge pull request #8313 from wazuh/bug/54-fix-api-reference-scroll-3.1
[3.1] Fix for the API reference left menu and update of the top bar
2 parents a113122 + 851e635 commit eac1335

15 files changed

+154
-44
lines changed

source/_themes/wazuh_doc_theme_v3/src/scss/components/_brand.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
position: relative;
99
display: flex;
1010
align-content: flex-end;
11+
padding-bottom: 2px;
1112

1213
img {
1314
width: auto;

source/_themes/wazuh_doc_theme_v3/src/scss/components/_navbar-menu.scss

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,48 @@ header {
1010

1111
.navbar-nav .nav-item {
1212
.nav-link {
13+
display: inline;
1314
padding: 24px 10px;
1415
font-weight: 500;
1516
}
17+
&.install,
18+
&.login {
19+
flex-grow: 0;
20+
.nav-link {
21+
display: flex;
22+
align-items: center;
23+
}
24+
}
25+
&.login {
26+
svg {
27+
width: 13px;
28+
height: 19px;
29+
}
30+
.nav-link {
31+
@include media-only(xl,wzh-xl) {
32+
width: 111.5px;
33+
}
34+
@include media-only(wzh-xl,xxl) {
35+
width: 106.5px;
36+
}
37+
@include media-min(xxl) {
38+
width: 112.1px;
39+
}
40+
}
41+
}
42+
&.install {
43+
.nav-link {
44+
@include media-only(xl,wzh-xl) {
45+
width: 141.8px;
46+
}
47+
@include media-only(wzh-xl,xxl) {
48+
width: 136.8px;
49+
}
50+
@include media-min(xxl) {
51+
width: 146px;
52+
}
53+
}
54+
}
1655
}
1756
}
1857

@@ -66,7 +105,7 @@ header {
66105
border: 1px solid;
67106
border-radius: 10px;
68107
position: absolute;
69-
top: -5px!important;
108+
top: 20px!important;
70109
&::before {
71110
position: absolute;
72111
top: -9px;
@@ -95,7 +134,7 @@ header {
95134
.navbar-nav {
96135
background-color: $light-color-base-space;
97136
.nav-link {
98-
color: $light-color-main-text;
137+
color: $light-color-main-text-extra;
99138
&.active,
100139
&:hover,
101140
&:focus,
@@ -111,7 +150,7 @@ header {
111150
}
112151
}
113152
svg {
114-
fill: $light-color-main-text;
153+
fill: $light-color-main-text-extra;
115154
}
116155
}
117156
}
@@ -123,7 +162,7 @@ header {
123162
border-color: $light-color-primary-lighter;
124163
}
125164
.dropdown-item {
126-
color: $light-color-main-text;
165+
color: $light-color-main-text-extra;
127166
&:hover {
128167
color: $light-color-primary;
129168
background-color: $light-color-base-space;

source/_themes/wazuh_doc_theme_v3/src/scss/components/_version-selector.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ header {
3939
padding: 0 5px;
4040
border: none;
4141
}
42+
@include media-only(xl, wzh-xl) {
43+
width: 263px;
44+
}
45+
@include media-only(wzh-xl, xxl) {
46+
width: 253px;
47+
}
48+
@include media-min(xxl) {
49+
width: 268px;
50+
}
4251
&:focus {
4352
box-shadow: none;
4453
}

source/_themes/wazuh_doc_theme_v3/src/scss/pages/api-reference.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ $dark-color-redoc-table-heading: #292929 !default;
2121
$dark-color-redoc-table-background: #2a2d34 !default;
2222
$dark-color-redoc-danger: #e31b0f !default;
2323

24+
:root {
25+
scroll-behavior: unset;
26+
}
2427

2528
.loading {
2629
header,

source/_themes/wazuh_doc_theme_v3/src/scss/pages/index.scss

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,34 @@
2424
header {
2525

2626
.mobile-secondary-header {
27+
.navbar-nav {
28+
@include media-only(xl,wzh-xl) {
29+
max-width: 900px;
30+
}
31+
@include media-only(wzh-xl,xxl) {
32+
max-width: 930px;
33+
}
34+
@include media-min(xxl) {
35+
max-width: 1000px;
36+
}
37+
}
2738
.nav-item {
2839
&.install,
2940
&.login {
3041
a {
3142
@include media-min(xl) {
3243
border-radius: 8px;
3344
border-width: 1.5px;
34-
font-size: 15px;
3545
height: 40px;
3646
padding: 0 20px;
3747
margin-left: 10px;
3848
}
49+
@include media-only(xl,xxl) {
50+
font-size: 15px;
51+
}
52+
@include media-min(xxl) {
53+
font-size: 16px;
54+
}
3955
}
4056
}
4157
&.install {

source/_themes/wazuh_doc_theme_v3/src/scss/parts/_header.scss

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@ header {
3636
}
3737
svg {
3838
height: 33px;
39-
width: 144px;
39+
width: 173px;
40+
@include media-max (xl) {
41+
width: 127px;
42+
height: 26px;
43+
}
4044
@include media-max(sm){
4145
max-width: 180px;
4246
}
4347
@include media-only(xl,wzh-xl){
44-
height: 27px;
45-
width: 127px;
46-
}
47-
@include media-min(wzh-xl){
48-
height: 34px;
49-
width: 170px;
48+
height: 33px;
49+
width: 144px;
5050
}
5151
}
5252
}
@@ -71,6 +71,15 @@ header {
7171
flex-shrink: 0;
7272
flex-wrap: nowrap;
7373
}
74+
@include media-only(xl,wzh-xl) {
75+
width: 956px;
76+
}
77+
@include media-only(wzh-xl,xxl) {
78+
width: 996px;
79+
}
80+
@include media-min(xxl) {
81+
width: 1146px;
82+
}
7483
.container {
7584
@include media-min(xl){
7685
display: flex;
@@ -86,6 +95,16 @@ header {
8695
flex-direction: row;
8796
align-items: center;
8897
margin-left: auto;
98+
width: calc(100% - 30px);
99+
}
100+
@include media-only(xl,wzh-xl) {
101+
max-width: calc(900px - 273px);
102+
}
103+
@include media-only(wzh-xl,xxl) {
104+
max-width: calc(930px - 263px);
105+
}
106+
@include media-min(xxl) {
107+
max-width: calc(1000px - 278px);
89108
}
90109
}
91110
.nav-item {
@@ -101,7 +120,13 @@ header {
101120
padding-left: 8px;
102121
padding-right: 8px;
103122
}
123+
@include media-only(wzh-xl,xxl){
124+
font-size: 16px;
125+
padding-left: 9px;
126+
padding-right: 9px;
127+
}
104128
&.dropdown-toggle {
129+
padding: 0 10px;
105130
@include media-only(xl,wzh-xl){
106131
padding-left: 8px;
107132
padding-right: 2px;
@@ -296,7 +321,7 @@ header {
296321
width: 202px;
297322
}
298323
@include media-only (xl,wzh-xl) {
299-
width: 263px;
324+
width: 262px;
300325
}
301326
@include media-only (wzh-xl,xxl) {
302327
width: 253px;

source/_themes/wazuh_doc_theme_v3/static/css/min/api-reference.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/_themes/wazuh_doc_theme_v3/static/css/min/index.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/_themes/wazuh_doc_theme_v3/static/css/min/not-found.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/_themes/wazuh_doc_theme_v3/static/css/min/search-results.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/_themes/wazuh_doc_theme_v3/static/css/min/wazuh-documentation.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/_themes/wazuh_doc_theme_v3/template-parts/brand.html

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
<div class="navbar-brand">
22
<a class="logo-link docs d-flex align-items-baseline" href="{{ theme_wazuh_web_url }}" target="_blank" rel="noreferrer noopener">
33
<span class="visually-hidden">Wazuh</span>
4-
<svg height="29" width="138" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 580 121.191">
5-
<g>
6-
<polygon points="93.182,89.822 74.016,27.521 58.884,27.521 39.712,89.822 20.714,27.479 3.307,27.479 31.052,118.326
7-
45.177,118.326 66.45,52.575 87.637,118.326 101.761,118.326 129.507,27.521 112.187,27.521"/>
8-
<polygon points="252.707,43.244 299.532,43.244 247.995,115.547 247.995,118.326 324.927,118.326 324.927,102.604
9-
275.995,102.604 327.445,30.381 327.445,27.521 252.707,27.521"/>
10-
<path d="M212.985,37.093c-7.786-8.124-18.408-12.399-30.906-12.399c-26.449,0-46.391,20.767-46.391,48.304
11-
c0,27.534,19.942,48.298,46.391,48.298c12.469,0,23.091-4.249,30.906-12.318v10.414h17.777V26.604h-17.777V37.093z
12-
M183.891,104.566c-17.459,0-30.136-13.276-30.136-31.569c0-18.234,12.677-31.47,30.136-31.47
13-
c17.407,0,30.043,13.236,30.043,31.47C213.935,91.29,201.298,104.566,183.891,104.566z"/>
14-
<path d="M410.246,78.913c0,16.301-8.972,25.653-24.608,25.653c-15.693,0-24.695-9.352-24.695-25.653v-52.31h-17.783v53.739
15-
c0,30.226,22.883,40.952,42.477,40.952c19.554,0,42.385-10.726,42.385-40.952V26.604h-17.777V78.913z"/>
16-
<path d="M530.848,58.126c-0.504-3.702-1.459-7.485-2.86-11.352c-1.401-3.867-3.433-7.441-6.095-10.721
17-
c-2.663-3.276-6.124-5.925-10.379-7.945c-4.26-2.017-9.534-3.025-15.809-3.025c-8.185,0-15.161,1.766-20.932,5.297
18-
c-3.534,2.16-6.558,4.845-9.082,8.044V3.183h-15.722v115.143h17.823V71.073c0-5.381,0.602-9.948,1.806-13.705
19-
c1.21-3.754,2.86-6.781,4.961-9.08c2.101-2.298,4.556-3.965,7.357-5.001c2.802-1.039,5.771-1.557,8.915-1.557
20-
c4.816,0,8.729,0.981,11.728,2.944c2.999,1.962,5.326,4.538,6.975,7.734c1.656,3.195,2.779,6.657,3.363,10.385
21-
c0.59,3.728,0.886,7.355,0.886,10.886v44.648h17.823V67.877C531.606,65.076,531.352,61.825,530.848,58.126z"/>
4+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="173" height="36" viewBox="0 0 2214 455" xml:space="preserve">
5+
<g transform="matrix(1 0 0 1 1096.56 263)">
6+
<g>
7+
<g transform="matrix(1 0 0 1 -853.6 5.59)" id="l_w">
8+
<polygon style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill-rule: nonzero; opacity: 1;" points="102.79,64.95 29.21,-174.21 -28.88,-174.21 -102.48,64.95 -175.41,-174.37 -242.23,-174.37 -135.72,174.37 -81.5,174.37 0.17,-78.03 81.5,174.37 135.72,174.37 242.23,-174.21 175.74,-174.21 "></polygon>
9+
</g>
10+
<g transform="matrix(1 0 0 1 -4.02 5.67)" id="l_a">
11+
<polygon style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill-rule: nonzero; opacity: 1;" points="-134.41,-113.94 45.34,-113.94 -152.5,163.62 -152.5,174.29 142.83,174.29 142.83,113.94 -45.01,113.94 152.5,-163.31 152.5,-174.29 -134.41,-174.29 "></polygon>
12+
</g>
13+
<g transform="matrix(1 0 0 1 -405.16 5.95)" id="l_z">
14+
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill-rule: nonzero; opacity: 1;" transform=" translate(-938.4, -545.95)" d="M 1052.639 408.128 c -29.888 -31.188 -70.664 -47.599 -118.641 -47.599 c -101.53 0 -178.083 79.72 -178.083 185.428 c 0 105.697 76.553 185.405 178.083 185.405 c 47.865 0 88.642 -16.31 118.641 -47.287 v 39.977 h 68.243 V 367.863 h -68.243 V 408.128 z M 940.953 667.143 c -67.02 0 -115.686 -50.965 -115.686 -121.185 c 0 -69.998 48.665 -120.807 115.686 -120.807 c 66.82 0 115.33 50.81 115.33 120.807 C 1056.283 616.178 1007.774 667.143 940.953 667.143 z" stroke-linecap="round"></path>
15+
</g>
16+
<g transform="matrix(1 0 0 1 371.69 9.61)" id="l_u">
17+
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill-rule: nonzero; opacity: 1;" transform=" translate(-1715.24, -549.61)" d="M 1809.883 568.668 c 0 62.576 -34.443 98.475 -94.464 98.475 c -60.243 0 -94.797 -35.899 -94.797 -98.475 V 367.863 h -68.265 v 206.294 c 0 116.03 87.842 157.206 163.062 157.206 c 75.064 0 162.706 -41.176 162.706 -157.206 V 367.863 h -68.242 V 568.668 z" stroke-linecap="round"></path>
18+
</g>
19+
<g transform="matrix(1 0 0 1 775.51 -41.04)" id="l_h">
20+
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill-rule: nonzero; opacity: 1;" transform=" translate(-2119.06, -498.96)" d="M 2272.846 488.87 c -1.933 -14.211 -5.6 -28.733 -10.977 -43.577 c -5.378 -14.844 -13.177 -28.566 -23.399 -41.154 c -10.222 -12.577 -23.51 -22.744 -39.843 -30.499 c -16.355 -7.744 -36.599 -11.611 -60.687 -11.611 c -31.421 0 -58.198 6.778 -80.353 20.333 c -13.567 8.293 -25.174 18.601 -34.865 30.88 V 277.955 h -60.354 v 442.009 h 68.42 V 538.569 c 0 -20.655 2.311 -38.188 6.933 -52.609 c 4.644 -14.411 10.978 -26.033 19.044 -34.855 c 8.066 -8.822 17.488 -15.222 28.243 -19.199 c 10.755 -3.989 22.155 -5.978 34.221 -5.978 c 18.489 0 33.51 3.766 45.021 11.3 s 20.444 17.422 26.777 29.688 c 6.355 12.266 10.666 25.555 12.911 39.866 c 2.267 14.311 3.4 28.232 3.4 41.788 v 171.395 h 68.42 V 526.303 C 2275.758 515.547 2274.78 503.07 2272.846 488.87 z" stroke-linecap="round"></path>
21+
</g>
22+
<g transform="matrix(1 0 0 1 1062.43 131.88)" id="l_dot">
23+
<circle style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(0,122,255); fill-rule: nonzero; opacity: 1;" cx="0" cy="0" r="55.013"></circle>
24+
</g>
25+
</g>
2226
</g>
23-
<ellipse transform="matrix(0.3827 -0.9239 0.9239 0.3827 251.1053 587.4084)" fill="#007AFF" cx="565.113" cy="105.801" rx="14.331" ry="14.331"/>
2427
</svg>
2528
{% if theme_breadcrumb_root_title == 'Training'%}
2629
{{ theme_breadcrumb_root_title }}

source/_themes/wazuh_doc_theme_v3/template-parts/footer.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@
135135
<li class="rrss nav-item"><a class="nav-link" title="Wazuh on LinkedIn" aria-label="Wazuh on LinkedIn" target="_blank" href="https://www.linkedin.com/company/wazuh" rel="noreferrer noopener"><svg><use xlink:href="#ico-linkedin"></use></svg><span class="visually-hidden">LinkedIn</span></a></li>
136136
<li class="rrss nav-item"><a class="nav-link" title="Wazuh on Reddit" aria-label="Wazuh on Reddit" target="_blank" href="https://www.reddit.com/r/Wazuh/" rel="noreferrer noopener"><svg><use xlink:href="#ico-reddit"></use></svg><span class="visually-hidden">Reddit</span></a></li>
137137
<li class="rrss nav-item"><a class="nav-link" title="Wazuh on Github" aria-label="Wazuh on Github" target="_blank" href="https://github.com/wazuh" rel="noreferrer noopener"><svg><use xlink:href="#ico-github"></use></svg><span class="visually-hidden">GitHub</span></a></a></li>
138+
<li class="rrss nav-item"><a class="nav-link" title="Join us on Discord" aria-label="Join us on Discord" target="_blank" href="{{ theme_wazuh_web_url }}/community/join-us-on-discord/" rel="noreferrer noopener"><svg><use xlink:href="#ico-discord"></use></svg><span class="visually-hidden">Discord</span></a></li>
138139
<li class="rrss nav-item"><a class="nav-link" title="Join us on Slack" aria-label="Join us on Slack" target="_blank" href="{{ theme_wazuh_web_url }}/community/join-us-on-slack/" rel="noreferrer noopener"><svg><use xlink:href="#ico-slack"></use></svg><span class="visually-hidden">Slack</span></a></li>
139140
<li class="rrss nav-item"><a class="nav-link" title="Subscribe to our mailing list" aria-label="Subscribe to our mailing list" target="_blank" href="mailto:wazuh+subscribe@googlegroups.com" rel="noreferrer noopener"><svg><use xlink:href="#ico-mailinglist"></use></svg><span class="visually-hidden">Mailing list</span></a></li>
140141
</ul>

0 commit comments

Comments
 (0)