diff --git a/README.md b/README.md
index 6f40989..cb63fd0 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,10 @@
| [source code on GitHub](https://github.com/jaandrle/deka-dom-el)
| [*mirrored* on Gitea](https://gitea.jaandrle.cz/jaandrle/deka-dom-el)
+
+
+
+
# Deka DOM Elements
***Vanilla for flavouring — a full-fledged feast for large projects***
diff --git a/bs/docs.js b/bs/docs.js
index 27b2822..4e6c46d 100755
--- a/bs/docs.js
+++ b/bs/docs.js
@@ -14,6 +14,10 @@ if(s.test("-d", path_target.root)){
echo("Creating directory…");
s.mkdir("-p", path_target.root);
}
+
+// Create assets directory in target
+echo("Creating assets directory…");
+s.mkdir("-p", path_target.root+"assets");
echo("Collecting list of pages…");
const pages= s.ls($.xdg.main`../docs/*.html.js`).map(addPage);
for(const { id, info } of pages){
@@ -33,6 +37,13 @@ for(const { id, info } of pages){
s.echo(serverDOM.serialize()).to(path_target.root+id+".html");
}
s.echo(styles.content).to(path_target.css+styles.name);
+
+// Copy assets
+echo("Copying assets…");
+if(s.test("-d", "docs/assets")) {
+ s.cp("-r", "docs/assets/*", path_target.assets);
+}
+
dispatchEvent("onssrend");
echo("Done");
diff --git a/docs/assets/favicon.svg b/docs/assets/favicon.svg
new file mode 100644
index 0000000..e52cd62
--- /dev/null
+++ b/docs/assets/favicon.svg
@@ -0,0 +1,28 @@
+
+
\ No newline at end of file
diff --git a/docs/assets/logo.svg b/docs/assets/logo.svg
new file mode 100644
index 0000000..690e248
--- /dev/null
+++ b/docs/assets/logo.svg
@@ -0,0 +1,33 @@
+
+
\ No newline at end of file
diff --git a/docs/layout/head.html.js b/docs/layout/head.html.js
index 96627f1..3eb4969 100644
--- a/docs/layout/head.html.js
+++ b/docs/layout/head.html.js
@@ -49,22 +49,11 @@ ${host} p {
margin: 0;
}
-${host} .github-link {
+${host_nav} .github-link {
display: flex;
align-items: center;
gap: 0.5rem;
- color: white;
- font-size: 0.875rem;
- padding: 0.375rem 0.75rem;
- border-radius: var(--border-radius);
- background-color: hsla(0, 0%, 0%, 0.2);
- text-decoration: none;
- transition: background-color 0.2s;
-}
-
-${host} .github-link:hover {
- background-color: hsla(0, 0%, 0%, 0.3);
- text-decoration: none;
+ font-size: 0.9rem;
}
/* Navigation */
@@ -107,13 +96,6 @@ ${host_nav} a .nav-number {
color: rgb(from currentColor r g b / .75);
}
-${host_nav} a:first-child {
- display: flex;
- align-items: center;
- font-weight: 600;
- margin-bottom: 0.5rem;
-}
-
/* Mobile navigation */
@media (max-width: 767px) {
${host_nav} {
@@ -163,15 +145,13 @@ export function header({ info: { href, title, description }, pkg }){
// Header section with accessibility support
el("header", { role: "banner", className: header.name }).append(
el("div", { className: "header-title" }).append(
- el("a", {
- href: pkg.homepage,
- className: "github-link",
- "aria-label": "View on GitHub",
- target: "_blank",
- rel: "noopener noreferrer"
- }).append(
- el(iconGitHub),
- ),
+ el("img", {
+ src: "assets/logo.svg",
+ alt: "DDE Logo",
+ width: "32",
+ height: "32",
+ style: "margin-right: 0.5rem;"
+ }),
el("h1").append(
el("a", { href: pages[0].href, textContent: pkg.name, title: "Go to documentation homepage" }),
),
@@ -185,15 +165,25 @@ export function header({ info: { href, title, description }, pkg }){
),
// Navigation between pages
- nav({ href })
+ nav({ href, pkg })
);
}
-function nav({ href }){
+function nav({ href, pkg }){
return el("nav", {
role: "navigation",
"aria-label": "Main navigation",
className: nav.name
}).append(
+ el("a", {
+ href: pkg.homepage,
+ className: "github-link",
+ "aria-label": "View on GitHub",
+ target: "_blank",
+ rel: "noopener noreferrer",
+ }).append(
+ el(iconGitHub),
+ "GitHub"
+ ),
...pages.map((p, i) => {
const isIndex = p.href === "index";
const isCurrent = p.href === href;
@@ -211,7 +201,7 @@ function nav({ href }){
}),
p.title
);
- })
+ }),
);
}
function head({ title, description, pkg }){
@@ -219,6 +209,7 @@ function head({ title, description, pkg }){
el("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }),
el("meta", { name: "description", content: description }),
el("meta", { name: "theme-color", content: "#b71c1c" }),
+ el("link", { rel: "icon", href: "assets/favicon.svg", type: "image/svg+xml" }),
el("title", title),
el(metaAuthor),
el(metaTwitter, pkg),
@@ -239,7 +230,7 @@ function metaTwitter({ name, description, homepage }){
el("meta", { name: "twitter:url", content: homepage }),
el("meta", { name: "twitter:title", content: name }),
el("meta", { name: "twitter:description", content: description }),
- //el("meta", { name: "twitter:image", content: "" }),
+ el("meta", { name: "twitter:image", content: homepage + "/assets/logo.svg" }),
el("meta", { name: "twitter:creator", content: "@jaandrle" }),
);
}
@@ -248,7 +239,7 @@ function metaFacebook({ name, description, homepage }){
el("meta", { name: "og:url", content: homepage }),
el("meta", { name: "og:title", content: name }),
el("meta", { name: "og:description", content: description }),
- //el("meta", { name: "og:image", content: "" }),
+ el("meta", { name: "og:image", content: homepage + "/assets/logo.svg" }),
el("meta", { name: "og:creator", content: "@jaandrle" }),
);
}
diff --git a/docs/ssr.js b/docs/ssr.js
index 12afb0a..a7349bb 100644
--- a/docs/ssr.js
+++ b/docs/ssr.js
@@ -1,7 +1,8 @@
export { t } from "./utils/index.js";
export const path_target= {
root: "dist/docs/",
- css: "dist/docs/"
+ css: "dist/docs/",
+ assets: "dist/docs/assets/"
};
/**
* This variable will be filled with the list of pages during the build process (see `bs/docs.js`).
diff --git a/nohup.out b/nohup.out
new file mode 100644
index 0000000..bb4f927
--- /dev/null
+++ b/nohup.out
@@ -0,0 +1,26 @@
+ Markserv boot: starting Markserv...
+(node:170089) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/jaandrle/.npm/_npx/13a70f167aa91a98/node_modules/implant/package.json' of 'implant'. Please either fix that or report it to the module author
+(Use `node --trace-deprecation ...` to show where the warning was created)
+(node:170089) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/jaandrle/.npm/_npx/13a70f167aa91a98/node_modules/balanced-pairs/package.json' of 'balanced-pairs'. Please either fix that or report it to the module author
+(node:170089) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/jaandrle/.npm/_npx/13a70f167aa91a98/node_modules/super-split/package.json' of 'super-split'. Please either fix that or report it to the module author
+ Markserv address: http://localhost:8642
+ Markserv path: /home/jaandrle/Vzdálené/GitHub/deka-dom-el
+ Markserv livereload: communicating on port: 35729
+ Markserv process: your pid is: 170089
+ Markserv stop: press [Ctrl + C] or type "sudo kill -9 170089"
+ GitHub Contribute on Github - github.com/markserv
+ Markserv upgrade: checking for upgrade...
+ Markserv upgrade: no upgrade available
+ Markserv dir: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/
+ Markserv markdown: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/README.md
+ Markserv file: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/docs/assets/logo.svg
+ Markserv markdown: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/README.md
+ Markserv file: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/docs/assets/logo.svg
+ Markserv markdown: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/README.md
+ Markserv file: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/docs/assets/logo.svg
+ Markserv markdown: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/README.md
+ Markserv file: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/docs/assets/logo.svg
+ Markserv markdown: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/README.md
+ Markserv file: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/docs/assets/logo.svg
+ Markserv markdown: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/README.md
+ Markserv file: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/docs/assets/logo.svg