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

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

Issue 9695048: Template parser (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Siggi's comments 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_searches.tmpl ('k') | utils/tests/template/top_searches_css.tmpl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 template TopSearches(var persons) {
2 css {
3 .all-list {
4 font-family: arial;
5 }
6 .person-item {
7 padding: 4px 0px 4px 5px;
8 background-color: slateGray;
9 color: white;
10 font-weight: bold;
11 }
12 .search-item {
13 font-size: 11pt;
14 padding: 3px 0px 3px 15px;
15 background-color: #aaa;
16 font-weight: bold;
17 }
18 .metrics-item {
19 font-size: 10pt;
20 padding: 2px 0px 2px 25px;
21 background-color: lightgray;
22 border-bottom: 1px solid white;
23 }
24 .total-hits {
25 position: absolute;
26 left: 100px;
27 }
28 }
29 <div class="all-list">
30 ${#each persons}
31 <div class="person-item">
32 <span>${name},&nbsp;</span>
33 <span>age&nbsp;=&nbsp;</span>
34 <span>${age}</span>
35 </div>
36 <div>
37 ${#each persons.searches}
38 <div class="search-item">query=${query},&nbsp;rank=${rank},&nbsp;total =${total}</div>
39 ${#each searches.metrics}
40 <div class="metrics-item">
41 <span>${country}</span>
42 <span class="total-hits">${quantity}</span>
43 </div>
44 ${/each}
45 ${/each}
46 </div>
47 ${/each}
48 </div>
49 }
50
51 template NameEntry(String name, int age) {
52 css {
53 .name-item {
54 font-size: 18pt;
55 font-weight: bold;
56 }
57 }
58 <div var=topDiv class="name-item" attr="test" attr1=test1 attr2='test2' attr3= test3>
59 <span var=spanElem>${name}</span>
60 <span> - </span>
61 <span>${age}</span>
62 </div>
63 }
64
OLDNEW
« no previous file with comments | « utils/tests/template/top_searches.tmpl ('k') | utils/tests/template/top_searches_css.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698