导航图像列表的最简单方法是什么?

时间:2022-04-11 11:49:34

The purpose of this is to view remote images with a browser. I already have set apache and I can see the folder of pictures with directory listing. The bad thing, is that I have to click each image, each time I want to see one.

这样做的目的是使用浏览器查看远程图像。我已经设置了apache,我可以看到带有目录列表的图片文件夹。不好的是,每次我想看一个,我都要点击每个图像。

What I want is to navigate through the images in the folder using the arrows in my keyboard. I don't want any UI, just the image.

我想要的是使用键盘上的箭头浏览文件夹中的图像。我不想要任何UI,只需要图像。

What's the best thing to do this? Is it possible to do using just HTML5?

这样做最好的是什么?是否可以只使用HTML5?

Thanks.

谢谢。

2 个解决方案

#1


2  

Here is a simple gallery with keyboard navigation. You can (in php) echo out the directory listing of images as a array in js.

这是一个带键盘导航的简单图库。您可以(在php中)将图像的目录列表作为数组以js形式回显。

Example

Full Screen Example

全屏示例

#2


1  

The simplest solution I can think of is Single File PHP Gallery. It's one file. You add it to that directory and it makes it into a gallery. I don't know if it supports the keyboard navigation you're looking for.

我能想到的最简单的解决方案是单文件PHP库。这是一个文件。您将它添加到该目录,并使其成为一个库。我不知道它是否支持您正在寻找的键盘导航。

The most straightforward approach would really be javascript, as mentioned by rlemon. PHP is overkill for what you've described and by itself cannot add the keyboard shortcuts. You need javascript for that part. The Single File PHP Gallery might work if you're trying to avoid writing any code, though.

最简单的方法实际上就是javascript,正如rlemon所提到的那样。 PHP对于您所描述的内容而言过于苛刻,并且本身无法添加键盘快捷键。你需要javascript的那部分。但是,如果您试图避免编写任何代码,单个文件PHP库可能会起作用。

#1


2  

Here is a simple gallery with keyboard navigation. You can (in php) echo out the directory listing of images as a array in js.

这是一个带键盘导航的简单图库。您可以(在php中)将图像的目录列表作为数组以js形式回显。

Example

Full Screen Example

全屏示例

#2


1  

The simplest solution I can think of is Single File PHP Gallery. It's one file. You add it to that directory and it makes it into a gallery. I don't know if it supports the keyboard navigation you're looking for.

我能想到的最简单的解决方案是单文件PHP库。这是一个文件。您将它添加到该目录,并使其成为一个库。我不知道它是否支持您正在寻找的键盘导航。

The most straightforward approach would really be javascript, as mentioned by rlemon. PHP is overkill for what you've described and by itself cannot add the keyboard shortcuts. You need javascript for that part. The Single File PHP Gallery might work if you're trying to avoid writing any code, though.

最简单的方法实际上就是javascript,正如rlemon所提到的那样。 PHP对于您所描述的内容而言过于苛刻,并且本身无法添加键盘快捷键。你需要javascript的那部分。但是,如果您试图避免编写任何代码,单个文件PHP库可能会起作用。