📜 ⬆️ ⬇️

Cloud galleries

If someone has already invented it before me - it's a shame. The thought came yesterday, I am writing today.

Tag clouds (categories) is no surprise. The principle of output is also known to everyone: two font sizes are set — the largest (let it be 40px) and, accordingly, the smallest (let it be 10). These are the limits within which the values ​​for the size of the displayed category are taken depending on various conditions: the number of views, records, etc.

But this, as for news feeds, blogs and other resources, where the main content is the text. What about photo galleries?
')
Now let us recall one of the possibilities of html - setting the size of an image as a percentage of its actual size. It becomes elementary: instead of initial parameters, we put values ​​from 1 to 100%.
Many galleries support the creation of identical previews for albums: for example, a square section is cut from a photo and compressed to 100 by 100 px.

Now all together. Suppose we have two values ​​- 25% and 100%. 25% - the size of the side of the preview of the original size (for example, took 100px) with the least number of visits (or posted photos),
and 100%, respectively, at the highest.

We get a kind of "cloud galleries" =)

UPD: something like this.

Source: https://habr.com/ru/post/6359/


All Articles