chiark / gitweb /
doc: clean up the CSS style docs and make them consistent.
authorVladimír Vondruš <mosra@centrum.cz>
Sun, 3 Dec 2017 13:39:29 +0000 (14:39 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 4 Dec 2017 18:20:40 +0000 (19:20 +0100)
doc/css/themes.rst
doc/pelican/theme.rst

index f1f2218762d79077580ff2e971b3b218b74b7d0b..e8aafdf1f00c10a152d5f1150813072cd375812c 100644 (file)
@@ -107,8 +107,8 @@ together and it will create a ``*.compiled.css`` file in the same directory:
 
 .. code:: sh
 
-    # Creates a m-dark.compiled.css file
-    ./postprocess.py m-dark.css
+    cd css
+    ./postprocess.py m-dark.css # Creates a m-dark.compiled.css file
 
 If you want to modify the Pygments style, it's a bit more involved. You need to
 edit the ``*.py`` file instead of the ``*.css``:
index c0255b70904dd4ac71d9e2bb1bc7fdbb1f7cd701..d05012a7f3998dfbecffb994e193d7336e028590 100644 (file)
@@ -59,18 +59,22 @@ subdir of your m.css submodule), then you tell it to put the static contents of
 the theme into a ``static/`` directory in the root of your webserver; the
 :py:`M_CSS_FILES` variable is a list of CSS files that the theme needs. You can
 put there any files you need, but there need to be at least the files mentioned
-on the `CSS themes <{filename}/css/themes.rst>`_ page. Lastly, the theme uses
-some Jinja2 filters from the `m.htmlsanity <{filename}/plugins/htmlsanity.rst>`_
+on the `CSS themes <{filename}/css/themes.rst>`_ page. The :py:`M_THEME_COLOR`
+specifies color used for the :html:`<meta name="theme-color" />` tag
+corresponding to given theme; if not set, it's simply not present. Lastly, the
+theme uses some Jinja2 filters from the `m.htmlsanity <{filename}/plugins/htmlsanity.rst>`_
 plugin, so that plugin needs to be loaded as well.
 
 .. code:: py
 
     THEME = 'm.css/pelican-theme'
     THEME_STATIC_DIR = 'static'
-    M_CSS_FILES = ['https://fonts.googleapis.com/css?family=Source+Code+Pro:400,400i,600,600i%7CSource+Sans+Pro:400,400i,600&amp;subset=latin-ext',
-                   '/static/m-dark.css']
     DIRECT_TEMPLATES = ['index']
 
+    M_CSS_FILES = ['https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600',
+                   '/static/m-dark.css']
+    M_THEME_COLOR = '#22272e'
+
     PLUGIN_PATHS += ['m.css/pelican-plugins']
     PLUGINS += ['m.htmlsanity']
 
@@ -79,6 +83,15 @@ distinction --- use ``m-dark.css`` for local development and override the
 :py:`M_CSS_FILES` to use the smaller, faster and more compatible ``m-dark.compiled.css``
 for publishing.
 
+If you would want to use the light theme instead, the configuration is this
+(again with ``m-light.css`` possibly replaced with ``m-light.compiled.css``):
+
+.. code:: py
+
+    M_CSS_FILES = ['https://fonts.googleapis.com/css?family=Libre+Baskerville:400,400i,700,700i%7CSource+Code+Pro:400,400i,600',
+                   '/static/m-light.css']
+    M_THEME_COLOR = '#cb4b16'
+
 .. note-info::
 
     To reduce confusion, new configuration variables specific to m.css theme
@@ -112,14 +125,6 @@ can be either absolute or relative to :py:`SITEURL`.
     M_BLOG_NAME = 'Your Brand Blog'
     M_BLOG_URL = 'blog/'
 
-Theme color :html:`<meta>` tag used by `CSS themes`_ can be specified with
-the :py:`M_THEME_COLOR` variable. If not set, no theme color :html:`<meta>` tag
-is present. Example configuration for the builtin dark theme:
-
-.. code:: py
-
-    M_THEME_COLOR = '#22272e'
-
 `Top navbar`_
 -------------