Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <nav>
- <svg viewBox="0 0 2 3" aria-hidden="true">
- <path d="M0,0, L1, 2 C1.5, 3 1.5, 3, 2, 3, L2, 0Z" />
- </svg>
- <ul>
- <li aria-current={$page.url.pathname === '/' ? 'page' : undefined}>
- <a href="/">Home</a>
- </li>
- <li aria-current={$page.url.pathname === '/pool' ? 'page' : undefined}>
- <a href="/pool">Pool Play</a>
- </li>
- <li aria-current={$page.url.pathname === '/bracket' ? 'page' : undefined}>
- <a href="/bracket">Bracket Play</a>
- </li>
- <li aria-current={$page.url.pathname === '/admin' ? 'page' : undefined}>
- <a href="/admin">Admin Stuff</a>
- </li>
- </ul>
- <svg viewBox="0 0 2 3" aria-hidden="true">
- <path d="M0,0 L0,3 C0.5,3 0.5,3 1,2 L2,0 Z" />
- </svg>
- </nav>
- <style>
- nav {
- display: flex;
- justify-content: center;
- --background: var(--color-theme-3);
- }
- svg {
- width: 2em;
- height: 3em;
- display: block;
- }
- path {
- fill: var(--color-theme-3);
- }
- ul {
- position: relative;
- padding: 0;
- margin: 0;
- height: 3em;
- display: flex;
- justify-content: center;
- align-items: center;
- list-style: none;
- background: var(--background);
- background-size: contain;
- }
- li {
- position: relative;
- height: 100%;
- }
- li[aria-current='page']::before {
- --size: 10px;
- content: '';
- width: 0;
- height: 0;
- position: absolute;
- top: 0;
- left: calc(50% - var(--size));
- border: var(--size) solid transparent;
- border-top: var(--size) solid var(--color-theme-1);
- }
- nav a {
- display: flex;
- height: 100%;
- align-items: center;
- padding: 0 0.5rem;
- color: var(--color-text);
- font-weight: 700;
- font-size: 0.8rem;
- text-transform: uppercase;
- letter-spacing: 0.1em;
- text-decoration: none;
- transition: color 0.2s linear;
- }
- a:hover {
- color: var(--color-theme-2);
- }
- </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement