class CustomProjectCard extends HTMLElement { static get observedAttributes() { return ['title', 'description', 'tags', 'image']; } attributeChangedCallback(name, oldValue, newValue) { if (this.shadowRoot) { this.render(); } } connectedCallback() { this.attachShadow({ mode: 'open' }); this.render(); } render() { const title = this.getAttribute('title') || 'Project Title'; const description = this.getAttribute('description') || 'Project description goes here'; const tags = this.getAttribute('tags') || 'Design, Development'; const image = this.getAttribute('image') || 'http://static.photos/technology/640x360/1'; this.shadowRoot.innerHTML = `
${title}

${title}

${description}

${tags.split(',').map(tag => ` ${tag.trim()} `).join('')}
View Project
`; // Initialize feather icons after content is loaded document.addEventListener('DOMContentLoaded', () => { feather.replace(); }); } } customElements.define('custom-project-card', CustomProjectCard);