Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Eagle.js | 4,051 | 18 | 5 | 9 months ago | 20 | October 23, 2019 | 13 | isc | JavaScript | |
A hackable slideshow framework built with Vue.js | ||||||||||
Keen Slider | 3,809 | 35 | 2 months ago | 100 | September 19, 2022 | 44 | mit | TypeScript | ||
The HTML touch slider carousel with the most native feeling you will get. | ||||||||||
Embla Carousel | 3,044 | 3 | 16 | 15 days ago | 184 | September 12, 2022 | 6 | mit | TypeScript | |
www.embla-carousel.com — A lightweight carousel library with fluid motion and great swipe precision. | ||||||||||
Vue Fullpage.js | 1,766 | 39 | 15 | a month ago | 24 | September 09, 2022 | 3 | gpl-3.0 | Vue | |
Official Vue.js wrapper for fullPage.js http://alvarotrigo.com/vue-fullpage/ | ||||||||||
Vueper Slides | 500 | 9 | 10 | 5 months ago | 105 | June 18, 2022 | 15 | mit | Vue | |
A touch ready and responsive slideshow / carousel for Vue 2 & 3. | ||||||||||
Photos | 379 | 2 days ago | 207 | agpl-3.0 | JavaScript | |||||
📸 Your memories under your control | ||||||||||
Slidy | 250 | 3 days ago | mit | TypeScript | ||||||
📸 Sliding action script | ||||||||||
Vue Slides | 242 | 1 | 1 | 4 years ago | 39 | November 29, 2018 | 2 | mit | JavaScript | |
Present with Vue | ||||||||||
Vue Infinite Slide Bar | 213 | a year ago | 14 | mit | Vue | |||||
∞ Infinite slide bar component (no dependency and light weight 1.48 KB) | ||||||||||
Press | 184 | 1 | 4 | 2 years ago | 1 | September 22, 2019 | 42 | JavaScript | ||
[Deprecated] Minimalist Markdown Publishing for Nuxt.js |
Show your latest holiday photos and videos like in the movies. Show a glimpse of your latest novel directly from your nextcloud. Choose the best GIF of your collection thanks to the direct view of your favorites files!
apps
folder of your Nextcloud: git clone https://github.com/nextcloud/viewer.git
npm ci
and build the Javascript with npm run build
.To build the Javascript whenever you make changes, you can also run npm run dev
for developement builds.
In php, on your page, emit the LoadViewer event. Check the documentation/tutorial for more info on this type of page controller sample.
use OCA\Viewer\Event\LoadViewer;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\IRequest;
class PageController extends Controller {
protected $appName;
/** @var IEventDispatcher */
private $eventDispatcher;
public function __construct($appName,
IRequest $request,
IEventDispatcher $eventDispatcher) {
parent::__construct($appName, $request);
$this->appName = $appName;
$this->eventDispatcher = $eventDispatcher;
}
/**
* @NoAdminRequired
* @NoCSRFRequired
* Render default index template
*
* @return TemplateResponse
*/
public function index(): TemplateResponse {
$this->eventDispatcher->dispatch(LoadViewer::class, new LoadViewer());
$response = new TemplateResponse($this->appName, 'main');
return $response;
}
}
This will load all the necessary scripts and make the Viewer accessible trough javascript at OCA.Viewer
OCA.Viewer.open({path: '/path/to/file.jpg'})
OCA.Viewer.open({
path: '/path/to/file.jpg',
list: [
{
basename: 'file.jpg',
filename: '/path/to/file.jpg',
...
},
...
],
})
// Alternative: pass known file info so it doesn't need to be fetched
const fileInfo = {
filename: '/path/to/file.jpg',
basename: 'file.jpg',
mime: 'image/jpeg',
etag: 'xyz987',
hasPreview: true,
fileid: 13579,
}
OCA.Viewer.open({
fileinfo: fileInfo,
list: [fileInfo],
})
The list parameter requires an array of fileinfo. You can check how we generate a fileinfo object here from a dav PROPFIND request data. There is currently no dedicated package for it, but this is coming. You can check the photos repository where we also use it.
const fileInfo1 = {
filename: 'https://next.cloud/apps/pizza/topping/pineapple.jpg',
basename: 'pineapple.jpg',
source: 'https://next.cloud/apps/pizza/topping/pineapple.jpg',
mime: 'image/jpeg',
etag: 'abc123',
hasPreview: false,
fileid: 12345,
}
const fileInfo2 = {
filename: 'https://next.cloud/apps/pizza/topping/garlic.jpg',
basename: 'garlic.jpg',
source: 'https://next.cloud/apps/pizza/topping/garlic.jpg',
mime: 'image/jpeg',
etag: 'def456',
hasPreview: false,
fileid: 67890,
}
OCA.Viewer.open({
fileInfo: fileInfo1,
list: [fileInfo1, fileInfo2],
})
In order to open a shared file you will need to provide the share token
so the Viewer can use it to authenticate the requests to the server.
See the files_sharing
app
controller
and
template
for an example.
OCA.Viewer.close()
If you want to make your app compatible with this app, you can use the OCA.Viewer
methods
path
and mime
props (they will be automatically passed by the viewer) import VideoView from 'VideoView.vue'
OCA.Viewer.registerHandler({
// unique id
id: 'video',
// optional, it will group every view of this group and
// use the proper view when building the file list
// of the slideshow.
// e.g. you open an image/jpeg that have the `media` group
// you will be able to see the video/mpeg from the `video` handler
// files that also have the `media` group set.
group: 'media',
// the list of mimes your component is able to display
mimes: [
'video/mpeg',
'video/ogg',
'video/webm',
'video/mp4'
],
// your vue component view
component: VideoView
})
models
directory and the view on the components
directory. Please have a look at what's already here and take example of it. 🙇♀️