Skip to content

Commit d8fa5b7

Browse files
committed
Replace external Prism theme dependencies with local files
- Download prism-okaidia.min.css theme for dark mode - Update setPrismTheme function to use local theme files - Remove dependency on external CDN for theme switching - Improve application self-containment and reliability
1 parent b7e148f commit d8fa5b7

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

public/ext/prism-okaidia.min.css

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

public/js/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ document.addEventListener('DOMContentLoaded', () => {
1717
function setPrismTheme(isDark) {
1818
const prismLink = document.getElementById('prism-theme');
1919
if (isDark) {
20-
prismLink.href = 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-okaidia.min.css';
20+
prismLink.href = 'ext/prism-okaidia.min.css';
2121
} else {
22-
prismLink.href = 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css';
22+
prismLink.href = 'ext/prism.min.css';
2323
}
2424
}
2525

0 commit comments

Comments
 (0)