Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: utils/tests/template/top_searches_css.tmpl

Issue 9728009: Template bug fixes and new features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Undid css.status change Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « utils/tests/template/top_searches2.tmpl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 template TopSearches(Person person, var searches) { 1 template TopSearches(Person person, var searches) {
2 css { 2 css {
3 .metrics-item { 3 .metrics-item {
4 font-family: arial; 4 font-family: arial;
5 background-color: lightgray; 5 background-color: lightgray;
6 margin-left: 10px; 6 margin-left: 10px;
7 border-bottom: 1px solid white; 7 border-bottom: 1px solid white;
8 } 8 }
9 .total-hits { 9 .total-hits {
10 position: absolute; 10 position: absolute;
11 left: 100px; 11 left: 100px;
12 } 12 }
13 } 13 }
14 <div> 14 <div>
15 ${#with person} 15 ${#with person}
16 <div> 16 <div>
17 <span>${name},&nbsp;</span> 17 <span>${name},&nbsp;</span>
18 <span>age&nbsp;=&nbsp;</span> 18 <span>age&nbsp;=&nbsp;</span>
19 <span>${age}</span> 19 <span>${age}</span>
20 </div> 20 </div>
21 <div> 21 <div>
22 ${#each searches} 22 ${#each searches search}
23 <div>query=${query},&nbsp;rank=${rank},&nbsp;total=${total}</div> 23 <div>query=${search.query},&nbsp;rank=${search.rank},&nbsp;total=${sea rch.total}</div>
24 ${#each searches.metrics} 24 ${#each search.metrics metric}
25 <div class="metrics-item"> 25 <div class="metrics-item">
26 <span>${country}</span> 26 <span>${metric.country}</span>
27 <span class="total-hits">${quantity}</span> 27 <span class="total-hits">${metric.quantity}</span>
28 </div> 28 </div>
29 ${/each} 29 ${/each}
30 ${/each} 30 ${/each}
31 </div> 31 </div>
32 ${/with} 32 ${/with}
33 </div> 33 </div>
34 } 34 }
35 35
36 template NameEntry(String name, int age) { 36 template NameEntry(String name, int age) {
37 css { 37 css {
38 .name-item { 38 .name-item {
39 font-size: 18pt; 39 font-size: 18pt;
40 font-weight: bold; 40 font-weight: bold;
41 } 41 }
42 } 42 }
43 <div var=topDiv class="name-item" attr="test" attr1=test1 attr2='test2' attr3= test3> 43 <div var=topDiv class="name-item" attr="test" attr1=test1 attr2='test2' attr3= test3>
44 <span var=spanElem>${name}</span> 44 <span var=spanElem>${name}</span>
45 <span> - </span> 45 <span> - </span>
46 <span>${age}</span> 46 <span>${age}</span>
47 </div> 47 </div>
48 } 48 }
49 49
OLDNEW
« no previous file with comments | « utils/tests/template/top_searches2.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698