Skip to content

Commit c94a1e6

Browse files
committed
Add favicon
1 parent 02f902a commit c94a1e6

File tree

5 files changed

+21
-6
lines changed

5 files changed

+21
-6
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ To build the app for production, use
6868
elm make src/Main.elm --optimize --output=main.js
6969
````
7070

71-
Then deploy `main.js` and `index.html` using a webserver of your choice. Make sure the domain/address and port of your server is included in the _OAuth Redirect URLs_ list for your twitch app (See [Prerequisites](https://github.com/HS-Flensburg-DST/abschlussprojekt-fabian-w-und-florian#prerequisites)).
71+
Then deploy `main.js`, `assets`, `favicon.ico` and `index.html` using a webserver of your choice. Make sure the domain/address and port of your server is included in the _OAuth Redirect URLs_ list for your twitch app (See [Prerequisites](https://github.com/HS-Flensburg-DST/abschlussprojekt-fabian-w-und-florian#prerequisites)).
7272

7373

7474
## Miscellaneous
@@ -132,5 +132,4 @@ local storage. The `index.html` contains a script which provides respective Java
132132
- [repeat](https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/repeat/default/48px.svg)
133133
- [warning](https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsrounded/warning/default/48px.svg)
134134
- [check circle](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_circle%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048)
135-
- [info](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Ainfo%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048)
136-
- [close](https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/close/default/48px.svg)
135+
- [calendar today (modified for the favicon)]([blob:null/d2d98612-e0b2-4f5d-8153-78d195b3b127](https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/calendar_today/default/48px.svg))

assets/favicon-16x16.png

624 Bytes
Loading

assets/favicon-32x32.png

723 Bytes
Loading

favicon.ico

14.7 KB
Binary file not shown.

src/Main.elm

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import Browser.Navigation as Nav
55
import Css
66
import Css.Global
77
import Error exposing (Error(..))
8-
import Html.Styled as Html exposing (Html, a, button, div, h1, img, li, p, span, text, toUnstyled, ul)
9-
import Html.Styled.Attributes exposing (alt, class, classList, css, href, src, style, tabindex)
8+
import Html.Styled as Html exposing (Html, a, button, div, h1, img, li, node, p, span, text, toUnstyled, ul)
9+
import Html.Styled.Attributes exposing (alt, attribute, class, classList, css, href, rel, src, style, tabindex, type_)
1010
import Html.Styled.Events exposing (onClick)
1111
import Http
1212
import Icons
@@ -392,11 +392,27 @@ handleUrlMsg msg navKey =
392392

393393
view : Model -> Document Msg
394394
view model =
395-
{ title = "Stream Time"
395+
let
396+
favicon size =
397+
node
398+
"link"
399+
[ rel "icon"
400+
, type_ "image/png"
401+
, attribute "sizes" (sizeSquared size)
402+
, href ("/assets/favicon-" ++ sizeSquared size ++ ".png")
403+
]
404+
[]
405+
406+
sizeSquared size =
407+
String.fromInt size ++ "x" ++ String.fromInt size
408+
in
409+
{ title = "Stream time"
396410
, body =
397411
[ toUnstyled <|
398412
div []
399413
[ Css.Global.global Tw.globalStyles
414+
, favicon 32
415+
, favicon 64
400416
, div []
401417
[ case model of
402418
NotLoggedIn err urlInfo ->

0 commit comments

Comments
 (0)