N
N
Nikita Shchypylov2016-06-23 12:53:46
css
Nikita Shchypylov, 2016-06-23 12:53:46

How to put down the path to the picture in 92 points?

Such a thing: you need to insert 92 li's for the slider. Write all the way in pictures hands fall off. The pictures are in the same folder, the names are different.
Is there any option to do this automatically?
Thanks

Answer the question

In order to leave comments, you need to log in

4 answer(s)
Z
zooks, 2016-06-23
@zooks

This is done on the server side - through scripts or CMS.

A
Alexey Ukolov, 2016-06-23
@alexey-m-ukolov

You can list the names of all the pictures in the list and insert them into the necessary rules by brute force.
If you don’t feel like listing, you can write a plugin for PostCSS in a hardcoded way .

Y
Yuri Esin, 2016-06-23
@Exomode

Script to generate text through a template, the algorithm is approximately the following (C#):

string url = "https://адрес_сайта_с_изображениями.рф/"
string path = "D:/Путь_к_изображениям/";
string[] imgNames = Directory.GetFiles(path);
string result = "<ul>";

foreach (string imgName in imgNames) result += "<li><img src=\"" + url + imgName + "\" /></li>";

result += "</ul>";

File.WriteAllText("result.html", result);

A
Alexey, 2016-06-23
@alsopub

Если индекс открыт - site.ru/images/slider и показывает список файлов - то есть варианты.
Иначе - или как Алексей Уколов или zooks написали.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question