Skip to content

Commit 52efe95

Browse files
committed
doc: deploy PR #760 preview
1 parent ac72167 commit 52efe95

467 files changed

Lines changed: 59309 additions & 2335 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/prPreview/760/__404error.html

Lines changed: 127 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -867,13 +867,135 @@ <h5>
867867
header.insertBefore(headerLeft, header.firstChild);
868868
}
869869

870-
// Move the toggle button into the container
871-
headerLeft.insertBefore(toggleButton, headerLeft.firstChild);
872-
}
873-
});
870+
// Move the toggle button into the container
871+
headerLeft.insertBefore(toggleButton, headerLeft.firstChild);
872+
}
873+
});
874+
875+
// Add class icon before all component sections
876+
document.addEventListener("DOMContentLoaded", () => {
877+
// Remove duplicate class icons from library headers
878+
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
879+
headings.forEach(heading => {
880+
// Remove duplicate icons like "◆ ◆" and replace with single icon
881+
if (heading.textContent.includes('◆ ◆')) {
882+
heading.textContent = heading.textContent.replace(/ /g, '◆');
883+
}
884+
});
874885

886+
// Add class icon before all Ouds component sections in "Classes" section
887+
const classesSection = document.querySelector('h3');
888+
if (classesSection && classesSection.textContent.includes('Classes')) {
889+
// Get all elements after "Classes" heading
890+
let currentElement = classesSection.nextElementSibling;
891+
while (currentElement) {
892+
// Stop if we hit another major section (Enums, Properties, etc.)
893+
if (currentElement.tagName === 'H3' || currentElement.tagName === 'H2') {
894+
break;
895+
}
875896

876-
</script>
897+
// Check for class names (looking for bold text or links containing "Ouds")
898+
if (currentElement.innerHTML.includes('<strong>Ouds') ||
899+
(currentElement.textContent.match(/^Ouds/) && currentElement.tagName !== 'P')) {
900+
901+
// Add icon if not already present
902+
if (!currentElement.textContent.includes('◆')) {
903+
const firstChild = currentElement.firstChild;
904+
if (firstChild) {
905+
// Check if it's a strong tag or link
906+
if (firstChild.tagName === 'STRONG' || firstChild.tagName === 'A') {
907+
const iconSpan = document.createElement('span');
908+
iconSpan.innerHTML = '◆ ';
909+
iconSpan.style.color = 'var(--color-key-orange)';
910+
iconSpan.style.marginRight = '4px';
911+
iconSpan.style.fontWeight = 'bold';
912+
firstChild.insertBefore(iconSpan, firstChild.firstChild);
913+
} else {
914+
const iconSpan = document.createElement('span');
915+
iconSpan.innerHTML = '◆ ';
916+
iconSpan.style.color = 'var(--color-key-orange)';
917+
iconSpan.style.marginRight = '4px';
918+
iconSpan.style.fontWeight = 'bold';
919+
currentElement.insertBefore(iconSpan, firstChild);
920+
}
921+
}
922+
}
923+
}
924+
925+
currentElement = currentElement.nextElementSibling;
926+
}
927+
}
928+
929+
// Also add icons to sidebar component links
930+
document.querySelectorAll('.section-subitem a').forEach(link => {
931+
const text = link.textContent;
932+
if (text.includes('ouds_') && !link.textContent.includes('◆')) {
933+
const iconSpan = document.createElement('span');
934+
iconSpan.innerHTML = '◆ ';
935+
iconSpan.style.color = 'var(--color-key-orange)';
936+
iconSpan.style.marginRight = '4px';
937+
iconSpan.style.fontWeight = 'bold';
938+
link.insertBefore(iconSpan, link.firstChild);
939+
}
940+
});
941+
942+
// Highlight current page in sidebar and expand its parent section
943+
function highlightCurrentPage() {
944+
const currentUrl = window.location.href;
945+
const currentPath = window.location.pathname;
946+
947+
// Find all links in sidebar
948+
document.querySelectorAll('.section-subitem a').forEach(link => {
949+
const linkHref = link.getAttribute('href');
950+
951+
// Check if link matches current page
952+
if (linkHref && (currentUrl.includes(linkHref) || currentPath.includes(linkHref))) {
953+
// Add highlight style to the link
954+
link.style.fontWeight = 'bold';
955+
link.style.color = 'var(--color-key-orange)';
956+
957+
// Expand the parent section-subtitle
958+
let parent = link.parentElement;
959+
while (parent) {
960+
if (parent.classList.contains('section-subitem')) {
961+
// Found the section-subitem, now find its parent section-subtitle
962+
let subtitle = parent.previousElementSibling;
963+
while (subtitle && !subtitle.classList.contains('section-subtitle')) {
964+
subtitle = subtitle.previousElementSibling;
965+
}
966+
967+
if (subtitle) {
968+
// Expand this section-subtitle
969+
subtitle.classList.remove('collapsed');
970+
subtitle.classList.add('expanded');
971+
972+
// Show all section-subitem under this subtitle
973+
let nextElement = subtitle.nextElementSibling;
974+
while (nextElement && !nextElement.classList.contains('section-subtitle') && !nextElement.classList.contains('section-title')) {
975+
if (nextElement.classList.contains('section-subitem')) {
976+
nextElement.classList.remove('collapsed');
977+
}
978+
nextElement = nextElement.nextElementSibling;
979+
}
980+
}
981+
break;
982+
}
983+
parent = parent.parentElement;
984+
}
985+
}
986+
});
987+
}
988+
989+
// Call the function immediately and also listen for navigation
990+
highlightCurrentPage();
991+
992+
// Listen for URL changes (for spa-style navigation)
993+
window.addEventListener('hashchange', highlightCurrentPage);
994+
window.addEventListener('popstate', highlightCurrentPage);
995+
});
996+
997+
998+
</script>
877999
</footer>
8781000
</body>
8791001
</html>

docs/prPreview/760/components_alert_ouds_alert_message/OudsAlertMessage-class.html

Lines changed: 127 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,13 +1164,135 @@ <h5>ouds_alert_message library</h5>
11641164
header.insertBefore(headerLeft, header.firstChild);
11651165
}
11661166

1167-
// Move the toggle button into the container
1168-
headerLeft.insertBefore(toggleButton, headerLeft.firstChild);
1169-
}
1170-
});
1167+
// Move the toggle button into the container
1168+
headerLeft.insertBefore(toggleButton, headerLeft.firstChild);
1169+
}
1170+
});
1171+
1172+
// Add class icon before all component sections
1173+
document.addEventListener("DOMContentLoaded", () => {
1174+
// Remove duplicate class icons from library headers
1175+
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
1176+
headings.forEach(heading => {
1177+
// Remove duplicate icons like "◆ ◆" and replace with single icon
1178+
if (heading.textContent.includes('◆ ◆')) {
1179+
heading.textContent = heading.textContent.replace(/ /g, '◆');
1180+
}
1181+
});
11711182

1183+
// Add class icon before all Ouds component sections in "Classes" section
1184+
const classesSection = document.querySelector('h3');
1185+
if (classesSection && classesSection.textContent.includes('Classes')) {
1186+
// Get all elements after "Classes" heading
1187+
let currentElement = classesSection.nextElementSibling;
1188+
while (currentElement) {
1189+
// Stop if we hit another major section (Enums, Properties, etc.)
1190+
if (currentElement.tagName === 'H3' || currentElement.tagName === 'H2') {
1191+
break;
1192+
}
11721193

1173-
</script>
1194+
// Check for class names (looking for bold text or links containing "Ouds")
1195+
if (currentElement.innerHTML.includes('<strong>Ouds') ||
1196+
(currentElement.textContent.match(/^Ouds/) && currentElement.tagName !== 'P')) {
1197+
1198+
// Add icon if not already present
1199+
if (!currentElement.textContent.includes('◆')) {
1200+
const firstChild = currentElement.firstChild;
1201+
if (firstChild) {
1202+
// Check if it's a strong tag or link
1203+
if (firstChild.tagName === 'STRONG' || firstChild.tagName === 'A') {
1204+
const iconSpan = document.createElement('span');
1205+
iconSpan.innerHTML = '◆ ';
1206+
iconSpan.style.color = 'var(--color-key-orange)';
1207+
iconSpan.style.marginRight = '4px';
1208+
iconSpan.style.fontWeight = 'bold';
1209+
firstChild.insertBefore(iconSpan, firstChild.firstChild);
1210+
} else {
1211+
const iconSpan = document.createElement('span');
1212+
iconSpan.innerHTML = '◆ ';
1213+
iconSpan.style.color = 'var(--color-key-orange)';
1214+
iconSpan.style.marginRight = '4px';
1215+
iconSpan.style.fontWeight = 'bold';
1216+
currentElement.insertBefore(iconSpan, firstChild);
1217+
}
1218+
}
1219+
}
1220+
}
1221+
1222+
currentElement = currentElement.nextElementSibling;
1223+
}
1224+
}
1225+
1226+
// Also add icons to sidebar component links
1227+
document.querySelectorAll('.section-subitem a').forEach(link => {
1228+
const text = link.textContent;
1229+
if (text.includes('ouds_') && !link.textContent.includes('◆')) {
1230+
const iconSpan = document.createElement('span');
1231+
iconSpan.innerHTML = '◆ ';
1232+
iconSpan.style.color = 'var(--color-key-orange)';
1233+
iconSpan.style.marginRight = '4px';
1234+
iconSpan.style.fontWeight = 'bold';
1235+
link.insertBefore(iconSpan, link.firstChild);
1236+
}
1237+
});
1238+
1239+
// Highlight current page in sidebar and expand its parent section
1240+
function highlightCurrentPage() {
1241+
const currentUrl = window.location.href;
1242+
const currentPath = window.location.pathname;
1243+
1244+
// Find all links in sidebar
1245+
document.querySelectorAll('.section-subitem a').forEach(link => {
1246+
const linkHref = link.getAttribute('href');
1247+
1248+
// Check if link matches current page
1249+
if (linkHref && (currentUrl.includes(linkHref) || currentPath.includes(linkHref))) {
1250+
// Add highlight style to the link
1251+
link.style.fontWeight = 'bold';
1252+
link.style.color = 'var(--color-key-orange)';
1253+
1254+
// Expand the parent section-subtitle
1255+
let parent = link.parentElement;
1256+
while (parent) {
1257+
if (parent.classList.contains('section-subitem')) {
1258+
// Found the section-subitem, now find its parent section-subtitle
1259+
let subtitle = parent.previousElementSibling;
1260+
while (subtitle && !subtitle.classList.contains('section-subtitle')) {
1261+
subtitle = subtitle.previousElementSibling;
1262+
}
1263+
1264+
if (subtitle) {
1265+
// Expand this section-subtitle
1266+
subtitle.classList.remove('collapsed');
1267+
subtitle.classList.add('expanded');
1268+
1269+
// Show all section-subitem under this subtitle
1270+
let nextElement = subtitle.nextElementSibling;
1271+
while (nextElement && !nextElement.classList.contains('section-subtitle') && !nextElement.classList.contains('section-title')) {
1272+
if (nextElement.classList.contains('section-subitem')) {
1273+
nextElement.classList.remove('collapsed');
1274+
}
1275+
nextElement = nextElement.nextElementSibling;
1276+
}
1277+
}
1278+
break;
1279+
}
1280+
parent = parent.parentElement;
1281+
}
1282+
}
1283+
});
1284+
}
1285+
1286+
// Call the function immediately and also listen for navigation
1287+
highlightCurrentPage();
1288+
1289+
// Listen for URL changes (for spa-style navigation)
1290+
window.addEventListener('hashchange', highlightCurrentPage);
1291+
window.addEventListener('popstate', highlightCurrentPage);
1292+
});
1293+
1294+
1295+
</script>
11741296
</footer>
11751297
</body>
11761298
</html>

0 commit comments

Comments
 (0)