Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple themes #244

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ _build
*.swp
*.swo
docs/jsdoc/html
src/themes/folio
src/index.html
35 changes: 35 additions & 0 deletions docs/options/theme.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
============
theme
============

| type: **String**
| default: **undefined**

The theme that should be used for this gallery.

If undefined, this will default to the most recently loaded theme.

The name should be in the same format as the theme's css/js files: 'galleria.themename'.

The theme must be loaded (either before or after) by calling 'Galleria.loadTheme'.

.. highlight:: html

Example::

<script>
Galleria.loadTheme('themes/classic/galleria.classic.js');
$('#galleria').galleria({
theme: 'galleria.classic'
});
</script>

Alternatively, it is possible to simply call 'loadTheme' directly before the gallery is initialized::

<script>
Galleria.loadTheme('themes/classic/galleria.classic.js');
$('#galleria-one').galleria(); // Will have the 'classic' theme

Galleria.loadTheme('themes/twelve/galleria.twelve.js');
$('#galleria-two').galleria(); // Will have the 'Twelve' theme
</script>
Loading