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

fotorama directive for rst #1794

Closed
wants to merge 1 commit into from

Conversation

@humitos
Copy link
Member

commented Jun 8, 2015

Allows to include a fotorama[1] gallery in any post.

[1] http://fotorama.io/

fotorama directive for rst
Allows to include a fotorama[1] gallery in any post.

[1] http://fotorama.io/
@humitos

This comment has been minimized.

Copy link
Member Author

commented Jun 8, 2015

You can check an example here: http://argentinaenpython.com.ar/fotorama/

@ralsina

This comment has been minimized.

Copy link
Member

commented Jun 8, 2015

This belongs in plugins, not in core. We are moving stuff in that direction.

Unless of course, you want to propose it as a replacement for the current slides directive, in which case it will need a few changes.


<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <!-- 33 KB -->

<link href="http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.4/fotorama.css" rel="stylesheet"> <!-- 3 KB -->

This comment has been minimized.

Copy link
@ralsina

ralsina Jun 8, 2015

Member

You can't drop CSS link elements in the middle of the HTML, it's not standards compliant (see Notes here: https://developer.mozilla.org/en/docs/Web/HTML/Element/link ).

I'm afraid that means to support this you need to add that link element in your conf.py (EXTRA_HEAD is the option, IIRC)

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Jun 8, 2015

Member

You could also use the template hooks for that.

Chris Warrick https://chriswarrick.com
Sent from my Galaxy S3.
On 8 Jun 2015 12:23, "Roberto Alsina" notifications@github.com wrote:

In nikola/data/themes/base/templates/embedded-fotorama.tmpl
#1794 (comment):

@@ -0,0 +1,16 @@
+## -- coding: utf-8 --
+
+<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
+
+

You can't drop CSS link elements in the middle of the HTML, it's not
standards compliant (see Notes here:
https://developer.mozilla.org/en/docs/Web/HTML/Element/link ).

I'm afraid that means to support this you need to add that link element in
your conf.py (EXTRA_HEAD is the option, IIRC)


Reply to this email directly or view it on GitHub
https://github.com/getnikola/nikola/pull/1794/files#r31901731.

This comment has been minimized.

Copy link
@ralsina

ralsina Jun 8, 2015

Member

indeed an example on how to do that via template hooks would be awesome :-)

This comment has been minimized.

@@ -0,0 +1,16 @@
## -*- coding: utf-8 -*-

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <!-- 33 KB -->

This comment has been minimized.

Copy link
@ralsina

ralsina Jun 8, 2015

Member

Most themes already load jquery, but they do so at the end of the body.

<script src="http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.4/fotorama.js"></script> <!-- 16 KB -->

<div class="fotorama"
% for key, value in options.iteritems():

This comment has been minimized.

Copy link
@ralsina

ralsina Jun 8, 2015

Member

This is not compatible with python 3, just use items(). Yes, it's slightly inefficient in python 2, but you won't have a million options :-)

'ratio': '16/9',
'keyboard': 'true',
'thumb-width': 128,
'thumb-height': 128,

This comment has been minimized.

Copy link
@ralsina

ralsina Jun 8, 2015

Member

we already have a thumbnails size setting in conf.py it would be great if you could respect it.

@Kwpolska Kwpolska force-pushed the master branch from d4befbe to 8a69e98 Jun 17, 2015

@Kwpolska Kwpolska added the invalid label Jun 23, 2015

@Kwpolska

This comment has been minimized.

Copy link
Member

commented Jun 23, 2015

@humitos Please file your PR against the themes repo, this should not be in the core.

@Kwpolska Kwpolska closed this Jun 23, 2015

@Kwpolska Kwpolska deleted the fotorama-rst-directive branch Jul 20, 2015

@humitos

This comment has been minimized.

Copy link
Member Author

commented Aug 2, 2015

Moved here: getnikola/plugins#94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.