diff --git a/app/decorators/bookmarks/decorator.rb b/app/decorators/bookmarks/decorator.rb index 312dc55..bd390bf 100644 --- a/app/decorators/bookmarks/decorator.rb +++ b/app/decorators/bookmarks/decorator.rb @@ -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 diff --git a/app/templates/bookmarks/show.html.slim b/app/templates/bookmarks/show.html.slim index b2124fa..a0d5e37 100644 --- a/app/templates/bookmarks/show.html.slim +++ b/app/templates/bookmarks/show.html.slim @@ -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] diff --git a/app/templates/shared/_pinboard.html.slim b/app/templates/shared/_pinboard.html.slim new file mode 100644 index 0000000..bb542d8 --- /dev/null +++ b/app/templates/shared/_pinboard.html.slim @@ -0,0 +1,2 @@ + + diff --git a/public/assets/index.css b/public/assets/index.css index 7bccde5..7147145 100644 --- a/public/assets/index.css +++ b/public/assets/index.css @@ -1036,6 +1036,10 @@ video { width: 0.5rem; } +.w-4 { + width: 1rem; +} + .max-w-prose { max-width: 65ch; } @@ -1060,6 +1064,11 @@ video { flex-basis: 40%; } +.-rotate-45 { + --tw-rotate: -45deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + .items-center { align-items: center; }