diff --git a/docs/logic.js b/docs/logic.js
index 0a6d45448..91edbbc08 100644
--- a/docs/logic.js
+++ b/docs/logic.js
@@ -23,9 +23,36 @@ function convertLinksToList(links) {
if (links.length === 0) {
return '';
}
- return `
${links.map(link => `- ${link}
`).join('')}
`;
+ let htmlOutput = `
`;
+ const displayLimit = 5;
+ links.slice(0, displayLimit).forEach(link => {
+ htmlOutput += `- ${link}
`;
+ });
+ htmlOutput += `
`;
+ if (links.length > displayLimit) {
+ htmlOutput += `
+
+ ${links.slice(displayLimit).map(link => `- ${link}
`).join('')}
+
+
`;
+ }
+ htmlOutput += `
`;
+ return htmlOutput;
}
+function toggleDropdown(button) {
+ const dropdown = button.previousElementSibling;
+ if (dropdown.style.display === "none") {
+ dropdown.style.display = "block";
+ button.textContent = "Show Less";
+ } else {
+ dropdown.style.display = "none";
+ button.textContent = "Show More";
+ }
+}
+
+
+
function getCveLink(cveId) {
return `${cveId}`;
}
diff --git a/docs/style.css b/docs/style.css
index 0d11b1bf9..fb7fe7fd1 100644
--- a/docs/style.css
+++ b/docs/style.css
@@ -1,5 +1,6 @@
@import url("https://fonts.googleapis.com/css?family=Source+Code+Pro&display=swap");
body {
+ font-family: 'Source Code Pro', monospace;
background: black;
color: white;
}
@@ -182,3 +183,21 @@ hr {
.cveNum {
font-size: 1.25rem;
}
+.poc-container {
+ position: relative;
+ padding-right: 100px; /* Adjust this value if needed */
+}
+
+.dropdown-btn {
+ border: none;
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ outline: none;
+ overflow: hidden;
+ background-color: #222;
+ color: #fff;
+ font-weight: 700;
+ padding: .5rem;
+ cursor: pointer;
+}