-2

How would I go about doing reveal animations (e.g. WOW.js) when scrolling in Flask? Is it possible to elegantly use a javascript library in python, or would I have to simply port everything to flask myself?

Victor Lin
  • 288
  • 1
  • 3
  • 10
  • 1
    I think you might be trying to ask something else? I get this feeling because you're using the word "port." What problem are you trying to solve? Are you trying to dynamically load data onto the page? – Ryan O'Donnell Jan 03 '16 at 16:57

2 Answers2

2

Flask is a server side web framework. It will process the requests and output responses for the browser. Your client side codes would work fine if they are output correctly.

You will need to render the HTML using Jinja2 templates. You can serve your JS files, CSS files and images as static contents. If they are served correctly and the browser can load them, things will work just fine.

masnun
  • 11,635
  • 4
  • 39
  • 50
0

To complete Abu Ashraf Masnun's answer, I'd use Bower to manage the dependencies of your different js packages.

I use it with Jinja2 and Flask together and it's running very good (it can be a bit mindfuck with Angular (because Jinja2 and Angular are using the same syntax for placeholders) but it doesn't seem to be important for you :) ).

Laurent Meyer
  • 2,766
  • 3
  • 33
  • 57