Permalink
Browse files

Works with .NET 4.0, and has completely rewritten documentation templ…

…ates using HTML (Chrome/Safari only)
  • Loading branch information...
dylanbeattie committed Apr 9, 2011
1 parent bb7c034 commit 68e5bd4ac4be0aae3fa8ebee2b28923648935ec8
View
Binary file not shown.
@@ -254,9 +254,6 @@
<Content Include="templates\js\navigation.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
- <Content Include="templates\_footer.spark">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
<Content Include="templates\!namespace\_events.spark">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
@@ -283,6 +280,9 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
+ <None Include="templates\_common_footer.spark">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
@@ -1,4 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>${h(Type.PrettyName)} - ${WriteProductName(Assemblies[0])} Documentation</title>
@@ -10,14 +10,21 @@
<script type="text/javascript" src="../js/example.js"></script>
</head>
<body>
+ <header><h1>${WriteProductName(Assemblies[0])} : API Documentation</h1>
+ </header>
+
<namespaces />
<types />
- <div class="header">
+ <article>
+ <header>
<p class="class"><strong>Type</strong> ${h(Type.PrettyName)}</p>
+ </header>
+ <section>
+ <header>
<p><strong>Namespace</strong> ${Namespace.Name}</p>
<p if="Type.ParentType != null && Type.ParentType.PrettyName != 'object'"><strong>Parent</strong> ${Format(Type.ParentType)}</p>
<p if="Type.Interfaces.Count > 0"><strong>Interfaces</strong> ${WriteInterfaces(Type.Interfaces)}</p>
- </div>
+ </header>
<div class="sub-header">
<if condition="(Type.Summary != null && Type.Summary.Children.Count() > 0) || (Type.Remarks != null && Type.Remarks.Children.Count() > 0)">
<div id="summary">
@@ -55,7 +62,6 @@
</ul>
</if>
</div>
-
<events events="Type.Events" title="'Events'" />
<var publicInstanceMethods="Type.Methods.Where(x => x.IsPublic && !x.IsStatic)" />
@@ -66,7 +72,8 @@
<properties properties="Type.Properties" title="'Public properties'" />
<fields fields="Type.Fields" title="'Public fields'" />
-
- <use file="../_footer" />
+ </section>
+ </article>
+ <use file="../_common_footer" />
</body>
</html>
@@ -1,32 +1,46 @@
<if condition="methods.Count() > 0">
<h3 class="section">${title}</h3>
-
+
<div id="${method.Name}" class="method" each="var method in methods">
- <h4>${Format(method.ReturnType)} <strong>${h(method.PrettyName)}</strong>(${OutputMethodParams(method)})</h4>
+ <h4>
+ ${Format(method.ReturnType)} <strong>${h(method.PrettyName)}</strong>(${OutputMethodParams(method)})
+ </h4>
<div class="content">
- <comment content="method.Summary" />
- <remarks content="method.Remarks" />
+ <comment content="method.Summary" />
+ <remarks content="method.Remarks" />
+
+ <var hasReturn="method.ReturnType.PrettyName != 'void'" />
+ <var hasParams="method.Parameters.Any(x => x.HasDocumentation)" />
- <var hasReturn="method.ReturnType.PrettyName != 'void'" />
- <var hasParams="method.Parameters.Any(x => x.HasDocumentation)" />
+ <div class="parameters" if="hasParams">
+ <h5>Parameters</h5>
+ <dl>
+ <for each="var param in method.Parameters">
+ <dt>
+ <code>${Format(param.Reference)}</code> ${param.Name}
+ </dt>
+ <dd if="!param.Summary.IsEmpty">
+ <comment content="param.Summary" />
+ </dd>
+ </for>
+ </dl>
+ </div>
- <div class="parameters" if="hasParams">
- <h5>Parameters</h5>
+ <div class="return" if="!method.Returns.IsEmpty">
- <for each="var param in method.Parameters">
- <h6><code>${Format(param.Reference)}</code> ${param.Name}</h6>
- <p class="comments" if="!param.Summary.IsEmpty"><comment content="param.Summary" /></p>
- </for>
- </div>
+ <h5>Returns</h5>
+ <dl>
+ <dt>
+ <code>${Format(method.ReturnType)}</code>
+ </dt>
+ <dd>
+ <comment content="method.Returns" />
+ </dd>
+ </dl>
+ </div>
- <div class="return" if="!method.Returns.IsEmpty">
- <h5>Return</h5>
- <h6><code>${Format(method.ReturnType)}</code></h6>
- <p><comment content="method.Returns" /></p>
- </div>
-
- <value content="method.Value" />
- <example content="method.Example" />
- </div>
+ <value content="method.Value" />
+ <example content="method.Example" />
+ </div>
</div>
</if>
@@ -1,4 +1,4 @@
-<div id="namespaces">
+<nav id="namespaces">
<h2 class="fixed">Namespaces</h2>
<div class="scroll">
<ul>
@@ -11,4 +11,4 @@
</li>
</ul>
</div>
-</div>
+</nav>
@@ -1,19 +1,27 @@
<if condition="properties.Count() > 0">
- <h3 class="section">${title}</h3>
+ <h3 class="section">${title}</h3>
- <div id="${property.Name}" class="method" each="var property in properties">
- <h4>${Format(property.ReturnType)} <strong>${h(property.Name)}</strong> <if condition="property.HasGet">get;</if> <if condition="property.HasSet">set;</if></h4>
- <div class="content">
- <comment content="property.Summary" />
- <remarks content="property.Remarks" />
-
- <div class="return" if="property.ReturnType.HasDocumentation">
- <h5>Property type</h5>
- <h6><code>${Format(property.ReturnType)}</code></h6>
- <p><comment content="property.ReturnType.Summary" /></p>
- </div>
- <value content="property.Value" />
- <example content="property.Example" />
- </div>
- </div>
+ <div id="${property.Name}" class="method" each="var property in properties">
+ <h4>
+ ${Format(property.ReturnType)} <strong>${h(property.Name)}</strong> <if condition="property.HasGet">get;</if> <if condition="property.HasSet">set;</if>
+ </h4>
+ <div class="content">
+ <comment content="property.Summary" />
+ <remarks content="property.Remarks" />
+
+ <div class="return" if="property.ReturnType.HasDocumentation">
+ <h5>Property type</h5>
+ <dl>
+ <dt>
+ <code>${Format(property.ReturnType)}</code>
+ </dt>
+ <dd>
+ <comment content="property.ReturnType.Summary" />
+ </dd>
+ </dl>
+ </div>
+ <value content="property.Value" />
+ <example content="property.Example" />
+ </div>
+ </div>
</if>
@@ -1,4 +1,4 @@
-<div id="types">
+<nav id="types">
<h2 class="fixed">Types in ${Namespace.PrettyName}</h2>
<div class="scroll">
<ul>
@@ -11,4 +11,4 @@
</li>
</ul>
</div>
-</div>
+</nav>
@@ -1,4 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>${Namespace.Name} - ${WriteProductName(Assemblies[0])} Documentation</title>
@@ -9,11 +9,15 @@
<script type="text/javascript" src="../js/navigation.js"></script>
</head>
<body>
+ <header><h1>${WriteProductName(Assemblies[0])} : API Documentation</h1>
+ </header>
<namespaces />
<types />
- <div class="header">
+ <article>
+ <header>
<p class="class"><strong>Namespace</strong> ${Namespace.Name}</p>
- </div>
+ </header>
+ <section>
<div class="sub-header">
<if condition="Namespace.HasClasses">
<h3 class="section">Classes</h3>
@@ -34,7 +38,8 @@
</if>
<p if="!Namespace.HasTypes">This namespace is empty.</p>
</div>
-
- <use file="../_footer" />
+ </section>
+ </article>
+ <use file="../_common_footer" />
</body>
</html>
@@ -0,0 +1,6 @@
+<footer>
+ <span id="version">Built from v${WriteVersion(Assemblies[0])} of ${WriteAssemblyTitle(Assemblies[0])}</span>
+ <span id="docu-link">
+ Generated by <a href="http://docu.jagregory.com">docu</a>
+ </span>
+</footer>
@@ -1,4 +0,0 @@
-<div id="footer">
- <p>Based on v${WriteVersion(Assemblies[0])} of ${WriteAssemblyTitle(Assemblies[0])}</p>
- <p>Generated by <a href="http://docu.jagregory.com">docu</a></p>
-</div>
@@ -1,8 +1,8 @@
-<div id="namespaces">
+<nav id="namespaces">
<h2 class="fixed">Namespaces</h2>
<div class="scroll">
<ul>
<li each="var ns in Namespaces">${Format(ns)}</li>
</ul>
</div>
-</div>
+</nav>
@@ -1,4 +1,4 @@
-<div id="types">
+<nav id="types">
<h2 class="fixed">All Types</h2>
<div class="scroll">
<ul>
@@ -7,4 +7,4 @@
</for>
</ul>
</div>
-</div>
+</nav>
@@ -1,17 +1,20 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
- <title>${WriteProductName(Assemblies[0])} Documentation</title>
+ <title>${WriteProductName(Assemblies[0])} API Documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link type="text/css" rel="stylesheet" href="main.css" />
</head>
<body>
+ <header><h1>${WriteProductName(Assemblies[0])} : API Documentation</h1>
+ </header>
<namespaces />
<types />
- <div class="header">
+ <article>
+ <header>
<p class="class">${WriteProductName(Assemblies[0])} Documentation</p>
- </div>
-
- <use file="_footer" />
+ </header>
+ </article>
+ <use file="_common_footer" />
</body>
</html>
Oops, something went wrong.

0 comments on commit 68e5bd4

Please sign in to comment.