[Telepathy-commits] [telepathy-spec/master] Add a header bar to the page/Add parameters to the methods/signals

Davyd Madeley davyd at madeley.id.au
Mon Mar 23 12:29:18 PDT 2009


---
 doc/spec/style.css           |   24 +++++++++++++-
 doc/templates/interface.html |   75 +++++++++++++++++++++++++++++------------
 2 files changed, 76 insertions(+), 23 deletions(-)

diff --git a/doc/spec/style.css b/doc/spec/style.css
index e1cb00c..394359b 100644
--- a/doc/spec/style.css
+++ b/doc/spec/style.css
@@ -1,8 +1,26 @@
-h1, h2 {
+html, body,
+h1, h2, h3 {
 	margin: 0;
 	padding: 0;
 }
 
+div.header {
+	position: fixed;
+	background-color: white;
+	width: 100%;
+	margin: 0;
+	padding: 0.5ex;
+	border-bottom: 1px solid black;
+	top: 0;
+	left: 0;
+	z-index: 1;
+	height: 4em;
+}
+
+div.main {
+	margin-top: 5em;
+}
+
 div.outset {
 	padding: 1ex;
 	margin-top: 1ex;
@@ -16,6 +34,10 @@ div.inset {
 	padding: 0.5ex;
 }
 
+div.indent {
+	margin-left: 1em;
+}
+
 #methods {
 	background-color: #fcaf3e;
 }
diff --git a/doc/templates/interface.html b/doc/templates/interface.html
index e71b1cf..5d4513a 100644
--- a/doc/templates/interface.html
+++ b/doc/templates/interface.html
@@ -6,33 +6,64 @@
   <link rel="stylesheet" href="style.css" type="text/css"/>
  </head>
  <body>
+  <div class="header">
   <h1>Interface $interface.name</h1>
+   <a href="index.html">Interface Index</a> |
+   <a href="#methods">Methods</a> | <a href="#signals">Signals</a> |
+   <a href="#properties">Properties</a>
+  </div>
+  <div class="main">
 
-  <div id="methods" class="outset method">
-   <h1>Methods</h1>
-   #for $method in $interface.methods.values()
-   <div id="$method.name" class="inset method">
-    <h2>$method.get_short_name()</h2>
+   <div id="methods" class="outset method">
+    <h1>Methods</h1>
+    #for $method in $interface.methods.values()
+    <div id="$method.name" class="inset method">
+     <h2>$method.get_short_name()</h2>
+     #if $method.in_args
+     <div class="indent">
+      <h3>Parameters</h3>
+      #for $arg in $method.in_args
+       $arg.name<br/>
+      #end for
+     </div>
+     #end if
+     #if $method.out_args
+     <div class="indent">
+      <h3>Returns</h3>
+      #for $arg in $method.out_args
+       $arg.name<br/>
+      #end for
+     </div>
+     #end if
+    </div>
+    #end for
    </div>
-   #end for
-  </div>
-   
-  <div id="signals" class="outset signal">
-   <h1>Signals</h1>
-   #for $signal in $interface.signals.values()
-   <div id="$signal.name" class="inset signal">
-    <h2>$signal.get_short_name()</h2>
+    
+   <div id="signals" class="outset signal">
+    <h1>Signals</h1>
+    #for $signal in $interface.signals.values()
+    <div id="$signal.name" class="inset signal">
+     <h2>$signal.get_short_name()</h2>
+     #if $signal.args
+     <div class="indent">
+      <h3>Parameters</h3>
+      #for $arg in $signal.args
+       $arg.name<br/>
+      #end for
+     </div>
+     #end if
+    </div>
+    #end for
    </div>
-   #end for
-  </div>
-   
-  <div id="properties" class="outset property">
-   <h1>Properties</h1>
-   #for $property in $interface.properties.values()
-   <div id="$property.name" class="inset property">
-    <h2>$property.get_short_name()</h2>
+    
+   <div id="properties" class="outset property">
+    <h1>Properties</h1>
+    #for $property in $interface.properties.values()
+    <div id="$property.name" class="inset property">
+     <h2>$property.get_short_name()</h2>
+    </div>
+    #end for
    </div>
-   #end for
   </div>
  </body>
 </html>
-- 
1.5.6.5




More information about the telepathy-commits mailing list