2019-12-04 02:56:39 +01:00
meta name="generator" content="philomena"
2019-12-19 16:59:36 +01:00
meta name="theme-color" content="#618fc3"
2019-12-04 02:56:39 +01:00
meta name="format-detection" content="telephone=no"
meta name="robots" content="noindex, nofollow"
2019-12-04 22:47:46 +01:00
= if opengraph?(@conn) do
2019-12-04 02:56:39 +01:00
- image = @conn.assigns.image
2019-12-19 16:43:07 +01:00
- filtered = ImageView.filter_or_spoiler_hits?(@conn, image) or not image.thumbnails_generated
- description = "##{image.id} - #{image.tag_list_cache} - Derpibooru"
2019-12-04 02:56:39 +01:00
meta name="keywords" content=image.tag_list_cache
2019-12-19 16:59:36 +01:00
meta name="description" content=description
2019-12-19 16:51:13 +01:00
meta property="og:title" content=description
meta property="og:url" content=Routes.image_url(@conn, :show, image)
2019-12-04 02:56:39 +01:00
= for tag <- artist_tags(image.tags) do
meta property="dc:creator" content=tag.name_in_namespace
= if image.source_url not in [nil, ""] do
2019-12-11 21:40:48 +01:00
meta property="foaf:primaryTopic" content=image.source_url
2019-12-04 02:56:39 +01:00
link rel="alternate" type="application/json+oembed" href=Routes.api_json_oembed_url(@conn, :index, url: Routes.image_path(@conn, :show, image)) title="oEmbed JSON Profile"
= cond do
2019-12-19 16:43:07 +01:00
- image.image_mime_type == "video/webm" and not filtered ->
2019-12-19 16:51:13 +01:00
meta property="og:type" content="video.other"
meta property="og:image" content=ImageView.thumb_url(image, false, :rendered)
meta property="og:video" content=ImageView.thumb_url(image, false, :large)
2019-12-04 02:56:39 +01:00
2019-12-19 16:43:07 +01:00
- image.image_mime_type == "image/svg+xml" and not filtered ->
2019-12-19 16:51:13 +01:00
meta property="og:type" content="website"
meta property="og:image" content=ImageView.thumb_url(image, false, :rendered)
2019-12-04 02:56:39 +01:00
2019-12-19 16:43:07 +01:00
- not filtered ->
2019-12-19 16:51:13 +01:00
meta property="og:type" content="website"
meta property="og:image" content=ImageView.thumb_url(image, false, :large)
2019-12-04 02:56:39 +01:00
- true ->
2019-12-19 16:51:13 +01:00
meta property="og:type" content="website"
2019-12-04 02:56:39 +01:00
- else
2019-12-19 16:43:07 +01:00
meta name="description" content="Derpibooru is a linear imagebooru which lets you share, find and discover new art and media surrounding the show My Little Pony: Friendship is Magic"