From fddcf8c66ee6b0ed7da074ebeaacf0f49f3780e0 Mon Sep 17 00:00:00 2001 From: Christian Duvholt Date: Wed, 7 Jan 2015 15:21:08 +0100 Subject: [PATCH 1/4] Wrap django-wiki CSS in #wiki --- files/static/less/wiki.less | 2 ++ onlineweb4/settings/base.py | 6 +++++- templates/wiki/base.html | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/files/static/less/wiki.less b/files/static/less/wiki.less index b8af6a26c..ff47d2fdd 100644 --- a/files/static/less/wiki.less +++ b/files/static/less/wiki.less @@ -1,4 +1,6 @@ #wiki { + @import "wiki/bootstrap/less/wiki/wiki-bootstrap.less"; + padding: 87px 0 0; .page-header { margin-top: 0px; diff --git a/onlineweb4/settings/base.py b/onlineweb4/settings/base.py index 7ebf7ba0f..4fb416910 100644 --- a/onlineweb4/settings/base.py +++ b/onlineweb4/settings/base.py @@ -1,5 +1,6 @@ import os import sys +import wiki from django.contrib.messages import constants as messages # Directory that contains this file. @@ -82,10 +83,13 @@ 'compressor.finders.CompressorFinder', ) +# Including django-wiki static files so we can import the less files. +DJANGO_WIKI_STATIC = os.path.join(os.path.dirname(wiki.__file__), 'static') + COMPRESS_FILES = True COMPRESS_OUTPUT_DIR = 'cache' COMPRESS_PRECOMPILERS = ( - ('text/less', 'lessc {infile} {outfile}'), + ('text/less', 'lessc --include-path=%s {infile} {outfile}' % DJANGO_WIKI_STATIC), ) COMPRESS_CSS_FILTERS = [ diff --git a/templates/wiki/base.html b/templates/wiki/base.html index 2b739bb07..b907fd10e 100644 --- a/templates/wiki/base.html +++ b/templates/wiki/base.html @@ -18,7 +18,6 @@ {% endblock %} {% block styles %} - {{ block.super }} From 5216146de76950c0447a0b6c37e189d16e01283e Mon Sep 17 00:00:00 2001 From: Christian Duvholt Date: Wed, 7 Jan 2015 19:39:44 +0100 Subject: [PATCH 2/4] Hardcode Font Awesome path --- files/static/less/wiki.less | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/static/less/wiki.less b/files/static/less/wiki.less index ff47d2fdd..19a02cea8 100644 --- a/files/static/less/wiki.less +++ b/files/static/less/wiki.less @@ -1,5 +1,7 @@ #wiki { @import "wiki/bootstrap/less/wiki/wiki-bootstrap.less"; + // Hardcoded for now + @FontAwesomePath: "/static/wiki/font-awesome/font/"; padding: 87px 0 0; .page-header { From 426d35ee9680438ffbed828eb68b79cf69238c42 Mon Sep 17 00:00:00 2001 From: Christian Duvholt Date: Wed, 21 Jan 2015 20:20:27 +0100 Subject: [PATCH 3/4] Minor font-awesome path fix --- files/static/less/wiki.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/static/less/wiki.less b/files/static/less/wiki.less index 19a02cea8..7cd09022b 100644 --- a/files/static/less/wiki.less +++ b/files/static/less/wiki.less @@ -1,7 +1,7 @@ #wiki { @import "wiki/bootstrap/less/wiki/wiki-bootstrap.less"; // Hardcoded for now - @FontAwesomePath: "/static/wiki/font-awesome/font/"; + @FontAwesomePath: "/static/wiki/font-awesome/font"; padding: 87px 0 0; .page-header { From 6cb9c062efe3fd8db9d3eca4c513914c368a4ca0 Mon Sep 17 00:00:00 2001 From: Christian Duvholt Date: Wed, 21 Jan 2015 22:38:02 +0100 Subject: [PATCH 4/4] Add note about Font Awesome 4 font path --- files/static/less/wiki.less | 1 + 1 file changed, 1 insertion(+) diff --git a/files/static/less/wiki.less b/files/static/less/wiki.less index 7cd09022b..4cec3b6b7 100644 --- a/files/static/less/wiki.less +++ b/files/static/less/wiki.less @@ -1,6 +1,7 @@ #wiki { @import "wiki/bootstrap/less/wiki/wiki-bootstrap.less"; // Hardcoded for now + // Note: change to @fa-font-path when upgrading to Font Awesome 4 @FontAwesomePath: "/static/wiki/font-awesome/font"; padding: 87px 0 0;