mirror of
https://github.com/alecthomas/chroma.git
synced 2025-07-17 01:22:22 +02:00
Add info block.
This commit is contained in:
@ -11,6 +11,13 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
var output = document.getElementById("output");
|
var output = document.getElementById("output");
|
||||||
var htmlCheckbox = document.getElementById("html");
|
var htmlCheckbox = document.getElementById("html");
|
||||||
|
|
||||||
|
(document.querySelectorAll('.notification .delete') || []).forEach(($delete) => {
|
||||||
|
$notification = $delete.parentNode;
|
||||||
|
$delete.addEventListener('click', () => {
|
||||||
|
$notification.parentNode.removeChild($notification);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
function debounce(func, wait, immediate) {
|
function debounce(func, wait, immediate) {
|
||||||
var timeout;
|
var timeout;
|
||||||
return function () {
|
return function () {
|
||||||
|
@ -9,8 +9,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#output {
|
#output {
|
||||||
{{.Background}}
|
{{.Background}};
|
||||||
|
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,10 +21,16 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="notification is-hidden"></div>
|
|
||||||
|
|
||||||
<h1 class="title">Chroma Playground</h1>
|
<h1 class="title">Chroma Playground</h1>
|
||||||
|
|
||||||
|
<div class="notification is-info">
|
||||||
|
<button class="delete"></button>
|
||||||
|
<a href="https://github.com/alecthomas/chroma">Chroma</a> is a general purpose syntax highlighter in pure Go.
|
||||||
|
It takes source code and other structured text and converts it into syntax highlighted HTML, ANSI-coloured text,
|
||||||
|
etc. Chroma is based heavily on Pygments, and includes translators for Pygments lexers and styles.
|
||||||
|
</div>
|
||||||
|
|
||||||
<form id="chroma" method="post">
|
<form id="chroma" method="post">
|
||||||
{{ .CSRFField }}
|
{{ .CSRFField }}
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
|
Reference in New Issue
Block a user