wangxso commited on
Commit
4de3816
·
verified ·
1 Parent(s): e65e001

转换为vue的代码

Browse files
src/App.vue ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```vue
2
+ <template>
3
+ <div id="app">
4
+ <custom-navbar />
5
+ <router-view />
6
+ <custom-footer />
7
+ </div>
8
+ </template>
9
+
10
+ <script>
11
+ import CustomNavbar from './components/CustomNavbar.vue'
12
+ import CustomFooter from './components/CustomFooter.vue'
13
+
14
+ export default {
15
+ name: 'App',
16
+ components: {
17
+ CustomNavbar,
18
+ CustomFooter
19
+ }
20
+ }
21
+ </script>
22
+ ```
src/components/CustomFooter.vue ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```vue
2
+ <template>
3
+ <footer class="bg-gray-900 text-white py-16">
4
+ <div class="container mx-auto px-4 grid grid-cols-1 md:grid-cols-4 gap-8">
5
+ <div class="footer-about">
6
+ <div class="flex items-center gap-2 mb-4">
7
+ <i data-feather="shield" class="text-blue-500"></i>
8
+ <span class="font-serif font-bold text-lg">SolStrategies</span>
9
+ </div>
10
+ <p class="text-gray-400 mb-6">
11
+ Singapore-headquartered leader in integrated PR strategies, secure investments, and comprehensive security solutions.
12
+ </p>
13
+ <div class="flex gap-4">
14
+ <a href="#" class="social-link">
15
+ <i data-feather="linkedin"></i>
16
+ </a>
17
+ <a href="#" class="social-link">
18
+ <i data-feather="twitter"></i>
19
+ </a>
20
+ <a href="#" class="social-link">
21
+ <i data-feather="facebook"></i>
22
+ </a>
23
+ </div>
24
+ </div>
25
+
26
+ <div>
27
+ <h3 class="footer-heading">Services</h3>
28
+ <ul class="space-y-3">
29
+ <li v-for="service in services" :key="service">
30
+ <a href="#" class="footer-link">{{ service }}</a>
31
+ </li>
32
+ </ul>
33
+ </div>
34
+
35
+ <div>
36
+ <h3 class="footer-heading">Quick Links</h3>
37
+ <ul class="space-y-3">
38
+ <li v-for="link in quickLinks" :key="link.name">
39
+ <router-link :to="link.path" class="footer-link">{{ link.name }}</router-link>
40
+ </li>
41
+ </ul>
42
+ </div>
43
+
44
+ <div>
45
+ <h3 class="footer-heading">Contact</h3>
46
+ <div class="space-y-4">
47
+ <div class="flex items-start gap-3">
48
+ <i data-feather="map-pin" class="text-blue-500 mt-1"></i>
49
+ <span class="text-gray-400">200 Park Avenue, New York, NY 10166</span>
50
+ </div>
51
+ <div class="flex items-center gap-3">
52
+ <i data-feather="mail" class="text-blue-500"></i>
53
+ <span class="text-gray-400">contact@solstrategies.com</span>
54
+ </div>
55
+ <div class="flex items-center gap-3">
56
+ <i data-feather="phone" class="text-blue-500"></i>
57
+ <span class="text-gray-400">+1 (212) 555-0100</span>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ </div>
62
+
63
+ <div class="container mx-auto px-4 border-t border-gray-800 mt-12 pt-8 text-center text-gray-500 text-sm">
64
+ &copy; {{ new Date().getFullYear() }} SolStrategies. All rights reserved.
65
+ </div>
66
+ </footer>
67
+ </template>
68
+
69
+ <script>
70
+ import { ref } from 'vue'
71
+ import feather from 'feather-icons'
72
+
73
+ export default {
74
+ setup() {
75
+ const services = ref([
76
+ 'Strategic Communications',
77
+ 'Crisis Management',
78
+ 'Investment Security',
79
+ 'Cyber Protection',
80
+ 'Executive Protection'
81
+ ])
82
+
83
+ const quickLinks = ref([
84
+ { name: 'About Us', path: '/about' },
85
+ { name: 'Insights', path: '/insights' },
86
+ { name: 'Careers', path: '#' },
87
+ { name: 'Contact', path: '/contact' },
88
+ { name: 'Privacy Policy', path: '#' }
89
+ ])
90
+
91
+ return {
92
+ services,
93
+ quickLinks
94
+ }
95
+ },
96
+ mounted() {
97
+ feather.replace()
98
+ }
99
+ }
100
+ </script>
101
+
102
+ <style scoped>
103
+ .footer-heading {
104
+ @apply text-lg font-bold mb-4 pb-2 relative;
105
+ }
106
+
107
+ .footer-heading::after {
108
+ content: '';
109
+ @apply absolute bottom-0 left-0 w-10 h-0.5 bg-blue-500;
110
+ }
111
+
112
+ .footer-link {
113
+ @apply text-gray-400 hover:text-white transition-colors duration-200;
114
+ }
115
+
116
+ .social-link {
117
+ @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;
118
+ }
119
+ </style>
120
+ ```
src/components/CustomNavbar.vue ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```vue
2
+ <template>
3
+ <nav class="fixed top-0 left-0 right-0 z-50 transition-all duration-300" :class="{ 'scrolled': isScrolled }">
4
+ <div class="container mx-auto px-4 py-4 flex justify-between items-center">
5
+ <router-link to="/" class="logo flex items-center gap-2">
6
+ <i data-feather="shield" class="text-blue-500"></i>
7
+ <span class="font-serif font-bold text-white">SolStrategies</span>
8
+ </router-link>
9
+
10
+ <ul class="hidden md:flex gap-8 items-center">
11
+ <li v-for="item in navItems" :key="item.name">
12
+ <router-link :to="item.path" class="nav-link text-white hover:text-white transition-colors duration-200">
13
+ {{ item.name }}
14
+ </router-link>
15
+ </li>
16
+ <li>
17
+ <router-link to="/contact" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md transition-all duration-200">
18
+ Contact
19
+ </router-link>
20
+ </li>
21
+ </ul>
22
+
23
+ <button @click="toggleMobileMenu" class="md:hidden text-white">
24
+ <i :data-feather="mobileMenuOpen ? 'x' : 'menu'"></i>
25
+ </button>
26
+ </div>
27
+
28
+ <div v-if="mobileMenuOpen" class="md:hidden bg-gray-900 py-4 px-4">
29
+ <ul class="flex flex-col gap-4">
30
+ <li v-for="item in navItems" :key="item.name">
31
+ <router-link
32
+ :to="item.path"
33
+ class="block text-white py-2 border-b border-gray-800 hover:text-blue-400 transition-colors duration-200"
34
+ @click="mobileMenuOpen = false"
35
+ >
36
+ {{ item.name }}
37
+ </router-link>
38
+ </li>
39
+ <li>
40
+ <router-link
41
+ to="/contact"
42
+ class="block bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md text-center mt-2 transition-all duration-200"
43
+ @click="mobileMenuOpen = false"
44
+ >
45
+ Contact
46
+ </router-link>
47
+ </li>
48
+ </ul>
49
+ </div>
50
+ </nav>
51
+ </template>
52
+
53
+ <script>
54
+ import { ref, onMounted, onUnmounted } from 'vue'
55
+ import feather from 'feather-icons'
56
+
57
+ export default {
58
+ setup() {
59
+ const isScrolled = ref(false)
60
+ const mobileMenuOpen = ref(false)
61
+ const navItems = [
62
+ { name: 'Home', path: '/' },
63
+ { name: 'Services', path: '/services' },
64
+ { name: 'About', path: '/about' },
65
+ { name: 'Insights', path: '/insights' }
66
+ ]
67
+
68
+ const handleScroll = () => {
69
+ isScrolled.value = window.scrollY > 50
70
+ }
71
+
72
+ const toggleMobileMenu = () => {
73
+ mobileMenuOpen.value = !mobileMenuOpen.value
74
+ }
75
+
76
+ onMounted(() => {
77
+ window.addEventListener('scroll', handleScroll)
78
+ feather.replace()
79
+ })
80
+
81
+ onUnmounted(() => {
82
+ window.removeEventListener('scroll', handleScroll)
83
+ })
84
+
85
+ return {
86
+ isScrolled,
87
+ mobileMenuOpen,
88
+ navItems,
89
+ toggleMobileMenu
90
+ }
91
+ }
92
+ }
93
+ </script>
94
+
95
+ <style scoped>
96
+ .scrolled {
97
+ @apply bg-gray-900 py-2 shadow-md;
98
+ }
99
+
100
+ .nav-link {
101
+ @apply relative;
102
+ }
103
+
104
+ .nav-link::after {
105
+ content: '';
106
+ @apply absolute bottom-0 left-0 w-0 h-0.5 bg-blue-500 transition-all duration-300;
107
+ }
108
+
109
+ .nav-link:hover::after {
110
+ @apply w-full;
111
+ }
112
+
113
+ .router-link-active::after {
114
+ @apply w-full;
115
+ }
116
+ </style>
117
+ ```
src/components/home/AboutSection.vue ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```vue
2
+ <template>
3
+ <section class="py-20 bg-gray-100">
4
+ <div class="max-w-7xl mx-auto px-4">
5
+ <div class="flex flex-col md:flex-row items-center gap-12">
6
+ <div class="md:w-1/2">
7
+ <img
8
+ src="http://static.photos/office/1024x576/22"
9
+ alt="SolStrategies boardroom"
10
+ class="rounded-lg shadow-xl w-full h-auto"
11
+ >
12
+ </div>
13
+ <div class="md:w-1/2">
14
+ <h2 class="text-3xl font-bold mb-6 font-serif">About SolStrategies</h2>
15
+ <p class="text-gray-700 mb-4 leading-relaxed">
16
+ SolStrategies Capital Shield is a premier global consultancy specializing in the intersection of strategic communications, capital deployment, and enterprise security. Founded in 2012 by former intelligence and financial professionals, we bring unparalleled expertise to complex challenges.
17
+ </p>
18
+ <p class="text-gray-700 mb-6 leading-relaxed">
19
+ Our multidisciplinary approach integrates cutting-edge security protocols with market-moving investment strategies and reputation management, serving Fortune 500 companies, governments, and high-net-worth individuals.
20
+ </p>
21
+ <router-link
22
+ to="/about"
23
+ class="inline-block bg-gray-800 hover:bg-gray-900 text-white px-6 py-3 rounded-md font-medium transition duration-300"
24
+ >
25
+ Learn More
26
+ </router-link>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ </section>
31
+ </template>
32
+ ```
src/main.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { createApp } from 'vue'
2
+ import App from './App.vue'
3
+ import router from './router'
4
+ import './assets/style.css'
5
+ import { createHead } from '@vueuse/head'
6
+ import feather from 'feather-icons'
7
+
8
+ const head = createHead()
9
+ const app = createApp(App)
10
+
11
+ app.use(router)
12
+ app.use(head)
13
+ app.mount('#app')
14
+
15
+ feather.replace()
src/router/index.js ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { createRouter, createWebHistory } from 'vue-router'
2
+ import Home from '../views/Home.vue'
3
+ import About from '../views/About.vue'
4
+ import Services from '../views/Services.vue'
5
+ import Insights from '../views/Insights.vue'
6
+ import Contact from '../views/Contact.vue'
7
+
8
+ const routes = [
9
+ {
10
+ path: '/',
11
+ name: 'Home',
12
+ component: Home
13
+ },
14
+ {
15
+ path: '/about',
16
+ name: 'About',
17
+ component: About
18
+ },
19
+ {
20
+ path: '/services',
21
+ name: 'Services',
22
+ component: Services
23
+ },
24
+ {
25
+ path: '/insights',
26
+ name: 'Insights',
27
+ component: Insights
28
+ },
29
+ {
30
+ path: '/contact',
31
+ name: 'Contact',
32
+ component: Contact
33
+ }
34
+ ]
35
+
36
+ const router = createRouter({
37
+ history: createWebHistory(process.env.BASE_URL),
38
+ routes,
39
+ scrollBehavior() {
40
+ return { top: 0 }
41
+ }
42
+ })
43
+
44
+ export default router
src/views/Home.vue ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```vue
2
+ <template>
3
+ <main>
4
+ <!-- Hero Section -->
5
+ <section class="relative h-screen flex items-center justify-center text-center px-4 bg-gradient-to-b from-gray-900 to-gray-800 text-white">
6
+ <div class="absolute inset-0 bg-black opacity-50"></div>
7
+ <div class="relative z-10 max-w-4xl mx-auto">
8
+ <h1 class="text-4xl md:text-6xl font-bold mb-6 font-serif">SolStrategies</h1>
9
+ <p class="text-xl md:text-2xl mb-8 leading-relaxed">
10
+ Headquartered in Singapore - Integrating strategic communications, capital intelligence, and security fortification for global enterprises
11
+ </p>
12
+ <div class="flex gap-4 justify-center">
13
+ <router-link
14
+ to="/services"
15
+ class="bg-blue-600 hover:bg-blue-700 text-white px-8 py-3 rounded-md font-medium transition duration-300"
16
+ >
17
+ Our Services
18
+ </router-link>
19
+ <router-link
20
+ to="/contact"
21
+ class="border-2 border-white hover:bg-white hover:text-gray-900 text-white px-8 py-3 rounded-md font-medium transition duration-300"
22
+ >
23
+ Contact Us
24
+ </router-link>
25
+ </div>
26
+ </div>
27
+ </section>
28
+
29
+ <!-- Trust Indicators -->
30
+ <section class="py-12 bg-white">
31
+ <div class="max-w-7xl mx-auto px-4">
32
+ <div class="grid grid-cols-2 md:grid-cols-4 gap-8 text-center">
33
+ <div v-for="indicator in trustIndicators" :key="indicator.title" class="p-6">
34
+ <div class="text-blue-600 mb-4">
35
+ <i :data-feather="indicator.icon" class="w-12 h-12 mx-auto"></i>
36
+ </div>
37
+ <h3 class="text-xl font-bold mb-2">{{ indicator.title }}</h3>
38
+ <p class="text-gray-600">{{ indicator.description }}</p>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ </section>
43
+
44
+ <!-- About Section -->
45
+ <AboutSection />
46
+
47
+ <!-- Case Studies -->
48
+ <CaseStudies />
49
+
50
+ <!-- CTA Section -->
51
+ <CTASection />
52
+ </main>
53
+ </template>
54
+
55
+ <script>
56
+ import { ref, onMounted } from 'vue'
57
+ import feather from 'feather-icons'
58
+ import AboutSection from '@/components/home/AboutSection.vue'
59
+ import CaseStudies from '@/components/home/CaseStudies.vue'
60
+ import CTASection from '@/components/home/CTASection.vue'
61
+
62
+ export default {
63
+ components: {
64
+ AboutSection,
65
+ CaseStudies,
66
+ CTASection
67
+ },
68
+ setup() {
69
+ const trustIndicators = ref([
70
+ {
71
+ icon: 'shield',
72
+ title: 'Enterprise Security',
73
+ description: 'Fortified solutions for digital and physical assets'
74
+ },
75
+ {
76
+ icon: 'trending-up',
77
+ title: 'Capital Growth',
78
+ description: 'Strategic investment opportunities with risk mitigation'
79
+ },
80
+ {
81
+ icon: 'globe',
82
+ title: 'Global PR',
83
+ description: 'Crisis management and reputation enhancement'
84
+ },
85
+ {
86
+ icon: 'lock',
87
+ title: 'Compliance',
88
+ description: 'Regulatory adherence across jurisdictions'
89
+ }
90
+ ])
91
+
92
+ onMounted(() => {
93
+ feather.replace()
94
+ })
95
+
96
+ return {
97
+ trustIndicators
98
+ }
99
+ }
100
+ }
101
+ </script>
102
+ ```