the terminal is no longer just styling but an actual tiny terminal emulator lol
This commit is contained in:
1 parent
7451fe33b7
commit
4f18ef5844
8 files changed
+584
-116
No files matched your search
@@ -0,0 +1,112 @@
|
||||
<div class="terminal-container" #terminalContainer xmlns="http://www.w3.org/1999/html">
|
||||
<div class="terminal-output" #terminalOutput>
|
||||
@for (line of history; track $index; let isLast = $last) {
|
||||
@if (line.type === 'command') {
|
||||
<code>
|
||||
<h2>
|
||||
{{ line.text }}
|
||||
@if (booting && isLast) {
|
||||
<span class="cursorblink">█</span>
|
||||
}
|
||||
</h2>
|
||||
</code>
|
||||
} @else if (line.type === 'template') {
|
||||
<code>
|
||||
<ng-container [ngTemplateOutlet]="line.template"></ng-container>
|
||||
</code>
|
||||
} @else if (line.type === 'entries') {
|
||||
<div class="ls-output fade-in">
|
||||
@for (entry of line.entries; track entry.name) {
|
||||
<code>
|
||||
<span class="ls-entry" [class]="'ls-' + entry.type">
|
||||
{{ entry.name }}
|
||||
</span>
|
||||
</code>
|
||||
}
|
||||
</div>
|
||||
} @else if (line.type === 'error') {
|
||||
<code>
|
||||
<p class="terminal-error fade-in">{{ line.text }}</p>
|
||||
</code>
|
||||
} @else {
|
||||
<code>
|
||||
<p class="fade-in">{{ line.text }}</p>
|
||||
</code>
|
||||
}
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
@if (!booting) {
|
||||
<code>
|
||||
<h2 class="terminal-input-line" (click)="focusInput()">
|
||||
<span class="prompt">$ </span>
|
||||
|
||||
<span class="input-shell">
|
||||
<span class="input-mirror">
|
||||
{{ command }}
|
||||
@if (!command) {
|
||||
<span class="input-placeholder"> </span>
|
||||
}
|
||||
<span class="cursorblink">█</span>
|
||||
</span>
|
||||
<input
|
||||
#terminalInput
|
||||
type="text"
|
||||
[(ngModel)]="command"
|
||||
(keydown.enter)="runCommand()"
|
||||
class="terminal-field"
|
||||
autocomplete="off"
|
||||
spellcheck="false"
|
||||
/>
|
||||
</span>
|
||||
</h2>
|
||||
</code>
|
||||
}
|
||||
</div>
|
||||
<ng-template #aboutTemplate>
|
||||
<p class="fade-in" [innerHTML]="'ABOUT' | translate"></p>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #catTemplate>
|
||||
<img alt="cat" class="fade-in" src="https://files.itz.sh/itzmineydev/lilguy.jpg">
|
||||
</ng-template>
|
||||
|
||||
<ng-template #toolsTemplate>
|
||||
<div class="tech-stack fade-in">
|
||||
<div class="category">
|
||||
<h4>Runtimes</h4>
|
||||
<ul>
|
||||
<a href="https://nginx.org/en/" target="_blank"><li>NGiNX</li></a>
|
||||
<a href="https://nodejs.org/" target="_blank"><li>Node.js</li></a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="category">
|
||||
<h4>{{ 'TECHSTACK_LANGS' | translate }}</h4>
|
||||
<ul>
|
||||
<a href="https://www.typescriptlang.org/" target="_blank"><li>TypeScript</li></a>
|
||||
<a href="https://go.dev/" target="_blank"><li>Go</li></a>
|
||||
<a href="https://html.spec.whatwg.org/" target="_blank"><li>CSS & HTML</li></a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="category">
|
||||
<h4>Frameworks</h4>
|
||||
<ul>
|
||||
<a href="https://angular.dev/" target="_blank"><li>Angular</li></a>
|
||||
<a href="https://express.com/" target="_blank"><li>Express</li></a>
|
||||
<a href="https://flask.palletsprojects.com/en/stable/" target="_blank"><li>Flask</li></a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="category">
|
||||
<h4>{{ 'TECHSTACK_DBS' | translate }}</h4>
|
||||
<ul>
|
||||
<a href="https://www.mysql.com/" target="_blank"><li>MySQL</li></a>
|
||||
<a href="https://mariadb.org/" target="_blank"><li>MariaDB</li></a>
|
||||
<a href="https://www.postgresql.org/" target="_blank"><li>PostgreSQL</li></a>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
Reference in new issue
Block a user