Skip to content

Instantly share code, notes, and snippets.

Avatar
📓

Fernando Klerith

📓
View GitHub Profile
@Klerith
Klerith / auth-layout.css
Last active May 26, 2023 12:22
qwik - AuthLayout y Login
View auth-layout.css
.login-main{
@apply min-h-screen bg-gray-100 py-6 flex flex-col justify-center sm:py-12
}
.login-bg {
@apply relative py-3 sm:max-w-xl sm:mx-auto;
}
@Klerith
Klerith / modal.css
Created May 11, 2023 17:39
Modal con Tailwind y qwik
View modal.css
.modal-background {
@apply fixed flex justify-center items-center inset-0 bg-black bg-opacity-50 overflow-y-auto h-full w-full transition-all;
}
.modal-content {
@apply border shadow-lg rounded-md bg-white;
}
@Klerith
Klerith / instalaciones-qwik.md
Created May 8, 2023 22:31
Instalaciones recomendadas para qwik
@Klerith
Klerith / get_turns.dart
Created May 4, 2023 18:25
Grados a Dart Turns
View get_turns.dart
double prevValue = 0.0;
double turns = 0;
double getTurns() {
double? direction = widget.heading;
direction = (direction < 0) ? (360 + direction): direction;
double diff = direction - prevValue;
@Klerith
Klerith / todos_screen.dart
Last active May 1, 2023 21:26
Pantalla básica para lista de tareas
View todos_screen.dart
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
class TodosScreen extends ConsumerWidget {
const TodosScreen({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
return Scaffold(
@Klerith
Klerith / auth-layout.component.html
Last active April 22, 2023 15:52
Angular - LoginPage
View auth-layout.component.html
<div class="limiter">
<div class="container-login100" style="background-image: url('../../../../assets/images/bg-01.jpg');">
<div class="wrap-login100 p-l-55 p-r-55 p-t-65 p-b-54">
<router-outlet />
</div>
</div>
</div>
@Klerith
Klerith / hex-color.js
Created April 17, 2023 15:54
Color hexadecimal
View hex-color.js
const color = '#xxxxxx'.replace(/x/g, y=>(Math.random()*16|0).toString(16));
@Klerith
Klerith / interfaces.ts
Last active April 11, 2023 15:28
Marcadores - Curso Angular cero a experto
View interfaces.ts
interface House {
title: string;
description: string;
lngLat: [number, number];
}
const houses: House[] = [
{
title: 'Casa residencial, Canadá',
@Klerith
Klerith / custom_product_field.dart
Created March 22, 2023 19:35
Pantalla de Producto y Custom Product Field
View custom_product_field.dart
import 'package:flutter/material.dart';
class CustomProductField extends StatelessWidget {
final bool isTopField; // La idea es que tenga bordes redondeados arriba
final bool isBottomField; // La idea es que tenga bordes redondeados abajo
final String? label;
final String? hint;
final String? errorMessage;
@Klerith
Klerith / email.dart
Created March 18, 2023 14:15
Flutter - Formz Inputs
View email.dart
import 'package:formz/formz.dart';
// Define input validation errors
enum EmailError { empty, format }
// Extend FormzInput and provide the input type and error type.
class Email extends FormzInput<String, EmailError> {
static final RegExp emailRegExp = RegExp(
r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$',