-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from tuatmcc/feat/navigation
feat/navigation
- Loading branch information
Showing
10 changed files
with
154 additions
and
87 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
--- | ||
|
||
<div class="h-dvh flex relative"> | ||
<div class="fixed w-32 h-32 top-0 z-10"> | ||
<img src="/logos/logo.svg" alt="MCC Logo" class="pl-8 pt-8 lg:h-40 lg:mr-[-200px]" /> | ||
</div> | ||
<div class="w-full flex flex-col p-4 pt-16"> | ||
<div class="flex justify-end mb-[-1px]"> | ||
<svg width="70" height="140" viewBox="0 0 70 140" fill="none" xmlns="http://www.w3.org/2000/svg" class="mr-[-1px] text-blue-800"> | ||
<path d="M70 140H0C15 136 15 140 35 70C55 0 55 0 70 0V140Z" fill="currentColor"/> | ||
</svg> | ||
<div class="rounded-tr-2xl bg-blue-800 w-[calc(100%-200px)]" /> | ||
</div> | ||
<div class="w-full h-full rounded-b-2xl rounded-l-2xl bg-blue-800 p-4"> | ||
<slot /> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<style> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,80 @@ | ||
--- | ||
import { FaDiscord, FaGithub, FaXTwitter } from "react-icons/fa6"; | ||
import { NavigationContainer } from "./NavigationContainer.tsx"; | ||
import { FaXTwitter, FaGithub, FaDiscord } from "react-icons/fa6"; | ||
const links = [ | ||
{ href: "/", label: "Home" }, | ||
{ href: "/about", label: "About" }, | ||
{ href: "/achievements", label: "Achievements" }, | ||
{ href: "/blog", label: "Blog" }, | ||
]; | ||
const socialLinks = [ | ||
{ href: "https://x.com/tuatmcc", icon: FaXTwitter }, | ||
{ href: "https://x.com/tuatmcc", icon: FaGithub }, | ||
{ href: "https://x.com/tuatmcc", icon: FaDiscord }, | ||
]; | ||
--- | ||
|
||
<slot /> | ||
<NavigationContainer client:only="react"> | ||
<div class="w-full h-full pl-8 pt-24 overflow-y-auto flex flex-col justify-between"> | ||
<div | ||
class="w-full h-full pl-8 pt-24 overflow-y-auto flex flex-col justify-between" | ||
> | ||
<ul class="flex flex-col gap-8"> | ||
{ | ||
links.map((link) => ( | ||
<li class="link-item relative flex text-white text-2xl font-orbitron tracking-wider"> | ||
<li class="link-item relative flex text-gray-100 text-2xl font-orbitron tracking-wider"> | ||
<a href={link.href} class=" flex justify-end w-full p-2"> | ||
{link.label} | ||
</a> | ||
</li> | ||
)) | ||
} | ||
</ul> | ||
<div class="relative"> | ||
<div class="absolute top-0 right-0 w-[2px] bottom-0 bg-red-600" /> | ||
<ul class="relative flex flex-col gap-8 p-4"> | ||
<li class="flex"> | ||
<a href="https://x.com/tuatmcc" target="_blank" rel="noopener noreferrer" class="flex flex-1 justify-end"> | ||
<FaXTwitter className="text-white w-6 h-6" /> | ||
</a> | ||
</li> | ||
<li class="flex"> | ||
<a href="https://x.com/tuatmcc" target="_blank" rel="noopener noreferrer" class="flex flex-1 justify-end"> | ||
<FaGithub className="text-white w-6 h-6" /> | ||
</a> | ||
</li> | ||
<li class="flex"> | ||
<a href="https://x.com/tuatmcc" target="_blank" rel="noopener noreferrer" class="flex flex-1 justify-end"> | ||
<FaDiscord className="text-white w-6 h-6" /> | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</NavigationContainer> | ||
|
||
<style> | ||
.link-item { | ||
&::after { | ||
position: absolute; | ||
content: ""; | ||
display: block; | ||
bottom: 0; | ||
left: 50%; | ||
width: 0; | ||
bottom: 0; | ||
height: 2px; | ||
background: white; | ||
transition: all 0.2s; | ||
transform: translateX(-50%); | ||
opacity: 0; | ||
} | ||
<div class="relative"> | ||
<div class="absolute top-0 right-0 w-[4px] bottom-0 bg-blue-600"></div> | ||
<ul class="relative flex flex-col gap-8 p-4"> | ||
{ | ||
socialLinks.map((socialLink) => ( | ||
<li class="flex"> | ||
<a | ||
href={socialLink.href} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
class="flex flex-1 justify-end" | ||
> | ||
<socialLink.icon className="text-gray-200 w-6 h-6" /> | ||
</a> | ||
</li> | ||
)) | ||
} | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
&:hover { | ||
<style> | ||
.link-item { | ||
&::after { | ||
width: 100%; | ||
opacity: 1; | ||
position: absolute; | ||
content: ""; | ||
display: block; | ||
bottom: 0; | ||
right: 0; | ||
width: 0; | ||
bottom: 0; | ||
height: 2px; | ||
background: white; | ||
transition: all 0.2s; | ||
opacity: 0; | ||
} | ||
|
||
&:hover { | ||
&::after { | ||
width: 100%; | ||
opacity: 1; | ||
} | ||
} | ||
} | ||
} | ||
</style> | ||
</style> | ||
</NavigationContainer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,37 @@ | ||
--- | ||
import Container from "../components/Container.astro"; | ||
import Navigation from "../components/Navigation/Navigation.astro"; | ||
import RecentNews from "../components/home/RecentNews.astro"; | ||
import Layout from "../layouts/Layout.astro"; | ||
--- | ||
|
||
<Layout title="MCC" path="" og={{ enabled: true }} pagefind={false}> | ||
<!-- <img src="/abstract-wave.jpg" class="absolute top-0 left-0 w-full h-full bg-black" /> --> | ||
<Navigation> | ||
<div class="h-svh flex flex-col items-center justify-center relative"> | ||
<img src="/animated_mcc.webp" alt="MCC Logo" class="w-80 h-80" /> | ||
</div> | ||
<RecentNews /> | ||
<main class="main"> | ||
<!-- <div class="background-gradient fixed top-0 left-0 w-full h-full z-[-1]" /> --> | ||
<div class="background-pattern fixed top-0 left-0 w-full h-full opacity-10 z-[-1]" /> | ||
<div class="sticky h-svh flex flex-col items-center justify-center top-0 z-[-1]"> | ||
<img src="/animated_mcc.webp" alt="MCC Logo" class="w-80 h-80" /> | ||
</div> | ||
<Container> | ||
<h1 class="text-4xl text-white tracking-wider font-orbitron text-center">Welcome to MCC</h1> | ||
</Container> | ||
</Navigation> | ||
</main> | ||
</Layout> | ||
|
||
<style> | ||
.background-pattern { | ||
background-image: url("/assets/triangle.svg"); | ||
background-repeat: repeat; | ||
background-size: 100px; | ||
background-position: center; | ||
} | ||
|
||
.background-gradient { | ||
background-image: linear-gradient(#fff, transparent, #ccc9, #ccc); | ||
background-size: 100%; | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
} | ||
</style> |