<!doctype html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script src="galleria/galleria-1.4.min.js"></script>
</head>
<body>
<div class="galleria">
<img src="photo1.jpg">
<img src="photo2.jpg">
<img src="photo3.jpg">
</div>
<script>
Galleria.loadTheme('galleria/themes/classic/galleria.classic.min.js');
Galleria.run('.galleria');
</script>
</body>
</html>First I don't know if I post here or GitHub so I am starting here.Let me know if I need to bounce it over to GitHub.
I have downloaded the JavaScript and dragged and dropped it into TW.galleria-1.4.2.min.jsgalleria-1.4.2.js
I then changed the Type to "application/javascript".Is this the right way to get the code into TW?
Next I need to use that code if the above is correct.I am trying to work with the demo code<!doctype html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script src="galleria/galleria-1.4.min.js"></script>
</head>
<body>
<div class="galleria">
<img src="photo1.jpg">
<img src="photo2.jpg">
<img src="photo3.jpg">
</div>
<script>
Galleria.loadTheme('galleria/themes/classic/galleria.classic.min.js');
Galleria.run('.galleria');
</script>
</body>
</html>
/*!
* jQuery JavaScript Library v1.11.1
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2014-05-01T17:42Z
*/
TW5 does not have a gallery type options, although Tobias's linkimg works pretty well for creating one.
I know what I want in my head but it is just not there yet, so I am going to make it(hopefully) and if others use it that would be cool.
how are you going to use this with tiddlywiki?
So I downloaded the referenced jQuery Script directly, it is larger than the galleria.js at 277kb.
Seems to be included in TW Classic or at least on the GitHub,
<div class="galleria"></div> <script> var data = [ { image: "/path/to/myimage1.jpg" }, { image: "/path/to/myimage2.jpg" }, ]; Galleria.run('.galleria', { dataSource: data, }); </script>
which means you could have your galleria widget work with filters to collect image tiddlers
(easy if you have image tiddlers that use the _canonical_uri)
BJ
Galleria.loadTheme = function( src, options ) {
// Don't load if theme is already loadedQuestion: Could we load the theme when we load TW5?
Question: Could we load the theme when we load TW5?
I see the issue now that I type the question, How will the code find the Tiddler?
<script src="galleria/themes/galleria.classic.js"></script>
<link rel="stylesheet" href="galleria/themes/galleria.classic.css">There is no way for me to hijack and override its internal functions. The only thing that is left to do is to fork the Galleria codebase and rewrite those theme handling bits while doing away with all the external file stuff. That will take some reengineering so as to work in TiddlyWiki.