updates
Browse files- src/transformers-custom.css +48 -33
- webpack.config.js +26 -7
src/transformers-custom.css
CHANGED
|
@@ -75,9 +75,10 @@
|
|
| 75 |
}
|
| 76 |
|
| 77 |
.tenet-list li.tenet:hover {
|
| 78 |
-
transform: translateY(-
|
| 79 |
-
box-shadow: 0
|
| 80 |
-
border-color: rgba(0, 123, 255, 0.
|
|
|
|
| 81 |
}
|
| 82 |
|
| 83 |
/* Colorful numbering system */
|
|
@@ -262,38 +263,32 @@ img {
|
|
| 262 |
margin: 1.5rem 0;
|
| 263 |
}
|
| 264 |
|
| 265 |
-
/* Table of contents styling - Fixed
|
| 266 |
-
d-contents {
|
| 267 |
-
display: block !important;
|
| 268 |
-
visibility: visible !important;
|
| 269 |
-
opacity: 1 !important;
|
| 270 |
-
}
|
| 271 |
-
|
| 272 |
@media (min-width: 1200px) {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 273 |
d-contents {
|
| 274 |
-
position:
|
| 275 |
-
top:
|
| 276 |
-
|
| 277 |
-
width: 280px !important;
|
| 278 |
-
height: 100vh !important;
|
| 279 |
background: white !important;
|
| 280 |
-
|
| 281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 282 |
overflow-y: auto !important;
|
| 283 |
-
|
| 284 |
-
|
|
|
|
|
|
|
| 285 |
display: block !important;
|
| 286 |
visibility: visible !important;
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
/* Add margin to main content to avoid overlap */
|
| 290 |
-
d-article {
|
| 291 |
-
margin-right: 300px !important;
|
| 292 |
-
}
|
| 293 |
-
|
| 294 |
-
d-contents nav {
|
| 295 |
-
position: sticky;
|
| 296 |
-
top: 2rem;
|
| 297 |
}
|
| 298 |
}
|
| 299 |
|
|
@@ -442,11 +437,31 @@ d-contents nav a[title]:hover:before {
|
|
| 442 |
}
|
| 443 |
}
|
| 444 |
|
| 445 |
-
/* Improve code syntax highlighting */
|
| 446 |
-
|
| 447 |
background: #f8f9fa !important;
|
| 448 |
-
border
|
| 449 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 450 |
}
|
| 451 |
|
| 452 |
/* Distill article improvements */
|
|
|
|
| 75 |
}
|
| 76 |
|
| 77 |
.tenet-list li.tenet:hover {
|
| 78 |
+
transform: translateY(-8px) scale(1.02);
|
| 79 |
+
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
|
| 80 |
+
border-color: rgba(0, 123, 255, 0.5);
|
| 81 |
+
background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
|
| 82 |
}
|
| 83 |
|
| 84 |
/* Colorful numbering system */
|
|
|
|
| 263 |
margin: 1.5rem 0;
|
| 264 |
}
|
| 265 |
|
| 266 |
+
/* Table of contents styling - Fixed top left like ultrascale */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 267 |
@media (min-width: 1200px) {
|
| 268 |
+
d-article {
|
| 269 |
+
overflow: visible;
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
d-contents {
|
| 273 |
+
position: sticky !important;
|
| 274 |
+
top: 10px !important;
|
| 275 |
+
align-self: start !important;
|
|
|
|
|
|
|
| 276 |
background: white !important;
|
| 277 |
+
grid-column-start: 1 !important;
|
| 278 |
+
grid-column-end: 4 !important;
|
| 279 |
+
grid-row: auto / span 6 !important;
|
| 280 |
+
justify-self: end !important;
|
| 281 |
+
margin-top: 0em !important;
|
| 282 |
+
padding-right: 3em !important;
|
| 283 |
+
padding-left: 2em !important;
|
| 284 |
overflow-y: auto !important;
|
| 285 |
+
height: calc(100vh - 40px) !important;
|
| 286 |
+
scrollbar-width: none !important;
|
| 287 |
+
transition: max-height 0.3s ease-out !important;
|
| 288 |
+
z-index: -100 !important;
|
| 289 |
display: block !important;
|
| 290 |
visibility: visible !important;
|
| 291 |
+
border-right: 1px solid rgba(0, 0, 0, 0.1) !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 292 |
}
|
| 293 |
}
|
| 294 |
|
|
|
|
| 437 |
}
|
| 438 |
}
|
| 439 |
|
| 440 |
+
/* Improve code syntax highlighting with Prism */
|
| 441 |
+
pre[class*="language-"] {
|
| 442 |
background: #f8f9fa !important;
|
| 443 |
+
border: 1px solid #e9ecef !important;
|
| 444 |
+
border-radius: 8px !important;
|
| 445 |
+
padding: 1.5rem !important;
|
| 446 |
+
margin: 1.5rem 0 !important;
|
| 447 |
+
overflow-x: auto !important;
|
| 448 |
+
font-size: 0.9em !important;
|
| 449 |
+
line-height: 1.5 !important;
|
| 450 |
+
}
|
| 451 |
+
|
| 452 |
+
code[class*="language-"] {
|
| 453 |
+
background: none !important;
|
| 454 |
+
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace !important;
|
| 455 |
+
color: #383a42 !important;
|
| 456 |
+
}
|
| 457 |
+
|
| 458 |
+
/* Inline code */
|
| 459 |
+
p code, li code {
|
| 460 |
+
background: #f1f3f4 !important;
|
| 461 |
+
padding: 0.2em 0.4em !important;
|
| 462 |
+
border-radius: 3px !important;
|
| 463 |
+
font-size: 0.9em !important;
|
| 464 |
+
color: #d73a49 !important;
|
| 465 |
}
|
| 466 |
|
| 467 |
/* Distill article improvements */
|
webpack.config.js
CHANGED
|
@@ -185,11 +185,30 @@ module.exports = {
|
|
| 185 |
}
|
| 186 |
}
|
| 187 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 188 |
// Try multiple times to ensure it runs after distill.js
|
| 189 |
-
document.addEventListener('DOMContentLoaded',
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
</script>`;
|
| 194 |
|
| 195 |
// Create full HTML document with distill template
|
|
@@ -198,14 +217,14 @@ module.exports = {
|
|
| 198 |
<head>
|
| 199 |
<script src="distill.bundle.js" type="module" fetchpriority="high" blocking></script>
|
| 200 |
<script src="main.bundle.js" type="module" fetchpriority="low" defer></script>
|
| 201 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/
|
| 202 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/
|
| 203 |
<script src="https://d3js.org/d3.v7.min.js"></script>
|
| 204 |
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 205 |
<meta charset="utf8">
|
| 206 |
<title>Transformers Feature Showcase</title>
|
| 207 |
<link rel="stylesheet" href="style.css">
|
| 208 |
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/
|
| 209 |
</head>
|
| 210 |
<body>
|
| 211 |
<d-front-matter>
|
|
|
|
| 185 |
}
|
| 186 |
}
|
| 187 |
|
| 188 |
+
// Initialize Prism syntax highlighting
|
| 189 |
+
function initializeSyntaxHighlighting() {
|
| 190 |
+
if (typeof Prism !== 'undefined') {
|
| 191 |
+
Prism.highlightAll();
|
| 192 |
+
}
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
// Try multiple times to ensure it runs after distill.js
|
| 196 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 197 |
+
initializeTOC();
|
| 198 |
+
initializeSyntaxHighlighting();
|
| 199 |
+
});
|
| 200 |
+
setTimeout(function() {
|
| 201 |
+
initializeTOC();
|
| 202 |
+
initializeSyntaxHighlighting();
|
| 203 |
+
}, 100);
|
| 204 |
+
setTimeout(function() {
|
| 205 |
+
initializeTOC();
|
| 206 |
+
initializeSyntaxHighlighting();
|
| 207 |
+
}, 500);
|
| 208 |
+
setTimeout(function() {
|
| 209 |
+
initializeTOC();
|
| 210 |
+
initializeSyntaxHighlighting();
|
| 211 |
+
}, 1000);
|
| 212 |
</script>`;
|
| 213 |
|
| 214 |
// Create full HTML document with distill template
|
|
|
|
| 217 |
<head>
|
| 218 |
<script src="distill.bundle.js" type="module" fetchpriority="high" blocking></script>
|
| 219 |
<script src="main.bundle.js" type="module" fetchpriority="low" defer></script>
|
| 220 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js"></script>
|
| 221 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
|
| 222 |
<script src="https://d3js.org/d3.v7.min.js"></script>
|
| 223 |
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 224 |
<meta charset="utf8">
|
| 225 |
<title>Transformers Feature Showcase</title>
|
| 226 |
<link rel="stylesheet" href="style.css">
|
| 227 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css">
|
| 228 |
</head>
|
| 229 |
<body>
|
| 230 |
<d-front-matter>
|