Sublime Text 2 editor style scroll bars.
Project description
=====================
Django Sublime Scroll
=====================
"Sublime Text 2"-style scroll bars.
Installation:
=============
* pip install django-sublime-scroll
* Setup wkhtmltoimage
* load template tags
.. code:: jinja
{% load sublime_scroll_tags %}
{% sublime_scroll %}
* It's a good idea to have some cache so that the page capture is not generated every time that the page is loaded. So at the very least, you should do this:
.. code:: jinja
{% load sublime_scroll_tags cache %}
{% cache 500 sublime_scroll %}
{% sublime_scroll %}
{% endcache %}
* Make sure to include RequestContext in response. Example:
.. code:: python
from django.template import RequestContext
return render_to_response('index.html', {'form': form, },
context_instance = RequestContext(request))
Settings:
=========
.. code:: python
# Absolute path to wkhtmltoimage if not in system PATH:
SUBLIME_SCROLL_WKHTMLTOIMAGE_PATH # (default: "wkhtmltoimage")
# Scroll Bar width:
SUBLIME_SCROLL_SETTINGS
# Default (in javascript):
{
'scroll_width': 150,
'offset': 0,
'z_index': 50,
'content_width': 960,
'full_height': "$('html').height()",
'opacity': 0.1,
'color': 'white',
}
Django Sublime Scroll
=====================
"Sublime Text 2"-style scroll bars.
Installation:
=============
* pip install django-sublime-scroll
* Setup wkhtmltoimage
* load template tags
.. code:: jinja
{% load sublime_scroll_tags %}
{% sublime_scroll %}
* It's a good idea to have some cache so that the page capture is not generated every time that the page is loaded. So at the very least, you should do this:
.. code:: jinja
{% load sublime_scroll_tags cache %}
{% cache 500 sublime_scroll %}
{% sublime_scroll %}
{% endcache %}
* Make sure to include RequestContext in response. Example:
.. code:: python
from django.template import RequestContext
return render_to_response('index.html', {'form': form, },
context_instance = RequestContext(request))
Settings:
=========
.. code:: python
# Absolute path to wkhtmltoimage if not in system PATH:
SUBLIME_SCROLL_WKHTMLTOIMAGE_PATH # (default: "wkhtmltoimage")
# Scroll Bar width:
SUBLIME_SCROLL_SETTINGS
# Default (in javascript):
{
'scroll_width': 150,
'offset': 0,
'z_index': 50,
'content_width': 960,
'full_height': "$('html').height()",
'opacity': 0.1,
'color': 'white',
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-sublime-scroll-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c0def848e9395fec149fef529828ec12026672bda56f4e593142673f06f4784 |
|
MD5 | a78f6c5843b5e013abcadf039b1f25e8 |
|
BLAKE2b-256 | e9a0b43d8a2eaa579c1d92daff170a305d1620cb59fc25fc4e917f07740ecb83 |