Variable Description
=================================== =======================================
:ini:`M_THEME_COLOR` Color for :html:`<meta name="theme-color"/>`,
- corresponding to the CSS style. See below
- for more information.
+ corresponding to the CSS style. If empty,
+ no :html:`<meta>` tag is rendered. See
+ below for more information.
:ini:`M_PAGE_HEADER` HTML code to put at the top of every page.
Useful for example to link to different
versions of the same documentation. The
``{filename}`` placeholder is replaced with
current file name.
+:ini:`M_PAGE_FINE_PRINT` HTML code to put into the footer. If not
+ set, a default generic text is used. The
+ ``{doxygen_version}`` placeholder is
+ replaced with Doxygen version that
+ generated the input XML files.
:ini:`M_CLASS_TREE_EXPAND_LEVELS` How many levels of the class tree to
expand. ``0`` means only the top-level
symbols are shown. If not set, ``1`` is
'HTML_OUTPUT',
'XML_OUTPUT',
'M_PAGE_HEADER',
+ 'M_PAGE_FINE_PRINT',
'M_THEME_COLOR']:
if i in config: state.doxyfile[i] = ' '.join(config[i])
{% block header_links %}
{% endblock %}
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ {% if M_THEME_COLOR %}
<meta name="theme-color" content="{{ M_THEME_COLOR }}" />
+ {% endif %}
</head>
<body>
<header><nav id="navigation">
<div class="m-container">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
+ {% if M_PAGE_FINE_PRINT %}
+ {{ M_PAGE_FINE_PRINT|replace('{doxygen_version}', DOXYGEN_VERSION) }}
+ {% else %}
<p>{{ PROJECT_NAME }}{% if PROJECT_BRIEF %} {{ PROJECT_BRIEF }}{% endif %}. Created by <a href="http://doxygen.org/">Doxygen</a>{% if M_SHOW_DOXYGEN_VERSION %} {{ DOXYGEN_VERSION }}{% endif %} and <a href="http://mcss.mosra.cz/">m.css</a>.</p>
+ {% endif %}
</div>
</div>
</div>
--- /dev/null
+XML_OUTPUT =
+
+PROJECT_NAME = "A project"
+PROJECT_BRIEF = "is cool"
+
+M_THEME_COLOR =
+M_PAGE_HEADER = "<p><a href=\"{filename}\">A self link</a>.</p>"
+M_PAGE_FINE_PRINT = "<p><a href=\"http://doxygen.org\">Doxygen</a> version {doxygen_version}.</p>"
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>A project is cool</title>
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
+ <link rel="stylesheet" href="m-dark+doxygen.compiled.css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+</head>
+<body>
+<header><nav id="navigation">
+ <div class="m-container">
+ <div class="m-row">
+ <a href="index.html" id="m-navbar-brand" class="m-col-t-9 m-col-m-none m-left-m">A project <span class="m-thin">is cool</span></a>
+ <a id="m-navbar-show" href="#navigation" title="Show navigation" class="m-col-t-3 m-hide-m m-text-right"></a>
+ <a id="m-navbar-hide" href="#" title="Hide navigation" class="m-col-t-3 m-hide-m m-text-right"></a>
+ <div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
+ <div class="m-row">
+ <ol class="m-col-t-6 m-col-m-none">
+ <li><a href="pages.html" id="m-navbar-current">Pages</a></li>
+ <li><a href="namespaces.html">Namespaces</a></li>
+ </ol>
+ <ol class="m-col-t-6 m-col-m-none" start="3">
+ <li><a href="annotated.html">Classes</a></li>
+ <li><a href="files.html">Files</a></li>
+ </ol>
+ </div>
+ </div>
+ </div>
+ </div>
+</nav></header>
+<main><article>
+ <div class="m-container m-container-inflatable">
+ <div class="m-row">
+ <div class="m-col-l-10 m-push-l-1">
+ <p><a href="index.html">A self link</a>.</p>
+ <h1>
+ A project
+ </h1>
+ </div>
+ </div>
+ </div>
+</article></main>
+<footer><nav>
+ <div class="m-container">
+ <div class="m-row">
+ <div class="m-col-l-10 m-push-l-1">
+ <p><a href="http://doxygen.org">Doxygen</a> version 1.0.666.</p>
+ </div>
+ </div>
+ </div>
+</nav></footer>
+</body>
+</html>
--- /dev/null
+<?xml version='1.0' encoding='UTF-8' standalone='no'?>
+<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.0.666">
+ <compounddef id="indexpage" kind="page">
+ <compoundname>index</compoundname>
+ <title>A project</title>
+ <briefdescription>
+ </briefdescription>
+ <detaileddescription>
+ </detaileddescription>
+ </compounddef>
+</doxygen>
--- /dev/null
+#
+# This file is part of m.css.
+#
+# Copyright © 2017 Vladimír Vondruš <mosra@centrum.cz>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+from test import BaseTestCase
+
+class Layout(BaseTestCase):
+ def __init__(self, *args, **kwargs):
+ super().__init__(__file__, '', *args, **kwargs)
+
+ def test(self):
+ self.run_dox2html5(wildcard='indexpage.xml')
+ self.assertEqual(*self.actual_expected_contents('index.html'))