AncViz's picture
Can you add working example files (so when you lick 'load example' on the examples tab, it loads the real example)? This may require adjusting the functionality of the drag-and-drop components
72e5643 verified
class CustomNavbar extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
nav {
background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}
.logo {
color: white;
font-weight: bold;
font-size: 1.5rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.logo-icon {
width: 24px;
height: 24px;
}
ul {
display: flex;
gap: 2rem;
list-style: none;
margin: 0;
padding: 0;
align-items: center;
}
a {
color: white;
text-decoration: none;
transition: opacity 0.2s;
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
border-radius: 0.375rem;
}
a:hover {
opacity: 0.8;
background: rgba(255, 255, 255, 0.1);
}
.nav-icon {
width: 18px;
height: 18px;
}
@media (max-width: 768px) {
nav {
padding: 1rem;
flex-direction: column;
gap: 1rem;
}
ul {
gap: 1rem;
}
a span {
display: none;
}
}
</style>
<nav>
<a href="/" class="logo">
<i data-feather="cpu" class="logo-icon"></i>
<span>AgentFlow Studio</span>
</a>
<ul>
<li><a href="/">
<i data-feather="home" class="nav-icon"></i>
<span>Home</span>
</a></li>
<li><a href="/docs.html">
<i data-feather="book" class="nav-icon"></i>
<span>Documentation</span>
</a></li>
<li><a href="/examples.html">
<i data-feather="code" class="nav-icon"></i>
<span>Examples</span>
</a></li>
<li><a href="/about.html">
<i data-feather="info" class="nav-icon"></i>
<span>About</span>
</a></li>
</ul>
</nav>
`;
// Initialize Feather icons after component is rendered
setTimeout(() => {
if (typeof feather !== 'undefined') {
feather.replace();
}
}, 100);
}
}
customElements.define('custom-navbar', CustomNavbar);