ewnewq's picture
修改成跟图片一样的样式
979bd80 verified
class CustomFooter extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
footer {
background: #111827;
color: #f9fafb;
padding: 3rem 2rem;
text-align: center;
margin-top: auto;
}
.footer-content {
max-width: 6xl;
margin: 0 auto;
}
.footer-links {
display: flex;
justify-content: center;
gap: 2rem;
margin-bottom: 2rem;
flex-wrap: wrap;
}
.footer-links a {
color: #d1d5db;
text-decoration: none;
transition: color 0.2s ease;
}
.footer-links a:hover {
color: #3b82f6;
}
.copyright {
color: #9ca3af;
font-size: 0.875rem;
}
@media (max-width: 768px) {
.footer-links {
flex-direction: column;
gap: 1rem;
}
}
</style>
<footer>
<div class="footer-content">
<div class="footer-links">
<a href="#hero">首页</a>
<a href="#features">特性</a>
<a href="#generator">生成器</a>
<a href="#documentation">文档</a>
<a href="https://mybatis-flex.com" target="_blank">官方文档</a>
<a href="https://github.com/mybatis-flex" target="_blank">GitHub</a>
</div>
<p class="copyright">&copy; 2024 FlexGen Studio. 基于 MyBatis Flex 构建。保留所有权利。</p>
</div>
</footer>
`;
}
}
customElements.define('custom-footer', CustomFooter);