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

hexo-tag-twentytwenty

v0.0.4

Published

Hexo tag to embed Image Comparison Slider Scripts. Image Comparison Slider depend on jQuery Twenty Twenty plugin.

Downloads

51

Readme

hexo-tag-twentytwenty

Hexo tag to embed Image Comparison Slider Scripts. Image Comparison Slider depend on JQuery Twenty Twenty plugin.

Introduction

Hexo tag to embed Image Comparison Slider Scripts. Image Comparison Slider depend on JQuery Twenty Twenty plugin.

DEMO

https://photo-tea.com/p/hexo-tag-twentytwenty/

Installation

npm install hexo-tag-twentytwenty --save

Usage

Create Embedded twentytwenty with following syntax:

{% twtw before-image after-iamge [width] [height] %}

Example 1 :

{% twtw before.jpg after.jpg %}

Will output the HTML:

<div>
  <img src="before.jpg">
  <img src="after.jpg">
</div>

Example 2 :

if you want to set width and height.

{% twtw before.jpg after.jpg 800 600 %}

Will output the HTML:

<div>
  <img src="before.jpg" data-width="800" data-height="600">
  <img src="after.jpg" data-width="800" data-height="600">
</div>

option

You can configure this plugin in _config.yml. The options are as follows .

| option | description | default | | :--- | :--- | :--- | | class| class name of div | none | | imgClass| class name of img | none | | embedAsset | if you want to read external file , please add asset file path. This actually need jQuery as a dependency.| none |

Example:

twentytwenty:
  class:
    - twentytwenty-container
    - embeded-twentytwenty
  imgClass:
    - photo
    - round
  embedAsset:
    - https://cdnjs.cloudflare.com/ajax/libs/mhayes-twentytwenty/1.0.0/css/twentytwenty.min.css
    - https://cdnjs.cloudflare.com/ajax/libs/mhayes-twentytwenty/1.0.0/js/jquery.event.move.min.js
    - https://cdnjs.cloudflare.com/ajax/libs/mhayes-twentytwenty/1.0.0/js/jquery.twentytwenty.min.js
    - /js/twentytwenty.js

For example , /js/twentytwenty.js is as follows .

(function(){
  $(document).ready(
    function() {
      initialize_twentytwenty();
    }
  );
  function initialize_twentytwenty(){
    if($(".twentytwenty-container").twentytwenty){
      $(".twentytwenty-container").twentytwenty();
    }else{
      setTimeout(function(){
        initialize_twentytwenty();
      },250);
    }
  }
})();

License

MIT

Hexo - https://hexo.io/ JQuery Twenty Twenty - https://github.com/zurb/twentytwenty