|
67 | 67 | </div> |
68 | 68 |
|
69 | 69 | <div class="grid__row icons__list"> |
70 | | - |
| 70 | + |
71 | 71 | <section class="grid__row"> |
72 | 72 | <div class="section__head"> |
73 | 73 | <h2 class="icon__title-section">App Icon</h2> |
|
77 | 77 | </ul> |
78 | 78 | </div> |
79 | 79 | <div class="appicon__wrapper" v-if="isMaterial"> |
80 | | - <div class="box" |
81 | | - v-for="icon in filteredMdIcons" |
| 80 | + <div class="box" |
| 81 | + v-for="icon in filteredMdIcons" |
82 | 82 | :key="icon.name" |
83 | 83 | @click="activateIcon(icon)"> |
84 | 84 | <component :is="icon.name" |
|
91 | 91 | </div> |
92 | 92 | </div> |
93 | 93 | <div class="appicon__wrapper" v-if="isIos"> |
94 | | - <div class="box" |
95 | | - v-for="icon in filteredIosIcons" |
| 94 | + <div class="box" |
| 95 | + v-for="icon in filteredIosIcons" |
96 | 96 | :key="icon.name" |
97 | 97 | @click="activateIcon(icon)"> |
98 | 98 | <component :is="icon.name" |
|
105 | 105 | </div> |
106 | 106 | </div> |
107 | 107 | </section> |
108 | | - |
| 108 | + |
109 | 109 | <section class="grid__row"> |
110 | 110 | <div class="section__head"> |
111 | 111 | <h2 class="icon__title-section">Logo Icon</h2> |
112 | 112 | </div> |
113 | 113 | <div class="appicon__wrapper"> |
114 | | - <div class="box" |
115 | | - v-for="icon in filteredLogoIcons" |
| 114 | + <div class="box" |
| 115 | + v-for="icon in filteredLogoIcons" |
116 | 116 | :key="icon.name" |
117 | 117 | @click="activateIcon(icon)"> |
118 | 118 | <component :is="icon.name" |
|
134 | 134 | <h2>Contribute</h2> |
135 | 135 | <p>Feel free to fork <i class="fa fa-code-fork"></i> on <a href="https://github.com/mazipan/vue-ionicons" target="_blank">GitHub <i class="fa fa-github"></i></a> if you have any features <i class="fa fa-cart-plus"></i> or bugs <i class="fa fa-bug"></i>!</p> |
136 | 136 |
|
137 | | - <h2>Contact Developer</h2> |
138 | | - <p> |
139 | | - <a href="https://github.com/mazipan"> |
140 | | - <LogoGithubIcon w="30px" h="30px" /> |
141 | | - </a> |
142 | | - <a href="mailto:mazipanneh@gmail.com"> |
143 | | - <IosMailIcon w="30px" h="30px" /> |
144 | | - </a> |
145 | | - <a href="https://facebook.com/mazipanneh"> |
146 | | - <LogoFacebookIcon w="30px" h="30px" /> |
147 | | - </a> |
148 | | - <a href="https://twitter.com/Maz_Ipan"> |
149 | | - <LogoTwitterIcon w="30px" h="30px" /> |
150 | | - </a> |
151 | | - <a href="https://id.linkedin.com/in/irfanmaulanamazipan"> |
152 | | - <LogoLinkedinIcon w="30px" h="30px" /> |
153 | | - </a> |
154 | | - </p> |
155 | | - |
156 | | - <p>Copyright © 2017 <a href="https://mazipanneh.com/blog/">Irfan Maulana</a>, All Rights Reserved.</p> |
| 137 | + <p>Copyright © 2017 <a href="https://mazipan.space/">Irfan Maulana</a>, All Rights Reserved.</p> |
157 | 138 | </footer> |
158 | 139 |
|
159 | 140 | <section |
160 | 141 | :class="{ 'show' : visibleToast }" |
161 | 142 | class="toast"> |
162 | | - <span>import {{ activeIcon.libraryName }} from 'vue-ionicons/dist/{{ activeIcon.name.replace('-icon', '') }}.vue'</span> |
| 143 | + <input :id="`txt-${activeIcon.libraryName}`" type="text" :value="activeIcon.inputValue" /> |
163 | 144 | </section> |
164 | 145 |
|
165 | 146 | </div> |
@@ -192,7 +173,8 @@ export default { |
192 | 173 | activeIcon: { |
193 | 174 | libraryName: '', |
194 | 175 | name: '', |
195 | | - readableName: '' |
| 176 | + readableName: '', |
| 177 | + inputValue: '' |
196 | 178 | }, |
197 | 179 | visibleToast: false |
198 | 180 | } |
@@ -236,8 +218,19 @@ export default { |
236 | 218 | } |
237 | 219 | }, |
238 | 220 | activateIcon (icon) { |
239 | | - this.activeIcon = icon |
240 | | - this.visibleToast = true |
| 221 | + this.activeIcon = { |
| 222 | + ...icon, |
| 223 | + inputValue: `import ${icon.libraryName} from 'vue-ionicons/dist/${icon.name.replace('-icon', '')}.vue'` |
| 224 | + } |
| 225 | + this.visibleToast = true |
| 226 | +
|
| 227 | + setTimeout(() => { |
| 228 | + var copyText = document.getElementById(`txt-${icon.libraryName}`); |
| 229 | + copyText.select(); |
| 230 | + copyText.setSelectionRange(0, 99999); |
| 231 | + document.execCommand("copy"); |
| 232 | + }, 1000) |
| 233 | +
|
241 | 234 | setTimeout(() => { |
242 | 235 | this.visibleToast = false |
243 | 236 | }, 5000) |
|
0 commit comments