Add images and binary content on gist preview (#615)

This commit is contained in:
Thomas Miceli
2026-02-03 15:55:44 +07:00
committed by GitHub
parent fe04c03acb
commit 2e10c1732a
5 changed files with 53 additions and 11 deletions

View File

@@ -2,9 +2,14 @@ import '../css/tailwind.css';
import '../img/favicon-32.png';
import '../img/opengist.svg';
import jdenticon from 'jdenticon/standalone';
import PDFObject from 'pdfobject';
jdenticon.update("[data-jdenticon-value]")
document.querySelectorAll(".pdf").forEach((el) => {
PDFObject.embed(el.dataset.src || "", el);
})
document.addEventListener('DOMContentLoaded', () => {
document.getElementById('user-btn')?.addEventListener("click" , () => {
document.getElementById('user-menu')!.classList.toggle('hidden');