summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-05-16 18:17:44 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-05-16 18:17:44 -0400
commitcbebe08a0cc993693a7a90cbd1ddc82bb89c4194 (patch)
treec81ae08e28d7b68591ef5fe5de89b12f871c9637
parent7cbf8cc4fc8e073145589ac9f6e12b00f81b286b (diff)
downloadaskbot-cbebe08a0cc993693a7a90cbd1ddc82bb89c4194.tar.gz
askbot-cbebe08a0cc993693a7a90cbd1ddc82bb89c4194.tar.bz2
askbot-cbebe08a0cc993693a7a90cbd1ddc82bb89c4194.zip
added the YanoneKaffeesatz font to the media files and an settings.py option ASKBOT_USE_LOCAL_FONTS for use on the intranet or development offline
-rw-r--r--askbot/context.py11
-rw-r--r--askbot/doc/source/index.rst1
-rw-r--r--askbot/doc/source/intranet-setup.rst14
-rw-r--r--askbot/skins/default/media/bootstrap/css/bootstrap.css12
-rw-r--r--askbot/skins/default/media/images/OFL.txt93
-rw-r--r--askbot/skins/default/media/images/YanoneKaffeesatz-Bold.ttfbin0 -> 73000 bytes
-rw-r--r--askbot/skins/default/media/images/YanoneKaffeesatz-ExtraLight.ttfbin0 -> 77024 bytes
-rw-r--r--askbot/skins/default/media/images/YanoneKaffeesatz-Light.ttfbin0 -> 77296 bytes
-rw-r--r--askbot/skins/default/media/images/YanoneKaffeesatz-Regular.ttfbin0 -> 76588 bytes
-rw-r--r--askbot/skins/default/media/images/Yanone_Kaffeesatz.zipbin0 -> 154362 bytes
-rw-r--r--askbot/skins/default/media/style/style.less4
-rw-r--r--askbot/skins/default/templates/meta/fonts.html20
-rw-r--r--askbot/skins/default/templates/meta/html_head_stylesheets.html6
13 files changed, 145 insertions, 16 deletions
diff --git a/askbot/context.py b/askbot/context.py
index ea10a890..03a2d1d8 100644
--- a/askbot/context.py
+++ b/askbot/context.py
@@ -26,7 +26,16 @@ def application_settings(request):
my_settings['LANGUAGE_CODE'] = getattr(request, 'LANGUAGE_CODE', settings.LANGUAGE_CODE)
my_settings['ASKBOT_URL'] = settings.ASKBOT_URL
my_settings['STATIC_URL'] = settings.STATIC_URL
- my_settings['ASKBOT_CSS_DEVEL'] = getattr(settings, 'ASKBOT_CSS_DEVEL', False)
+ my_settings['ASKBOT_CSS_DEVEL'] = getattr(
+ settings,
+ 'ASKBOT_CSS_DEVEL',
+ False
+ )
+ my_settings['USE_LOCAL_FONTS'] = getattr(
+ settings,
+ 'ASKBOT_USE_LOCAL_FONTS',
+ False
+ )
my_settings['DEBUG'] = settings.DEBUG
my_settings['USING_RUNSERVER'] = 'runserver' in sys.argv
my_settings['ASKBOT_VERSION'] = askbot.get_version()
diff --git a/askbot/doc/source/index.rst b/askbot/doc/source/index.rst
index 81f21fcc..353b9105 100644
--- a/askbot/doc/source/index.rst
+++ b/askbot/doc/source/index.rst
@@ -26,6 +26,7 @@ at the forum_ or by email at admin@askbot.org
Appendix C: Optional modules <optional-modules>
Appendix D: Askbot as reusable Django application <askbot-as-reusable-django-application>
Appendix E: Customizing skin in askbot <customizing-skin-in-askbot>
+ Appendix F: Intranet setup <intranet-setup>
Footnotes <footnotes>
Contributors <contributors>
Changelog<changelog>
diff --git a/askbot/doc/source/intranet-setup.rst b/askbot/doc/source/intranet-setup.rst
new file mode 100644
index 00000000..224ffb89
--- /dev/null
+++ b/askbot/doc/source/intranet-setup.rst
@@ -0,0 +1,14 @@
+==========================================================
+Setting up Askbot for use on the closed network (Intranet)
+==========================================================
+
+When using Askbot on the Intranet (for example - within your
+Company network), it will be useful to disable references to
+all external resources - such as custom fonts, gravatars.
+
+Please change the following settings in your ``settings.py`` file::
+
+ ASKBOT_USE_LOCAL_FONTS=True
+
+In addition, in the "live settings":
+* disable gravatar in "settings->User settings"
diff --git a/askbot/skins/default/media/bootstrap/css/bootstrap.css b/askbot/skins/default/media/bootstrap/css/bootstrap.css
index 9447a9a2..3e829732 100644
--- a/askbot/skins/default/media/bootstrap/css/bootstrap.css
+++ b/askbot/skins/default/media/bootstrap/css/bootstrap.css
@@ -918,18 +918,6 @@ input,
textarea,
select,
.uneditable-input {
- display: inline-block;
- width: 210px;
- height: 18px;
- padding: 4px;
- margin-bottom: 9px;
- font-size: 13px;
- line-height: 18px;
- color: #555555;
- border: 1px solid #cccccc;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
}
.uneditable-textarea {
width: auto;
diff --git a/askbot/skins/default/media/images/OFL.txt b/askbot/skins/default/media/images/OFL.txt
new file mode 100644
index 00000000..3bc11311
--- /dev/null
+++ b/askbot/skins/default/media/images/OFL.txt
@@ -0,0 +1,93 @@
+Copyright (c) 2010, Jan Gerner (post@yanone.de)
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/askbot/skins/default/media/images/YanoneKaffeesatz-Bold.ttf b/askbot/skins/default/media/images/YanoneKaffeesatz-Bold.ttf
new file mode 100644
index 00000000..c693c4b3
--- /dev/null
+++ b/askbot/skins/default/media/images/YanoneKaffeesatz-Bold.ttf
Binary files differ
diff --git a/askbot/skins/default/media/images/YanoneKaffeesatz-ExtraLight.ttf b/askbot/skins/default/media/images/YanoneKaffeesatz-ExtraLight.ttf
new file mode 100644
index 00000000..b59e4894
--- /dev/null
+++ b/askbot/skins/default/media/images/YanoneKaffeesatz-ExtraLight.ttf
Binary files differ
diff --git a/askbot/skins/default/media/images/YanoneKaffeesatz-Light.ttf b/askbot/skins/default/media/images/YanoneKaffeesatz-Light.ttf
new file mode 100644
index 00000000..5026d3bd
--- /dev/null
+++ b/askbot/skins/default/media/images/YanoneKaffeesatz-Light.ttf
Binary files differ
diff --git a/askbot/skins/default/media/images/YanoneKaffeesatz-Regular.ttf b/askbot/skins/default/media/images/YanoneKaffeesatz-Regular.ttf
new file mode 100644
index 00000000..808ce0d0
--- /dev/null
+++ b/askbot/skins/default/media/images/YanoneKaffeesatz-Regular.ttf
Binary files differ
diff --git a/askbot/skins/default/media/images/Yanone_Kaffeesatz.zip b/askbot/skins/default/media/images/Yanone_Kaffeesatz.zip
new file mode 100644
index 00000000..55e9731a
--- /dev/null
+++ b/askbot/skins/default/media/images/Yanone_Kaffeesatz.zip
Binary files differ
diff --git a/askbot/skins/default/media/style/style.less b/askbot/skins/default/media/style/style.less
index 5967817d..c3423418 100644
--- a/askbot/skins/default/media/style/style.less
+++ b/askbot/skins/default/media/style/style.less
@@ -1812,7 +1812,7 @@ ul#related-tags li {
button{
line-height:25px;
margin-bottom:5px;
- .button-style(100px,27px,12px);
+ .button-style(100px, 27px, 12px);
font-family:@body-font;
font-weight:bold;
}
@@ -2354,7 +2354,7 @@ a:hover.medal {
font-weight:bold;
line-height:26px;
margin-top:-2px;
- .button-style(100px,26px,12px);
+ .button-style(100px,26px,14px);
}
.follow-toggle:hover, .submit:hover {
diff --git a/askbot/skins/default/templates/meta/fonts.html b/askbot/skins/default/templates/meta/fonts.html
new file mode 100644
index 00000000..f55d567c
--- /dev/null
+++ b/askbot/skins/default/templates/meta/fonts.html
@@ -0,0 +1,20 @@
+<style type="text/css">
+@font-face {
+ font-family: 'Yanone Kaffeesatz';
+ font-style: normal;
+ font-weight: 400;
+ src: url('{{"/images/YanoneKaffeesatz-Regular.ttf"|media}}');
+}
+@font-face {
+ font-family: 'Yanone Kaffeesatz';
+ font-style: normal;
+ font-weight: 700;
+ src: url('{{"/images/YanoneKaffeesatz-Bold.ttf"|media}}');
+}
+@font-face {
+ font-family: 'Yanone Kaffeesatz';
+ font-style: normal;
+ font-weight: 300;
+ src: url('{{"/images/YanoneKaffeesatz-Light.ttf"|media}}');
+}
+</style>
diff --git a/askbot/skins/default/templates/meta/html_head_stylesheets.html b/askbot/skins/default/templates/meta/html_head_stylesheets.html
index 14f3c106..0d2ba463 100644
--- a/askbot/skins/default/templates/meta/html_head_stylesheets.html
+++ b/askbot/skins/default/templates/meta/html_head_stylesheets.html
@@ -4,7 +4,11 @@
<link href="{{"/style/style.less"|media }}" rel="stylesheet/less" type="text/css" />
<script type="text/javascript" src="{{"/js/less.min.js"|media}}"></script>
{% endif %}
-<link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:300,400,700' rel='stylesheet' type='text/css'>
+{% if settings.USE_LOCAL_FONTS %}
+ {% include "meta/fonts.html" %}
+{% else %}
+ <link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:300,400,700' rel='stylesheet' type='text/css'>
+{% endif %}
{{ skin.get_extra_css_link() }}
{% if settings.USE_CUSTOM_CSS %}
<link