How to make my photo grid thumbnail sizes dynamic How to make my photo grid thumbnail sizes dynamic
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

How to make my photo grid thumbnail sizes dynamic

Started by matheso, January 19, 2015, 02:49:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

matheso

Hello,

I'd like to change the layout of the thumbnails on my homepage from what it is now, to something like this:  http://www.pexels.com/

The thumbnail shouldI assume I'll need to change themes, but I don't know which one would be best?

Two main things I'd like:



matheso

Sorry about that!    Thumbnail width should be dynamic, based on the photo's resolution.

Can you recommend a solution?  Thank you


allvip

#3
Type in Google grid dynamic jquery.

I found this:

Isotope (is made by same person that made the famous mansonry) : http://isotope.metafizzy.co/layout-modes/fitrows.html
packery jquery plugin:  http://packery.metafizzy.co/
freewallpackery http://vnjs.net/www/project/freewall/

More: http://speckyboy.com/2013/07/15/15-jquery-plugins-for-creating-dynamic-layouts/

I did a very fast read and search of the plugins I listed.
I did not payed attention if it really is what you want.

matheso

Thank you, freewall looks perfect. However, I have 2 questions:

1. Is freewall free to use for commercial purposes? I can't find this info

2. I don't see where I place the html code into my template.html file?   Right now my template file has this code to show my gallery:

<div id="cpg_main_block_outer">
        <div class="cpg_main_block_inner">
            {GALLERY}
            <br />
        </div>
        </div>


I don't see where I place freewall's code?

Thanks again

gmc

Quote from: matheso on January 20, 2015, 01:38:06 AM
1. Is freewall free to use for commercial purposes? I can't find this info
At the bottom of the Freewall site:

Copyright
© 2013 Minh Nguyen
Released under the MIT license


The MIT license:
http://opensource.org/licenses/MIT
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

allvip

Should work like this: add in template.html in the head (<head> </head> section):

<script type="text/javascript" src="themes/matheso/js/freewall.js"></script>

and under {JAVASCRIPT} or before </body>


  <script>
    $(function() {
      var wall = new freewall("#thumbWrapp");
      wall.fitWidth();
    });
  </script>

matheso

Thank you both for your helpful feedback. @allvip I'll try exactly that when I get a chance, and will report back. I appreciate it!

allvip