Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ dist
dist-ssr
*.local

# Generated build artifacts
public/iframe-resizer-child.js

# Editor directories and files
.vscode/*
!.vscode/extensions.json
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "vite",
"build": "vue-tsc && vite build",
"dev": "cp node_modules/@iframe-resizer/child/index.umd.js public/iframe-resizer-child.js && vite",
"build": "cp node_modules/@iframe-resizer/child/index.umd.js public/iframe-resizer-child.js && vue-tsc && vite build",
Comment on lines +7 to +8
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The cp command is not cross-platform and will fail on Windows environments (unless using a shell like Git Bash). To ensure the project can be developed across different operating systems, consider using a portable Node.js script or a tool like shx for file operations.

Suggested change
"dev": "cp node_modules/@iframe-resizer/child/index.umd.js public/iframe-resizer-child.js && vite",
"build": "cp node_modules/@iframe-resizer/child/index.umd.js public/iframe-resizer-child.js && vue-tsc && vite build",
"dev": "node -e \"require('fs').copyFileSync('node_modules/@iframe-resizer/child/index.umd.js', 'public/iframe-resizer-child.js')\" && vite",
"build": "node -e \"require('fs').copyFileSync('node_modules/@iframe-resizer/child/index.umd.js', 'public/iframe-resizer-child.js')\" && vue-tsc && vite build",

Comment on lines +7 to +8
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

The dev/build scripts rely on the shell cp command, which is not available in some environments (notably default Windows shells) and can make local development/CI brittle. Consider replacing this with a cross-platform approach (e.g., a small Node copy script or a cross-platform CLI like shx) and wiring it as a pre-step.

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +8
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

This change copies @iframe-resizer/child’s UMD bundle into public/ and serves it to end users. @iframe-resizer/child is marked as GPL-3.0 in the lockfile, so please double-check license compatibility and any required notices/attribution now that the code is being redistributed as a site asset.

Suggested change
"dev": "cp node_modules/@iframe-resizer/child/index.umd.js public/iframe-resizer-child.js && vite",
"build": "cp node_modules/@iframe-resizer/child/index.umd.js public/iframe-resizer-child.js && vue-tsc && vite build",
"dev": "vite",
"build": "vue-tsc && vite build",

Copilot uses AI. Check for mistakes.
"preview": "vite preview",
"lint": "eslint",
"lint:fix": "eslint --fix",
Expand Down
2 changes: 1 addition & 1 deletion public/contributors.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!doctype html>
<html lang="en">
<head>
<script src="https://cdn.jsdelivr.net/npm/@iframe-resizer/child@5.3.2" integrity="z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg=="></script>
<script src="/iframe-resizer-child.js"></script>
<style>
#contributor-container {
display: flex;
Expand Down
133 changes: 123 additions & 10 deletions src/components/TopNavbar.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<script setup lang="ts">
import type { MessageSchema } from '../locales/schema'
import { onClickOutside } from '@vueuse/core'
import { ref } from 'vue'
import { useI18n } from 'vue-i18n'

const { t } = useI18n<MessageSchema>({
Expand Down Expand Up @@ -35,10 +37,23 @@ const rightNavLinks = [
external: true
}
]

const allNavLinks = [...leftNavLinks, ...rightNavLinks]

const menuOpen = ref(false)
const navRef = ref<HTMLElement | null>(null)

onClickOutside(navRef, () => {
menuOpen.value = false
})

function closeMenu() {
menuOpen.value = false
}
</script>

<template>
<nav class="docusaurus-navbar navbar navbar--fixed-top">
<nav ref="navRef" class="docusaurus-navbar navbar navbar--fixed-top">
<div class="navbar__inner">
<div class="navbar__items">
<a href="https://projectbluefin.io" class="navbar__brand">
Expand All @@ -51,7 +66,7 @@ const rightNavLinks = [
v-for="link in leftNavLinks"
:key="link.name"
:href="link.href"
class="navbar__item navbar__link"
class="navbar__item navbar__link navbar__link--desktop"
:target="link.external ? '_blank' : undefined"
:rel="link.external ? 'noopener noreferrer' : undefined"
>
Expand All @@ -64,13 +79,40 @@ const rightNavLinks = [
v-for="link in rightNavLinks"
:key="link.name"
:href="link.href"
class="navbar__item navbar__link"
class="navbar__item navbar__link navbar__link--desktop"
:target="link.external ? '_blank' : undefined"
:rel="link.external ? 'noopener noreferrer' : undefined"
>
{{ link.name }}
</a>
</div>

<!-- Hamburger button — mobile only -->
<button
class="navbar__toggle"
:aria-expanded="menuOpen"
aria-label="Toggle navigation menu"
@click="menuOpen = !menuOpen"
>
Comment on lines +91 to +96
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

The hamburger toggle button should explicitly set type="button" to avoid the default type="submit" behavior if this navbar ever ends up rendered inside a <form> (or is reused in such a context).

Copilot uses AI. Check for mistakes.
<span class="navbar__toggle-bar" />
<span class="navbar__toggle-bar" />
<span class="navbar__toggle-bar" />
</button>
</div>

<!-- Mobile dropdown menu -->
<div v-if="menuOpen" class="navbar__mobile-menu">
<a
v-for="link in allNavLinks"
:key="link.name"
:href="link.href"
class="navbar__mobile-link"
:target="link.external ? '_blank' : undefined"
:rel="link.external ? 'noopener noreferrer' : undefined"
@click="closeMenu"
>
{{ link.name }}
</a>
</div>
</nav>
</template>
Expand Down Expand Up @@ -127,7 +169,7 @@ const rightNavLinks = [
max-width: 1440px;
margin: 0 auto;
padding: var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal);
height: 100%;
height: var(--ifm-navbar-height);
}

.navbar__items {
Expand Down Expand Up @@ -217,6 +259,62 @@ const rightNavLinks = [
justify-content: flex-end;
}

// Hamburger button — hidden on desktop
.navbar__toggle {
display: none;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 5px;
width: 36px;
height: 36px;
padding: 0;
background: none;
border: none;
cursor: pointer;
flex-shrink: 0;
}

.navbar__toggle-bar {
display: block;
width: 22px;
height: 2px;
background-color: var(--ifm-navbar-link-color);
border-radius: 2px;
transition: background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default);
}

.navbar__toggle:hover .navbar__toggle-bar {
background-color: var(--ifm-navbar-link-hover-color);
}

// Mobile dropdown
.navbar__mobile-menu {
display: none;
flex-direction: column;
background-color: var(--ifm-navbar-background-color);
border-top: 1px solid rgba(255, 255, 255, 0.1);
padding: 0.5rem 1rem 1rem;
}
Comment on lines +292 to +298
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Since the navbar is fixed at the top, the mobile dropdown menu might exceed the viewport height on smaller screens or in landscape orientation, making some links inaccessible. Adding a maximum height and enabling vertical scrolling ensures all menu items remain reachable.

.navbar__mobile-menu {
  display: none;
  flex-direction: column;
  background-color: var(--ifm-navbar-background-color);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem 1rem;
  max-height: calc(100vh - var(--ifm-navbar-height));
  overflow-y: auto;
}


.navbar__mobile-link {
color: var(--ifm-navbar-link-color);
text-decoration: none;
font-size: 14pt;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Using pt (points) for font sizes is generally discouraged in web development as it is a physical unit intended for print. It can lead to accessibility issues because it doesn't scale correctly with browser zoom or user font settings. It is recommended to use relative units like rem or em instead.

  font-size: 1.125rem;

font-weight: 400;
padding: 0.75rem 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
transition: color var(--ifm-transition-fast) var(--ifm-transition-timing-default);

&:last-child {
border-bottom: none;
}

&:hover {
color: var(--ifm-navbar-link-hover-color);
}
}

// Mobile responsive - matching Docusaurus breakpoints exactly
@media (max-width: 996px) {
.docusaurus-navbar {
Expand All @@ -234,18 +332,33 @@ const rightNavLinks = [
}

@media (max-width: 768px) {
.navbar__items {
a:not(.navbar__brand) {
display: none;
}
.docusaurus-navbar {
height: auto;
min-height: var(--ifm-navbar-height);
}

.navbar__brand {
margin: 0 auto;
.navbar__inner {
height: var(--ifm-navbar-height);
}

.navbar__link--desktop {
display: none;
}

.navbar__items--right {
display: none;
}

.navbar__brand {
margin: 0;
}

.navbar__toggle {
display: flex;
}

.navbar__mobile-menu {
display: flex;
}
}
</style>
Loading