aboutsummaryrefslogtreecommitdiffhomepage
path: root/nuldoc-src/templates/post_list.ts
diff options
context:
space:
mode:
Diffstat (limited to 'nuldoc-src/templates/post_list.ts')
-rw-r--r--nuldoc-src/templates/post_list.ts21
1 files changed, 7 insertions, 14 deletions
diff --git a/nuldoc-src/templates/post_list.ts b/nuldoc-src/templates/post_list.ts
index cdd2253..f75b8e1 100644
--- a/nuldoc-src/templates/post_list.ts
+++ b/nuldoc-src/templates/post_list.ts
@@ -1,19 +1,12 @@
-import { Element } from "../dom.ts";
import { Document } from "../docbook/document.ts";
import { Config } from "../config.ts";
-import { el, stylesheetLinkElement, text } from "./utils.ts";
-
-function metaElement(attrs: [string, string][]): Element {
- return el("meta", attrs);
-}
-
-function linkElement(rel: string, href: string, type: string | null): Element {
- const attrs: [string, string][] = [["rel", rel], ["href", href]];
- if (type !== null) {
- attrs.push(["type", type]);
- }
- return el("link", attrs);
-}
+import {
+ el,
+ linkElement,
+ metaElement,
+ stylesheetLinkElement,
+ text,
+} from "./utils.ts";
export default async function convertPostList(
posts: Document[],