summaryrefslogtreecommitdiff
path: root/giscanner/doctemplates
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2013-01-31 12:52:23 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2013-02-01 19:47:41 -0500
commit7e0ab2b629691c5904e00f4890a2da052a0a9c37 (patch)
tree61682b838570c4ae2043871c446815e169d2191c /giscanner/doctemplates
parent9c68ba7c6f8b6b7367ccad1877d28cd526045961 (diff)
downloadgobject-introspection-7e0ab2b629691c5904e00f4890a2da052a0a9c37.tar.gz
doctool: Define a standard order of items for all pages
Diffstat (limited to 'giscanner/doctemplates')
-rw-r--r--giscanner/doctemplates/C/mallard-C-class.tmpl6
-rw-r--r--giscanner/doctemplates/C/mallard-C-function.tmpl6
-rw-r--r--giscanner/doctemplates/C/mallard-C-namespace.tmpl6
-rw-r--r--giscanner/doctemplates/C/mallard-C-vfunc.tmpl6
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-class.tmpl9
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-enum.tmpl3
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-function.tmpl7
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-namespace.tmpl6
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-property.tmpl3
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-signal.tmpl7
-rw-r--r--giscanner/doctemplates/Python/mallard-Python-vfunc.tmpl7
-rw-r--r--giscanner/doctemplates/mallard-base.tmpl12
12 files changed, 44 insertions, 34 deletions
diff --git a/giscanner/doctemplates/C/mallard-C-class.tmpl b/giscanner/doctemplates/C/mallard-C-class.tmpl
index b1be35e4..a627ace4 100644
--- a/giscanner/doctemplates/C/mallard-C-class.tmpl
+++ b/giscanner/doctemplates/C/mallard-C-class.tmpl
@@ -1,8 +1,6 @@
<%! page_type="guide" %>\
<%inherit file="mallard-base.tmpl"/>
-<%block name="content">
-${parent.content()}
-${self.since_version()}
+<%block name="synopsis">
<synopsis ui:expanded="no">
<title>Hierarchy</title>
<tree>
@@ -11,6 +9,8 @@ ${self.since_version()}
</item>
</tree>
</synopsis>
+</%block>
+<%block name="links">
<links type="topic" ui:expanded="yes"
api:type="function" api:mime="text/x-csrc"
groups="constructor" style="linklist">
diff --git a/giscanner/doctemplates/C/mallard-C-function.tmpl b/giscanner/doctemplates/C/mallard-C-function.tmpl
index f93fc31d..e0af6413 100644
--- a/giscanner/doctemplates/C/mallard-C-function.tmpl
+++ b/giscanner/doctemplates/C/mallard-C-function.tmpl
@@ -28,7 +28,7 @@
% endfor
</api:function>
</%block>
-<%block name="content">
+<%block name="synopsis">
<synopsis><code mime="text/x-csrc">
${node.retval.type.ctype} ${node.symbol} (\
% if node.is_method:
@@ -58,7 +58,8 @@ ${formatter.format_type(arg.type) | x} ${arg.argname}\
%endif
% endfor
</code></synopsis>
-${parent.content()}
+</%block>
+<%block name="details">
% if node.parameters or node.retval:
<table>
% for arg, ix in zip(node.parameters, range(len(node.parameters))):
@@ -75,5 +76,4 @@ ${parent.content()}
% endif
</table>
% endif
-${self.since_version()}
</%block>
diff --git a/giscanner/doctemplates/C/mallard-C-namespace.tmpl b/giscanner/doctemplates/C/mallard-C-namespace.tmpl
index 372cd33f..28cd4708 100644
--- a/giscanner/doctemplates/C/mallard-C-namespace.tmpl
+++ b/giscanner/doctemplates/C/mallard-C-namespace.tmpl
@@ -1,6 +1,8 @@
<%! page_type="guide" %>\
<%inherit file="mallard-base.tmpl"/>
-<%block name="content">
+<%block name="doc">
+</%block>
+<%block name="links">
<links type="topic" ui:expanded="yes" groups="class" style="linklist">
<title>Classes</title>
</links>
@@ -11,3 +13,5 @@
<title>Other</title>
</links>
</%block>
+<%block name="since_version">
+</%block>
diff --git a/giscanner/doctemplates/C/mallard-C-vfunc.tmpl b/giscanner/doctemplates/C/mallard-C-vfunc.tmpl
index b27b2cef..9cea1676 100644
--- a/giscanner/doctemplates/C/mallard-C-vfunc.tmpl
+++ b/giscanner/doctemplates/C/mallard-C-vfunc.tmpl
@@ -2,10 +2,11 @@
<%block name="info">
<link type="guide" xref="${namespace.name}.${node.parent.name}" group="vfunc"/>
</%block>
-<%block name="content">
+<%block name="synopsis">
<synopsis><code mime="text/x-csrc">
</code></synopsis>
-${parent.content()}
+</%block>
+<%block name="details">
% if node.parameters or node.retval:
<table>
% for arg, ix in zip(node.parameters, range(len(node.parameters))):
@@ -22,5 +23,4 @@ ${parent.content()}
% endif
</table>
% endif
-${self.since_version()}
</%block>
diff --git a/giscanner/doctemplates/Python/mallard-Python-class.tmpl b/giscanner/doctemplates/Python/mallard-Python-class.tmpl
index 3f0d67a1..f4de812d 100644
--- a/giscanner/doctemplates/Python/mallard-Python-class.tmpl
+++ b/giscanner/doctemplates/Python/mallard-Python-class.tmpl
@@ -1,6 +1,5 @@
<%inherit file="mallard-base.tmpl"/>
-<%block name="content">
- ${parent.content()}
+<%block name="synopsis">
<synopsis><code>
from gi.repository import ${namespace.name}
@@ -15,8 +14,8 @@ ${formatter.to_underscores(node.name).lower()} = ${namespace.name}.${node.name}(
% endfor
)\
</code></synopsis>
-
- ${self.since_version()}
+</%block>
+<%block name="details">
<synopsis>
<title>Hierarchy</title>
<tree>
@@ -29,6 +28,8 @@ ${formatter.to_underscores(node.name).lower()} = ${namespace.name}.${node.name}(
% endfor
</tree>
</synopsis>
+</%block>
+<%block name="links">
<links type="topic" ui:expanded="yes"
api:type="function" api:mime="text/x-python"
groups="method" style="linklist">
diff --git a/giscanner/doctemplates/Python/mallard-Python-enum.tmpl b/giscanner/doctemplates/Python/mallard-Python-enum.tmpl
index 09f4d9a8..3c38f884 100644
--- a/giscanner/doctemplates/Python/mallard-Python-enum.tmpl
+++ b/giscanner/doctemplates/Python/mallard-Python-enum.tmpl
@@ -1,6 +1,5 @@
<%inherit file="mallard-base.tmpl"/>
-<%block name="content">
- ${formatter.format(node, node.doc)}
+<%block name="details">
% if node.members:
<table>
% for member, ix in zip(node.members, range(len(node.members))):
diff --git a/giscanner/doctemplates/Python/mallard-Python-function.tmpl b/giscanner/doctemplates/Python/mallard-Python-function.tmpl
index 683ca835..1dbba1ee 100644
--- a/giscanner/doctemplates/Python/mallard-Python-function.tmpl
+++ b/giscanner/doctemplates/Python/mallard-Python-function.tmpl
@@ -28,7 +28,7 @@
% endfor
</api:function>
</%block>
-<%block name="content">
+<%block name="synopsis">
<synopsis><code mime="text/x-python">
% if len(node.parameters) != 0:
@accepts(\
@@ -45,8 +45,8 @@ ${', '.join((arg.argname for arg in node.parameters))}\
):
# Python wrapper for ${node.symbol}()
</code></synopsis>
-${parent.content()}
-
+</%block>
+<%block name="details">
% if node.parameters or node.retval:
<table>
% for arg, ix in zip(node.parameters, range(len(node.parameters))):
@@ -63,5 +63,4 @@ ${parent.content()}
% endif
</table>
% endif
-${self.since_version()}
</%block>
diff --git a/giscanner/doctemplates/Python/mallard-Python-namespace.tmpl b/giscanner/doctemplates/Python/mallard-Python-namespace.tmpl
index 372cd33f..28cd4708 100644
--- a/giscanner/doctemplates/Python/mallard-Python-namespace.tmpl
+++ b/giscanner/doctemplates/Python/mallard-Python-namespace.tmpl
@@ -1,6 +1,8 @@
<%! page_type="guide" %>\
<%inherit file="mallard-base.tmpl"/>
-<%block name="content">
+<%block name="doc">
+</%block>
+<%block name="links">
<links type="topic" ui:expanded="yes" groups="class" style="linklist">
<title>Classes</title>
</links>
@@ -11,3 +13,5 @@
<title>Other</title>
</links>
</%block>
+<%block name="since_version">
+</%block>
diff --git a/giscanner/doctemplates/Python/mallard-Python-property.tmpl b/giscanner/doctemplates/Python/mallard-Python-property.tmpl
index db78f2b9..32d673b2 100644
--- a/giscanner/doctemplates/Python/mallard-Python-property.tmpl
+++ b/giscanner/doctemplates/Python/mallard-Python-property.tmpl
@@ -3,9 +3,8 @@
<link type="guide" xref="${namespace.name}.${node.parent.name}" group="property"/>
<title type="link" role="topic">${node.name}</title>
</%block>
-<%block name="content">
+<%block name="synopsis">
<synopsis><code mime="text/x-python">
"${node.name}" ${formatter.format_type(node.type)} : ${formatter.format_property_flags(node)}
</code></synopsis>
-${parent.content()}
</%block>
diff --git a/giscanner/doctemplates/Python/mallard-Python-signal.tmpl b/giscanner/doctemplates/Python/mallard-Python-signal.tmpl
index a430d9b9..eccede7c 100644
--- a/giscanner/doctemplates/Python/mallard-Python-signal.tmpl
+++ b/giscanner/doctemplates/Python/mallard-Python-signal.tmpl
@@ -3,7 +3,7 @@
<link type="guide" xref="${namespace.name}.${node.parent.name}" group="signal"/>
<title type="link" role="topic">${node.name}</title>
</%block>
-<%block name="content">
+<%block name="synopsis">
<synopsis><code mime="text/x-python">
def callback(${formatter.to_underscores(node.parent.name).lower()}, \
% for arg, ix in zip(node.parameters, range(len(node.parameters))):
@@ -11,8 +11,8 @@ ${arg.argname}, \
% endfor
user_param1, ...)
</code></synopsis>
-${formatter.format(node, node.doc)}
-
+</%block>
+<%block name="details">
<table>
<tr>
<td><p>${formatter.to_underscores(node.parent.name).lower()} :</p></td>
@@ -41,6 +41,5 @@ ${formatter.format(node, node.doc)}
</tr>
% endif
</table>
-${self.since_version()}
</%block>
diff --git a/giscanner/doctemplates/Python/mallard-Python-vfunc.tmpl b/giscanner/doctemplates/Python/mallard-Python-vfunc.tmpl
index 65af0058..32230704 100644
--- a/giscanner/doctemplates/Python/mallard-Python-vfunc.tmpl
+++ b/giscanner/doctemplates/Python/mallard-Python-vfunc.tmpl
@@ -1,5 +1,5 @@
<%inherit file="mallard-base.tmpl"/>
-<%block name="content">
+<%block name="synopsis">
<synopsis><code mime="text/x-python">
% if len(node.parameters) != 0:
@accepts(\
@@ -12,8 +12,8 @@ do_${node.name}(self, \
${', '.join((arg.argname for arg in node.parameters))}\
):
</code></synopsis>
-${parent.content()}
-
+</%block>
+<%block name="details">
% if node.parameters or node.retval:
<table>
% for arg, ix in zip(node.parameters, range(len(node.parameters))):
@@ -30,5 +30,4 @@ ${parent.content()}
% endif
</table>
% endif
-${self.since_version()}
</%block>
diff --git a/giscanner/doctemplates/mallard-base.tmpl b/giscanner/doctemplates/mallard-base.tmpl
index 07eb4468..e40739c3 100644
--- a/giscanner/doctemplates/mallard-base.tmpl
+++ b/giscanner/doctemplates/mallard-base.tmpl
@@ -12,12 +12,18 @@
</%block>
</info>
<title><%block name="title">${formatter.format_page_name(node)}</%block></title>
- <%block name="content">
+ <%block name="synopsis">
+ </%block>
+ <%block name="doc">
${formatter.format(node, node.doc)}
</%block>
- <%def name="since_version()">
+ <%block name="since_version">
% if node.version:
<p>Since ${node.version}</p>
% endif
- </%def>
+ </%block>
+ <%block name="details">
+ </%block>
+ <%block name="links">
+ </%block>
</page>