Sunday, September 25, 2016

Using galleria in a web page

Previous post described galleria used in the Intel XDK. If you have downloaded galleria from galleria site you could use it as described in the Getting Started page.

It is quite simple to use and works quite well. I will describe it being included in a web page on my windows 10 computer's localhost, the IIS Server.

After downloading and unpacking the galleria folder as described earlier copy and paste the following files to wwwroot of your localhost.

galleria-1.4.7.js
galleria.classic.css

Also place some image files in the images directory in the wwwroot directory of inetpub (herein some simple images are placed).

Create a HTML page as shown.


TestGalleria.png

Place this file in the wwwroot directory of inetpub in your computer.
That's it. When you browse to the page TestHTML.html in your computer (http://localhost/TestGalleria.html) you will see the display as shown:


Click on the smaller image and the larger image gets replaced. Works well!

There could be some problems. If you forget to include the galleria.classic.css file then you will get a fatal error warning such as this one.

Also if the width and height in your CSS file are not optimum, you will get this error.




Post a Comment