1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-29 13:39:10 +00:00
conky/web/pages/lua.tsx
Brenden Matthews 47ad3f9982 Refactor docs, make a new website.
* Docs have been migrated from docbook to yaml + jinja2 + pandoc
* Created a new (basic) website for docs based on React + Tailwinds
2022-09-30 18:21:24 -04:00

54 lines
1.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Layout from '../components/Layout'
import SEO from '../components/SEO'
import { getLua, LuaDoc } from '../utils/doc-utils'
import { Link } from 'react-feather'
export interface LuaProps {
lua: LuaDoc[]
}
export default function Lua(props: LuaProps) {
return (
<Layout>
<SEO title="Conky Lua API" description="Conky Lua API documentation" />
<main className="w-full">
<div>
<h1 className="text-2xl">Lua API</h1>
</div>
<div>
{props.lua.map((cs) => (
<div
id={cs.name}
key={cs.name}
className="scroll-mt-16 target:bg-rose-300 target:dark:bg-rose-900 hover:bg-slate-100 dark:hover:bg-slate-800 my-4"
>
<div className="flex">
<div className="p-2">
<a href={`#${cs.name}`}>
<Link size={16} />
</a>
</div>
<div className="flex-col p-1">
<code className="text-lg p-1 bg-fuchsia-200 dark:bg-fuchsia-900 font-bold">
{cs.name}
</code>
<div
className="py-2"
dangerouslySetInnerHTML={{ __html: cs.desc }}
/>
</div>
</div>
</div>
))}
</div>
</main>
</Layout>
)
}
export async function getStaticProps() {
const lua = getLua()
return { props: { lua } }
}