Merge pull request #2881 from duckduckgo/gd/templates-formatting

Goodie Templates: Improve formatting
master
Zach Thompson 2016-04-18 12:16:11 -06:00
commit 483a2915e1
5 changed files with 14 additions and 15 deletions

View File

@ -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 => {

View File

@ -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 => {

View File

@ -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>

View File

@ -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(){
//
// });

View File

@ -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 => {