OLD | NEW |
(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}, </span> |
| 33 <span>age = </span> |
| 34 <span>${age}</span> |
| 35 </div> |
| 36 <div> |
| 37 ${#each persons.searches} |
| 38 <div class="search-item">query=${query}, rank=${rank}, 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 |
OLD | NEW |