Theme for Brown University Library Django Projects
-
Either checkout and run
python setup.py installor install directly from Github with pip:pip install git+https://github.com/Brown-University-Library/django-bulstyle.git#egg=bulstyle -
In settings.py :
-
Add
bulstyleto yourINSTALLED_APPSINSTALLED_APPS = ( # other packages 'bulstyle', )
-
Add
bulstyle/css/bulstyle.cssto you BOOTSRAP3 settingsBOOTSTRAP3 = { # other settings 'css_url': os.path.join('',STATIC_URL,'bulstyle/css/bulstyle.css'), }
-
In your project
base.htmltemplate{% extends 'bulstyle/base.html' %}
-
Follow the above instructions except replace
bulstyle.csswithbulstyle-blacklight.cssBOOTSTRAP3 = { # other settings 'css_url': os.path.join('',STATIC_URL,'bulstyle/css/bulstyle-blacklight.css'), }
The following setting will change the main container class for all divs.
BULSTYLE = {
'container_class': 'container', #default
}With this setting you could potentially change to a fluid layout using
BULSTYLE = {
'container_class': 'container-fluid',
}This package will dynamically insert the common Brown University Library header into the page. The following optional parameters can be added to BULSTYLE
BULSTYLE = {
'header_url': 'https://library.brown.edu/common/includes/bul_pl_header.php', #Default
'header_cache_length': 500, #Default
'header_subnav_key': '', #Default
'header_subnav_login_key': '', #Default
'footer_url': 'https://library.brown.edu/common/includes/bul_pl_footer.php', #Default
'footer_cache_length': 5000, #Default
}You can also set the subnav key in your application template. It will override the settings.
{% include bulpattern %}
{% block library_navigation %}
{% bul_header 'key1' %}
{% endblock %}or if you have different keys for non-logged-in/logged-in users
{% include bulpattern %}
{% block library_navigation %}
{% bul_header 'key1' 'key2'%}
{% endblock %}This is a precompiled theme that is not generated by the scss files included. Also has some styles used in the Brown Digital Repository
-
Follow the above instructions except replace
bulstyle.csswithproject.cssBOOTSTRAP3 = { # other settings 'css_url': os.path.join('',STATIC_URL,'bulstyle/css/project.css'), }
bulstyle BULSTYLE by [Brown University Library] BUL is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License] CC BY-SA 3.0
Human readable summary:
You are free:
- to Share — to copy, distribute and transmit the work
- to Remix — to adapt the work
- to make commercial use of the work
Under the following conditions:
- Attribution — You must attribute the work to:
Brown University Library - http://library.brown.edu/its/software/
- Share Alike — If you alter, transform, or build upon this work,
you may distribute the resulting work only under the same
or similar license to this one.