diff options
| author | Kyren223 <Kyren223@proton.me> | 2024-11-12 16:05:53 +0200 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2024-11-12 16:05:53 +0200 |
| commit | 0c17d94c4d1303d73b3ad3e7a9dfef1fb8f0a883 (patch) | |
| tree | 7a005aedbb5795779a56799fc8e2353a1b126a7a /src/components | |
| parent | 56e79f187c71eaadca5ae0a1e717793175c04671 (diff) | |
Backup
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Link.astro | 12 | ||||
| -rw-r--r-- | src/components/Markdown.astro | 12 | ||||
| -rw-r--r-- | src/components/MarkdownB.astro | 11 | ||||
| -rw-r--r-- | src/components/Nav.astro | 9 | ||||
| -rw-r--r-- | src/components/TerminalBorder.astro | 47 |
5 files changed, 62 insertions, 29 deletions
diff --git a/src/components/Link.astro b/src/components/Link.astro new file mode 100644 index 0000000..72a0e0a --- /dev/null +++ b/src/components/Link.astro @@ -0,0 +1,12 @@ +--- +interface Props { + href: string; + newTab?: boolean; +} + +const { href, newTab = true } = Astro.props; +--- + +<a href={href} {...newTab && { target: "_blank", rel: "noopener noreferrer" }}> + <slot /> +</a> diff --git a/src/components/Markdown.astro b/src/components/Markdown.astro new file mode 100644 index 0000000..ef3ed1d --- /dev/null +++ b/src/components/Markdown.astro @@ -0,0 +1,12 @@ +--- +import "../../styles/asides.css"; +import "../../styles/markdown.css"; +import "../../styles/props.css"; +import "../../styles/reset.css"; +import "../../styles/shiki.css"; +import "../../styles/util.css"; +--- + +<div class="sl-markdown-content"> + <slot /> +</div> diff --git a/src/components/MarkdownB.astro b/src/components/MarkdownB.astro new file mode 100644 index 0000000..adc46c1 --- /dev/null +++ b/src/components/MarkdownB.astro @@ -0,0 +1,11 @@ +--- +import Markdown from './Markdown.astro'; +import "../../styles/asides.css"; +import "../../styles/markdown.css"; +import "../../styles/props.css"; +import "../../styles/reset.css"; +import "../../styles/shiki.css"; +import "../../styles/util.css"; +--- +<Markdown><slot></Markdown> + diff --git a/src/components/Nav.astro b/src/components/Nav.astro index 60f2f14..1d7d979 100644 --- a/src/components/Nav.astro +++ b/src/components/Nav.astro @@ -5,7 +5,7 @@ interface Props { const { path } = Astro.props; -const directories = ["about", "works", "links"]; +const directories = ["skills", "projects", "blogs"]; --- <nav> @@ -23,10 +23,6 @@ const directories = ["about", "works", "links"]; </nav> <style> - /* main { */ - /* padding-top: 1.25rem; */ - /* } */ - nav { font-weight: 300; display: flex; @@ -43,12 +39,13 @@ const directories = ["about", "works", "links"]; margin-bottom: 0px; margin-left: 0.15rem; color: var(--primary); - font-size: 1rem; + font-size: 1.25rem; } #nav-links a:hover { color: var(--accent); } #nav-path { margin-right: 2rem; + font-size: 1.25rem; } </style> diff --git a/src/components/TerminalBorder.astro b/src/components/TerminalBorder.astro index 6add2b7..bb6874c 100644 --- a/src/components/TerminalBorder.astro +++ b/src/components/TerminalBorder.astro @@ -2,35 +2,36 @@ interface Props { header: string; margin?: string; + class?: string; } -const { header, margin = "-1px" } = Astro.props; +const { header, margin = "-1px", class: htmlClass } = Astro.props; --- -<div class="section" style={`margin: ${margin};`}> + +<div class="section" style={`margin: ${margin};`} class={htmlClass}> <span class="tag">{header}</span> - <slot/> + <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); -} + .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> |
