diff --git a/assets/css/highlight.css b/assets/css/highlight.css
index b80583a..2859b7b 100644
--- a/assets/css/highlight.css
+++ b/assets/css/highlight.css
@@ -6,22 +6,25 @@
--light-red: #e06c75;
--dark-red: #be5046;
--comment-gray: #5c6370;
- --green-light: #c678dd;
+ --dark-green: #3c2330;
+ --fucsia-light: #c678dd;
--comment-color: var(--comment-gray);
--string-color: var(--text-color);
--variable-color: var(--light-yellow);
--field-color: var(--light-yellow);
--keyword-function-color: var(--text-color-accent);
- --keyword-color: var(--green-light);
+ --keyword-color: var(--fucsia-light);
--keyword-modifier-color: var(--light-red);
--punctuation-bracket-color: var(--cyan);
--type-color: var(--light-red);
--variable-parameter-color: var(--blue);
--function-call-color: var(--blue);
- ---builtin-color: var(--green-light);
+ ---builtin-color: var(--fucsi-light);
--operator-color: var(--light-red);
--qualifier-color: var(--light-red);
--attribute-color: var(--light-red);
+ --line-number-color: var(--dark-green);
+ --line-number-hover-color: var(--dark-yellow);
}
code .comment {
@@ -79,3 +82,32 @@ code.zig .qualifier {
code.zig .attribute {
color: var(--attribute-color);
}
+
+.line-numbers-js {
+ /* Initialize CSS counter for each specific pre block */
+ counter-reset: line;
+}
+
+.line-numbers-js span.ln {
+ display: block;
+ line-height: 0;
+}
+
+.line-numbers-js span.ln:hover::before {
+ color: var(--line-number-hover-color);
+}
+
+.line-numbers-js span.ln::before {
+ /* Increment the 'line' counter for every span encountered */
+ counter-increment: line;
+ content: counter(line);
+ position: absolute;
+ right: 30px;
+ width: 20px;
+ text-align: right;
+ color: var(--line-number-color);
+
+ /* Prevent copying line number when selecting */
+ -webkit-user-select: none;
+ user-select: none;
+}
\ No newline at end of file
diff --git a/content/docs/architecture/command.smd b/content/docs/architecture/command.smd
index b30135a..4200f68 100644
--- a/content/docs/architecture/command.smd
+++ b/content/docs/architecture/command.smd
@@ -113,12 +113,13 @@ pub const goto_line_meta: Meta = .{ .arguments = &.{.integer} };
and to actually receiving the integer parameter, `goto_line` will
extract from the context like this:
-```zig
-pub fn goto_line(self: *Self, ctx: Context) Result {
- var line: usize = 0;
- if (!try ctx.args.match(.{tp.extract(&line)}))
- return error.InvalidGotoLineArgument;
-```
+>[]($block.attrs('line-numbers-js'))
+>```zig
+>pub fn goto_line(self: *Self, ctx: Context) Result {
+> var line: usize = 0;
+> if (!try ctx.args.match(.{tp.extract(&line)}))
+> return error.InvalidGotoLineArgument;
+>```
To send a parameter to a command, make sure that the type is exactly
the same when retrieving it. We will refer as encode and decode when
@@ -178,4 +179,4 @@ buffer and editor.
* [Add tests](/docs/testing) to harden your code
* [Sending parameters across](/docs/architecture/inner_data_exchange)
-* [Back to architecture](/docs/architecture)
\ No newline at end of file
+* [Back to architecture](/docs/architecture)
diff --git a/layouts/templates/base.shtml b/layouts/templates/base.shtml
index f07632f..bdb7265 100644
--- a/layouts/templates/base.shtml
+++ b/layouts/templates/base.shtml
@@ -23,6 +23,8 @@
community
+
+