From 6ffecd4ac26679d48fb2b96ed6e4c21e986d8e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 18 Jan 2017 17:52:54 +0100 Subject: [PATCH] style: switch to Open Sans (#14574) --- gadjo/finders.py | 2 +- gadjo/static/css/_opensans.scss | 13 +++++++++++++ gadjo/static/css/gadjo.scss | 3 ++- setup.py | 1 + 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 gadjo/static/css/_opensans.scss diff --git a/gadjo/finders.py b/gadjo/finders.py index d006931..5403ee0 100644 --- a/gadjo/finders.py +++ b/gadjo/finders.py @@ -36,7 +36,7 @@ class XStaticStorage(FileSystemStorage): class XStaticFinder(BaseFinder): storage_class = XStaticStorage - gadjo_deps = ['jquery', 'jquery_ui', 'font_awesome'] + gadjo_deps = ['jquery', 'jquery_ui', 'font_awesome', 'opensans'] def __init__(self, apps=None, *args, **kwargs): # The list of apps that are handled diff --git a/gadjo/static/css/_opensans.scss b/gadjo/static/css/_opensans.scss new file mode 100644 index 0000000..dcbcc50 --- /dev/null +++ b/gadjo/static/css/_opensans.scss @@ -0,0 +1,13 @@ +@font-face { + font-family: 'Open Sans'; + src: url('../xstatic/fonts/Regular/OpenSans-Regular.eot?#iefix') format('embedded-opentype'), url('../xstatic/fonts/Regular/OpenSans-Regular.woff') format('woff'), url('../xstatic/fonts/Regular/OpenSans-Regular.ttf') format('truetype'), url('../xstatic/fonts/Regular/OpenSans-Regular.svg#fontawesomeregular') format('svg'); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: 'Open Sans'; + src: url('../xstatic/fonts/Bold/OpenSans-Bold.eot?#iefix') format('embedded-opentype'), url('../xstatic/fonts/Bold/OpenSans-Bold.woff') format('woff'), url('../xstatic/fonts/Bold/OpenSans-Bold.ttf') format('truetype'), url('../xstatic/fonts/Bold/OpenSans-Bold.svg#fontawesomeregular') format('svg'); + font-weight: bold; + font-style: normal; +} diff --git a/gadjo/static/css/gadjo.scss b/gadjo/static/css/gadjo.scss index c18d45b..4af482d 100644 --- a/gadjo/static/css/gadjo.scss +++ b/gadjo/static/css/gadjo.scss @@ -1,10 +1,11 @@ +@import 'opensans'; @import 'utils'; /* generalities */ html, body { margin: 0; - font-family: "Bitstream Vera Sans", "Verdana", sans-serif; + font-family: "Open Sans", sans-serif; background: #f2f2f2; color: #3c3c33; } diff --git a/setup.py b/setup.py index 1d2b369..dd56cf8 100644 --- a/setup.py +++ b/setup.py @@ -208,6 +208,7 @@ setup( 'XStatic_Font_Awesome', 'XStatic_jQuery', 'XStatic_jquery_ui', + 'XStatic_OpenSans', ], setup_requires=[ 'Pillow', -- 2.11.0