Add pinboard syndication icon

This commit is contained in:
2023-02-01 21:31:57 +11:00
parent 9309c2c104
commit 59a59379cf
4 changed files with 30 additions and 0 deletions

View File

@@ -9,6 +9,19 @@ module Adamantium
def display_published_at
published_at.strftime("%e %B, %Y")
end
def syndicated?
!syndication_sources.empty?
end
def syndicated_to
syndication_sources.map do |source, url|
{
location: source,
url: url
}
end
end
end
end
end

View File

@@ -15,3 +15,9 @@ div class="mb-2 max-w-prose mx-auto text-gray-800 dark:text-gray-200 flex"
span class="text-right flex-1"
== render :tags, tags: bookmark.tags
div class="mb-2 max-w-prose mx-auto text-gray-600 dark:text-gray-200 flex"
- if bookmark.syndicated?
span Also on:  
- bookmark.syndicated_to.each do |loc|
a href=loc[:url]
== render loc[:location]

View File

@@ -0,0 +1,2 @@
<svg class="fill-blue-100 hover:fill-blue-400 w-4 -rotate-45" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M32 32C32 14.3 46.3 0 64 0H320c17.7 0 32 14.3 32 32s-14.3 32-32 32H290.5l11.4 148.2c36.7 19.9 65.7 53.2 79.5 94.7l1 3c3.3 9.8 1.6 20.5-4.4 28.8s-15.7 13.3-26 13.3H32c-10.3 0-19.9-4.9-26-13.3s-7.7-19.1-4.4-28.8l1-3c13.8-41.5 42.8-74.8 79.5-94.7L93.5 64H64C46.3 64 32 49.7 32 32zM160 384h64v96c0 17.7-14.3 32-32 32s-32-14.3-32-32V384z"/></svg>

After

Width:  |  Height:  |  Size: 639 B