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]
|
||||
if (typeof t === "string" && t.trim()) return t
|
||||
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))
|
||||
}
|
||||
const temasOf = (u: any): string[] => {
|
||||
@@ -285,7 +285,7 @@ function Page() {
|
||||
<div className="flex items-center justify-between w-full">
|
||||
<span className="font-medium">
|
||||
{/^\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}
|
||||
</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 { Button } from "@/components/ui/button"
|
||||
import { ArrowRight } from "lucide-react"
|
||||
import '../App.css'
|
||||
|
||||
export const Route = createFileRoute('/')({
|
||||
@@ -9,7 +8,7 @@ export const Route = createFileRoute('/')({
|
||||
|
||||
function App() {
|
||||
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 */}
|
||||
<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>
|
||||
@@ -25,18 +24,10 @@ function App() {
|
||||
<h2 className="text-5xl md:text-6xl font-mono font-bold mb-6">
|
||||
Bienvenido a <span className="text-primary">Acad-IA</span>
|
||||
</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>
|
||||
|
||||
{/* 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
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user