feat: empty components, functional nav

This commit is contained in:
2025-07-15 12:47:49 -07:00
parent cb0da16c0b
commit 168f9b9ad5
36 changed files with 8819 additions and 7 deletions

0
src/app/about/about.css Normal file
View File

1
src/app/about/about.html Normal file
View File

@ -0,0 +1 @@
<p>about works!</p>

11
src/app/about/about.ts Normal file
View File

@ -0,0 +1,11 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-about',
imports: [],
templateUrl: './about.html',
styleUrl: './about.css'
})
export class About {
}

21
src/app/app.config.ts Normal file
View File

@ -0,0 +1,21 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import {
ApplicationConfig,
provideBrowserGlobalErrorListeners,
provideZoneChangeDetection,
} from "@angular/core";
import { provideRouter } from "@angular/router";
import { routes } from "./app.routes";
export const appConfig: ApplicationConfig = {
providers: [
provideBrowserGlobalErrorListeners(),
provideZoneChangeDetection({ eventCoalescing: true }),
provideRouter(routes),
],
};

9
src/app/app.css Normal file
View File

@ -0,0 +1,9 @@
main {
margin-top: 60px;
}
@media screen and (max-width: 650px) {
main {
margin-top: 120px;
}
}

4
src/app/app.html Normal file
View File

@ -0,0 +1,4 @@
<app-nav></app-nav>
<main>
<router-outlet></router-outlet>
</main>

20
src/app/app.routes.ts Normal file
View File

@ -0,0 +1,20 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import { Routes } from "@angular/router";
import { About } from "./about/about.js";
import { Archive } from "./archive/archive.js";
import { Characters } from "./characters/characters.js";
import { Comic } from "./comic/comic.js";
import { Home } from "./home/home.js";
export const routes: Routes = [
{ component: Home, path: "", pathMatch: "full" },
{ component: Comic, path: "comic" },
{ component: About, path: "about" },
{ component: Archive, path: "archive" },
{ component: Characters, path: "characters" },
];

22
src/app/app.ts Normal file
View File

@ -0,0 +1,22 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import { Component } from "@angular/core";
import { RouterOutlet } from "@angular/router";
import { Nav } from "./nav/nav.js";
/**
* The root component of the application.
*/
@Component({
imports: [ RouterOutlet, Nav ],
selector: "app-root",
styleUrl: "./app.css",
templateUrl: "./app.html",
})
export class App {
protected title = "yurigpt";
}

View File

View File

@ -0,0 +1 @@
<p>archive works!</p>

View File

@ -0,0 +1,11 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-archive',
imports: [],
templateUrl: './archive.html',
styleUrl: './archive.css'
})
export class Archive {
}

View File

View File

@ -0,0 +1 @@
<p>characters works!</p>

View File

@ -0,0 +1,11 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-characters',
imports: [],
templateUrl: './characters.html',
styleUrl: './characters.css'
})
export class Characters {
}

0
src/app/comic/comic.css Normal file
View File

1
src/app/comic/comic.html Normal file
View File

@ -0,0 +1 @@
<p>comic works!</p>

11
src/app/comic/comic.ts Normal file
View File

@ -0,0 +1,11 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-comic',
imports: [],
templateUrl: './comic.html',
styleUrl: './comic.css'
})
export class Comic {
}

0
src/app/home/home.css Normal file
View File

1
src/app/home/home.html Normal file
View File

@ -0,0 +1 @@
<p>home works!</p>

17
src/app/home/home.ts Normal file
View File

@ -0,0 +1,17 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import { Component } from "@angular/core";
@Component({
imports: [],
selector: "app-home",
styleUrl: "./home.css",
templateUrl: "./home.html",
})
export class Home {
}

44
src/app/nav/nav.css Normal file
View File

@ -0,0 +1,44 @@
nav {
width: 100%;
height: 50px;
position: fixed;
background: var(--background);
color: var(--foreground);
top: 0;
}
ul {
display: flex;
justify-content: space-around;
align-items: center;
list-style: none;
margin: 0;
padding: 0;
flex-wrap: nowrap;
}
li {
margin: 0 10px;
}
#highlight {
font-size: 1.2em;
background: var(--foreground);
color: var(--background);
padding: 5px 10px;
border-radius: 5px;
}
@media screen and (max-width: 650px) {
nav {
height: 100px;
}
ul {
flex-wrap: wrap;
}
#highlight {
font-size: 1em;
color: var(--foreground);
background: transparent;
}
}

9
src/app/nav/nav.html Normal file
View File

@ -0,0 +1,9 @@
<nav>
<ul>
<li><a routerLink="/">YuriGPT</a></li>
<li><a routerLink="/about">About</a></li>
<li id="highlight"><a routerLink="/comic">Start Reading</a></li>
<li><a routerLink="/characters">Characters</a></li>
<li><a routerLink="/archive">Archive</a></li>
</ul>
</nav>

18
src/app/nav/nav.ts Normal file
View File

@ -0,0 +1,18 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import { Component } from "@angular/core";
import { RouterModule } from "@angular/router";
@Component({
imports: [ RouterModule ],
selector: "app-nav",
styleUrl: "./nav.css",
templateUrl: "./nav.html",
})
export class Nav {
}

14
src/index.html Normal file
View File

@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Yurigpt</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
<script src="https://cdn.nhcarrigan.com/headers/index.js"></script>
</html>

15
src/main.ts Normal file
View File

@ -0,0 +1,15 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import { bootstrapApplication } from "@angular/platform-browser";
import { appConfig } from "./app/app.config.js";
import { App } from "./app/app.js";
bootstrapApplication(App, appConfig).
// eslint-disable-next-line unicorn/prefer-top-level-await -- It is an Angular thing.
catch((error: unknown) => {
console.error(error);
});

1
src/styles.css Normal file
View File

@ -0,0 +1 @@
/* You can add global styles to this file, and also import other style files */