handle the image differently because the text template floats it to the right

master
Brian Stoner 2016-01-14 11:49:35 -05:00
parent d05566efd0
commit 1815e7190b
3 changed files with 12 additions and 9 deletions

View File

@ -59,7 +59,7 @@ handle remainder => sub {
id => 'duck_duck_go', id => 'duck_duck_go',
data => { data => {
title => $response->{title}, title => $response->{title},
image => $response->{image}, subtitle_image => $response->{image},
subtitle_text => $response->{subtitle}, subtitle_text => $response->{subtitle},
subtitle_url => $response->{url} subtitle_url => $response->{url}
}, },

View File

@ -4,3 +4,6 @@
<a class="c-base__link tx--14" href="{{subtitle_url}}">{{subtitle_text}}</a> <a class="c-base__link tx--14" href="{{subtitle_url}}">{{subtitle_text}}</a>
</h4> </h4>
{{/if}} {{/if}}
{{#if subtitle_image}}
<img class="c-base__img" src="{{imageProxy subtitle_image}}" />
{{/if}}

View File

@ -17,7 +17,7 @@ my @about_result = (
id => $id, id => $id,
data => { data => {
title => 'Want to know more about us?', title => 'Want to know more about us?',
image => undef, subtitle_image => undef,
subtitle_text => 'Visit our About page', subtitle_text => 'Visit our About page',
subtitle_url => 'https://duckduckgo.com/about' subtitle_url => 'https://duckduckgo.com/about'
}, },
@ -34,7 +34,7 @@ my @blog_result = (
id => $id, id => $id,
data => { data => {
title => 'Want to stay up to date with DuckDuckGo?', title => 'Want to stay up to date with DuckDuckGo?',
image => undef, subtitle_image => undef,
subtitle_text => 'Visit the official DuckDuckGo blog', subtitle_text => 'Visit the official DuckDuckGo blog',
subtitle_url => 'https://duck.co/blog' subtitle_url => 'https://duck.co/blog'
}, },
@ -51,7 +51,7 @@ my @help_result = (
id => $id, id => $id,
data => { data => {
title => 'Need some help?', title => 'Need some help?',
image => undef, subtitle_image => undef,
subtitle_text => 'Visit our help page', subtitle_text => 'Visit our help page',
subtitle_url => 'https://duck.co/help' subtitle_url => 'https://duck.co/help'
}, },
@ -68,7 +68,7 @@ my @irc_result = (
id => $id, id => $id,
data => { data => {
title => 'Want to chat with us on IRC?', title => 'Want to chat with us on IRC?',
image => undef, subtitle_image => undef,
subtitle_text => 'Visit #duckduckgo on irc.freenode.net', subtitle_text => 'Visit #duckduckgo on irc.freenode.net',
subtitle_url => 'http://webchat.freenode.net/?channels=duckduckgo' subtitle_url => 'http://webchat.freenode.net/?channels=duckduckgo'
}, },
@ -85,7 +85,7 @@ my @merch_result = (
id => $id, id => $id,
data => { data => {
title => 'Looking for some swag? (Thanks for the support!)', title => 'Looking for some swag? (Thanks for the support!)',
image => undef, subtitle_image => undef,
subtitle_text => 'Check out the DuckDuckGo store for t-shirts, stickers, and other items', subtitle_text => 'Check out the DuckDuckGo store for t-shirts, stickers, and other items',
subtitle_url => 'https://duck.co/help/community/swag' subtitle_url => 'https://duck.co/help/community/swag'
}, },
@ -102,7 +102,7 @@ my @tor_result = (
id => $id, id => $id,
data => { data => {
title => 'DuckDuckGo is available on Tor', title => 'DuckDuckGo is available on Tor',
image => undef, subtitle_image => undef,
subtitle_text => 'Visit our onion address', subtitle_text => 'Visit our onion address',
subtitle_url => 'http://3g2upl4pq6kufc4m.onion' subtitle_url => 'http://3g2upl4pq6kufc4m.onion'
}, },
@ -119,7 +119,7 @@ my @shorturl_result = (
id => $id, id => $id,
data => { data => {
title => 'Need a quicker way to visit DuckDuckGo?', title => 'Need a quicker way to visit DuckDuckGo?',
image => undef, subtitle_image => undef,
subtitle_text => 'You can also find us at https://ddg.gg', subtitle_text => 'You can also find us at https://ddg.gg',
subtitle_url => 'https://ddg.gg' subtitle_url => 'https://ddg.gg'
}, },
@ -136,7 +136,7 @@ my @zci_result = (
id => $id, id => $id,
data => { data => {
title => 'Zero Click Info is another term for our Instant Answers that show above the search results', title => 'Zero Click Info is another term for our Instant Answers that show above the search results',
image => undef, subtitle_image => undef,
subtitle_text => 'Learn more about Instant Answers', subtitle_text => 'Learn more about Instant Answers',
subtitle_url => 'http://duckduckhack.com' subtitle_url => 'http://duckduckhack.com'
}, },