onebox 2.2.11 → 2.2.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +0 -4
  3. data/lib/onebox/engine.rb +7 -11
  4. data/lib/onebox/engine/allowlisted_generic_onebox.rb +11 -18
  5. data/lib/onebox/engine/amazon_onebox.rb +26 -17
  6. data/lib/onebox/engine/asciinema_onebox.rb +0 -1
  7. data/lib/onebox/engine/audioboom_onebox.rb +5 -2
  8. data/lib/onebox/engine/bandcamp_onebox.rb +8 -8
  9. data/lib/onebox/engine/cloudapp_onebox.rb +12 -12
  10. data/lib/onebox/engine/coub_onebox.rb +0 -1
  11. data/lib/onebox/engine/facebook_media_onebox.rb +8 -7
  12. data/lib/onebox/engine/five_hundred_px_onebox.rb +0 -1
  13. data/lib/onebox/engine/flickr_onebox.rb +14 -15
  14. data/lib/onebox/engine/gfycat_onebox.rb +26 -26
  15. data/lib/onebox/engine/giphy_onebox.rb +0 -1
  16. data/lib/onebox/engine/github_blob_onebox.rb +4 -0
  17. data/lib/onebox/engine/github_commit_onebox.rb +13 -16
  18. data/lib/onebox/engine/github_folder_onebox.rb +1 -1
  19. data/lib/onebox/engine/github_gist_onebox.rb +1 -2
  20. data/lib/onebox/engine/github_issue_onebox.rb +16 -18
  21. data/lib/onebox/engine/github_pullrequest_onebox.rb +9 -1
  22. data/lib/onebox/engine/gitlab_blob_onebox.rb +4 -0
  23. data/lib/onebox/engine/google_calendar_onebox.rb +1 -1
  24. data/lib/onebox/engine/google_docs_onebox.rb +23 -41
  25. data/lib/onebox/engine/google_drive_onebox.rb +7 -7
  26. data/lib/onebox/engine/google_maps_onebox.rb +10 -8
  27. data/lib/onebox/engine/google_photos_onebox.rb +18 -18
  28. data/lib/onebox/engine/google_play_app_onebox.rb +3 -7
  29. data/lib/onebox/engine/imgur_onebox.rb +2 -2
  30. data/lib/onebox/engine/instagram_onebox.rb +4 -5
  31. data/lib/onebox/engine/kaltura_onebox.rb +8 -6
  32. data/lib/onebox/engine/opengraph_image.rb +0 -1
  33. data/lib/onebox/engine/pastebin_onebox.rb +11 -15
  34. data/lib/onebox/engine/pdf_onebox.rb +7 -15
  35. data/lib/onebox/engine/pubmed_onebox.rb +17 -12
  36. data/lib/onebox/engine/replit_onebox.rb +0 -1
  37. data/lib/onebox/engine/sketchfab_onebox.rb +8 -8
  38. data/lib/onebox/engine/slides_onebox.rb +10 -10
  39. data/lib/onebox/engine/soundcloud_onebox.rb +0 -1
  40. data/lib/onebox/engine/stack_exchange_onebox.rb +3 -2
  41. data/lib/onebox/engine/standard_embed.rb +2 -5
  42. data/lib/onebox/engine/steam_store_onebox.rb +6 -5
  43. data/lib/onebox/engine/trello_onebox.rb +4 -7
  44. data/lib/onebox/engine/twitch_clips_onebox.rb +1 -3
  45. data/lib/onebox/engine/twitch_stream_onebox.rb +1 -2
  46. data/lib/onebox/engine/twitch_video_onebox.rb +0 -2
  47. data/lib/onebox/engine/typeform_onebox.rb +7 -6
  48. data/lib/onebox/engine/vimeo_onebox.rb +9 -7
  49. data/lib/onebox/engine/wikimedia_onebox.rb +1 -2
  50. data/lib/onebox/engine/wikipedia_onebox.rb +12 -8
  51. data/lib/onebox/engine/youku_onebox.rb +7 -13
  52. data/lib/onebox/engine/youtube_onebox.rb +14 -13
  53. data/lib/onebox/file_type_finder.rb +0 -1
  54. data/lib/onebox/helpers.rb +6 -7
  55. data/lib/onebox/layout.rb +2 -14
  56. data/lib/onebox/matcher.rb +10 -8
  57. data/lib/onebox/mixins/git_blob_onebox.rb +8 -8
  58. data/lib/onebox/mixins/github_body.rb +30 -0
  59. data/lib/onebox/mixins/twitch_onebox.rb +0 -1
  60. data/lib/onebox/open_graph.rb +4 -4
  61. data/lib/onebox/preview.rb +3 -4
  62. data/lib/onebox/sanitize_config.rb +1 -1
  63. data/lib/onebox/version.rb +1 -1
  64. data/templates/_layout.mustache +6 -2
  65. data/templates/allowlistedgeneric.mustache +8 -9
  66. data/templates/amazon.mustache +5 -2
  67. data/templates/github/github_body.mustache +5 -0
  68. data/templates/githubblob.mustache +44 -34
  69. data/templates/githubcommit.mustache +2 -10
  70. data/templates/githubfolder.mustache +2 -2
  71. data/templates/githubgist.mustache +9 -6
  72. data/templates/githubissue.mustache +9 -11
  73. data/templates/githubpullrequest.mustache +3 -2
  74. data/templates/gitlabblob.mustache +11 -4
  75. data/templates/googledocs.mustache +2 -2
  76. data/templates/googledrive.mustache +2 -2
  77. data/templates/googleplayapp.mustache +2 -1
  78. data/templates/instagram.mustache +1 -1
  79. data/templates/pastebin.mustache +6 -2
  80. data/templates/pdf.mustache +6 -3
  81. data/templates/stackexchange.mustache +1 -0
  82. data/templates/twitterstatus.mustache +20 -5
  83. data/templates/wikimedia.mustache +2 -2
  84. data/templates/wikipedia.mustache +2 -2
  85. data/templates/xkcd.mustache +2 -2
  86. metadata +7 -5
@@ -2,13 +2,12 @@
2
2
 
3
3
  module Onebox
4
4
  class Preview
5
-
6
5
  # see https://bugs.ruby-lang.org/issues/14688
7
6
  client_exception = defined?(Net::HTTPClientException) ? Net::HTTPClientException : Net::HTTPServerException
8
7
  WEB_EXCEPTIONS ||= [client_exception, OpenURI::HTTPError, Timeout::Error, Net::HTTPError, Errno::ECONNREFUSED]
9
8
 
10
- def initialize(link, options = Onebox.options)
11
- @url = link
9
+ def initialize(url, options = Onebox.options)
10
+ @url = url
12
11
  @options = options.dup
13
12
 
14
13
  allowed_origins = @options[:allowed_iframe_origins] || Onebox::Engine.all_iframe_origins
@@ -85,7 +84,7 @@ module Onebox
85
84
 
86
85
  def engine
87
86
  return nil unless @engine_class
88
- return @engine if @engine
87
+ return @engine if defined?(@engine)
89
88
 
90
89
  @engine = @engine_class.new(@url)
91
90
  @engine.options = @options
@@ -6,7 +6,7 @@ class Sanitize
6
6
  HTTP_PROTOCOLS ||= ['http', 'https', :relative].freeze
7
7
 
8
8
  ONEBOX ||= freeze_config merge(RELAXED,
9
- elements: RELAXED[:elements] + %w[audio embed iframe source video svg path],
9
+ elements: RELAXED[:elements] + %w[audio details embed iframe source video svg path],
10
10
 
11
11
  attributes: {
12
12
  'a' => RELAXED[:attributes]['a'] + %w(target),
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Onebox
4
- VERSION = "2.2.11"
4
+ VERSION = "2.2.16"
5
5
  end
@@ -3,19 +3,23 @@
3
3
  {{#favicon}}
4
4
  <img src="{{favicon}}" class="site-icon"/>
5
5
  {{/favicon}}
6
+
6
7
  {{#article_published_time}}
7
- <a href="{{link}}" target='_blank' rel='noopener' title="{{article_published_time_title}}">{{domain}} &ndash; {{article_published_time}}</a>
8
+ <a href="{{link}}" target="_blank" rel="noopener" title="{{article_published_time_title}}">{{domain}} &ndash; {{article_published_time}}</a>
8
9
  {{/article_published_time}}
9
10
  {{^article_published_time}}
10
- <a href="{{link}}" target='_blank' rel='noopener'>{{domain}}</a>
11
+ <a href="{{link}}" target="_blank" rel="noopener">{{domain}}</a>
11
12
  {{/article_published_time}}
12
13
  </header>
14
+
13
15
  <article class="onebox-body">
14
16
  {{{view}}}
15
17
  </article>
18
+
16
19
  <div class="onebox-metadata">
17
20
  {{#metadata_1_label}}<span style="float: left;">{{metadata_1_label}}: {{metadata_1_value}}</span>{{/metadata_1_label}}
18
21
  {{#metadata_2_label}}<span style="float: right;">{{metadata_2_label}}: {{metadata_2_value}}</span>{{/metadata_2_label}}
19
22
  </div>
23
+
20
24
  <div style="clear: both"></div>
21
25
  </aside>
@@ -1,17 +1,16 @@
1
1
  {{#image}}<img src="{{image}}" class="thumbnail"/>{{/image}}
2
2
 
3
- <h3><a href='{{link}}' target="_blank" rel="noopener">{{title}}</a></h3>
3
+ <h3><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h3>
4
4
 
5
5
  {{#description}}
6
- <p>{{description}}</p>
6
+ <p>{{description}}</p>
7
7
  {{/description}}
8
8
 
9
9
  {{#data_1}}
10
- <p><span class="label1">{{label_1}}: {{data_1}}</span>
11
- {{#data_2}}
12
- <span class="label2">{{label_2}}: {{data_2}}</span></p>
13
- {{/data_2}}
14
- {{^data_2}}
15
- </p>
16
- {{/data_2}}
10
+ <p>
11
+ <span class="label1">{{label_1}}: {{data_1}}</span>
12
+ {{#data_2}}
13
+ <span class="label2">{{label_2}}: {{data_2}}</span>
14
+ {{/data_2}}
15
+ </p>
17
16
  {{/data_1}}
@@ -1,8 +1,11 @@
1
- {{#image}}<img src="{{image}}" class="thumbnail"/>{{/image}}
1
+ {{#image}}<img src="{{image}}" class="thumbnail">{{/image}}
2
+
3
+ <h3><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h3>
2
4
 
3
- <h3><a href='{{link}}' target='_blank' rel='noopener'>{{title}}</a></h3>
4
5
  {{#by_info}}<b>{{by_info}}</b>{{/by_info}}
6
+
5
7
  <p>{{description}}</p>
8
+
6
9
  <p>
7
10
  {{#rating}}{{rating}}{{/rating}}
8
11
  {{#isbn_asin}}{{isbn_asin_text}}: {{isbn_asin}}, {{/isbn_asin}}
@@ -0,0 +1,5 @@
1
+ {{#body}}
2
+ <div class="github-row">
3
+ <p class="github-body-container">{{body}}{{#excerpt}}<span class="show-more-container"><a href="{{html_url}}" target="_blank" rel="noopener" class="show-more">…</a>{{/excerpt}}</span>{{#excerpt}}<span class="excerpt hidden">{{excerpt}}</span>{{/excerpt}}</p>
4
+ </div>
5
+ {{/body}}
@@ -1,42 +1,52 @@
1
1
  <h4><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h4>
2
+
2
3
  {{^has_lines}}
3
- {{#model_file}}
4
- <iframe class="render-viewer" width="{{width}}" height="{{height}}" src="{{content}}" sandbox="allow-scripts allow-same-origin allow-top-navigation ">
5
- Viewer requires iframe.
6
- </iframe>
7
- {{/model_file}}
8
- {{^model_file}}
9
- <pre><code class='{{lang}}'>{{content}}</code></pre>
10
- {{/model_file}}
4
+ {{#model_file}}
5
+ <iframe class="render-viewer" width="{{width}}" height="{{height}}" src="{{content}}" sandbox="allow-scripts allow-same-origin allow-top-navigation ">
6
+ Viewer requires iframe.
7
+ </iframe>
8
+ {{/model_file}}
9
+
10
+ {{^model_file}}
11
+ <pre><code class="{{lang}}">{{content}}</code></pre>
12
+ {{/model_file}}
11
13
  {{/has_lines}}
14
+
12
15
  {{#has_lines}}
13
- {{! This is a template comment | Sample rules for this box
14
- <style>
15
- pre.onebox code ol{
16
- margin-left:0px;
17
- }
18
- pre.onebox code ol .lines{
19
- margin-left:30px;
20
- }
21
- pre.onebox code ol.lines li {
22
- list-style-type: decimal;
23
- margin-left:45px;
24
- }
25
- pre.onebox code li{
26
- list-style-type: none;
27
- background-color:#fff;
28
- border-bottom:1px solid #F0F0F0;
29
- padding-left:5px;
16
+ {{! This is a template comment | Sample rules for this box
17
+ <style>
18
+ pre.onebox code ol{
19
+ margin-left:0px;
20
+ }
21
+ pre.onebox code ol .lines{
22
+ margin-left:30px;
23
+ }
24
+ pre.onebox code ol.lines li {
25
+ list-style-type: decimal;
26
+ margin-left:45px;
27
+ }
28
+ pre.onebox code li{
29
+ list-style-type: none;
30
+ background-color:#fff;
31
+ border-bottom:1px solid #F0F0F0;
32
+ padding-left:5px;
33
+
34
+ }
35
+ pre.onebox code li.selected{
36
+ background-color:#cfc
37
+ }
38
+ </style>
39
+ }}
30
40
 
31
- }
32
- pre.onebox code li.selected{
33
- background-color:#cfc
34
- }
35
- </style>
36
- }}
37
- <pre class='onebox' ><code class='{{lang}}'><ol class='start lines' start="{{cr_results.from}}" style='counter-reset: li-counter {{cr_results.from_minus_one}} ;'>
38
- {{#lines}}<li{{#selected}} class="selected"{{/selected}}>{{data}}</li>{{/lines}}
39
- </ol></code></pre>
41
+ <pre class="onebox">
42
+ <code class="{{lang}}">
43
+ <ol class="start lines" start="{{cr_results.from}}" style="counter-reset: li-counter {{cr_results.from_minus_one}} ;">
44
+ {{#lines}}
45
+ <li{{#selected}} class="selected"{{/selected}}>{{data}}</li>
46
+ {{/lines}}
47
+ </ol>
48
+ </code>
49
+ </pre>
40
50
  {{/has_lines}}
41
51
 
42
52
  {{#truncated}}
@@ -10,7 +10,7 @@
10
10
 
11
11
  <div class="github-info">
12
12
  <div class="date">
13
- committed <span class="discourse-local-date" data-format='ll' data-date="{{committed_at_date}}" data-time="{{committed_at_time}}" data-timezone="UTC">{{committed_at}}</span>
13
+ committed <span class="discourse-local-date" data-format="ll" data-date="{{committed_at_date}}" data-time="{{committed_at_time}}" data-timezone="UTC">{{committed_at}}</span>
14
14
  </div>
15
15
 
16
16
  <div class="user">
@@ -18,7 +18,6 @@
18
18
  <img alt="{{author.login}}" src="{{author.avatar_url}}" class="onebox-avatar-inline" width="20" height="20">
19
19
  {{author.login}}
20
20
  </a>
21
-
22
21
  </div>
23
22
 
24
23
  <div class="lines" title="changed {{files.length}} files with {{stats.additions}} additions and {{stats.deletions}} deletions">
@@ -28,14 +27,7 @@
28
27
  </a>
29
28
  </div>
30
29
  </div>
31
-
32
30
  </div>
33
31
  </div>
34
32
 
35
-
36
- {{#message}}
37
- <div class="github-row">
38
- <pre class="github-content" style="white-space: normal;">{{message}}</pre>
39
- </div>
40
- {{/message}}
41
-
33
+ {{> github/github_body}}
@@ -1,9 +1,9 @@
1
1
  {{#image}}<img src="{{image}}" class="thumbnail"/>{{/image}}
2
2
 
3
- <h3><a href='{{link}}' target="_blank" rel="noopener">{{title}}</a></h3>
3
+ <h3><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h3>
4
4
 
5
5
  {{#path}}
6
- <p><a href='{{link}}' target="_blank" rel="noopener">{{path}}</a></p>
6
+ <p><a href="{{link}}" target="_blank" rel="noopener">{{path}}</a></p>
7
7
  {{/path}}
8
8
 
9
9
  {{#description}}
@@ -1,12 +1,15 @@
1
1
  <h4><a href="{{link}}" target="_blank" rel="noopener">{{link}}</a></h4>
2
+
2
3
  {{#gist_files}}
3
- <h5>{{filename}}</h5>
4
- <pre><code class='{{language}}'>{{content}}</code></pre>
5
- {{#truncated?}}This file has been truncated. <a href="{{link}}" target="_blank" rel="noopener">show original</a>{{/truncated?}}
4
+ <h5>{{filename}}</h5>
5
+ <pre><code class="{{language}}">{{content}}</code></pre>
6
+ {{#truncated?}}
7
+ This file has been truncated. <a href="{{link}}" target="_blank" rel="noopener">show original</a>
8
+ {{/truncated?}}
6
9
  {{/gist_files}}
7
10
 
8
11
  <p>
9
- {{#truncated_files?}}
10
- There are more than three files. <a href="{{link}}" target="_blank" rel="noopener">show original</a>
11
- {{/truncated_files?}}
12
+ {{#truncated_files?}}
13
+ There are more than three files. <a href="{{link}}" target="_blank" rel="noopener">show original</a>
14
+ {{/truncated_files?}}
12
15
  </p>
@@ -10,12 +10,12 @@
10
10
 
11
11
  <div class="github-info">
12
12
  <div class="date">
13
- opened <span class="discourse-local-date" data-format='ll' data-date="{{created_at_date}}" data-time="{{created_at_time}}" data-timezone="UTC">{{created_at}}</span>
13
+ opened <span class="discourse-local-date" data-format="ll" data-date="{{created_at_date}}" data-time="{{created_at_time}}" data-timezone="UTC">{{created_at}}</span>
14
14
  </div>
15
15
 
16
16
  {{#closed_at}}
17
17
  <div class="date">
18
- closed <span class="discourse-local-date" data-format='ll' data-date="{{closed_at_date}}" data-time="{{closed_at_time}}" data-timezone="UTC">{{closed_at}}</span>
18
+ closed <span class="discourse-local-date" data-format="ll" data-date="{{closed_at_date}}" data-time="{{closed_at_time}}" data-timezone="UTC">{{closed_at}}</span>
19
19
  </div>
20
20
  {{/closed_at}}
21
21
 
@@ -26,15 +26,13 @@
26
26
  </a>
27
27
  </div>
28
28
  </div>
29
- </div>
30
- </div>
31
29
 
32
- <div class="github-row">
33
- <p class='github-content'>{{content}}</p>
30
+ <div class="labels">
31
+ {{#labels}}
32
+ <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">{{name}}</span>
33
+ {{/labels}}
34
+ </div>
35
+ </div>
34
36
  </div>
35
37
 
36
- <div class='labels'>
37
- {{#labels}}
38
- <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">{{name}}</span>
39
- {{/labels}}
40
- </div>
38
+ {{> github/github_body}}
@@ -14,7 +14,7 @@
14
14
 
15
15
  <div class="github-info">
16
16
  <div class="date">
17
- opened <span class="discourse-local-date" data-format='ll' data-date="{{created_at_date}}" data-time="{{created_at_time}}" data-timezone="UTC">{{created_at}}</span>
17
+ opened <span class="discourse-local-date" data-format="ll" data-date="{{created_at_date}}" data-time="{{created_at_time}}" data-timezone="UTC">{{created_at}}</span>
18
18
  </div>
19
19
 
20
20
  <div class="user">
@@ -31,6 +31,7 @@
31
31
  </a>
32
32
  </div>
33
33
  </div>
34
-
35
34
  </div>
36
35
  </div>
36
+
37
+ {{> github/github_body}}
@@ -1,12 +1,19 @@
1
1
  <h4><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h4>
2
+
2
3
  {{^has_lines}}
3
- <pre><code class='{{lang}}'>{{content}}</code></pre>
4
+ <pre><code class="{{lang}}">{{content}}</code></pre>
4
5
  {{/has_lines}}
5
6
 
6
7
  {{#has_lines}}
7
- <pre class='onebox'><code class='{{lang}}'><ol class='start lines' start="{{cr_results.from}}" style='counter-reset: li-counter {{cr_results.from_minus_one}} ;'>
8
- {{#lines}}<li{{#selected}} class="selected"{{/selected}}>{{data}}</li>{{/lines}}
9
- </ol></code></pre>
8
+ <pre class="onebox">
9
+ <code class="{{lang}}">
10
+ <ol class="start lines" start="{{cr_results.from}}" style="counter-reset: li-counter {{cr_results.from_minus_one}} ;">
11
+ {{#lines}}
12
+ <li{{#selected}} class="selected"{{/selected}}>{{data}}</li>
13
+ {{/lines}}
14
+ </ol>
15
+ </code>
16
+ </pre>
10
17
  {{/has_lines}}
11
18
 
12
19
  {{#truncated}}
@@ -1,5 +1,5 @@
1
- <a href='{{link}}' target="_blank" rel="noopener"><span class='googledocs-onebox-logo g-{{type}}-logo'></span></a>
1
+ <a href="{{link}}" target="_blank" rel="noopener"><span class="googledocs-onebox-logo g-{{type}}-logo"></span></a>
2
2
 
3
- <h3><a href='{{link}}' target="_blank" rel="noopener">{{title}}</a></h3>
3
+ <h3><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h3>
4
4
 
5
5
  <p>{{description}}</p>
@@ -1,8 +1,8 @@
1
1
  {{^image}}
2
- <a href='{{link}}' target="_blank" rel="noopener"><span class='googledocs-onebox-logo g-drive-logo'></span></a>
2
+ <a href="{{link}}" target="_blank" rel="noopener"><span class="googledocs-onebox-logo g-drive-logo"></span></a>
3
3
  {{/image}}
4
4
 
5
- {{#image}}<img src="{{image}}" class="thumbnail"/>{{/image}}
5
+ {{#image}}<img src="{{image}}" class="thumbnail">{{/image}}
6
6
 
7
7
  <h3><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h3>
8
8
 
@@ -1,4 +1,5 @@
1
1
  <h3>{{title}}</h3>
2
- <img src="{{image}}" class="thumbnail"/>
2
+
3
+ <img src="{{image}}" class="thumbnail">
3
4
  <p>{{description}}</p>
4
5
  <em>{{price}}</em>
@@ -3,7 +3,7 @@
3
3
  {{#image}}
4
4
  <div class="instagram-images">
5
5
  <a href="{{{link}}}" target="_blank" rel="noopener">
6
- <img class="instagram-image" src="{{{image}}}"/>
6
+ <img class="instagram-image" src="{{{image}}}">
7
7
  </a>
8
8
  </div>
9
9
  {{/image}}
@@ -1,3 +1,7 @@
1
1
  <h4><a href="{{link}}" target="_blank" rel="noopener">{{link}}</a></h4>
2
- <pre><code class='lang-auto'>{{content}}</code></pre>
3
- {{#truncated?}}This paste has been truncated. <a href="{{link}}" target="_blank" rel="noopener">show original</a>{{/truncated?}}
2
+
3
+ <pre><code class="lang-auto">{{content}}</code></pre>
4
+
5
+ {{#truncated?}}
6
+ This paste has been truncated. <a href="{{link}}" target="_blank" rel="noopener">show original</a>
7
+ {{/truncated?}}
@@ -1,4 +1,7 @@
1
- <a href='{{link}}' target="_blank" rel="noopener"><span class='pdf-onebox-logo'></span></a>
2
- <h3><a href='{{link}}' target="_blank" rel="noopener">{{title}}</a></h3>
1
+ <a href="{{link}}" target="_blank" rel="noopener"><span class="pdf-onebox-logo"></span></a>
3
2
 
4
- {{#filesize}}<p class='filesize'>{{filesize}}</p>{{/filesize}}
3
+ <h3><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h3>
4
+
5
+ {{#filesize}}
6
+ <p class="filesize">{{filesize}}</p>
7
+ {{/filesize}}
@@ -3,6 +3,7 @@
3
3
  <img alt="{{owner.display_name}}" src="{{owner.profile_image}}" class="thumbnail onebox-avatar">
4
4
  </a>
5
5
  {{/owner.profile_image}}
6
+
6
7
  <h4>
7
8
  <a href="{{link}}" target="_blank" rel="noopener">{{{title}}}</a>
8
9
  </h4>
@@ -1,23 +1,38 @@
1
1
  {{#avatar}}<img src="{{avatar}}" class="thumbnail onebox-avatar">{{/avatar}}
2
2
 
3
- <h4><a href='{{link}}' target='_blank' rel='noopener'>{{title}}</a></h4>
3
+ <h4><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h4>
4
4
 
5
- <div class="tweet"> {{{tweet}}}{{#quoted_tweet}}<div class="quoted"><a class="quoted-link" href="{{quoted_link}}"><p class="quoted-title">{{quoted_full_name}} <span>@{{quoted_screen_name}}</span></p></a><div>{{quoted_tweet}}</div></div>{{/quoted_tweet}}</div>
5
+ <div class="tweet">
6
+ {{{tweet}}}
7
+ {{#quoted_tweet}}
8
+ <div class="quoted">
9
+ <a class="quoted-link" href="{{quoted_link}}">
10
+ <p class="quoted-title">{{quoted_full_name}} <span>@{{quoted_screen_name}}</span></p>
11
+ </a>
6
12
 
7
- <div class='date'>
13
+ <div>{{quoted_tweet}}</div>
14
+ </div>
15
+ {{/quoted_tweet}}
16
+ </div>
17
+
18
+ <div class="date">
8
19
  <a href="{{link}}" target="_blank" rel="noopener">{{timestamp}}</a>
20
+
9
21
  {{#likes}}
10
22
  <span class="like">
11
23
  <svg viewBox="0 0 512 512" width="14px" height="16px" aria-hidden="true">
12
24
  <path d="M462.3 62.6C407.5 15.9 326 24.3 275.7 76.2L256 96.5l-19.7-20.3C186.1 24.3 104.5 15.9 49.7 62.6c-62.8 53.6-66.1 149.8-9.9 207.9l193.5 199.8c12.5 12.9 32.8 12.9 45.3 0l193.5-199.8c56.3-58.1 53-154.3-9.8-207.9z"></path>
13
- </svg> {{likes}}
25
+ </svg>
26
+ {{likes}}
14
27
  </span>
15
28
  {{/likes}}
29
+
16
30
  {{#retweets}}
17
31
  <span class="retweet">
18
32
  <svg viewBox="0 0 640 512" width="14px" height="16px" aria-hidden="true">
19
33
  <path d="M629.657 343.598L528.971 444.284c-9.373 9.372-24.568 9.372-33.941 0L394.343 343.598c-9.373-9.373-9.373-24.569 0-33.941l10.823-10.823c9.562-9.562 25.133-9.34 34.419.492L480 342.118V160H292.451a24.005 24.005 0 0 1-16.971-7.029l-16-16C244.361 121.851 255.069 96 276.451 96H520c13.255 0 24 10.745 24 24v222.118l40.416-42.792c9.285-9.831 24.856-10.054 34.419-.492l10.823 10.823c9.372 9.372 9.372 24.569-.001 33.941zm-265.138 15.431A23.999 23.999 0 0 0 347.548 352H160V169.881l40.416 42.792c9.286 9.831 24.856 10.054 34.419.491l10.822-10.822c9.373-9.373 9.373-24.569 0-33.941L144.971 67.716c-9.373-9.373-24.569-9.373-33.941 0L10.343 168.402c-9.373 9.373-9.373 24.569 0 33.941l10.822 10.822c9.562 9.562 25.133 9.34 34.419-.491L96 169.881V392c0 13.255 10.745 24 24 24h243.549c21.382 0 32.09-25.851 16.971-40.971l-16.001-16z"></path>
20
- </svg> {{retweets}}
34
+ </svg>
35
+ {{retweets}}
21
36
  </span>
22
37
  {{/retweets}}
23
38
  </div>