aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Moon Flower <mforoud86@gmail.com> 2026-02-22 13:11:37 +0330
committerGravatar Moon Flower <mforoud86@gmail.com> 2026-02-22 13:11:37 +0330
commitb13810691e06fbf34e5aa8c297665edb5b950ee9 (patch)
tree920712ff05691e7324bf6909d97214b98fa4f9d9
parentit was cooler without the sort (diff)
frontend changes
-rw-r--r--index.html22
-rw-r--r--styles.css5
2 files changed, 16 insertions, 11 deletions
diff --git a/index.html b/index.html
index f7c8b65..2e5e31b 100644
--- a/index.html
+++ b/index.html
@@ -405,16 +405,18 @@
const deftext = escapeHTML(code)
return `<block${idAttr}>
- <header>
- <div class='header-left'>
- <span>def</span>
- <span class='def-name'>${escapeHTML(name)}</span>
- ${deftext.length === 0 ? `` : `<code>${escapeHTML(code)}</code>`}
- </div>
- ${eng ? `<span class='eng-text'>[${escapeHTML(eng)}]</span>` : ''}
- </header>
- <desc>${descHtml}</desc>
- </block>`
+ ${name.length === 0 ? '' : `
+ <header>
+ <div class='header-left'>
+ <span>def</span>
+ <span class='def-name'>${escapeHTML(name)}</span>
+ ${deftext.length === 0 ? `` : `<code>${escapeHTML(code)}</code>`}
+ </div>
+ ${eng ? `<span class='eng-text'>[${escapeHTML(eng)}]</span>` : ''}
+ </header>
+ `}
+ <desc>${descHtml}</desc>
+ </block>`
}
}
diff --git a/styles.css b/styles.css
index c881666..370f5e4 100644
--- a/styles.css
+++ b/styles.css
@@ -271,9 +271,12 @@ header span.def-name {
font-size: 0.95em;
}
+header + desc {
+ margin-top: 0.5rem;
+}
+
desc {
display: block;
- margin-top: 0.5rem;
font-size: 0.95rem;
color: var(--desc-text);
padding-left: 32px;