File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<script lang =" ts" >
2- import BwIcon from ' $lib/components/bw-icon/bw-icon.svelte' ;
3- import { AcmTheme } from ' $lib/public/legacy/theme' ;
2+ import SocialIcon from ' $lib/components/social-icon/social-icon.svelte' ;
43
54 const footerItems = [
65 { title: ' Source Code' , path: ' /code' },
2120 {#each socials as socialPath (socialPath )}
2221 <li >
2322 <a href ={socialPath } target =" _blank" rel =" noopener noreferrer" >
24- <BwIcon
25- src ={` /assets${socialPath }.svg ` }
26- alt ={socialPath .slice (1 )}
27- filterOn ={[AcmTheme .Dark , AcmTheme .Light ]}
28- />
23+ <SocialIcon src ={` /assets${socialPath }.svg ` } alt ={socialPath .slice (1 )} width ={24 } />
2924 </a >
3025 </li >
3126 {/each }
107102
108103 .socials {
109104 display : flex ;
105+ padding-top : 6px ;
110106 gap : 32px ;
111107
112108 a {
113109 display : flex ;
114- padding-top : 6 px ;
110+ --icon-color : #ffffff ;
115111
116112 & :hover {
117- & :global (path ) {
118- fill : var (--acm-blue );
119- }
113+ --icon-color : var (--acm-blue );
120114 }
121115 }
122-
123- & :global (svg ) {
124- height : 32px ;
125- width : auto ;
126- }
127-
128- & :global (path ) {
129- fill : var (--perma-light );
130- transition : 0.25s ease-in-out ;
131- }
132116 }
133117 }
134118
Original file line number Diff line number Diff line change 1+ <script lang =" ts" >
2+ export let src: string ;
3+ export let alt: string ;
4+ export let width = 32 ;
5+ export let height = width ;
6+ </script >
7+
8+ <div
9+ role =" img"
10+ aria-label ={alt }
11+ class =" social-icon"
12+ style:--icon-url ="url( {src })"
13+ style:--size-w =" {width }px"
14+ style:--size-h =" {height }px"
15+ ></div >
16+
17+ <style lang =" scss" >
18+ .social-icon {
19+ width : var (--size-w );
20+ height : var (--size-h );
21+ display : inline-block ;
22+
23+ mask : var (--icon-url ) no-repeat center / contain ;
24+ -webkit-mask : var (--icon-url ) no-repeat center / contain ;
25+
26+ background-color : var (--icon-color , #ffffff );
27+
28+ transition : background-color 0.25s ease-in-out ;
29+ }
30+ </style >
You can’t perform that action at this time.
0 commit comments