Overhauls the Fresh homepage with a new design, new demos, and new sections highlighting Fresh's capabilities. --------- Co-authored-by: Marvin Hagemeister <marvin@deno.com>
13 lines
425 B
TypeScript
13 lines
425 B
TypeScript
import Prism from "$prism";
|
|
|
|
export function CodeBlock(
|
|
{ code, lang }: { code: string; lang: "js" | "ts" | "jsx" | "md" | "bash" },
|
|
) {
|
|
return (
|
|
<pre
|
|
class="rounded-lg text-base leading-relaxed bg-slate-800 text-white p-4 sm:p-6 md:p-4 lg:p-6 2xl:p-8 overflow-x-auto"
|
|
data-language={lang}
|
|
><code dangerouslySetInnerHTML={{ __html: Prism.highlight(code, Prism.languages[lang], lang)}} /></pre>
|
|
);
|
|
}
|