Skip to content

Instantly share code, notes, and snippets.

View ArtNous's full-sized avatar
🏠
Working from home

Jesus Pacheco ArtNous

🏠
Working from home
View GitHub Profile
@ArtNous
ArtNous / buildRows.ts
Created December 11, 2023 20:54
HARD CODED
export const buildRows = ({
flattenStudentMovements,
yearPassPromotions,
nextSection,
selectedSeccion,
// materiasPendientes = [],
nivel,
seccionesFromFetch = [],
previasProyeccionesData = [],
secciones = [],
@ArtNous
ArtNous / front.js
Created September 27, 2021 18:51
Promesa picker
import photopicker from './picker'
photopicker().then(rutas => {
// Hacer algo con rutas
})
async function hacerAlgo() {
const rutas = await photopicker()
// Trabajar con rutas
}
@ArtNous
ArtNous / scrolling.js
Created June 21, 2021 15:15
Scroll con tecla
window.addEventListener('onkeypress', e => {
if(e.key === '37') {
window.scrollTo(0,0)
} else if(e.key === '39') {
window.scrollTo(0,100)
}
})
@ArtNous
ArtNous / app.js
Created June 1, 2021 18:15
Haciendo un layout con Isotope
const elem = document.querySelector('.grid');
const iso = new Isotope( elem, {
// options
itemSelector: '.grid-item',
layoutMode: 'fitRows'
});
const button = document.getElementById('filter-btn');
button.addEventListener('click', function(e) {
iso.isotope({filter: 'A'})