docs(bot): updated doc

This commit is contained in:
Leifer Mendez
2022-12-22 18:36:43 +01:00
parent 65ffbc358d
commit 3dcb247ef9
41 changed files with 784 additions and 55 deletions

View File

@@ -5,28 +5,68 @@ import { useLocation } from '@builder.io/qwik-city'
* options = [] array con la lista de opciones de la documentacion
*/
export default component$(
({ options = [] }: { options: { link: string; name: string }[] }) => {
const location = useLocation()
const currentPage = location.pathname
({
options = [],
}: {
options: {
title: string
link: string
list: { link: string; name: string }[]
}[]
}) => {
return (
<div>
<ul>
{options.map((opt) => (
<li>
<a
class={
currentPage === `${opt.link}/`
? 'font-semibold'
: ''
}
href={opt.link}
>
{opt.name}
</a>
</li>
))}
</ul>
{options.map((item) => (
<UlCompoent title={item.title} list={item.list} />
))}
</div>
)
}
)
export const UlCompoent = component$(
(porps: {
title: string
link: string
list: { link: string; name: string }[]
}) => {
return (
<ul>
<li class="mt-2 lg:mt-2">
<a href={porps.link}>
<h5 class="mb-8 lg:mb-3 font-semibold text-slate-900 dark:text-slate-200">
{porps.title}
</h5>
</a>
<LiComponent list={porps.list} />
</li>
</ul>
)
}
)
export const LiComponent = component$(
(porps: { list: { link: string; name: string }[] }) => {
const location = useLocation()
const currentPage = location.pathname
return (
<ul class="space-y-6 lg:space-y-2 border-l border-slate-100 dark:border-slate-800">
{porps.list.map((opt) => (
<li>
<a
class={[
currentPage === `${opt.link}/`
? 'font-semibold'
: '',
'block border-l pl-4 -ml-px border-transparent hover:border-slate-400 dark:hover:border-slate-500 text-slate-700 hover:text-slate-900 dark:text-slate-400 dark:hover:text-slate-300 ',
]}
href={opt.link}
>
{opt.name}
</a>
</li>
))}
</ul>
)
}
)