Commit 3e18af61f2692d08523d5432ac9feb87acf0ffec

Thomas de Grivel 2024-09-06T13:48:07

fix nav, httpd: layout

diff --git a/.gitignore b/.gitignore
index b459bfc..7a0da29 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,6 +55,7 @@ macos/kc3-v*
 /misc/http_request
 /misc/http_response
 /misc/limits
+node_modules/
 *.o
 release/
 .test
diff --git a/test/httpd/app/controllers/doc_controller.kc3 b/test/httpd/app/controllers/doc_controller.kc3
index 97ace6e..e17214f 100644
--- a/test/httpd/app/controllers/doc_controller.kc3
+++ b/test/httpd/app/controllers/doc_controller.kc3
@@ -7,8 +7,8 @@ defmodule DocController do
         md = File.read(path_md)
         md_html = Markdown.to_html_str(md)
         title = "kc3-lang.org"
-        EKC3.render_file("app/templates/layout.html.ekc3")
-        %HTTP.Response{body: md_html}
+        body = EKC3.render_file("app/templates/layout.html.ekc3")
+        %HTTP.Response{body: body}
       else
         HTTPd.error_404_page(request)
       end
diff --git a/test/httpd/app/templates/nav.html.ekc3 b/test/httpd/app/templates/nav.html.ekc3
index 7cb3598..050687e 100644
--- a/test/httpd/app/templates/nav.html.ekc3
+++ b/test/httpd/app/templates/nav.html.ekc3
@@ -2,7 +2,7 @@
   <div class="container">
     <a class="navbar-brand" href="/">
       <div class="doc-logo">
-        <span><b>⬢</b></span> kc3-lang
+        <span><b>&#11042;</b></span> kc3-lang
       </div>
     </a>
     <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
diff --git a/test/httpd/assets/package-lock.json b/test/httpd/assets/package-lock.json
new file mode 100644
index 0000000..abeef5f
--- /dev/null
+++ b/test/httpd/assets/package-lock.json
@@ -0,0 +1,42 @@
+{
+  "name": "assets",
+  "lockfileVersion": 3,
+  "requires": true,
+  "packages": {
+    "": {
+      "dependencies": {
+        "bootstrap": "^5.3.3"
+      }
+    },
+    "node_modules/@popperjs/core": {
+      "version": "2.11.8",
+      "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
+      "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==",
+      "license": "MIT",
+      "peer": true,
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/popperjs"
+      }
+    },
+    "node_modules/bootstrap": {
+      "version": "5.3.3",
+      "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz",
+      "integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/twbs"
+        },
+        {
+          "type": "opencollective",
+          "url": "https://opencollective.com/bootstrap"
+        }
+      ],
+      "license": "MIT",
+      "peerDependencies": {
+        "@popperjs/core": "^2.11.8"
+      }
+    }
+  }
+}
diff --git a/test/httpd/assets/package.json b/test/httpd/assets/package.json
new file mode 100644
index 0000000..f6dfea9
--- /dev/null
+++ b/test/httpd/assets/package.json
@@ -0,0 +1,5 @@
+{
+  "dependencies": {
+    "bootstrap": "^5.3.3"
+  }
+}