style: update code font
This commit is contained in:
parent
bba560b1de
commit
c2d18a49b6
|
|
@ -1,22 +1,9 @@
|
|||
.code {
|
||||
@apply my-5;
|
||||
@apply relative;
|
||||
color: var(--code-fg);
|
||||
}
|
||||
|
||||
.code pre {
|
||||
@apply p-5;
|
||||
@apply rounded-lg;
|
||||
@apply whitespace-pre;
|
||||
@apply font-mono;
|
||||
@apply -mx-[2rem];
|
||||
@apply rounded-xl;
|
||||
@apply my-8;
|
||||
padding: 2rem;
|
||||
background-color: var(--code-bg);
|
||||
}
|
||||
|
||||
.code:before {
|
||||
content: attr(data-lang);
|
||||
color: var(--lang-color);
|
||||
@apply absolute;
|
||||
@apply right-3;
|
||||
@apply top-2;
|
||||
@apply text-xs;
|
||||
color: var(--code-fg);
|
||||
max-height: 800px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
.code {
|
||||
--lang-color: #8d8c8c;
|
||||
--code-bg: #2d2d2d;
|
||||
--code-fg: #ccc;
|
||||
--code-bg: rgb(18, 18, 38);
|
||||
--code-fg: #fff;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
import { Html, Head, Main, NextScript } from "next/document"
|
||||
|
||||
export default function Document() {
|
||||
return (
|
||||
<Html>
|
||||
<Head>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link
|
||||
rel="preconnect"
|
||||
href="https://fonts.gstatic.com"
|
||||
crossOrigin=""
|
||||
/>
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
</Head>
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
</Html>
|
||||
)
|
||||
}
|
||||
|
|
@ -129,13 +129,17 @@ export default function SubdomainEditor() {
|
|||
[uploadFile]
|
||||
)
|
||||
|
||||
const { editorRef } = useEditor({
|
||||
const { editorRef, view } = useEditor({
|
||||
value: values.content,
|
||||
onChange: handleEditorContentChange,
|
||||
onDropFile: handleDropFile,
|
||||
placeholder: "Start writing here..",
|
||||
})
|
||||
|
||||
const focusEditor = () => {
|
||||
view?.focus()
|
||||
}
|
||||
|
||||
return (
|
||||
<DashboardLayout>
|
||||
<DashboardMain fullWidth>
|
||||
|
|
@ -220,6 +224,11 @@ export default function SubdomainEditor() {
|
|||
type="text"
|
||||
name="title"
|
||||
value={values.title}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter") {
|
||||
focusEditor()
|
||||
}
|
||||
}}
|
||||
onChange={(e) => updateValue("title", e.target.value)}
|
||||
className="h-12 ml-1 inline-flex items-center border-none text-3xl font-bold w-full focus:outline-none"
|
||||
placeholder="Title goes here.."
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@ module.exports = {
|
|||
spacing: {
|
||||
sidebar: `240px`,
|
||||
},
|
||||
fontFamily: {
|
||||
mono: `IBM Plex Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace`,
|
||||
},
|
||||
},
|
||||
},
|
||||
variants: {},
|
||||
|
|
|
|||
Loading…
Reference in New Issue