baalajimaestro
328a3f9f8d
Prism seems unmaintained Signed-off-by: baalajimaestro <me@baalajimaestro.me>
83 lines
3.6 KiB
HTML
83 lines
3.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="preconnect" href="https://cdn.jsdelivr.net" />
|
|
<link rel="preconnect" href="https://cdnjs.cloudflare.com" />
|
|
<link rel="stylesheet" href="/static/tailwind.css" />
|
|
<link rel="stylesheet" href="/static/styles.css" />
|
|
</head>
|
|
<body class="bg-zinc-800">
|
|
<div class="flex flex-col items-center space-y-12">
|
|
<h2 class="text-3xl font-bold text-gray-300">Obsolute Paste</h2>
|
|
{% block content %}
|
|
{% if md %}
|
|
<link href='https://fonts.googleapis.com/css?family=Lunasima' rel='stylesheet'>
|
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
<div class="w-10/12 text-gray-100 border border-solid border-emerald-200 rounded bg-zinc-800 p-2 mdpaste" id="pastecontent"></div>
|
|
<script>
|
|
document.getElementById('pastecontent').innerHTML = marked.parse(`{{paste_content}}`);
|
|
</script>
|
|
{% else %}
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
|
<script type="module">
|
|
|
|
import { codeToHtml } from 'https://esm.sh/shiki@1.0.0'
|
|
|
|
document.addEventListener("DOMContentLoaded", async (event) => {
|
|
const elem = document.getElementById("pastecontent");
|
|
const result = hljs.highlightAuto(elem.textContent);
|
|
const detectedLang = result.language || 'txt';
|
|
|
|
// Set the highlighted HTML
|
|
elem.innerHTML = await codeToHtml(elem.textContent, {
|
|
lang: detectedLang,
|
|
theme: 'andromeeda'
|
|
});
|
|
});
|
|
</script>
|
|
<pre class="w-10/12 text-gray-100 border border-solid border-emerald-200 rounded bg-zinc-800 p-2"><code id="pastecontent">{{paste_content}}</code></pre>
|
|
{% endif %}
|
|
{% endblock content %}
|
|
</div>
|
|
<br />
|
|
<br />
|
|
<br />
|
|
<div class="fixed bottom-4 left-0 w-screen h-12 md:flex md:items-center md:justify-between md:p-6">
|
|
<span class="text-sm text-gray-400 sm:text-center">©2024 Maestro Creativescape.</span>
|
|
<ul class="flex flex-wrap items-center mt-3 text-sm text-gray-400 sm:mt-0">
|
|
<li>
|
|
<a href="https://ptr.moe" class="mr-4 hover:underline md:mr-6 ">PTR Cloud</a>
|
|
</li>
|
|
<li>
|
|
<a href="https://baalajimaestro.ptr.moe" class="mr-4 hover:underline md:mr-6 ">Home</a>
|
|
</li>
|
|
<li>
|
|
<a href="https://links.baalajimaestro.ptr.moe" class="mr-4 hover:underline md:mr-6">Links</a>
|
|
</li>
|
|
<li>
|
|
<a href="https://git.ptr.moe/baalajimaestro/obsolute-paste" class="mr-4 hover:underline md:mr-6">Source Code</a>
|
|
</li>
|
|
<li>
|
|
Powered by <a href="https://actix.rs" class="hover:underline">Actix</a> & <a href="https://forgejo.org/" class="mr-4 hover:underline md:mr-6">Forgejo</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<!-- Matomo -->
|
|
<script>
|
|
var _paq = window._paq = window._paq || [];
|
|
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
|
_paq.push(['trackPageView']);
|
|
_paq.push(['enableLinkTracking']);
|
|
(function() {
|
|
var u="https://counter.ptr.moe/";
|
|
_paq.push(['setTrackerUrl', u+'86eff12f2496']);
|
|
_paq.push(['setSiteId', '3']);
|
|
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
|
g.async=true; g.src=u+'dd168412e25a.js'; s.parentNode.insertBefore(g,s);
|
|
})();
|
|
</script>
|
|
<!-- End Matomo Code -->
|
|
</body>
|
|
</html>
|