From ad95fc72e70c4e718a2033bf09cd9079addc790b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= <hugo@lysator.liu.se>
Date: Mon, 26 Jun 2023 20:33:19 +0200
Subject: [PATCH] Document templates.

---
 templates/base.html         | 14 ++++++++++++++
 templates/code_page.html    |  7 +++++++
 templates/content.html      | 10 ++++++++++
 templates/index.html        |  9 +++++++++
 templates/module_index.html |  8 ++++++++
 templates/tabset.html       | 13 ++++++++++++-
 6 files changed, 60 insertions(+), 1 deletion(-)
 create mode 100644 templates/content.html

diff --git a/templates/base.html b/templates/base.html
index abc40f1..0244a82 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -1,3 +1,17 @@
+{#
+Base full page template, which all other page templates should extend.
+
+Blocks:
+	content:
+		Primary content of page, will be placed within the <body/> tag.
+
+Parameters:
+	path_base:
+		Base path on which the page will be uhoetans
+
+	breadcrumbs:
+		An optional list of breadcrumb items.
+#}
 <!doctype html>
 <html>
 	<head>
diff --git a/templates/code_page.html b/templates/code_page.html
index 2840bfc..80ad037 100644
--- a/templates/code_page.html
+++ b/templates/code_page.html
@@ -1,3 +1,10 @@
+{#
+A page containing puppet code.
+
+Parameters:
+	content:
+		Content of page
+#}
 {% extends "base.html" %}
 {% block content %}
 	<ul>
diff --git a/templates/content.html b/templates/content.html
new file mode 100644
index 0000000..d956087
--- /dev/null
+++ b/templates/content.html
@@ -0,0 +1,10 @@
+{#
+A page containing arbitrary content, nothing is assumed of it.
+
+Parameters:
+	Content:
+		Content of page
+#}
+{% extends "base.html" %}
+{% block content %}{{ content }}{% endblock %}
+{# ft: jinja #}
diff --git a/templates/index.html b/templates/index.html
index f1cd342..5cd4683 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,3 +1,12 @@
+{#
+Root index page for output.
+
+Contains a list of all found modules.
+
+Parameters:
+	modules:
+		List of modules.
+#}
 {% extends "base.html" %}
 {% block content %}
 	<h1>Muppet Strings</h1>
diff --git a/templates/module_index.html b/templates/module_index.html
index 3d0f1a8..f638e8c 100644
--- a/templates/module_index.html
+++ b/templates/module_index.html
@@ -1,3 +1,11 @@
+{#
+Index page for each module.
+
+Parameters:
+	module_name:
+	doc_files:
+	content:
+#}
 {% extends "base.html" %}
 {% block content %}
 <h1>{{ module_name }}</h1>
diff --git a/templates/tabset.html b/templates/tabset.html
index d29f85e..559af0a 100644
--- a/templates/tabset.html
+++ b/templates/tabset.html
@@ -1,4 +1,15 @@
-{# https://www.w3.org/WAI/ARIA/apg/patterns/tabs/examples/tabs-automatic/ #}
+{#
+A single tabset.
+
+A tabstep is a list of tabs, where one of them are being shown at a time.
+
+Parameters:
+	tabset:
+		id:
+		tabs:
+
+https://www.w3.org/WAI/ARIA/apg/patterns/tabs/examples/tabs-automatic/
+#}
 <div class="tabs" data-tabset="{{ tabset.id }}">
 	<menu class="yesscript"
 		  role="tablist" >
-- 
GitLab