Compare commits

..

No commits in common. "838190b8e5f3621d2ae06541774a8dcb0e573455" and "40e2d75e0a4b6aa4ea1f26f969718a5e5ee7464e" have entirely different histories.

5 changed files with 15 additions and 47 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "fgo-ta-com-website",
"version": "0.1.10",
"version": "0.1.7",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "fgo-ta-com-website",
"version": "0.1.10",
"version": "0.1.7",
"dependencies": {
"@astro-community/astro-embed-youtube": "^0.4.3",
"@astrojs/check": "^0.3.4",

View file

@ -1,7 +1,7 @@
{
"name": "fgo-ta-com-website",
"type": "module",
"version": "0.1.10",
"version": "0.1.9",
"scripts": {
"dev": "astro dev",
"start": "astro dev",

View file

@ -6,25 +6,23 @@ const hamburger_src_url = `url("${hamburger.src}")`
---
<header>
<a href="/" rel="noopener noreferrer" aria-label="Home" role="navigation">
<a href="/" rel="noopener noreferrer" aria-label="Home">
<Image src={logo} alt="Website Logo" />
<span class="visually-hidden">Website Logo</span>
</a>
<ul class="desktop">
<slot name="desktop" />
<slot />
</ul>
<button
class="mobile"
aria-label="Navigation Button"
tabindex="0"
onclick="this.focus()"
role="navigation"
>
<ul>
<slot name="mobile" />
<slot />
</ul>
<div class="placeholder"></div>
<div class="hamburger-menu" role="navigation"></div>
<div class="hamburger-menu"></div>
</button>
</header>
@ -41,7 +39,7 @@ const hamburger_src_url = `url("${hamburger.src}")`
line-height: 1.5em;
}
header > a {
margin-left: 16px;
padding-left: 16px;
padding-top: 8px;
display: block;
height: 48px;
@ -115,12 +113,12 @@ const hamburger_src_url = `url("${hamburger.src}")`
.hamburger-menu {
mask: var(--hamburger_src_url) no-repeat center;
background-color: white;
width: 2rem;
height: 2rem;
width: 2em;
height: 2em;
position: static;
align-self: flex-start;
margin-right: 1rem;
margin-top: 1rem;
padding-right: 1em;
padding-top: 2.5em;
}
@media (min-width: 1140px) {

View file

@ -1,13 +1,12 @@
---
export interface Props {
currentPage?: string
navtype: 'mobile' | 'desktop'
link: string
text: string
icon: ImageMetadata
}
const { icon, text, link, navtype, currentPage } = Astro.props
const { icon, text, link, currentPage } = Astro.props
let currPage = ''
const slug = link.replace(new RegExp('/', 'g'), '')
@ -20,8 +19,6 @@ if (currentPage === slug) {
const icon_src_url = `url("${icon.src}")`
const fulllink = `/${slug}`
let extraattributes = navtype === 'mobile' ? { tabindex: '0' } : {}
---
<li>
@ -30,8 +27,7 @@ let extraattributes = navtype === 'mobile' ? { tabindex: '0' } : {}
rel="noopener noreferrer"
aria-label={text}
class={currPage}
role="navigation"
{...extraattributes}
tabindex="0"
>
<div class="icon"></div>
{text}

View file

@ -63,22 +63,7 @@ const mapped_navdata = navdata.map((item) => ({
<Navbar>
{
mapped_navdata.map((item) => (
<NavbarEntry
currentPage={currentpage}
navtype="desktop"
{...item}
slot="desktop"
/>
))
}
{
mapped_navdata.map((item) => (
<NavbarEntry
currentPage={currentpage}
navtype="mobile"
{...item}
slot="mobile"
/>
<NavbarEntry currentPage={currentpage} {...item} />
))
}
</Navbar>
@ -103,15 +88,4 @@ const mapped_navdata = navdata.map((item) => ({
background: var(--c-lightgray);
margin: 0px;
}
.visually-hidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
</style>