Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
ember-cli-photoswipe
Advanced tools
Ember-cli Addon adaptation of the popular photo gallery library PhotoSwipe.
{{#photo-swipe items=model as |img|}}
<img class="thumb" src={{img.src}} alt={{img.title}}>
{{/photo-swipe}}
By wrapping your gallery in the component, the addon will take care of instantiating PhotoSwipe for you and for calculating the thumbnail bounds so you get the nice zoom in/out animations right out of the box. Easy, right?
See tests/dummy/app/templates/application.hbs
as an example of this.
The items
property is required and an array of objects should be
passed to it. PhotoSwipe expects these items to have the following structure:
[
{
src: 'http://placekitten.com/g/600/400',
w: 600,
h: 400,
title: 'whooa',
msrc: '(optional) larger image'
}
]
If you want to instantiate a PhotoSwipe gallery from an action instead of a thumbnail, you can also do the following:
{{photo-swipe gallery=myGallery options=psOpts items=items}}
And then you can initialize it through an action in your controller like this:
actions: {
initGallery: function() {
this.get('myGallery').init();
}
}
Any property bound to gallery
will become the actual gallery object.
This is used to instantiate PhotoSwipe and to interact with the live instance.
Any PhotoSwipe options can be passed to the options
property of the component.
For now the history module is disabled since it breaks ember routing.
More functionality is on the way, this is a work in progress. You can find PhotoSwipe documentation here.
You can pass the following extra options to the options property in the PhotoSwipe component to hide PhotoSwipe buttons (default to false):
hideClose
hideShare
hideToggleFullScreen
hideZoomInOut
If you have ideas or feature needs that could be implemented, just submit an issue or pull request.
As easy as running ember install:addon ember-cli-photoswipe
, which will also
run the generator.
For versions under 0.1.5 you need to run npm install ember-cli-photoswipe --save-dev
.
To run the dummy app:
git clone https://github.com/DanyHunter/ember-cli-photoswipe.git
ember server
ember test
ember test --server
ember build
For more information on using ember-cli, visit http://www.ember-cli.com/.
FAQs
Ember-cli adaptation of the popular photoswipe js library
The npm package ember-cli-photoswipe receives a total of 21 weekly downloads. As such, ember-cli-photoswipe popularity was classified as not popular.
We found that ember-cli-photoswipe demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.