Merge pull request #2881 from duckduckgo/gd/templates-formatting
Goodie Templates: Improve formattingmaster
commit
483a2915e1
|
@ -1,9 +1,8 @@
|
|||
package DDG::Goodie::<: $ia_package_name :>;
|
||||
|
||||
# ABSTRACT: Write an abstract here
|
||||
|
||||
# Start at http://docs.duckduckhack.com/walkthroughs/calculation.html if you are new
|
||||
# to instant answer development
|
||||
# Start at http://docs.duckduckhack.com/walkthroughs/calculation.html if
|
||||
# you are new to instant answer development
|
||||
|
||||
use DDG::Goodie;
|
||||
use strict;
|
||||
|
@ -36,9 +35,9 @@ handle <: $ia_handler :> => sub {
|
|||
structured_answer => {
|
||||
|
||||
data => {
|
||||
title => "My Instant Answer Title",
|
||||
subtitle => "My Subtitle",
|
||||
# image => "http://website.com/image.png"
|
||||
title => "My Instant Answer Title",
|
||||
subtitle => "My Subtitle",
|
||||
# image => "http://website.com/image.png",
|
||||
},
|
||||
|
||||
templates => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package DDG::Goodie::<: $ia_package_name :>;
|
||||
|
||||
# ABSTRACT: Write an abstract here
|
||||
|
||||
# Start at https://duck.co/duckduckhack/goodie_overview if you are new
|
||||
# to instant answer development
|
||||
|
||||
|
@ -22,7 +22,7 @@ handle <: $ia_handler :> => sub {
|
|||
structured_answer => {
|
||||
|
||||
data => {
|
||||
<: $ia_handler :> => \<: $ia_handler_var :>_
|
||||
<: $ia_handler :> => \<: $ia_handler_var :>_,
|
||||
},
|
||||
|
||||
templates => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<span>{{name}}</span>
|
||||
<a href="http://some.url/profile/data1">
|
||||
<img src="/iu/?u=Place a image url here">
|
||||
<img src="/iu/?u=Place a image url here">
|
||||
</a>
|
||||
|
|
|
@ -7,7 +7,7 @@ DDH.<: $ia_id :> = DDH.<: $ia_id :> || {};
|
|||
|
||||
// define private variables and functions here
|
||||
//
|
||||
// fuction helper () { ... }
|
||||
// function helper () { ... }
|
||||
//
|
||||
// var a = '',
|
||||
// b = '',
|
||||
|
@ -55,8 +55,8 @@ DDH.<: $ia_id :> = DDH.<: $ia_id :> || {};
|
|||
|
||||
// define any callbacks or event handlers here
|
||||
//
|
||||
// var $dom = $(".zci--'<: $ia_id :>'");
|
||||
// $dom.find(".my-special-class").click(funtcion(){
|
||||
// var $dom = $(".zci--<: $ia_id :>");
|
||||
// $dom.find(".my-special-class").click(function(){
|
||||
//
|
||||
// });
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@ sub build_structured_answer {
|
|||
structured_answer => {
|
||||
|
||||
data => {
|
||||
title => "My Instant Answer Title",
|
||||
subtitle => "My Subtitle",
|
||||
# image => "http://website.com/image.png"
|
||||
title => "My Instant Answer Title",
|
||||
subtitle => "My Subtitle",
|
||||
# image => "http://website.com/image.png",
|
||||
},
|
||||
|
||||
templates => {
|
||||
|
|
Loading…
Reference in New Issue