fix: update unit display logic and adjust background color in App component
This commit is contained in:
@@ -247,7 +247,7 @@ function Page() {
|
|||||||
const t = (u.temas || []).find(([k]: any[]) => String(k).toLowerCase() === "titulo")?.[1]
|
const t = (u.temas || []).find(([k]: any[]) => String(k).toLowerCase() === "titulo")?.[1]
|
||||||
if (typeof t === "string" && t.trim()) return t
|
if (typeof t === "string" && t.trim()) return t
|
||||||
return /^\s*\d+/.test(String(u.key))
|
return /^\s*\d+/.test(String(u.key))
|
||||||
? (u.title && u.title !== u.key ? u.title : `Unidad ${u.key ? u.key : 1}`)
|
? (u.title && u.title !== u.key ? u.title : `Unidad ${u.key && Number(u.key) ? Number(u.key) + 1 : 1}`)
|
||||||
: (u.title || String(u.key))
|
: (u.title || String(u.key))
|
||||||
}
|
}
|
||||||
const temasOf = (u: any): string[] => {
|
const temasOf = (u: any): string[] => {
|
||||||
@@ -285,7 +285,7 @@ function Page() {
|
|||||||
<div className="flex items-center justify-between w-full">
|
<div className="flex items-center justify-between w-full">
|
||||||
<span className="font-medium">
|
<span className="font-medium">
|
||||||
{/^\s*\d+/.test(String(u.key))
|
{/^\s*\d+/.test(String(u.key))
|
||||||
? `Unidad ${u.key ? u.key : 1}${u.__title ? `: ${u.__title}` : ""}`
|
? `Unidad ${u.key && Number(u.key) ? Number(u.key) + 1 : 1}${u.__title ? `: ${u.__title}` : ""}`
|
||||||
: u.__title}
|
: u.__title}
|
||||||
</span>
|
</span>
|
||||||
<span className="text-[11px] text-neutral-500">{u.__temas.length} tema(s)</span>
|
<span className="text-[11px] text-neutral-500">{u.__temas.length} tema(s)</span>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { createFileRoute, Link } from '@tanstack/react-router'
|
import { createFileRoute, Link } from '@tanstack/react-router'
|
||||||
import { Button } from "@/components/ui/button"
|
import { Button } from "@/components/ui/button"
|
||||||
import { ArrowRight } from "lucide-react"
|
|
||||||
import '../App.css'
|
import '../App.css'
|
||||||
|
|
||||||
export const Route = createFileRoute('/')({
|
export const Route = createFileRoute('/')({
|
||||||
@@ -9,7 +8,7 @@ export const Route = createFileRoute('/')({
|
|||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen flex flex-col bg-gradient-to-br from-slate-150 via-slate-200 to-primary">
|
<div className="min-h-screen flex flex-col bg-gradient-to-br from-white via-slate-200 to-primary">
|
||||||
{/* Navbar */}
|
{/* Navbar */}
|
||||||
<header className="flex items-center justify-between px-10 py-6 border-b border-slate-700/50">
|
<header className="flex items-center justify-between px-10 py-6 border-b border-slate-700/50">
|
||||||
<h1 className="text-2xl font-mono tracking-tight">Acad-IA</h1>
|
<h1 className="text-2xl font-mono tracking-tight">Acad-IA</h1>
|
||||||
@@ -25,18 +24,10 @@ function App() {
|
|||||||
<h2 className="text-5xl md:text-6xl font-mono font-bold mb-6">
|
<h2 className="text-5xl md:text-6xl font-mono font-bold mb-6">
|
||||||
Bienvenido a <span className="text-primary">Acad-IA</span>
|
Bienvenido a <span className="text-primary">Acad-IA</span>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div className="flex gap-4">
|
|
||||||
<Link to="/login" search={{ redirect: '/planes' }}>
|
|
||||||
<Button size="lg" className="rounded-2xl px-6 py-3 text-lg font-mono">
|
|
||||||
Comenzar <ArrowRight className="ml-2 h-5 w-5" />
|
|
||||||
</Button>
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
{/* Footer */}
|
{/* Footer */}
|
||||||
<footer className="py-6 text-center text-sm border-t border-slate-700/50">
|
<footer className="py-6 text-center text-sm border-t border-slate-700/50 ">
|
||||||
© {new Date().getFullYear()} Acad-IA — Universidad La Salle
|
© {new Date().getFullYear()} Acad-IA — Universidad La Salle
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user