chiya/assets/js/public.js

19 lines
525 B
JavaScript
Raw Normal View History

// Include phoenix_html to handle method=PUT/DELETE in forms and buttons.
2023-07-20 07:20:21 +02:00
import 'phoenix_html'
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' })
});