AutoThumbs VR - Automatic Thumbnails for Vertical Rhythm (Images and Media)
Automatic Thumbnails with a Single CSS Class
Support for Vertical Rhythm & Thumbnail Orientation
128 Demo Layouts of 4Γ3 and 16Γ9 Thumbnails
AutoThumbs VR automatically generates thumbnails with a height relative to their width according to a specified aspect ratio and thumbnail orientation. It provides 3 options for thumbnail orientation β default (square), landscape and portrait, and supports vertical rhythm (VR). To create a thumbnail use class .autothumb on its own for a square or nearest square for VR <div class="autothumb col-sm-3"></div>, or combine it with .landscape for landscape orientation <div class="autothumb landscape col-sm-3"></div> or .portrait for portrait orientation <div class="autothumb portrait col-sm-3"></div>. Add images using a css class with a background-image property pointing to your image, eg. .img {background-image: url(../img/img.jpg);}. Check out the demo files for examples using Bootstrap 4 as a grid system.
Table of Contents
CSS Files and Structure
JavaScript
Sources and Credits
A) CSS Files and Structure β top
Index files showcasing AutoThumbs VR Boxed and Fluid Layouts in 4Γ3 and 16Γ9 ratios.
index.html
index-fluid.html
16Γ9/index.html
16Γ9/index-fluid.html
The βdemosβ directories demos/ and 16Γ9/demos contain fluid and boxed demo layouts of 4Γ3 and 16Γ9 square, landscape and portrait thumbnails with vGrid set to 24px as well as masonry & mosaic layouts.
demo/boxed/default β Boxed 1Γ1 square or nearest square for VR thumbnails
demo/boxed/landscape β Boxed 4Γ3 landscape or nearest landscape for VR thumbnails
demo/boxed/portrait β Boxed 4Γ3 portrait or nearest portrait for VR thumbnails
demo/boxed/masonry β Boxed masonry & mosaic layouts of mixed 4Γ3 thumbnails
demo/fluid/default β Fluid 1Γ1 square or nearest square for VR thumbnails
demo/fluid/landscape β Fluid 4Γ3 landscape or nearest landscape for VR thumbnails
demo/fluid/portrait β Fluid 4Γ3 portrait or nearest portrait for VR thumbnails
demo/fluid/masonry β Fluid masonry & mosaic layouts of mixed 4Γ3 thumbnails
16Γ9/demo/boxed/default β Boxed 1Γ1 square or nearest square for VR thumbnails
16Γ9/demo/boxed/landscape β Boxed 16Γ9 landscape or nearest landscape for VR thumbnails
16Γ9/demo/boxed/portrait β Boxed 16Γ9 portrait or nearest portrait for VR thumbnails
16Γ9/demo/boxed/masonry β Boxed masonry & mosaic layouts of mixed 16Γ9 thumbnails
16Γ9/demo/fluid/default β Fluid 1Γ1 square or nearest square for VR thumbnails
16Γ9/demo/fluid/landscape β Fluid 16Γ9 landscape or nearest landscape for VR thumbnails
16Γ9/demo/fluid/portrait β Fluid 16Γ9 portrait or nearest portrait for VR thumbnails
16Γ9/demo/fluid/masonry β Fluid masonry & mosaic layouts of mixed 16Γ9 thumbnails
There are three css files included per thumbnail aspect ratio β files css/autothumbs-vr.css and 16Γ9/css/autothumbs-vr.css include styles (including images) for AutoThumbs VR. File css/demo.css includes additional styles for the demo pages. Bootstrap 4.1.3 css file is also included in the css directory.
css/autothumbs-vr.css
css/demo.css
css/bootstrap.css
16Γ9/css/autothumbs-vr.css
16Γ9/css/demo.css
16Γ9/css/bootstrap.css
JavaScript β top
There is one js file that includes the necessary code for AutoThumbs VR β autothumbs-vr.js. By default vertical rhythm is set to vGrid = 24 for a vertical rhythm unit of 24px. To change the vertical rhythm unit, open the js/autothumbs-vr.js or 16Γ9/js/autothumbs-vr.js and set vGrid to your selected value (without βpxβ).
To customise the aspect ratio, edit the x=4 and y=3 variables (4Γ3) in file js/autothumbs-vr.js or x=16 and y=9 (16Γ9) in file 16Γ9/js/autothumbs-vr.js and set them up accordingly, considering that x corresponds to the longest side and y to the shortest side of a thumbnail. Bootstrap 4.1.3 JS (bootstrap.min.js) and jQuery 3.3.1 (jquery.min.js) are included too.
js/autothumbs-vr.js
js/bootstrap.min.js
js/jquery.min.js
16Γ9/js/autothumbs-vr.js
16Γ9/js/bootstrap.min.js
16Γ9/js/jquery.min.js
C) Credits β top
Unsplash Typography Collection by Jeremy Beck
Bootstrap 4.1.3
jQuery 3.3.1
from CodeCanyon new items https://ift.tt/2PYvuIR via IFTTT https://goo.gl/zxKHwc













