[Products.SilvaExternalSources][Kit Blake] Indenting
[email protected] Sun, 29 Sep 2013 11:59:05 +0200
| Newsgroups | gmane.comp.web.zope.silva.cvs |
|---|---|
| Message-ID | <[email protected]> |
author: Kit Blake
date: Sun Sep 29 11:48:29 2013 +0200
revision: 1113:2e4cd61dc0a3 in Products.SilvaExternalSources
branch: 2.4
details: https://hg.infrae.com/Products.SilvaExternalSources?cmd=changeset;node=2e4cd61dc0a3
modified: Products/SilvaExternalSources/codesources/cs_twitter_timeline/twitter_timeline.pt
added:
removed:
log: Indenting
Subject: [Products.SilvaExternalSources][Kit Blake] Simplify tag nesting and indenting, use TAL instead of python for strings
author: Kit Blake
date: Sun Sep 29 11:58:52 2013 +0200
revision: 1114:cc765625246c in Products.SilvaExternalSources
branch: 2.4
details: https://hg.infrae.com/Products.SilvaExternalSources?cmd=changeset;node=cc765625246c
modified: Products/SilvaExternalSources/codesources/cs_twitter_timeline/twitter_timeline.pt
added:
removed:
log: Simplify tag nesting and indenting, use TAL instead of python for
strings
diffstat:
Products/SilvaExternalSources/codesources/cs_twitter_timeline/twitter_timeline.pt | 47 +++++----
1 files changed, 24 insertions(+), 23 deletions(-)
diffs (52 lines):
diff -r fa3ba92d4858 -r cc765625246c Products/SilvaExternalSources/codesources/cs_twitter_timeline/twitter_timeline.pt
--- a/Products/SilvaExternalSources/codesources/cs_twitter_timeline/twitter_timeline.pt Wed Sep 25 12:09:36 2013 +0200
+++ b/Products/SilvaExternalSources/codesources/cs_twitter_timeline/twitter_timeline.pt Sun Sep 29 11:58:52 2013 +0200
@@ -1,24 +1,25 @@
-<tal:twitter_timeline>
- <tal:def tal:define="username options/username;
- widgetid options/data-widget-id;
- theme options/data-theme | nothing;
- linkcolor options/data-link-color | nothing;
- height options/height | nothing;
- chrome options/data-chrome | nothing;
- bordercolor options/data-border-color | nothing;
- tweetlimit options/data-tweet-limit | nothing;" >
- <a tal:attributes="href python:'https://twitter.com/%s' % username;
- class string:twitter-timeline;
- data-widget-id widgetid;
- data-theme theme;
- data-link-color linkcolor;
- height height;
- data-chrome chrome;
- data-border-color bordercolor;
- data-tweet-limit tweetlimit;"
- tal:content="python:'Tweets by @%s' % username">
- </a>
- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
- </script>
- </tal:def>
+<tal:twitter_timeline
+ tal:define="
+ username options/username;
+ widgetid options/data-widget-id;
+ theme options/data-theme | nothing;
+ linkcolor options/data-link-color | nothing;
+ height options/height | nothing;
+ chrome options/data-chrome | nothing;
+ bordercolor options/data-border-color | nothing;
+ tweetlimit options/data-tweet-limit | nothing;">
+ <a tal:attributes="
+ href string:https://twitter.com/$username;
+ class string:twitter-timeline;
+ data-widget-id widgetid;
+ data-theme theme;
+ data-link-color linkcolor;
+ height height;
+ data-chrome chrome;
+ data-border-color bordercolor;
+ data-tweet-limit tweetlimit;"
+ tal:content="string:Tweets by $username">
+ </a>
+ <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
+ </script>
</tal:twitter_timeline>