Skip to content

Commit

Permalink
Fancier top left navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
Xithrius committed Jun 18, 2023
1 parent 7dfa42d commit dfba36e
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 10 deletions.
16 changes: 16 additions & 0 deletions site/lib/components/stamp.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const Stamp = () => (
<div
className="
bg-gradient-to-tr
from-red-600
to-pink-600
bg-clip-text
font-['Turret_Road']
text-transparent
"
>
xithrius.cloud
</div>
);

export default Stamp;
2 changes: 1 addition & 1 deletion site/lib/components/top-left-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type Props = {
const TopLeftNavigation = ({ children, href }: Props) => {
return (
<div className="absolute left-8 top-8 flex justify-center">
<Link href={href} className="top-0 left-0 text-2xl opacity-50 transition hover:opacity-100">
<Link href={href} className="top-0 left-0 text-4xl opacity-50 transition hover:opacity-100">
{children}
</Link>
</div>
Expand Down
5 changes: 4 additions & 1 deletion site/pages/blog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Post from "lib/interfaces/post";
import Head from "next/head";
import ThemeSwitch from "lib/components/themeswitch";
import TopLeftNavigation from "lib/components/top-left-nav";
import Stamp from "lib/components/stamp";

type Props = {
allPosts: Post[];
Expand All @@ -26,7 +27,9 @@ export default function Index({ allPosts }: Props) {
</Container>
</Layout>
<ThemeSwitch />
<TopLeftNavigation href="/">xithrius.cloud</TopLeftNavigation>
<TopLeftNavigation href="/">
<Stamp />
</TopLeftNavigation>
</>
);
}
Expand Down
14 changes: 9 additions & 5 deletions site/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import Container from "lib/components/container";
import { utcToZonedTime } from "date-fns-tz";
import { useEffect, useState } from "react";
import TopLeftNavigation from "lib/components/top-left-nav";
import Image from "next/image";
import Stamp from "lib/components/stamp";
// import Image from "next/image";

const sitePages = ["Projects", "ToDo", "Blog", "Start"];

Expand Down Expand Up @@ -53,9 +54,12 @@ export default function Home() {
<link rel="icon" href="/logo.png" />
</Head>
<Container>
<main className="-mt-20 flex flex-1 flex-col items-center justify-center text-center">
<Image src="/user_icon.svg" alt="Xithrius" width={512} height={512} />
<div className="-mt-20 flex w-3/5 justify-center border-t border-solid border-current py-5 text-xl">
<main className="flex flex-1 flex-col items-center justify-center text-center">
<div className="text-[10vw]">
<Stamp />
</div>

<div className="flex w-3/5 justify-center border-t border-solid border-current py-5 text-xl">
{sitePages.map((element) => (
<LinkElem
key={element}
Expand All @@ -72,7 +76,7 @@ export default function Home() {
<TopLeftNavigation href="https://github.com/Xithrius">
<SiGithub />
</TopLeftNavigation>
<div className="absolute left-8 bottom-8 flex justify-center font-mono">
<div className="absolute bottom-8 left-8 flex justify-center font-mono">
<TimezonedDate />
</div>
</>
Expand Down
5 changes: 4 additions & 1 deletion site/pages/projects/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Image from "next/image";
import ThemeSwitch from "lib/components/themeswitch";
import TopLeftNavigation from "lib/components/top-left-nav";
import Container from "lib/components/container";
import Stamp from "lib/components/stamp";

const githubProjects = [
"twitch-tui",
Expand Down Expand Up @@ -96,7 +97,9 @@ export default function Home({ projects, templates }: HomeProps) {
))}
</div>
<ThemeSwitch />
<TopLeftNavigation href="/">xithrius.cloud</TopLeftNavigation>
<TopLeftNavigation href="/">
<Stamp />
</TopLeftNavigation>
</Container>
</>
);
Expand Down
5 changes: 4 additions & 1 deletion site/pages/start/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { BsArrowRight } from "react-icons/bs";
import { useEffect } from "react";
import ThemeSwitch from "lib/components/themeswitch";
import TopLeftNavigation from "lib/components/top-left-nav";
import Stamp from "lib/components/stamp";

const LINKS = [
{
Expand Down Expand Up @@ -77,7 +78,9 @@ export default function Start() {
</tbody>
</table>
<ThemeSwitch />
<TopLeftNavigation href="/">xithrius.cloud</TopLeftNavigation>
<TopLeftNavigation href="/">
<Stamp />
</TopLeftNavigation>
</main>
</>
);
Expand Down
5 changes: 4 additions & 1 deletion site/pages/todo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import ThemeSwitch from "lib/components/themeswitch";
import TopLeftNavigation from "lib/components/top-left-nav";
import Container from "lib/components/container";
import todo from "lib/constants/todo_listing";
import Stamp from "lib/components/stamp";

interface todoItem {
desc: string;
Expand Down Expand Up @@ -69,7 +70,9 @@ export default function Home() {
return <TodoList key={e.year} year={e.year} items={e.items} />;
})}
<ThemeSwitch />
<TopLeftNavigation href="/">xithrius.cloud</TopLeftNavigation>
<TopLeftNavigation href="/">
<Stamp/>
</TopLeftNavigation>
</main>
</Container>
</>
Expand Down

1 comment on commit dfba36e

@vercel
Copy link

@vercel vercel bot commented on dfba36e Jun 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

xithrius-cloud – ./

xithrius-cloud-git-main-xithrius.vercel.app
xithrius.cloud
xithrius-cloud-xithrius.vercel.app

Please sign in to comment.