@@ -5,27 +5,30 @@ import 'animate.css'
55const chrome_url = ' https://chromewebstore.google.com/detail/django-files/abpbiefojfkekhkjnpakpekkpeibnjej'
66const firefox_url = ' https://addons.mozilla.org/addon/django-files'
77
8- // Browsers
9- const baseUrl = ' https://cdnjs.cloudflare.com/ajax/libs/browser-logos/75.0.1'
10- const browsers = [
11- { name: ' Chrome' , url: chrome_url, img: ' chrome/chrome_48x48.png' },
12- { name: ' Firefox' , url: firefox_url, img: ' firefox/firefox_48x48.png' },
13- { name: ' Edge' , url: chrome_url, img: ' edge/edge_48x48.png' },
14- { name: ' Opera' , url: chrome_url, img: ' opera/opera_48x48.png' },
15- { name: ' Brave' , url: chrome_url, img: ' brave/brave_48x48.png' },
16- // { name: 'Chromium', url: chrome_url, img: 'chromium/chromium_48x48.png' },
17- ]
18-
19- // Style from Props
8+ // Props
209const props = defineProps ({
2110 animation: { type: String , default: null },
2211 centered: { type: Boolean , default: false },
2312 margin: { type: String , default: null },
13+ size: { type: String , default: ' 48' }, // 16,24,32,48,64,128,256,512
2414})
2515
16+ // Browsers
17+ const baseUrl = ' https://cdnjs.cloudflare.com/ajax/libs/browser-logos/75.0.1'
18+ const browsers = [
19+ { name: ' Chrome' , url: chrome_url, img: ' chrome/chrome' },
20+ { name: ' Firefox' , url: firefox_url, img: ' firefox/firefox' },
21+ { name: ' Edge' , url: chrome_url, img: ' edge/edge' },
22+ { name: ' Opera' , url: chrome_url, img: ' opera/opera' },
23+ { name: ' Brave' , url: chrome_url, img: ' brave/brave' },
24+ // { name: 'Chromium', url: chrome_url, img: 'chromium/chromium' },
25+ ]
26+
27+ // Class
2628const imageClass = props .animation ? ` animate__animated ${ props .animation } ` : null
2729
28- const iconStyle = {}
30+ // Style
31+ const iconStyle = { minHeight: ` ${ props .size } px` }
2932if (props .centered ) iconStyle .textAlign = ' center'
3033if (props .margin ) iconStyle .margin = props .margin
3134 </script >
@@ -41,19 +44,20 @@ if (props.margin) iconStyle.margin = props.margin
4144 target =" _blank"
4245 rel =" noopener"
4346 >
44- <img :alt =" browser.name" :src =" `${baseUrl}/${browser.img}`" :class =" imageClass" width =" 48" height =" 48" />
47+ <img
48+ :alt =" browser.name"
49+ :width =" props.size"
50+ :height =" props.size"
51+ :src =" `${baseUrl}/${browser.img}_${props.size}x${props.size}.png`"
52+ :class =" imageClass"
53+ />
4554 </a >
4655 </div >
4756</template >
4857
4958<style scoped>
50- .browser-icons {
51- min-height : 48px ;
52- }
53- .browser-icons img {
54- margin-right : 6px ;
55- }
5659.browser-icons a {
60+ margin-right : 8px ;
5761 display : inline-block ;
5862 vertical-align : middle ;
5963 transform : translateZ (0 );
0 commit comments