|
| 1 | +<script> |
| 2 | +import ThemeSwitcher from '../ThemeSwitcher'; |
| 3 | +import HireMeModal from '../HireMeModal.vue'; |
| 4 | +import feather from 'feather-icons'; |
| 5 | +import AppHeaderLinks from './AppHeaderLinks.vue'; |
| 6 | +import Button from '../reusable/Button.vue'; |
| 7 | +
|
| 8 | +export default { |
| 9 | + components: { |
| 10 | + ThemeSwitcher, |
| 11 | + HireMeModal, |
| 12 | + AppHeaderLinks, |
| 13 | + Button, |
| 14 | + }, |
| 15 | + data() { |
| 16 | + return { |
| 17 | + isOpen: false, |
| 18 | + theme: '', |
| 19 | + modal: false, |
| 20 | + categories: [ |
| 21 | + { |
| 22 | + id: 1, |
| 23 | + value: 'web', |
| 24 | + name: 'Web Application', |
| 25 | + }, |
| 26 | + { |
| 27 | + id: 2, |
| 28 | + value: 'mobile', |
| 29 | + name: 'Mobile Application', |
| 30 | + }, |
| 31 | + { |
| 32 | + id: 3, |
| 33 | + value: 'ui-ux', |
| 34 | + name: 'UI/UX Design', |
| 35 | + }, |
| 36 | + { |
| 37 | + id: 4, |
| 38 | + value: 'branding', |
| 39 | + name: 'Branding & Anim', |
| 40 | + }, |
| 41 | + ], |
| 42 | + }; |
| 43 | + }, |
| 44 | +
|
| 45 | + created() { |
| 46 | + this.theme = localStorage.getItem('theme') || 'light'; |
| 47 | + }, |
| 48 | + mounted() { |
| 49 | + feather.replace(); |
| 50 | + this.theme = localStorage.getItem('theme') || 'light'; |
| 51 | + }, |
| 52 | + methods: { |
| 53 | + updateTheme(theme) { |
| 54 | + this.theme = theme; |
| 55 | + }, |
| 56 | + showModal() { |
| 57 | + if (this.modal) { |
| 58 | + // Stop screen scrolling |
| 59 | + document |
| 60 | + .getElementsByTagName('html')[0] |
| 61 | + .classList.remove('overflow-y-hidden'); |
| 62 | + this.modal = false; |
| 63 | + } else { |
| 64 | + document |
| 65 | + .getElementsByTagName('html')[0] |
| 66 | + .classList.add('overflow-y-hidden'); |
| 67 | + this.modal = true; |
| 68 | + } |
| 69 | + }, |
| 70 | + }, |
| 71 | + updated() { |
| 72 | + feather.replace(); |
| 73 | + }, |
| 74 | +}; |
| 75 | +</script> |
| 76 | + |
1 | 77 | <template>
|
2 | 78 | <nav id="nav" class="sm:container sm:mx-auto">
|
3 | 79 | <!-- Header start -->
|
|
96 | 172 | </nav>
|
97 | 173 | </template>
|
98 | 174 |
|
99 |
| -<script> |
100 |
| -import ThemeSwitcher from '../ThemeSwitcher'; |
101 |
| -import HireMeModal from '../HireMeModal.vue'; |
102 |
| -import feather from 'feather-icons'; |
103 |
| -import AppHeaderLinks from './AppHeaderLinks.vue'; |
104 |
| -import Button from '../reusable/Button.vue'; |
105 |
| -
|
106 |
| -export default { |
107 |
| - components: { |
108 |
| - ThemeSwitcher, |
109 |
| - HireMeModal, |
110 |
| - AppHeaderLinks, |
111 |
| - Button, |
112 |
| - }, |
113 |
| - data() { |
114 |
| - return { |
115 |
| - isOpen: false, |
116 |
| - theme: '', |
117 |
| - modal: false, |
118 |
| - categories: [ |
119 |
| - { |
120 |
| - id: 1, |
121 |
| - value: 'web', |
122 |
| - name: 'Web Application', |
123 |
| - }, |
124 |
| - { |
125 |
| - id: 2, |
126 |
| - value: 'mobile', |
127 |
| - name: 'Mobile Application', |
128 |
| - }, |
129 |
| - { |
130 |
| - id: 3, |
131 |
| - value: 'ui-ux', |
132 |
| - name: 'UI/UX Design', |
133 |
| - }, |
134 |
| - { |
135 |
| - id: 4, |
136 |
| - value: 'branding', |
137 |
| - name: 'Branding & Anim', |
138 |
| - }, |
139 |
| - ], |
140 |
| - }; |
141 |
| - }, |
142 |
| -
|
143 |
| - created() { |
144 |
| - this.theme = localStorage.getItem('theme') || 'light'; |
145 |
| - }, |
146 |
| - mounted() { |
147 |
| - feather.replace(); |
148 |
| - this.theme = localStorage.getItem('theme') || 'light'; |
149 |
| - }, |
150 |
| - methods: { |
151 |
| - updateTheme(theme) { |
152 |
| - this.theme = theme; |
153 |
| - }, |
154 |
| - showModal() { |
155 |
| - if (this.modal) { |
156 |
| - // Stop screen scrolling |
157 |
| - document |
158 |
| - .getElementsByTagName('html')[0] |
159 |
| - .classList.remove('overflow-y-hidden'); |
160 |
| - this.modal = false; |
161 |
| - } else { |
162 |
| - document |
163 |
| - .getElementsByTagName('html')[0] |
164 |
| - .classList.add('overflow-y-hidden'); |
165 |
| - this.modal = true; |
166 |
| - } |
167 |
| - }, |
168 |
| - }, |
169 |
| - updated() { |
170 |
| - feather.replace(); |
171 |
| - }, |
172 |
| -}; |
173 |
| -</script> |
174 |
| - |
175 | 175 | <style scoped>
|
176 | 176 | #nav a.router-link-exact-active {
|
177 | 177 | @apply text-indigo-700;
|
|
0 commit comments