npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

flex-grid-lists

v0.1.5

Published

Listados en modo lista o grilla con manejo de tamaños de columnas y el switch de un tipo a otro al cambiar una clase CSS del contenedor.

Downloads

12

Readme

Flex grid lists

Listados en modo lista o grilla con manejo de tamaños de columnas y el switch de un tipo a otro al cambiar una clase CSS del contenedor.

Los componentes que provee el paquete son:

  • list-card: Ítem del listado
  • list-row: Cotenedor de uno o muchos list-card que se mostrarán en modo lista (uno debajo del otro)
  • grid-row: Cotenedor de uno o muchos list-card que se mostrarán en modo grilla

La estructura html básica es:

<article class="list-card">
    <div class="list-card__header">
        ...
    </div>
    <div class="list-card__body">
        ...
    </div>
    <div class="list-card__footer">
        ...
    </div>
</article>

Instalación:

El paquete se encuentra disponible en el repositorio de npm con el nombre "flex-grid-lists"

npm i -S flex-grid-lists

Uso:

Para comenzar a utilizarlo, es necesario incluir el css (normal o minified) que se encuentra en la carpeta node_modules/flex-grid-lists/dist, o bien incluyendo y compilando el .scss que se encuentra en node_modules/flex-grid-lists/resources/styles.

Tipo seteado por el contenedor:

Modo lista

  • Cada list-card mostrará sus elementos internos (list-card__header, list-card__body, list-card__footer) a modo de columnas (uno al lado del otro)
<div class="list-row">
    <article class="list-card">
        ...
    </article>
</div>

Modo grilla

  • Cada list-card mostrará sus elementos internos (list-card__header, list-card__body, list-card__footer) a modo de filas (uno debajo del otro)
  • Para especificar las columnas que se mostrarán en las distintas resoluciones es necesario agregarle a cada list-card la clase grid-{tamaño}-{columnas}
  • La grilla está basada en 12 columnas (es una variable de SASS por lo que se puede modificar a gusto) e inspirada en la grilla de bootstrap
<div class="grid-row">
    <article class="list-card grid-xs-6 grid-sm-4">
        ...
    </article>
</div>

Todos los Viewports soportados son:

  • xs: <544px,
  • sm: >=544px,
  • md: >=768px,
  • lg: >=992px,
  • xl: >=1200px,
  • tv: >= 1824px

Ver demos

Tipo seteado por modificador:

También se puede forzar el tipo mediante un modificador, sin necesidad de utilizar los contenedores list-row o grid-row.

Modo grilla

<article class="list-card list-card--grid">
    ...
</article>

Modo lista

<article class="list-card list-card--list">
    ...
</article>

Ver demos

Desarrollo:

Requerimientos

  • nodejs

Instalación

git clone [email protected]:digbang/flex-grid-lists.git
cd flex-grid-lists
npm i

Compilado

Para compilar el código SASS se utiliza GULP.

Generar CSS Minificado

gulp

Generar CSS sin minificar + sourcemaps

gulp dev