![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
justifiedGallery
Advanced tools
Justified Gallery is a JavaScript library that allows you to create an high quality justified gallery of images.
Justified Gallery is a JavaScript library that allows you to create an high quality justified gallery of images.
This is a common problem for people who create websites: you have a series of images to display, but you are not sure how to arrange them in an elegant way. Important websites such as 500px, Flickr, or Google display images in an excellent way, justifying them similarly to brick wall. Justified Gallery will give you the power to do that too.
Justified Gallery is a professional and open source library that even 500px, one of the best photography social network, chose for displaying their images!
<figure>
.fixedHeight
option since now this behaviour can be replicated using maxRowHeight
.rowHeight
option, that could be smaller than the effective height of all the other rows.
For example: a gallery of images of 100x100px in a container of 950px, where rowHeight = 100. That gallery would
contain 9 pictures for each row, and the extra space used for justification. Each row will have approximately an
height of 105px after the justification. In this example the last row height would be 105px, where in the past
it would usually be 100px if not justified.bugfixes
lastRow option can be 'nojustify', which is the same as 'left', or it can be 'justify', 'center', 'right' or 'hide'.
refreshSensitivity option, to configure the change in width allowed (in px) without re-building the gallery
thumbnailPath to configure JG with a custom thumbnail selector, e.g. we want to do select the correct thumbnail changing only a suffix of the current filename
$("#myGallery").justifiedGallery({
thumbnailPath: function (currentPath, width, height) {
if (Math.max(width, height) < 250) {
return currentPath.replace(/(.*)(_[a-z]+)(\..*)/, "$1_small$2");
} else {
return currentPath.replace(/(.*)(_[a-z]+)(\..*)/, "$1_medium$2");
}
}
});
Sort (works also with infinite scroll)
Filter (works also with infinite scroll)
Randomize images now works also with infinite scroll
Text entries (i.e. without images) support
Destroy method
maxRowHeight could be also a percentage
configurable sizeRangeSuffixes. e.g. to have only thumbnails and big images it could be:
sizeRangeSuffixes : {
500: '_t',
2000: '_m'
}
Configurable entry selector
Code refactoring
The default suffixes are all empty, to be simpler to understand. To have the previous suffixes, the following settings can be used:
sizeRangeSuffixes : {
'lt100': '_t',
'lt240': '_m',
'lt320': '_n',
'lt500': '',
'lt640': '_z',
'lt1024': '_b'
}
Now is possible to have entries with the structure:
<div>
<a href="...">
<img src="..." />
</a>
<div class="caption">...</div>
</div>
Fixed margins
The border of the entire gallery can be customized
Corrected bugs for the callbacks when waitThumbnailsLoad = false
No more crops
Initial opacity settings for the caption to allow them to be always visible
All caption settings in a single object to be more compact
captionSettings : { //ignored with css animations
animationDuration : 500,
visibleOpacity : 0.7,
nonVisibleOpacity : 0.0
},
Justification formulas refactoring to be more maintainable
div
can be used instead of a
cssAnimation
)captionsAnimationDuration
)captionsVisibleOpacity
)imagesAnimationDuration
)justifyThreshold
)maxRowHeight
optionrandomize
option)justifyLastRow
setting has been renamed to lastRow
, and it accepts: 'justify'
, 'nojustify'
, 'hide'
.lastRow = 'nojustify'
, if the free space is small.data-safe-src
, this is choice, no matter what the src attribute is. This can be used to avoid the problems with Photon or other services that resize the images, changing the image src
s.rel
attribute.target
attribute.Please don't edit files in the dist
subdirectory as they are generated via Grunt. You'll find source code in the src
subdirectory.
Regarding code style like indentation and whitespace, follow the conventions you see used in the source already.
Prerequisites:
npm install -g grunt-cli
.npm install -g yarn
Build:
yarn install
to install all dependencies.grunt debug
to build the library only for testing (debug mode).grunt
to build this project in release mode.master
branch directly.FAQs
Justified Gallery is a JavaScript library that allows you to create an high quality justified gallery of images.
The npm package justifiedGallery receives a total of 1,565 weekly downloads. As such, justifiedGallery popularity was classified as popular.
We found that justifiedGallery demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.