Code Monkey home page Code Monkey logo

Comments (6)

srikat avatar srikat commented on June 12, 2024

http://sridharkatakam.com/medium-like-fluid-lightbox-wordpress-using-fluidbox/

from fluidbox.

dtjohnso avatar dtjohnso commented on June 12, 2024

I implemented Fluidbox into a Wordpress child-theme. You can see it here, and fork if you like to add it to your own theme.
https://github.com/dtjohnso/Twenty-Thirteen-Child

from fluidbox.

paaljoachim avatar paaljoachim commented on June 12, 2024

Thank you Srikat and dtjohnso

This is what is needed:
Good instructions with some explanations and variations of the code. So the user can understand what is going on, as well as ways to customize the lightbox. (Bare bones code).

Variations of the code:

$(function () {
$('.gallery a, a[rel="lightbox"]').fluidbox();
})

jQuery(function( $ ){
$('a.fluidbox').fluidbox();
});
and how it works. As it is likely that a person would like all clickable images to use the lightbox. Since different code can be added it would be nice with some additional examples.

It seems that the instructions could also be used for other lightboxes as well. So lets say that one would like to have a choice of two different lightboxes. This could mean that one creates generic instructions as to how to use lighboxes in general in WordPress or other web site.
Again bare bones instructions with some additional code examples would be nice.

from fluidbox.

paaljoachim avatar paaljoachim commented on June 12, 2024

Testings:

There is a WordPress lightbox code snippet on can add to the functions file and will make all images open in a lighbox. It is located here: http://wpsnipp.com/index.php/functions-php/add-rel-lightbox-to-all-images-embedded-in-a-post/

I commented out jquery.fluidbox.min.js AND fluidbox-init.js inside the enqueue_fluidbox in the functions file. Only the CSS file is in effect.

Inside the fluidbox.css
I added to .fluidbox-overlay a background-color of black and changed the opacity to 0.4 and the !important tag to both to get it to work.

Thoughts on the above?

from fluidbox.

terrymun avatar terrymun commented on June 12, 2024

I feel that the readme is succinct and sufficient to explain the use of Fluidbox to those who are familiar with CSS selectors and jQuery chaining. The basic usage instructions might be confusing to people unfamiliar with CSS and/or jQuery, and will be updated soon. Customization instructions have already been published under the Configuration section of the readme, which details what settings can be changed by the user.

If you have read the section you would discover the reason why !important was necessary for you to change the overlay colour, because it is dictated by a settling during the implementation. The default value for overlayColor is rgba(255,255,255,.85), and since it is applied using jQuery as an inline style, changes to the CSS file without using !important is not possible due to hierarchy/precedence.

Implementation of Fluidbox is a WP installation is straight forward — check out the wp_enqueue_script() and wp_enqueue_style documentations.

from fluidbox.

paaljoachim avatar paaljoachim commented on June 12, 2024

Hi Terry

I am glad to hear that the basic usage instructions will also be updated soon.

from fluidbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.