wangxso's picture
转换为vue的代码
4de3816 verified
```vue
<template>
<footer class="bg-gray-900 text-white py-16">
<div class="container mx-auto px-4 grid grid-cols-1 md:grid-cols-4 gap-8">
<div class="footer-about">
<div class="flex items-center gap-2 mb-4">
<i data-feather="shield" class="text-blue-500"></i>
<span class="font-serif font-bold text-lg">SolStrategies</span>
</div>
<p class="text-gray-400 mb-6">
Singapore-headquartered leader in integrated PR strategies, secure investments, and comprehensive security solutions.
</p>
<div class="flex gap-4">
<a href="#" class="social-link">
<i data-feather="linkedin"></i>
</a>
<a href="#" class="social-link">
<i data-feather="twitter"></i>
</a>
<a href="#" class="social-link">
<i data-feather="facebook"></i>
</a>
</div>
</div>
<div>
<h3 class="footer-heading">Services</h3>
<ul class="space-y-3">
<li v-for="service in services" :key="service">
<a href="#" class="footer-link">{{ service }}</a>
</li>
</ul>
</div>
<div>
<h3 class="footer-heading">Quick Links</h3>
<ul class="space-y-3">
<li v-for="link in quickLinks" :key="link.name">
<router-link :to="link.path" class="footer-link">{{ link.name }}</router-link>
</li>
</ul>
</div>
<div>
<h3 class="footer-heading">Contact</h3>
<div class="space-y-4">
<div class="flex items-start gap-3">
<i data-feather="map-pin" class="text-blue-500 mt-1"></i>
<span class="text-gray-400">200 Park Avenue, New York, NY 10166</span>
</div>
<div class="flex items-center gap-3">
<i data-feather="mail" class="text-blue-500"></i>
<span class="text-gray-400">contact@solstrategies.com</span>
</div>
<div class="flex items-center gap-3">
<i data-feather="phone" class="text-blue-500"></i>
<span class="text-gray-400">+1 (212) 555-0100</span>
</div>
</div>
</div>
</div>
<div class="container mx-auto px-4 border-t border-gray-800 mt-12 pt-8 text-center text-gray-500 text-sm">
&copy; {{ new Date().getFullYear() }} SolStrategies. All rights reserved.
</div>
</footer>
</template>
<script>
import { ref } from 'vue'
import feather from 'feather-icons'
export default {
setup() {
const services = ref([
'Strategic Communications',
'Crisis Management',
'Investment Security',
'Cyber Protection',
'Executive Protection'
])
const quickLinks = ref([
{ name: 'About Us', path: '/about' },
{ name: 'Insights', path: '/insights' },
{ name: 'Careers', path: '#' },
{ name: 'Contact', path: '/contact' },
{ name: 'Privacy Policy', path: '#' }
])
return {
services,
quickLinks
}
},
mounted() {
feather.replace()
}
}
</script>
<style scoped>
.footer-heading {
@apply text-lg font-bold mb-4 pb-2 relative;
}
.footer-heading::after {
content: '';
@apply absolute bottom-0 left-0 w-10 h-0.5 bg-blue-500;
}
.footer-link {
@apply text-gray-400 hover:text-white transition-colors duration-200;
}
.social-link {
@apply bg-gray-800 hover:bg-blue-600 text-white w-10 h-10 rounded-full flex items-center justify-center transition-all duration-200;
}
</style>
```