mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
feat: more icons for source urls (#218)
This commit is contained in:
parent
1f440475ed
commit
9e3db6b882
1 changed files with 46 additions and 9 deletions
|
@ -318,14 +318,20 @@ defmodule PhilomenaWeb.ImageView do
|
|||
"fab fa-twitter"
|
||||
|
||||
u
|
||||
when u in ["deviantart.com", "sta.sh", "www.sta.sh"] ->
|
||||
when u in [
|
||||
"deviantart.com",
|
||||
"sta.sh",
|
||||
"www.sta.sh",
|
||||
"images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com",
|
||||
"wixmp-ed30a86b8c4ca887773594c2.wixmp.com"
|
||||
] ->
|
||||
"fab fa-deviantart"
|
||||
|
||||
u
|
||||
when u in ["cdn.discordapp.com", "discordapp.com", "discord.com", "media.discordapp.net"] ->
|
||||
"fab fa-discord"
|
||||
|
||||
u when u in ["youtube.com", "www.youtube.com"] ->
|
||||
u when u in ["youtube.com", "www.youtube.com", "youtu.be"] ->
|
||||
"fab fa-youtube"
|
||||
|
||||
u when u in ["pillowfort.social", "www.pillowfort.social"] ->
|
||||
|
@ -343,6 +349,7 @@ defmodule PhilomenaWeb.ImageView do
|
|||
u
|
||||
when u in [
|
||||
"ych.art",
|
||||
"cdn.ych.art",
|
||||
"ych.commishes.com",
|
||||
"commishes.com",
|
||||
"portfolio.commishes.com",
|
||||
|
@ -350,13 +357,29 @@ defmodule PhilomenaWeb.ImageView do
|
|||
] ->
|
||||
"fa fa-palette"
|
||||
|
||||
u
|
||||
when u in ["ko-fi.com", "storage.ko-fi.com", "buymeacoffee.com", "www.buymeacoffee.com"] ->
|
||||
"fa fa-coffee"
|
||||
|
||||
u when u in ["artstation.com", "www.artstation.com"] ->
|
||||
"fab fa-artstation"
|
||||
|
||||
u when u in ["instagram.com", "www.instagram.com"] ->
|
||||
"fab fa-instagram"
|
||||
|
||||
u when u in ["reddit.com", "www.reddit.com"] ->
|
||||
u when u in ["t.me"] ->
|
||||
"fab fa-telegram"
|
||||
|
||||
u
|
||||
when u in [
|
||||
"reddit.com",
|
||||
"www.reddit.com",
|
||||
"old.reddit.com",
|
||||
"redd.it",
|
||||
"i.redd.it",
|
||||
"v.redd.it",
|
||||
"preview.redd.it"
|
||||
] ->
|
||||
"fab fa-reddit"
|
||||
|
||||
u when u in ["facebook.com", "www.facebook.com", "fb.me", "www.fb.me"] ->
|
||||
|
@ -405,12 +428,26 @@ defmodule PhilomenaWeb.ImageView do
|
|||
|
||||
link ->
|
||||
cond do
|
||||
Enum.member?(site_domains, link) -> "favicon-home"
|
||||
String.ends_with?(link, ".tumblr.com") -> "fab fa-tumblr"
|
||||
String.ends_with?(link, ".deviantart.com") -> "fab fa-deviantart"
|
||||
String.ends_with?(link, ".sofurry.com") -> "fa fa-paw"
|
||||
String.ends_with?(link, ".userapi.com") -> "fab fa-vk"
|
||||
true -> "fa fa-link"
|
||||
Enum.member?(site_domains, link) ->
|
||||
"favicon-home"
|
||||
|
||||
String.ends_with?(link, ".tumblr.com") ->
|
||||
"fab fa-tumblr"
|
||||
|
||||
String.ends_with?(link, ".deviantart.com") ->
|
||||
"fab fa-deviantart"
|
||||
|
||||
String.ends_with?(link, ".sofurry.com") ->
|
||||
"fa fa-paw"
|
||||
|
||||
String.ends_with?(link, ".userapi.com") ->
|
||||
"fab fa-vk"
|
||||
|
||||
String.ends_with?(link, ".patreonusercontent.com") ->
|
||||
"fab fa-patreon"
|
||||
|
||||
true ->
|
||||
"fa fa-link"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue