www: refresh home page (#2418)
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>
This commit is contained in:
co-authored by
Marvin Hagemeister
parent
3b68a5d455
commit
e8d1a68b58
@@ -0,0 +1,12 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user