WIP local fonts local_font_experiment
authorM. Taylor Saotome-Westlake <[email protected]>
Sat, 15 Sep 2018 23:41:13 +0000 (16:41 -0700)
committerM. Taylor Saotome-Westlake <[email protected]>
Sat, 15 Sep 2018 23:41:13 +0000 (16:41 -0700)
It's nontrivial because the HTML only retreives a stylesheet which retrieves
the actual fonts; not hard to solve, but I don't care that much right now

pelicanconf.py
plugins/tag_cloud.py
publishconf.py
theme/templates/base.html

index 7952a3f..a9875e1 100644 (file)
@@ -71,3 +71,5 @@ TAG_CLOUD_SORTING = "alphabetically"
 
 # Uncomment following line if you want document-relative URLs when developing
 RELATIVE_URLS = True
+
+IS_DEVELOPMENT = True
index 775977e..bdd9358 100644 (file)
@@ -23,6 +23,7 @@ logger = logging.getLogger(__name__)
 
 
 def set_default_settings(settings):
+    print(settings)
     settings.setdefault('TAG_CLOUD_STEPS', 4)
     settings.setdefault('TAG_CLOUD_MAX_ITEMS', 100)
     settings.setdefault('TAG_CLOUD_SORTING', 'random')
index 738f1f3..fd59a1a 100644 (file)
@@ -21,3 +21,5 @@ CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'
 DELETE_OUTPUT_DIRECTORY = True
 
 GOOGLE_ANALYTICS = "UA-100822263-1"
+
+IS_DEVELOPMENT = False
index 36ca164..472eaf1 100644 (file)
@@ -8,8 +8,13 @@
        {% block extra_meta %}
        {% endblock %}
 
-       <link rel="top" href="#" /><link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,300italic,400italic,600italic|Source+Code+Pro' rel='stylesheet' type='text/css'></link>
-       <link rel="stylesheet" href="{{ SITEURL }}/theme/css/{{ CSS_FILE }}" type="text/css" />
+        {% if IS_DEVELOPMENT %}
+
+          {# TODO: local fonts?! #}
+        {% else %}
+         <link rel="top" href="#" /><link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,300italic,400italic,600italic|Source+Code+Pro' rel='stylesheet' type='text/css'></link>
+         <link rel="stylesheet" href="{{ SITEURL }}/theme/css/{{ CSS_FILE }}" type="text/css" />
+        {% endif %}
 
        {% block scripts %}
        {% endblock %}