The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

45 lines
1.5 KiB

@model Teknik.Areas.Paste.ViewModels.PasteViewModel
@{
Layout = "";
string syntax = string.Empty;
if (Model.Syntax != "auto-detect")
{
syntax = Model.Syntax;
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="@Model.Config.Description" />
<meta name="author" content="@Model.Config.Author" />
<title>@ViewBag.Title</title>
<link rel="shortcut icon" href="/Images/favicon.ico" type="image/x-icon" />
@Styles.Render("~/Content/paste")
@Scripts.Render("~/bundles/common")
</head>
<body data-twttr-rendered="true">
<pre><code class="@syntax" id="code">@Model.Content</code></pre>
<script>
addEventListener('load', function () {
var code = document.querySelector('#code');
var worker = new Worker(GenerateBlobURL('@Scripts.Url("~/bundles/syntaxWorker")'));
worker.onmessage = function (event) {
code.innerHTML = event.data.value;
}
var scriptBlob = GenerateBlobURL('@Scripts.Url("~/bundles/highlight")');
var obj = {
script: '@Scripts.Url("~/bundles/highlight")',
code: code.textContent
};
worker.postMessage(obj);
})
function pageloadStopTimer() { }
</script>
</body>
</html>