summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Nav.astro50
-rw-r--r--src/components/TerminalBorder.astro36
2 files changed, 86 insertions, 0 deletions
diff --git a/src/components/Nav.astro b/src/components/Nav.astro
new file mode 100644
index 0000000..3c41d0d
--- /dev/null
+++ b/src/components/Nav.astro
@@ -0,0 +1,50 @@
+---
+interface Props {
+ path: string;
+}
+
+const { path } = Astro.props;
+
+const directories = ["about", "works", "links"]
+
+---
+<nav>
+ <span id="nav-path">/home/kyren/{path}</span>
+ <span id="nav-links">
+ <a href="/">home</a>
+ {directories.map((dir) => (
+ <a href={`/${dir}`}>{dir}</a>
+ <span></span> /* For whitespace */
+ ))}
+ </span>
+</nav>
+
+<style>
+
+nav {
+ font-weight: 300;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ border: 0;
+ border-bottom: 1px;
+ border-style: solid;
+ margin-bottom: 0.75rem;
+ padding-bottom: 0.75rem;
+}
+#nav-links a {
+ margin-right: 0.15rem;
+ margin-bottom: 0px;
+ margin-left: 0.15rem;
+ color: var(--primary);
+ font-size: 1rem;
+
+}
+#nav-links a:hover {
+ color: var(--accent);
+}
+#nav-path {
+ margin-right: 2rem;
+}
+
+</style>
diff --git a/src/components/TerminalBorder.astro b/src/components/TerminalBorder.astro
new file mode 100644
index 0000000..6add2b7
--- /dev/null
+++ b/src/components/TerminalBorder.astro
@@ -0,0 +1,36 @@
+---
+interface Props {
+ header: string;
+ margin?: string;
+}
+
+const { header, margin = "-1px" } = Astro.props;
+---
+<div class="section" style={`margin: ${margin};`}>
+ <span class="tag">{header}</span>
+ <slot/>
+</div>
+
+<style>
+.section {
+ position: relative;
+ padding: 0.8rem;
+ padding-top: 0.85rem;
+ display: flex;
+ border-style: solid;
+ border-width: 1px;
+ border-color: var(--alt);
+}
+
+.tag {
+ position: absolute;
+ top: -0.6rem;
+ left: 0.5rem;
+ background-color: var(--background);
+ padding-right: 0.5rem;
+ padding-left: 0.5rem;
+ font-size: 0.8rem;
+ color: var(--alt);
+}
+
+</style>