File tree 5 files changed +31
-21
lines changed
5 files changed +31
-21
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,20 @@ pub const ENDPOINT: Endpoint = Endpoint {
22
22
goodreads : "/api/goodreads" ,
23
23
} ;
24
24
25
+ pub const SOCIAL : SocialLinks = SocialLinks {
26
+ github : "https://github.com/wyatt-avilla" ,
27
+ lastfm : "https://www.last.fm/user/wowitswyatt" ,
28
+ letterboxd : "https://letterboxd.com/wowitswyatt/" ,
29
+ goodreads : "https://www.goodreads.com/user/show/159014522-wowitswyatt" ,
30
+ } ;
31
+
32
+ pub struct SocialLinks < ' a > {
33
+ pub github : & ' a str ,
34
+ pub lastfm : & ' a str ,
35
+ pub letterboxd : & ' a str ,
36
+ pub goodreads : & ' a str ,
37
+ }
38
+
25
39
pub struct Endpoint < ' a > {
26
40
pub base : & ' a str ,
27
41
pub github : & ' a str ,
Original file line number Diff line number Diff line change
1
+ use config:: SOCIAL ;
1
2
use stylist:: yew:: styled_component;
2
3
use yew:: prelude:: * ;
3
4
@@ -17,16 +18,14 @@ pub fn Button() -> Html {
17
18
</svg>
18
19
} ;
19
20
20
- let onclick = Callback :: noop ( ) ;
21
-
22
21
html ! {
23
- <button class={ css!( r#"
22
+ <a href= { SOCIAL . github } class={ css!( r#"
24
23
background: none;
25
24
border: none;
26
25
cursor: pointer;
27
26
border-radius: 50%;
28
- "# ) } onclick= { onclick } >
27
+ "# ) } >
29
28
{ icon_svg. clone( ) }
30
- </button >
29
+ </a >
31
30
}
32
31
}
Original file line number Diff line number Diff line change
1
+ use config:: SOCIAL ;
1
2
use stylist:: yew:: styled_component;
2
3
use yew:: prelude:: * ;
3
4
@@ -9,16 +10,14 @@ pub fn Button() -> Html {
9
10
</svg>
10
11
} ;
11
12
12
- let onclick = Callback :: noop ( ) ;
13
-
14
13
html ! {
15
- <button class={ css!( r#"
14
+ <a href= { SOCIAL . goodreads } class={ css!( r#"
16
15
background: none;
17
16
border: none;
18
17
cursor: pointer;
19
18
border-radius: 50%;
20
- "# ) } onclick= { onclick } >
21
- { icon_svg. clone( ) }
22
- </button >
19
+ "# ) } >
20
+ { icon_svg. clone( ) }
21
+ </a >
23
22
}
24
23
}
Original file line number Diff line number Diff line change
1
+ use config:: SOCIAL ;
1
2
use stylist:: yew:: styled_component;
2
3
use yew:: prelude:: * ;
3
4
@@ -9,16 +10,14 @@ pub fn Button() -> Html {
9
10
</svg>
10
11
} ;
11
12
12
- let onclick = Callback :: noop ( ) ;
13
-
14
13
html ! {
15
- <button class={ css!( r#"
14
+ <a href= { SOCIAL . lastfm } class={ css!( r#"
16
15
background: none;
17
16
border: none;
18
17
cursor: pointer;
19
18
border-radius: 50%;
20
- "# ) } onclick= { onclick } >
19
+ "# ) } >
21
20
{ icon_svg. clone( ) }
22
- </button >
21
+ </a >
23
22
}
24
23
}
Original file line number Diff line number Diff line change
1
+ use config:: SOCIAL ;
1
2
use stylist:: yew:: styled_component;
2
3
use yew:: prelude:: * ;
3
4
@@ -36,16 +37,14 @@ pub fn Button() -> Html {
36
37
</svg>
37
38
} ;
38
39
39
- let onclick = Callback :: noop ( ) ;
40
-
41
40
html ! {
42
- <button class={ css!( r#"
41
+ <a href= { SOCIAL . letterboxd } class={ css!( r#"
43
42
background: none;
44
43
border: none;
45
44
cursor: pointer;
46
45
border-radius: 50%;
47
- "# ) } onclick= { onclick } >
46
+ "# ) } >
48
47
{ icon_svg. clone( ) }
49
- </button >
48
+ </a >
50
49
}
51
50
}
You can’t perform that action at this time.
0 commit comments