Skip to content

Commit df6af6c

Browse files
committed
added header and footer, SEO optimizations
1 parent 7a165c1 commit df6af6c

File tree

5 files changed

+49
-15
lines changed

5 files changed

+49
-15
lines changed

src/components/footer.astro

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<footer>
2+
<p>This is an open source project. View the <a href="https://github.com/adammehaney/Binary-Search-Tree-Visualizer" target="_blank">Github Repository</a>.</p>
3+
<p>Created by Adam Mehaney</p>
4+
</footer>
5+
<style>
6+
footer {
7+
margin-top: 30px;
8+
text-align: center;
9+
}
10+
</style>

src/components/header.astro

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
import GithubLogo from './src/images/github-mark-white.svg'
3+
---
4+
5+
<header>
6+
<div>
7+
<h1>Binary Search Tree</h1>
8+
<h2>Visualizer</h2>
9+
</div>
10+
<div>
11+
<a href="https://github.com/adammehaney/Binary-Search-Tree-Visualizer" target="_blank"><img src={GithubLogo.src} alt="Github Logo" width="30px" height="30px"></a>
12+
</div>
13+
</header>
14+
15+
<style>
16+
header {
17+
display: flex;
18+
flex-direction: row;
19+
justify-content: space-between;
20+
align-items: center;
21+
}
22+
</style>

src/images/github-mark-white.svg

Lines changed: 1 addition & 0 deletions
Loading

src/layouts/Layout.astro

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ const { title } = Astro.props;
1212
<html lang="en">
1313
<head>
1414
<meta charset="UTF-8" />
15-
<meta name="description" content="Astro description" />
15+
<meta name="description" content="Easily visualize, randomly generate, add to, remove from a binary search tree. See preorder, inorder, and postorder lists of your binary search tree." />
1616
<meta name="viewport" content="width=device-width" />
1717
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
1818
<meta name="generator" content={Astro.generator} />
19+
<meta name="keywords" content="Binary Search Tree BST Balanced Set Search Insert Delete Adam Mehaney Predecessor Successor Inorder Data Structure Algorithm Visualization Online Learning Tutorial Open Source">
1920
<title>{title}</title>
2021
<script src="../typescript/BST.ts"></script>
2122
</head>
@@ -40,7 +41,15 @@ const { title } = Astro.props;
4041
html, input {
4142
font-family: 'Manrope Variable', sans-serif;
4243
background: var(--background);
43-
/* background-size: 224px; */
44+
}
45+
body {
46+
margin: auto;
47+
padding: 1rem;
48+
width: 800px;
49+
max-width: calc(100% - 2rem);
50+
color: white;
51+
font-size: 20px;
52+
line-height: 1.6;
4453
}
4554
code {
4655
font-family:

src/pages/index.astro

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
import Layout from '../layouts/Layout.astro';
33
import BST from '../components/BST.astro';
44
import InfoPanel from '../components/infopanel.astro';
5-
import Button from '../components/button.astro';
5+
import Header from '../components/header.astro'
6+
import Footer from '../components/footer.astro'
67
import { Icon } from 'astro-icon/components'
78
---
89

9-
<Layout title="Welcome to Astro.">
10+
<Layout title="Binary Search Tree Visualizer">
11+
<Header />
1012
<main>
11-
<h1>Binary Search Tree</h1>
12-
<h2>Visualizer</h2>
1313
<BST />
1414
<div>
1515
<InfoPanel>
@@ -56,18 +56,10 @@ import { Icon } from 'astro-icon/components'
5656
</InfoPanel>
5757
</div>
5858
</main>
59+
<Footer />
5960
</Layout>
6061

6162
<style>
62-
main {
63-
margin: auto;
64-
padding: 1rem;
65-
width: 800px;
66-
max-width: calc(100% - 2rem);
67-
color: white;
68-
font-size: 20px;
69-
line-height: 1.6;
70-
}
7163
main div {
7264
display: flex;
7365
flex-direction: column;

0 commit comments

Comments
 (0)