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

@bananin/bgaleria

v1.0.5

Published

Galería con Bananin

Downloads

113

Readme

Galería

Bananin's Gallery

Install

In head tag

<script src="https://unpkg.com/@bananin/bgaleria@latest/js/b-galeria.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://unpkg.com/@bananin/bgaleria@latest/css/b-galeria.css" />

<!-- If you include youtube videos you will need to include the api so that it does not remain playing when you close it -->
<script src="https://www.youtube.com/iframe_api"></script>

Setting

Inside Html body:

<div class="my-5" id="app">
    <b-galeria :img="images" ref="gal" id="gal"></b-galeria>
    <div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4">
        <div class="col" v-for="(i,e) in images">
            <img v-if="i.t=='i'" :src="i.s" class="img-gal" @click="this.$refs.gal.show(e)">
            <img v-if="i.t=='v'" :src="'https://img.youtube.com/vi/'+i.s+'/0.jpg'" class="img-gal" @click="this.$refs.gal.show(e)">
        </div>
    </div>
</div>

Javascript code:

const app = Vue.createApp({
    components: {
        "b-galeria": bGaleria
    },
    data() {
        return {
            images:[
                {s:"img/cara.png",t:"i"},
                {s:"img/cara.png",t:"i"},
                {s:"img/cara.png",t:"i"},
                {s:"DJgzyQX-yZQ",t:"v"}//youtube id
            ]
        };
    }
}).mount("#app");

#Options:

  • img: the items that are used for the gallery It consists of an array with objects [{s:"resource path",w:"resource path with webp",t:"resource type: i=image, v=video"}]
  • ref: reference you will have to call the component from Vue
  • Interval: time it takes to pass each image automatically
  • Id: id que se asignará a la galería prefijo: "gal-"

#Methods:

  • show(x=0): shows the gallery, x is optional and indicates which image should start to show.
  • hide(): hide the gallery
  • goTo(slide): move the gallery to the given position

Example in Galería con Bananin

License

MIT

Patrocinar

With your help I can continue paying the server <3