From 23a419289ddac04d4fc59c8056d0677f3a7f17ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Sat, 19 Dec 2020 19:58:43 -0800 Subject: [PATCH] add basic html translation example --- examples/website.kdl | 47 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 examples/website.kdl diff --git a/examples/website.kdl b/examples/website.kdl new file mode 100644 index 0000000..6968ec4 --- /dev/null +++ b/examples/website.kdl @@ -0,0 +1,47 @@ +doctype "html" +html lang="en" { + head { + meta charset="utf-8" + meta name="viewport" content="width=device-width, initial-scale=1.0" + meta \ + name="description" \ + content="kdl is a document language, mostly based on SDLang, with xml-like semantics that looks like you're invoking a bunch of CLI commands!" + title "kdl - Kat's Document Language" + link rel="stylesheet" href="/styles/global.css" + } + body { + main { + header class="py-10 bg-gray-300" { + h1 class="text-4xl text-center" "kdl - Kat's Document Language" + } + section class="kdl-section" id="description" { + p { + text "kdl is a document language, mostly based on " + a href="https://sdlang.org" "SDLang" + text " with xml-like semantics that looks like you're invoking a bunch of CLI commands" + } + p "It's meant to be used both as a serialization format and a configuration language, and is relatively light on syntax compared to XML." + } + section class="kdl-section" id="design-and-discussion" { + h2 "Design and Discussion" + p { + text "kdl is still extremely new, and discussion about the format should happen over on the " + a href="https://github.com/kdoclang/kdl/discussions" { + text "discussions" + } + text " page in the Github repo. Feel free to jump in and give us your 2 cents!" + } + } + section class="kdl-section" id="design-principles" { + h2 "Design Principles" + ol { + li "Maintainability" + li "Flexibility" + li "Cognitive simplicity and Learnability" + li "Ease of de/serialization" + li "Ease of implementation" + } + } + } + } +}