generated from nhcarrigan/template
feat: empty components, functional nav
This commit is contained in:
0
src/app/about/about.css
Normal file
0
src/app/about/about.css
Normal file
1
src/app/about/about.html
Normal file
1
src/app/about/about.html
Normal file
@ -0,0 +1 @@
|
||||
<p>about works!</p>
|
11
src/app/about/about.ts
Normal file
11
src/app/about/about.ts
Normal 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
21
src/app/app.config.ts
Normal 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
9
src/app/app.css
Normal 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
4
src/app/app.html
Normal file
@ -0,0 +1,4 @@
|
||||
<app-nav></app-nav>
|
||||
<main>
|
||||
<router-outlet></router-outlet>
|
||||
</main>
|
20
src/app/app.routes.ts
Normal file
20
src/app/app.routes.ts
Normal 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
22
src/app/app.ts
Normal 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";
|
||||
}
|
0
src/app/archive/archive.css
Normal file
0
src/app/archive/archive.css
Normal file
1
src/app/archive/archive.html
Normal file
1
src/app/archive/archive.html
Normal file
@ -0,0 +1 @@
|
||||
<p>archive works!</p>
|
11
src/app/archive/archive.ts
Normal file
11
src/app/archive/archive.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-archive',
|
||||
imports: [],
|
||||
templateUrl: './archive.html',
|
||||
styleUrl: './archive.css'
|
||||
})
|
||||
export class Archive {
|
||||
|
||||
}
|
0
src/app/characters/characters.css
Normal file
0
src/app/characters/characters.css
Normal file
1
src/app/characters/characters.html
Normal file
1
src/app/characters/characters.html
Normal file
@ -0,0 +1 @@
|
||||
<p>characters works!</p>
|
11
src/app/characters/characters.ts
Normal file
11
src/app/characters/characters.ts
Normal 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
0
src/app/comic/comic.css
Normal file
1
src/app/comic/comic.html
Normal file
1
src/app/comic/comic.html
Normal file
@ -0,0 +1 @@
|
||||
<p>comic works!</p>
|
11
src/app/comic/comic.ts
Normal file
11
src/app/comic/comic.ts
Normal 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
0
src/app/home/home.css
Normal file
1
src/app/home/home.html
Normal file
1
src/app/home/home.html
Normal file
@ -0,0 +1 @@
|
||||
<p>home works!</p>
|
17
src/app/home/home.ts
Normal file
17
src/app/home/home.ts
Normal 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
44
src/app/nav/nav.css
Normal 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
9
src/app/nav/nav.html
Normal 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
18
src/app/nav/nav.ts
Normal 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
14
src/index.html
Normal 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
15
src/main.ts
Normal 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
1
src/styles.css
Normal file
@ -0,0 +1 @@
|
||||
/* You can add global styles to this file, and also import other style files */
|
Reference in New Issue
Block a user