aboutsummaryrefslogtreecommitdiff
path: root/src/guff/views/ecrs
diff options
context:
space:
mode:
Diffstat (limited to 'src/guff/views/ecrs')
-rw-r--r--src/guff/views/ecrs/api-docs.ecr73
-rw-r--r--src/guff/views/ecrs/page.ecr14
2 files changed, 87 insertions, 0 deletions
diff --git a/src/guff/views/ecrs/api-docs.ecr b/src/guff/views/ecrs/api-docs.ecr
new file mode 100644
index 0000000..bda25f5
--- /dev/null
+++ b/src/guff/views/ecrs/api-docs.ecr
@@ -0,0 +1,73 @@
+<h1><%= h(TITLE) %></h1>
+
+<div id='toc' class='section'>
+ <h2>Table of Contents</h2>
+
+ <ul><%
+ namespaces.each do |namespace|
+ %>
+ <li class='namespace'>
+ <a
+ href='#n-<%= namespace %>'
+ title='View <%= namespace %> details.'
+ >
+ <%= namespace %>
+ </a>
+
+ <ul class='methods'><%
+ methods(namespace).each do |method|
+ %>
+ <li class='method'>
+ <a
+ href='#m-<%= namespace %>-<%= method %>'
+ title='View <%= namespace %>/<%= method %> details.'
+ >
+ <%= method %>
+ </a>
+ </li><!-- method -->
+ <% end %></ul><!-- methods -->
+ </li><!-- namespace -->
+ <% end %></ul>
+</div><!-- toc -->
+
+<% namespaces.each do |namespace| %>
+ <div
+ id='n-<%= namespace %>'
+ class='namespace section'
+ >
+ <h2 class='namespace title'>
+ <%= namespace %> methods
+ </h2><!-- namespace title -->
+
+ <% methods(namespace).each do |method| %>
+ <div
+ id='m-<%= namespace %>-<%= method %>'
+ class='method section'
+ >
+ <h3 class='method title'>
+ <%= namespace %>/<%= method %>
+ </h3><!-- method title -->
+
+ <h4>Description</h4>
+ <p class='method text'>
+ <%= h(method_text(namespace, method)) %>
+ </p><!-- method text -->
+
+ <h4>Parameters</h4>
+ <ul class='args'><%
+ method_args(namespace, method).each do |arg|
+ %>
+ <li class='arg'>
+ <span class='arg name'><%=
+ arg
+ %></span><!-- arg name -->
+
+ <span class='arg text'><%=
+ h(arg_text(namespace, method, arg))
+ %></span><!-- arg text -->
+ </li><!-- arg -->
+ <% end %></ul><!-- args -->
+ </div><!-- method section -->
+ <% end %>
+ </div><!-- namespace section -->
+<% end %>
diff --git a/src/guff/views/ecrs/page.ecr b/src/guff/views/ecrs/page.ecr
new file mode 100644
index 0000000..e009ac1
--- /dev/null
+++ b/src/guff/views/ecrs/page.ecr
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html lang='<%= h(@lang) %>'>
+ <head>
+ <meta charset="<%= h(@charset) %>"/>
+ <title><%= h(@title) %></title>
+ <%= page_headers %>
+ </head>
+
+ <body <%= body_attrs %>><%=
+ @body
+ %></body>
+
+ <%= page_footers %>
+</html>