refactor: create navigation component

This commit is contained in:
Ruidy 2024-12-31 09:09:49 +01:00
parent 9385a8a39d
commit a1bd208290
No known key found for this signature in database
GPG key ID: E00F51288CB857CC
4 changed files with 14 additions and 11 deletions

View file

@ -0,0 +1,8 @@
---
---
<nav>
<a href="/">Home</a>
<a href="/about">About</a>
<a href="/blog">Blog</a>
</nav>

View file

@ -1,5 +1,6 @@
--- ---
import "../styles/global.css" import "../styles/global.css"
import Navigation from "../components/Navigation.astro"
const pageTitle = "About Me" const pageTitle = "About Me"
@ -47,9 +48,7 @@ const skillColor = "navy"
</style> </style>
</head> </head>
<body> <body>
<a href="/">Home</a> <Navigation />
<a href="/about">About</a>
<a href="/blog">Blog</a>
<h1>{pageTitle}</h1> <h1>{pageTitle}</h1>
<h2>... and my new website!</h2> <h2>... and my new website!</h2>

View file

@ -1,5 +1,6 @@
--- ---
import "../styles/global.css" import "../styles/global.css"
import Navigation from "../components/Navigation.astro"
const pageTitle = "Blog posts" const pageTitle = "Blog posts"
@ -14,11 +15,7 @@ const pageTitle = "Blog posts"
<title>{pageTitle}</title> <title>{pageTitle}</title>
</head> </head>
<body> <body>
<a href="/">Home</a> <Navigation />
<a href="/about">About</a>
<a href="/blog">Blog</a>
<h1>{pageTitle}</h1> <h1>{pageTitle}</h1>
<p>This is a list of my blog posts.</p> <p>This is a list of my blog posts.</p>

View file

@ -1,5 +1,6 @@
--- ---
import "../styles/global.css" import "../styles/global.css"
import Navigation from "../components/Navigation.astro"
const pageTitle = "Orbital Orbit" const pageTitle = "Orbital Orbit"
--- ---
@ -13,9 +14,7 @@ const pageTitle = "Orbital Orbit"
<title>{pageTitle}</title> <title>{pageTitle}</title>
</head> </head>
<body> <body>
<a href="/">Home</a> <Navigation />
<a href="/about">About</a>
<a href="/blog">Blog</a>
<h1>{pageTitle}</h1> <h1>{pageTitle}</h1>
</body> </body>