diff --git a/.gitignore b/.gitignore index 9812d3d..af06b9a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ .pydevproject *.pyc citavi_mapper/private_settings.py +static diff --git a/.gitmodules b/.gitmodules index 12a7221..85e5c92 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ -[submodule "public/static/contrib/bootstrap"] - path = public/static/contrib/bootstrap +[submodule "static/contrib/bootstrap"] + path = static/contrib/bootstrap + url = https://github.com/twbs/bootstrap.git +[submodule "contrib/bootstrap"] + path = contrib/bootstrap url = https://github.com/twbs/bootstrap.git diff --git a/citavi_mapper/settings.py b/citavi_mapper/settings.py index 8e39ff7..97595c5 100644 --- a/citavi_mapper/settings.py +++ b/citavi_mapper/settings.py @@ -20,14 +20,13 @@ BASE_DIR = os.path.dirname(os.path.dirname(__file__)) # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True +#PIPELINE_ENABLED = False TEMPLATE_DEBUG = True ALLOWED_HOSTS = [] - # Application definition - INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', @@ -37,6 +36,8 @@ INSTALLED_APPS = ( 'django.contrib.staticfiles', 'pipeline', 'crispy_forms', + 'bootstrap3_datetime', + 'django_bootstrap_breadcrumbs', 'frontend', ) @@ -53,16 +54,24 @@ ROOT_URLCONF = 'citavi_mapper.urls' WSGI_APPLICATION = 'citavi_mapper.wsgi.application' + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.6/howto/static-files/ +STATIC_URL = '/static/' +STATIC_ROOT = os.path.join(BASE_DIR, "static") STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage' +STATICFILES_DIRS = (os.path.join(BASE_DIR, 'contrib'),) + +PIPELINE_COMPILERS = ( + 'pipeline.compilers.less.LessCompiler', +) PIPELINE_CSS = { - 'colors': { + 'bootstrap': { 'source_filenames': ( - 'css/core.css', - 'css/colors/*.css', - 'css/layers.css' + 'bootstrap/less/bootstrap.less', ), - 'output_filename': 'css/colors.css', + 'output_filename': 'css/b.css', 'extra_context': { 'media': 'screen,projection', }, @@ -70,17 +79,25 @@ PIPELINE_CSS = { } PIPELINE_JS = { - 'stats': { + 'bootstrap': { 'source_filenames': ( - 'js/jquery.js', - 'js/d3.js', - 'js/collections/*.js', - 'js/application.js', + 'bootstrap/js/transition.js', + 'bootstrap/js/modal.js', + 'bootstrap/js/dropdown.js', + 'bootstrap/js/scrollspy.js', + 'bootstrap/js/tab.js', + 'bootstrap/js/tooltip.js', + 'bootstrap/js/popover.js', + 'bootstrap/js/alert.js', + 'bootstrap/js/button.js', + 'bootstrap/js/collapse.js', + 'bootstrap/js/carousel.js', + 'bootstrap/js/affix.js', + 'js/language_picker.js' ), - 'output_filename': 'js/stats.js', - } + 'output_filename': 'js/b.js', + }, } - CRISPY_TEMPLATE_PACK = 'bootstrap3' # Internationalization @@ -96,13 +113,5 @@ USE_L10N = True USE_TZ = True - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/1.6/howto/static-files/ - -STATIC_URL = '/static/' - - - # import the private settings last to allow override from private_settings import * diff --git a/citavi_mapper/urls.py b/citavi_mapper/urls.py index 0d39edc..22bad4a 100644 --- a/citavi_mapper/urls.py +++ b/citavi_mapper/urls.py @@ -13,4 +13,4 @@ urlpatterns = patterns('', # url(r'^blog/', include('blog.urls')), url(r'^$', MainSite.as_view(), name='frontend-index'), url(r'^admin/', include(admin.site.urls)), -) +) \ No newline at end of file diff --git a/public/static/contrib/bootstrap b/contrib/bootstrap similarity index 100% rename from public/static/contrib/bootstrap rename to contrib/bootstrap diff --git a/frontend/templates/base.html b/frontend/templates/base.html index bb031bb..296c193 100644 --- a/frontend/templates/base.html +++ b/frontend/templates/base.html @@ -1,3 +1,4 @@ +{% load staticfiles compressed %} @@ -5,12 +6,40 @@ - {% block title %}Citavi Mapper :: {{ title }}{% endblock %} + {% block title %}Citavi Mapper :: {{title}}{% endblock %} + + + {% compressed_css 'bootstrap' %} + {% compressed_js 'bootstrap' %} -

{{ headline }}

-
- {% block content %}{{ content }}{% endblock %}t -
+ +
+ +
+
+ {% block content %}{% endblock %} +
+ \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index e6769ce..6f0046f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,6 @@ psycopg2 django django-crispy-forms django-pipeline +django-bootstrap-breadcrumbs +django-bootstrap3-datetimepicker +