Skip to content

Brown-University-Library/django-bulstyle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brown University Library Theme (Django)

Theme for Brown University Library Django Projects

Installation and configuration

  • Either checkout and run python setup.py install or install directly from Github with pip:

    pip install git+https://github.com/Brown-University-Library/django-bulstyle.git#egg=bulstyle
    
  • In settings.py :

  • Add bulstyle to your INSTALLED_APPS

    INSTALLED_APPS = (
       # other packages
      'bulstyle',
    )
  • Add bulstyle/css/bulstyle.css to you BOOTSRAP3 settings

    BOOTSTRAP3 = {
      # other settings
      'css_url': os.path.join('',STATIC_URL,'bulstyle/css/bulstyle.css'),
    }
  • In your project base.html template

        {% extends 'bulstyle/base.html' %}

Include Blacklight themes

  • Follow the above instructions except replace bulstyle.css with bulstyle-blacklight.css

    BOOTSTRAP3 = {
      # other settings
      'css_url': os.path.join('',STATIC_URL,'bulstyle/css/bulstyle-blacklight.css'),
    }

Optional Settings

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 %}

Legacy Theme

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.css with project.css

    BOOTSTRAP3 = {
      # other settings
      'css_url': os.path.join('',STATIC_URL,'bulstyle/css/project.css'),
    }

License

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.

About

Theme for Brown University Library Django Projects

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages