Skip to content

Instantly share code, notes, and snippets.

@Klerith
Klerith / instalaciones-tailwindcss.md
Created December 4, 2025 19:42
Instalaciones necesarias para el curso de TailwindCSS
@Klerith
Klerith / calculator.service.ts
Created November 27, 2025 14:46
Pruebas en ls servicios con se帽ales
it('should be created', () => {
// todo:
});
it('should be created with default values', () => {
// todo:
});
it('should set resultText, subResultText to "0" when C is pressed', () => {
@Klerith
Klerith / requirements.md
Created November 20, 2025 15:27
Requerimientos establecidos

Lineamientos para App de Venta de Propiedades y Presentaci贸n Web

Este documento define los requerimientos m铆nimos para una plataforma enfocada 煤nicamente en venta de propiedades y su visualizaci贸n en un sitio web p煤blico.

Requerimientos de desarrollo

  • Nuxt 4+
  • Tailwind CSS
  • TypeScript
  • Prisma
@Klerith
Klerith / checkValidations.ts
Last active November 13, 2025 20:46
Validaciones
const checkValidations = () => {
fieldErrors.value = {};
const result = productSchema.safeParse(newProduct.value);
if (!result.success) {
result.error.issues.forEach((issue) => {
const field = issue.path[0];
if (typeof field === 'string') {
@Klerith
Klerith / auth.d.ts
Created November 11, 2025 17:04
Expandir el tipo User de la sesi贸n
// auth.d.ts
declare module '#auth-utils' {
// Define the structure of your user object
interface User {
id: string;
email: string;
name?: string; // Optional field
roles: string[]; // Example of a specific role type
}
@Klerith
Klerith / products.seed.ts
Created November 7, 2025 15:48
Listado de productos para nuestra aplicaci贸n y sitio web de Nuxt
export const products = [
{
slug: 'cloud-storage-saas',
name: 'Cloud Storage Pro',
description:
'Servicio de almacenamiento en la nube seguro y escalable para empresas de cualquier tama帽o.',
price: 100,
images: [
'https://picsum.photos/600/400?random=1',
'https://picsum.photos/600/400?random=2',
@Klerith
Klerith / site-reviews.seed.ts
Created November 6, 2025 22:04
Semilla de rese帽as para el ejercicio de Nuxt
export const siteReviews = [
{
name: 'Carlos Ram铆rez',
subtitle: 'CEO de TechSolutions',
profileImage: 'https://randomuser.me/api/portraits/men/10.jpg',
description:
'Excelente consultor铆a, resolvieron mis dudas y mejoraron mis procesos tecnol贸gicos.',
},
{
name: 'Mariana L贸pez',
<script setup lang="ts">
defineProps<{
buttonLabel: string;
}>();
const reviewText = ref('');
const rating = ref(0);
const isOpen = ref(false);
const submitReview = () => {
<!-- PricingTable -->
<script setup lang="ts">
const tiers = [
{
id: 'solo',
title: 'Solo',
price: '$249',
description: 'Para aut贸nomos.',
billingCycle: '/mes',
@Klerith
Klerith / error.vue
Created October 9, 2025 15:13
Pantalla de error personalizada
<template>
<u-app>
<div class="error-container">
<div class="error-content">
<!-- Animaci贸n del n煤mero 404 -->
<div class="error-code-wrapper">
<h1 class="error-code">{{ error.statusCode || 404 }}</h1>
<div class="error-glow"></div>
</div>