Skip to content

Commit b40cb34

Browse files
committed
Updated package and docs
1 parent 34efe89 commit b40cb34

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1181
-964
lines changed

docs/index.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/main.680109a70c1b29c9.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/main.a0c54774b2d69c1a.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

projects/css-fusion/src/lib/css-fusion.module.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { DropdownDirective } from './directives/dropdown.directive';
55
import { NavDirective } from './directives/nav.directive';
66
import { TableDirective } from './directives/table.directive';
77
import { TabsDirective } from './directives/tab.directive';
8+
import { TypewriterDirective } from './directives/typewriter.directive';
89

910
@NgModule({
1011
declarations: [
@@ -14,6 +15,7 @@ import { TabsDirective } from './directives/tab.directive';
1415
NavDirective,
1516
TableDirective,
1617
TabsDirective,
18+
TypewriterDirective,
1719
],
1820
imports: [],
1921
exports: [
@@ -23,6 +25,7 @@ import { TabsDirective } from './directives/tab.directive';
2325
NavDirective,
2426
TableDirective,
2527
TabsDirective,
28+
TypewriterDirective,
2629
],
2730
})
2831
export class CssFusionModule {}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { TypewriterDirective } from './typewriter.directive';
2+
3+
describe('TypewriterDirective', () => {
4+
it('should create an instance', () => {
5+
const directive = new TypewriterDirective();
6+
expect(directive).toBeTruthy();
7+
});
8+
});
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { Directive, ElementRef, AfterViewInit } from '@angular/core';
2+
3+
@Directive({
4+
selector: '[libTypewriter]',
5+
})
6+
export class TypewriterDirective implements AfterViewInit {
7+
private fullText: string = '';
8+
private index: number = 0;
9+
private caretElement!: HTMLElement;
10+
11+
constructor(private elRef: ElementRef<HTMLElement>) {}
12+
13+
ngAfterViewInit(): void {
14+
const el = this.elRef.nativeElement;
15+
16+
// Find and store caret
17+
this.caretElement = el.querySelector('.caret') as HTMLElement;
18+
19+
// Extract full text excluding caret
20+
this.fullText = el.textContent?.replace(/\s+/g, ' ').trim() ?? '';
21+
22+
// Clear all content
23+
el.innerHTML = '';
24+
25+
// Add back caret
26+
if (this.caretElement) {
27+
el.appendChild(this.caretElement);
28+
}
29+
30+
this.typeWriter();
31+
}
32+
33+
private typeWriter(): void {
34+
const el = this.elRef.nativeElement;
35+
36+
if (this.index < this.fullText.length) {
37+
const textNode = document.createTextNode(
38+
this.fullText.charAt(this.index)
39+
);
40+
el.insertBefore(textNode, this.caretElement);
41+
this.index++;
42+
setTimeout(() => this.typeWriter(), 150);
43+
}
44+
}
45+
}

projects/css-fusion/src/lib/scss/_menubar.scss

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
.menubar-box {
2-
background-color: rgb(25, 27, 31);
3-
border-bottom: 0.1rem solid rgb(60, 61, 65);
2+
background-color: var(--menubar-bg);
3+
border-bottom: 1.6px solid var(--menubar-bdr);
44
width: 100%;
5-
height: 68px;
5+
height: var(--menubar-height);
66
display: grid;
77
grid-template-columns: var(--menubar-set01-size) 1fr var(--menubar-set03-size);
8-
padding: 0 16px;
8+
padding: 0 28px;
9+
border-radius: var(--menubar-curv);
910

1011
.menubar-set-01 {
1112
display: flex;
1213
align-items: center;
1314
justify-content: flex-start;
1415
gap: 10px;
1516

16-
.logo {
17-
width: 32px;
17+
.menubar-logo {
18+
width: var(--menubar-logo-size);
1819
display: block;
1920
}
2021

21-
p {
22-
color: #ffffff;
22+
.menubar-logo-name {
23+
color: var(--menubar-logo-name);
2324
}
2425
}
2526

@@ -28,7 +29,7 @@
2829

2930
.menubar-link {
3031
font-family: var(--me-font-content);
31-
color: rgb(124, 124, 124) !important;
32+
color: var(--menubar-link) !important;
3233
font-weight: 500;
3334
padding: 6px 10px;
3435
border-radius: 0.4rem;
@@ -39,8 +40,8 @@
3940
}
4041

4142
.active-link {
42-
background-color: rgba(77, 77, 77, 0.498) !important;
43-
color: #ffffff !important;
43+
background-color: var(--menubar-active-bg) !important;
44+
color: var(--menubar-active-text) !important;
4445
}
4546

4647
.menubar-link-center {
@@ -52,7 +53,7 @@
5253
}
5354

5455
.menubar-link-left {
55-
border-left: 2px solid #555555;
56+
border-left: 2px solid var(--menubar-links-bdr);
5657
height: fit-content;
5758
display: flex;
5859
align-items: center;
@@ -62,7 +63,7 @@
6263
}
6364

6465
.menubar-link-right {
65-
border-right: 2px solid #555555;
66+
border-right: 2px solid var(--menubar-links-bdr);
6667
height: fit-content;
6768
display: flex;
6869
align-items: center;
@@ -81,15 +82,16 @@
8182
}
8283

8384
.menubar-resizable {
84-
background-color: rgb(25, 27, 31);
85-
border-bottom: 0.1rem solid rgb(60, 61, 65);
85+
background-color: var(--menubar-bg);
86+
border-bottom: 0.1rem solid var(--menubar-bdr);
8687
width: 100%;
87-
height: 68px;
88+
height: var(--menubar-height);
8889
display: flex;
8990
flex-direction: row;
9091
align-items: center;
9192
justify-content: space-between;
92-
padding: 0 16px;
93+
padding: 0 28px;
94+
border-radius: var(--menubar-curv);
9395

9496
.menubar-set-01 {
9597
display: flex;
@@ -98,12 +100,12 @@
98100
gap: 10px;
99101

100102
.menubar-logo {
101-
width: 32px;
103+
width: var(--menubar-logo-size);
102104
display: block;
103105
}
104106

105-
p {
106-
color: #ffffff;
107+
.menubar-logo-name {
108+
color: var(--menubar-logo-name);
107109
}
108110
}
109111

@@ -113,9 +115,9 @@
113115
justify-content: flex-end;
114116
gap: 1rem;
115117

116-
.btn-icon {
118+
.menubar-icons {
117119
font-size: 28px;
118-
color: #fff;
120+
color: var(--menubar-icons);
119121
}
120122

121123
.menubar-profile-box {
@@ -128,16 +130,16 @@
128130
display: flex;
129131
flex-direction: column;
130132
justify-content: flex-start;
131-
133+
132134
.profile-name {
133135
font-size: 12px;
134136
line-height: 14px;
135137
font-weight: 500;
136-
color: #fff;
138+
color: var(--menubar-profile-title);
137139
}
138140

139141
.profile-role {
140-
color: #b9b9b9;
142+
color: var(--menubar-profile-content);
141143
}
142144
}
143145
}
@@ -146,8 +148,12 @@
146148

147149
#menubar-thumb {
148150
font-size: 2.6rem;
149-
color: #fff;
151+
color: var(--menubar-thumb);
150152
display: flex;
151153
align-items: center;
152154
justify-content: center;
153155
}
156+
157+
.menubar-lined {
158+
border: 1.6px solid var(--menubar-bdr) !important;
159+
}

0 commit comments

Comments
 (0)