2023-04-09 13:52:15 +02:00
|
|
|
// Include phoenix_html to handle method=PUT/DELETE in forms and buttons.
|
2023-07-20 07:20:21 +02:00
|
|
|
import 'phoenix_html'
|
2023-04-09 13:52:15 +02:00
|
|
|
|
2023-07-20 07:20:21 +02:00
|
|
|
import hljs from 'highlight.js'
|
2023-04-06 14:21:59 +02:00
|
|
|
import GLightbox from 'glightbox'
|
2023-07-20 07:20:21 +02:00
|
|
|
import Tablesort from 'tablesort'
|
2023-09-10 10:58:08 +02:00
|
|
|
import darkmode from "./darkmode"
|
2023-03-31 17:33:42 +02:00
|
|
|
|
2023-07-13 07:33:55 +02:00
|
|
|
document.addEventListener('DOMContentLoaded', (event) => {
|
2023-07-20 07:20:21 +02:00
|
|
|
document.querySelectorAll('.prose pre code').forEach((el) =>
|
|
|
|
hljs.highlightElement(el))
|
|
|
|
|
|
|
|
document.querySelectorAll('.prose table').forEach(el =>
|
|
|
|
new Tablesort(el))
|
2023-03-31 17:33:42 +02:00
|
|
|
|
2023-09-10 10:58:08 +02:00
|
|
|
darkmode()
|
2023-04-06 14:21:59 +02:00
|
|
|
|
2023-09-10 10:58:08 +02:00
|
|
|
GLightbox({ selector: '.lightbox' })
|
|
|
|
});
|