Add landing pages library with comprehensive components and demos

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
skyai_dev
2025-09-06 13:52:41 +10:00
parent 5346d6d0c9
commit 246c62fd49
113 changed files with 13015 additions and 165 deletions

View File

@@ -31,11 +31,11 @@ export type CodeBlockVariant = 'default' | 'minimal' | 'bordered';
@if (showLineNumbers && lineCount() > 1) {
<div class="code-block__line-numbers" [attr.aria-hidden]="true">
@for (lineNum of lineNumbers(); track lineNum) {
<span
<div
class="code-block__line-number"
[class.code-block__line-number--highlighted]="isLineHighlighted(lineNum)">
{{ lineNum }}
</span>
</div>
}
</div>
}
@@ -95,7 +95,14 @@ export class CodeBlockComponent implements OnInit, OnChanges {
}
readonly lineCount = computed(() => {
return this.code ? this.code.split('\n').length : 0;
if (!this.code) return 0;
const lines = this.code.split('\n');
// Remove the last empty line if the code ends with a newline
if (lines.length > 1 && lines[lines.length - 1] === '') {
return lines.length - 1;
}
return lines.length;
});
readonly lineNumbers = computed(() => {