Skip to content

Commit 73d2a44

Browse files
authoredSep 25, 2024
[DOCS] changes for port to master (#26776)
Port for ![image](https://github.com/user-attachments/assets/12acd130-f737-4536-83e9-5d707e9f68e0) to master
1 parent 27456f6 commit 73d2a44

File tree

5 files changed

+102
-101
lines changed

5 files changed

+102
-101
lines changed
 

‎docs/sphinx_setup/_static/css/banner.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
background-color: transparent;
5656
border: 0;
5757
float: right;
58-
font-size: 1.5rem;
58+
font-size: 1.2rem;
5959
font-weight: 700;
6060
line-height: 1;
6161
text-shadow: 0 1px 0 #fff;

‎docs/sphinx_setup/_static/css/custom.css

+52-57
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,19 @@ a#wap_dns {
4949
}
5050

5151
/* Sphinx replace a default github icon*/
52-
.fa-square-github {
52+
.bd-header .fa-square-github {
5353
margin-top: 6px;
5454
background-repeat: no-repeat;
5555
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' aria-labelledby='openvino github' aria-describedby='openvino github' role='img' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3EGithub%3C/title%3E%3Cdesc%3EA solid styled icon from Orion Icon Library.%3C/desc%3E%3Cpath d='M32 0a32.021 32.021 0 0 0-10.1 62.4c1.6.3 2.2-.7 2.2-1.5v-6c-8.9 1.9-10.8-3.8-10.8-3.8-1.5-3.7-3.6-4.7-3.6-4.7-2.9-2 .2-1.9.2-1.9 3.2.2 4.9 3.3 4.9 3.3 2.9 4.9 7.5 3.5 9.3 2.7a6.93 6.93 0 0 1 2-4.3c-7.1-.8-14.6-3.6-14.6-15.8a12.27 12.27 0 0 1 3.3-8.6 11.965 11.965 0 0 1 .3-8.5s2.7-.9 8.8 3.3a30.873 30.873 0 0 1 8-1.1 30.292 30.292 0 0 1 8 1.1c6.1-4.1 8.8-3.3 8.8-3.3a11.965 11.965 0 0 1 .3 8.5 12.1 12.1 0 0 1 3.3 8.6c0 12.3-7.5 15-14.6 15.8a7.746 7.746 0 0 1 2.2 5.9v8.8c0 .9.6 1.8 2.2 1.5A32.021 32.021 0 0 0 32 0z' fill='rgb(255, 255, 255)'%3E%3C/path%3E%3Cpath %3E%3C/path%3E%3C/svg%3E ");
5656
}
5757

58+
.bd-sidebar .fa-square-github {
59+
margin-top: 0;
60+
background-repeat: no-repeat;
61+
width: 64px;
62+
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' aria-labelledby='openvino github' aria-describedby='openvino github' role='img' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3EGithub%3C/title%3E%3Cdesc%3EA solid styled icon from Orion Icon Library.%3C/desc%3E%3Cpath d='M32 0a32.021 32.021 0 0 0-10.1 62.4c1.6.3 2.2-.7 2.2-1.5v-6c-8.9 1.9-10.8-3.8-10.8-3.8-1.5-3.7-3.6-4.7-3.6-4.7-2.9-2 .2-1.9.2-1.9 3.2.2 4.9 3.3 4.9 3.3 2.9 4.9 7.5 3.5 9.3 2.7a6.93 6.93 0 0 1 2-4.3c-7.1-.8-14.6-3.6-14.6-15.8a12.27 12.27 0 0 1 3.3-8.6 11.965 11.965 0 0 1 .3-8.5s2.7-.9 8.8 3.3a30.873 30.873 0 0 1 8-1.1 30.292 30.292 0 0 1 8 1.1c6.1-4.1 8.8-3.3 8.8-3.3a11.965 11.965 0 0 1 .3 8.5 12.1 12.1 0 0 1 3.3 8.6c0 12.3-7.5 15-14.6 15.8a7.746 7.746 0 0 1 2.2 5.9v8.8c0 .9.6 1.8 2.2 1.5A32.021 32.021 0 0 0 32 0z' fill='rgb(0, 0, 0)'%3E%3C/path%3E%3Cpath %3E%3C/path%3E%3C/svg%3E ");
63+
}
64+
5865
.fa-square-github path {
5966
fill: none;
6067
}
@@ -138,13 +145,6 @@ a#wap_dns {
138145
font-weight: 700;
139146
}
140147

141-
/* Underline width */
142-
a:hover,
143-
.toc-entry a.nav-link:hover,
144-
nav.bd-links li>a:hover {
145-
text-decoration-thickness: 1px;
146-
}
147-
148148

149149
#bd-docs-nav div ul a:hover {
150150
color: white;
@@ -177,6 +177,16 @@ a.current {
177177
padding: 0 0.8rem;
178178
}
179179

180+
.bd-sidebar .navbar-nav li a.nav-link:hover {
181+
color: black;
182+
font-size: 1rem !important;
183+
text-decoration: underline !important;
184+
}
185+
.bd-sidebar .navbar-nav li a.nav-link {
186+
color: black;
187+
font-size: 1rem !important;
188+
}
189+
180190
ul.bd-breadcrumbs li.breadcrumb-item:not(.breadcrumb-home):before {
181191
padding: .2rem .5rem 0 !important;
182192
}
@@ -188,13 +198,21 @@ li.breadcrumb-item {
188198
div.bd-page-width .bd-sidebar-primary {
189199
display: block !important;
190200
border-right: 0 !important;
191-
/* top: 0 !important; */
192201
}
193202

194203
a.nav-link:hover {
195204
text-decoration: none !important;
196205
}
197206

207+
li>a:hover {
208+
text-decoration-thickness: 1px;
209+
}
210+
211+
/* Underline width */
212+
a:hover, .toc-entry a.nav-link:hover, nav.bd-links li>a:hover {
213+
text-decoration-thickness: 1px;
214+
}
215+
198216
/* Github icon size */
199217
.nav-link[data-bs-original-title="GitHub"] {
200218
font-size: 2rem !important;
@@ -307,22 +325,45 @@ details.sd-dropdown .sd-summary-title {
307325
transform: rotate(0deg);
308326
}
309327

310-
/* Doc version dropdown formatting override */
328+
/* Doc version dropdown formatting override in header*/
311329
/* =================================================== */
312330
[aria-labelledby="version-selector"] {
313331
min-width: 125px !important;
314332
overflow-x: hidden !important;
315333
}
316334

317-
.sst-dropdown #version-selector {
335+
.bd-header .sst-dropdown #version-selector {
318336
min-width: 125px !important;
337+
color: white !important;
319338
}
320339

321340
[aria-labelledby="version-selector"] .dropdown-item {
322341
padding: 0.25rem 0.5rem !important;
323342
}
324343

344+
/* Doc version dropdown formatting override in sidebar*/
345+
/* =================================================== */
346+
.bd-sidebar [aria-labelledby="version-selector"] {
347+
min-width: 125px !important;
348+
overflow-x: hidden !important;
349+
}
350+
351+
.bd-sidebar .sst-dropdown #version-selector {
352+
min-width: 125px !important;
353+
color: white !important;
354+
}
355+
356+
.bd-sidebar [aria-labelledby="version-selector"] .dropdown-item {
357+
padding: 0.25rem 0.5rem !important;
358+
}
325359

360+
.bd-sidebar-primary .sidebar-header-items .sidebar-header-items__end {
361+
align-items: righ !important;
362+
display: flex;
363+
gap: .5rem;
364+
margin-bottom: 15px;
365+
margin-top: 20px
366+
}
326367
/* Content in two columns */
327368
/* =================================================== */
328369
.row-two-col-content {
@@ -453,52 +494,6 @@ div.highlight {
453494
color: #fff;
454495
}
455496

456-
457-
/* Transition banner */
458-
/* =================================================== */
459-
.transition-banner {
460-
top: 60px;
461-
background: #76CEFF;
462-
position: fixed;
463-
text-align: center;
464-
color: white;
465-
z-index: 1001;
466-
display: block;
467-
padding: 0 2rem;
468-
font-size: var(--pst-sidebar-font-size);
469-
border: none;
470-
border-radius: 0;
471-
font-weight: bold;
472-
width: 100%;
473-
margin-right: auto;
474-
margin-left: auto;
475-
}
476-
477-
.transition-banner>p {
478-
margin-bottom: 0;
479-
}
480-
481-
482-
.transition-banner .close-banner {
483-
position: absolute;
484-
top: 0;
485-
right: 0;
486-
padding: 0 1.25rem;
487-
color: #000;
488-
background-color: transparent;
489-
border: 0;
490-
float: right;
491-
font-size: 1.5rem;
492-
font-weight: 700;
493-
line-height: 1;
494-
text-shadow: 0 1px 0 #fff;
495-
opacity: .5;
496-
}
497-
498-
.hidden-banner {
499-
display: none !important;
500-
}
501-
502497
/* Header */
503498

504499
.bd-header label.primary-toggle {
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"p": "",
33
"version": "1",
4-
"style": "warning"
4+
"style": "warning",
5+
"styles": "warning info critical"
56
}

‎docs/sphinx_setup/_static/js/custom.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ function addLegalNotice() {
9090
$(document).ready(function () {
9191
initSidebar();
9292
handleSidebar();
93+
addFooter();
9394
createVersions();
9495
updateTitleTag();
9596
updateLanguageSelector();
@@ -103,7 +104,6 @@ $(document).ready(function () {
103104
initCollapsibleHeaders(); // included with the new benchmarks page
104105
createSphinxTabSets();
105106
initSplide();
106-
addFooter();
107107
});
108108

109109
function handleSidebar() {
@@ -346,6 +346,7 @@ function addFooter() {
346346
const footerAnchor = $('.footer');
347347

348348
fetch('/footer.html').then((response) => response.text()).then((text) => {
349+
console.log(text)
349350
const footerContent = $(text);
350351
footerAnchor.append(footerContent);
351352
});
+45-41
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,49 @@
11
var cookieVersion = 0;
22

3-
var dataUrl = document.getElementById("hidebanner").getAttribute( "data-url" );
4-
window.onload = (e) => {
5-
fetch(dataUrl).then((data) => {
6-
data.json().then((item) => {
7-
if(item != null && item.p != "" && item.version != "" && item.style != "" ) {
8-
cookieVersion = item.version;
9-
var transitionBanner = document.getElementById("info-banner");
10-
if (document.cookie.split(';').filter(function (find_cookie_name) {
11-
return find_cookie_name.trim().indexOf('TransitionBannerIsHiddenX' + cookieVersion + '=') === 0;
12-
}
13-
).length) {
14-
transitionBanner.classList.add("hidden-banner");
15-
}
16-
transitionBanner.classList.add(item.style);
17-
18-
const p = document.createElement("p");
19-
p.innerHTML = item.p;
20-
transitionBanner.append(p);
21-
22-
const button = document.createElement("button");
23-
button.className = "close-banner";
24-
button.type = "button";
25-
26-
const span = document.createElement("span");
27-
span.setAttribute('aria-hidden', 'true');
28-
span.innerHTML = '×';
29-
button.appendChild(span);
30-
button.addEventListener("click", function () {
31-
var cookieContent = 'TransitionBannerIsHiddenX' + cookieVersion + '=true;';
32-
var expiry = 'expires=';
33-
var date = new Date();
34-
var expirationDate = date.getTime() + (365 * 24 * 60 * 60 * 1000);
35-
date.setTime(expirationDate);
36-
expiry += date.toUTCString();
37-
document.cookie = cookieContent + expiry;
3+
var hiddenBanner = document.getElementById("hidebanner");
4+
if (hiddenBanner) {
5+
var dataUrl = hiddenBanner.getAttribute("data-url");
6+
window.onload = (e) => {
7+
fetch(dataUrl).then((data) => {
8+
data.json().then((item) => {
9+
if (item != null && item.p != "" && item.version != "" && item.style != "") {
10+
cookieVersion = item.version;
3811
var transitionBanner = document.getElementById("info-banner");
39-
transitionBanner.classList.add("hidden-banner");
40-
});
41-
transitionBanner.append(button)
42-
}
12+
if (document.cookie.split(';').filter(function (find_cookie_name) {
13+
return find_cookie_name.trim().indexOf('TransitionBannerIsHiddenX' + cookieVersion + '=') === 0;
14+
}
15+
).length) {
16+
transitionBanner.classList.add("hidden-banner");
17+
}
18+
transitionBanner.classList.add(item.style);
19+
20+
const p = document.createElement("p");
21+
p.innerHTML = item.p;
22+
transitionBanner.append(p);
23+
24+
const button = document.createElement("button");
25+
button.className = "close-banner";
26+
button.type = "button";
27+
28+
const span = document.createElement("span");
29+
span.setAttribute('aria-hidden', 'true');
30+
span.innerHTML = '×';
31+
button.appendChild(span);
32+
button.addEventListener("click", function () {
33+
var cookieContent = 'TransitionBannerIsHiddenX' + cookieVersion + '=true;';
34+
var expiry = 'expires=';
35+
var date = new Date();
36+
var expirationDate = date.getTime() + (365 * 24 * 60 * 60 * 1000);
37+
date.setTime(expirationDate);
38+
expiry += date.toUTCString();
39+
document.cookie = cookieContent + expiry;
40+
var transitionBanner = document.getElementById("info-banner");
41+
transitionBanner.classList.add("hidden-banner");
42+
});
43+
transitionBanner.append(button)
44+
}
45+
});
4346
});
44-
});
45-
};
47+
};
48+
}
49+

0 commit comments

Comments
 (0)
Please sign in to comment.