Socket
Socket
Sign inDemoInstall

bilderrahmen

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bilderrahmen

Lightweight vanilla-JS image lightbox crafted with CSS3 and inline SVG icons for modern browsers


Version published
Weekly downloads
11
decreased by-54.17%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Lightweight vanilla-JS image lightbox crafted with CSS3 and inline SVG icons for modern browsers

 

:sparkles: DEMO


 

Features

  • pure JavaScript, no dependencies
  • multiple galleries per page supported
  • minimal look
  • image title support
  • responsive
  • inline SVG buttons
  • MP4 video support (HTML 5 video)
  • minified: js 4.7 KB css 4.2 KB total 8.9 KB
  • gzipped: js 1.5 KB css 2.0 KB total 3.5 KB

 

Usage

Browser: Use directly from CDN

<html>
<body>
  <link href="https://unpkg.com/bilderrahmen@0.3.0/dist/bilderrahmen.min.css" rel="stylesheet" />

  <a href="https://codeclou.github.io/bilderrahmen/demo/demo-gallery-02/images/DSC05104.JPG" target="_blank"><img
        src="https://codeclou.github.io/bilderrahmen/demo/demo-gallery-02/thumbs/DSC05104.JPG"
        data-bilderrahmen="gallery-02"
        data-bilderrahmen-title="Image Four"
  /></a>
  
  <!-- Video only supports MP4 and one video source! -->
  <a href="https://codeclou.github.io/bilderrahmen/demo/demo-videos/demo-720p.mp4" target="_blank"><img
          src="https://codeclou.github.io/bilderrahmen/demo/demo-videos/demo-720p-poster.jpg"
          style="width:200px;border:1px solid #ccc"
          data-bilderrahmen-video="https://codeclou.github.io/bilderrahmen/demo/demo-videos/demo-720p.mp4"
          data-bilderrahmen="gallery-02"
          data-bilderrahmen-title="Video One"
  /></a>

  <script src="https://unpkg.com/bilderrahmen@0.3.0/dist/bilderrahmen.min.js"></script>
  <script>
      new bilderrahmen({
          closeOnOutsideClick: true
      });
  </script>
</body>
</html>

UMD: Use bilderrahmen.js as AMD or CommonJS module.

npm install bilderrahmen --save
var Bilderrahmen = require('bilderrahmen');

new Bilderrahmen({
   closeOnOutsideClick: true
});

Load css from node_modules/bilderrahmen/dist/bilderrahmen.min.css


ESM and SystemJS use bilderrahmen.esm.js as ES6-module and transpile it yourself with babel

<html>
<body>
<link href="https://unpkg.com/bilderrahmen@0.3.0/dist/bilderrahmen.min.css" rel="stylesheet" />
<script src="https://cdn.rawgit.com/systemjs/systemjs/0.20.9/dist/system.js"></script>
<script>
    SystemJS.config({
        map: {
            'plugin-babel': 'https://cdn.rawgit.com/systemjs/plugin-babel/0.0.21/plugin-babel.js',
            'systemjs-babel-build': 'https://cdn.rawgit.com/systemjs/plugin-babel/0.0.21/systemjs-babel-browser.js',
            'bilderrahmen': 'https://unpkg.com/bilderrahmen@0.3.0/dist/bilderrahmen.esm.js'
        },
        transpiler: 'plugin-babel'
    });
    SystemJS.import('./main.js');
</script>
</body>
</html>

main.js

import Bilderrahmen from 'bilderrahmen';

new Bilderrahmen({
   closeOnOutsideClick: true
});

 

Browser Support

Works in all modern browsers and was tested in the following versions

Note: SVG loading animation will not work in IE11 or Edge due to poor SVG animation support.


 

Development and Release

See DEVELOPMENT.md


 

License

MIT © Bernhard Grünewaldt

FAQs

Last updated on 23 Feb 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc