O'Reilly logo

Instant Galleria How-to by Nathan Van Gheem

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Installing themes (Simple)

Installing different themes will allow us to give Galleria a different look and feel, and in this recipe we will explore how we can use themes and install them.

Getting ready

The theme we'll be working with is the classic theme that comes with the Galleria source code.

How to do it...

There are two ways by which we can load theme files into Galleria:

  1. The first is to use the Galleria API to load the theme JavaScript file:
    Galleria.loadTheme('../themes/classic/galleria.classic.min.js');

    The only parameter the loadTheme function takes is a string that is the relative path to the theme JavaScript file.

  2. The second way to load the theme JavaScript file is simply to include the JavaScript file via the script tag as follows:
    <script ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required