some styles

This commit is contained in:
Ivan Dimitrov 2023-11-17 08:01:36 +02:00
parent 295f4f115c
commit 92e2139415
7 changed files with 14 additions and 6 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -24,7 +24,8 @@
"react-syntax-highlighter": "latest", "react-syntax-highlighter": "latest",
"rehype-raw": "latest", "rehype-raw": "latest",
"remark-frontmatter": "latest", "remark-frontmatter": "latest",
"remark-gfm": "latest" "remark-gfm": "latest",
"tailwind-scrollbar": "latest"
}, },
"devDependencies": { "devDependencies": {
"typescript": "latest", "typescript": "latest",

View File

@ -71,7 +71,7 @@ export default function Content({ params }: Props) {
}, },
a({ href, children, className }) { a({ href, children, className }) {
return ( return (
<Link className={className || ""} aria-label={href} href={href!} target="_blank">{children}</Link> <Link className={className || ""} aria-label={getText(children)} href={href!} target="_blank">{children}</Link>
) )
}, },
pre({ children, className }) { pre({ children, className }) {

View File

@ -2,9 +2,9 @@ import Link from "next/link";
import { getCases } from "$lib/content"; import { getCases } from "$lib/content";
const Cases = () => const Cases = () =>
<div className="p-20 w-full lg:w-3/4 mx-auto flex flex-col gap-4"> <div className="p-20 w-full h-full flex flex-col gap-4 overflow-y-scroll">
{getCases().filter(c => !c.data.draft).sort((a, b) => Number(b.data.z) - Number(a.data.z)).map((c) => c.data).map((d) => {getCases().filter(c => !c.data.draft).sort((a, b) => Number(b.data.z) - Number(a.data.z)).map((c) => c.data).map((d) =>
<div key={d.slug} className="w-full h-max flex justify-center rounded-lg border-2"> <div key={d.slug} className="w-full lg:w-3/4 mx-auto h-max flex justify-center rounded-lg border-2">
<div className="gradient w-full"> <div className="gradient w-full">
<Link className="btn flex flex-col w-full text-center" href={d.slug}> <Link className="btn flex flex-col w-full text-center" href={d.slug}>
<span className="text-lg px-6">{d.title}</span> <span className="text-lg px-6">{d.title}</span>

View File

@ -12,6 +12,7 @@ const CopyButton = ({ text }: Props) => {
return ( return (
<button <button
className="absolute top-5 right-5" className="absolute top-5 right-5"
aria-label="copy"
onClick={() => { onClick={() => {
navigator.clipboard.writeText(text) navigator.clipboard.writeText(text)
setVisible("visible") setVisible("visible")

View File

@ -14,8 +14,12 @@
} }
} }
html * {
@apply scrollbar scrollbar-thin scrollbar-thumb-sky-400
}
body { body {
@apply gradient text-slate-50 w-screen h-screen @apply gradient text-slate-50 w-screen h-screen overflow-hidden
} }
main { main {

View File

@ -6,6 +6,8 @@ const config: Config = {
'./src/components/**/*.{js,ts,jsx,tsx,mdx}', './src/components/**/*.{js,ts,jsx,tsx,mdx}',
'./src/app/**/*.{js,ts,jsx,tsx,mdx}', './src/app/**/*.{js,ts,jsx,tsx,mdx}',
], ],
plugins: [], plugins: [
require("tailwind-scrollbar")
],
} }
export default config export default config