File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed
Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 44 < meta charset ="UTF-8 " />
55 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
66 < meta name ="theme-color " content ="#152232 " />
7+ < link rel ="icon " href ="/favicon.svg " type ="image/svg+xml " />
78 < title > anifunnel</ title >
89 </ head >
910 < body >
Original file line number Diff line number Diff line change @@ -60,6 +60,14 @@ async fn management_js() -> responders::StaticContent<RawJavaScript<&'static str
6060 responders:: StaticContent :: new ( RawJavaScript ( include_str ! ( "../dist/assets/index.js" ) ) )
6161}
6262
63+ #[ get( "/favicon.svg" ) ]
64+ async fn favicon_svg ( ) -> responders:: StaticContent < ( rocket:: http:: ContentType , & ' static str ) > {
65+ responders:: StaticContent :: new ( (
66+ rocket:: http:: ContentType :: SVG ,
67+ include_str ! ( "../dist/favicon.svg" ) ,
68+ ) )
69+ }
70+
6371#[ get( "/" ) ]
6472async fn management_redirect ( ) -> Redirect {
6573 Redirect :: to ( uri ! ( management) )
@@ -204,6 +212,7 @@ fn build_server(
204212 api:: user_post,
205213 api:: anime_get,
206214 api:: anime_override,
215+ favicon_svg,
207216 management,
208217 management_css,
209218 management_js,
@@ -322,6 +331,7 @@ mod test {
322331 #[ test_case( "/admin" , "text/html; charset=utf-8" ; "front-end" ) ]
323332 #[ test_case( "/assets/index.css" , "text/css; charset=utf-8" ; "css" ) ]
324333 #[ test_case( "/assets/index.js" , "text/javascript" ; "javascript" ) ]
334+ #[ test_case( "/favicon.svg" , "image/svg+xml" ; "favicon" ) ]
325335 fn management_static_content ( url : & str , content_type : & str ) {
326336 let client = build_client ( build_state ( "" . into ( ) ) ) ;
327337 let response = client. get ( url) . dispatch ( ) ;
You can’t perform that action at this time.
0 commit comments