Как я могу создать галерею изображений с помощью нескольких действий мыши?

258
mk117

Я хотел бы иметь возможность создавать галерею изображений HTML в Windows 10 с подходом «1-клик». Есть ли способ сделать это без установки какого-либо программного обеспечения?

1
Голосование возобновить. В очереди на обзор не было ясно, что это был вопрос с самостоятельным ответом. В противном случае запрос на этот сайт показался слишком широким, но поскольку ответ был предоставлен, на мой взгляд, это полезный вопрос. Excellll 8 лет назад 0

1 ответ на вопрос

2
mk117

Here's my answer to the question...

Created this batch script that utilizes online CDN sources for Colorbox & jQuery.

Sources for the cdn included: cdn.bootcss.com, ajax.googleapis.com, and cdnjs.cloudflare.com.

This script mainly takes all the jpg images (from the folder it's placed in), and creates a gallery from it. Basically if you require to display an image gallery with responsive (mobile-friendly) lightbox, then this batch script creates it.

@echo off setlocal enableDelayedExpansion set "file_start=<HTML><HEAD><title>Gallery</title><meta name="viewport" content="width=device-width, initial-scale=1"><link href="https://cdn.bootcss.com/jquery.colorbox/1.4.33/example1/colorbox.min.css" media="all" rel="stylesheet" /><script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js" type="text/javascript"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.colorbox/1.6.3/jquery.colorbox-min.js" type="text/javascript"></script><script>$(document).ready(function(){ $('a.lightbox').colorbox(); });</script></HEAD><BODY>" set "link_start=<a href="" set ^"image_start=" class="lightbox"><img rel="images" src="" set ^"link_end=" width="30%%"/></a> " set "file_end=</BODY></HTML>" set "file_name=image_gallery.html" >"%file_name%" ( echo !file_start! setlocal disableDelayedExpansion for %%I in (*.jpg) do ( set "image=%%~fI" setlocal enableDelayedExpansion echo !link_start!!image!!image_start!!image!!link_end! endlocal ) endlocal echo !file_end! ) 

Похожие вопросы