OLD | NEW |
(Empty) | |
| 1 template TopSearches(Person person, var searches) { |
| 2 css { |
| 3 .metrics-item { |
| 4 font-family: arial; |
| 5 background-color: lightgray; |
| 6 margin-left: 10px; |
| 7 border-bottom: 1px solid white; |
| 8 } |
| 9 .total-hits { |
| 10 position: absolute; |
| 11 left: 100px; |
| 12 } |
| 13 } |
| 14 <div> |
| 15 ${#with person} |
| 16 <div> |
| 17 <span>${name}, </span> |
| 18 <span>age = </span> |
| 19 <span>${age}</span> |
| 20 </div> |
| 21 <div> |
| 22 ${#each searches} |
| 23 <div>query=${query}, rank=${rank}, total=${total}</div> |
| 24 ${#each searches.metrics} |
| 25 <div class="metrics-item"> |
| 26 <span>${country}</span> |
| 27 <span class="total-hits">${quantity}</span> |
| 28 </div> |
| 29 ${/each} |
| 30 ${/each} |
| 31 </div> |
| 32 ${/with} |
| 33 </div> |
| 34 } |
| 35 |
| 36 template NameEntry(String name, int age) { |
| 37 css { |
| 38 .name-item { |
| 39 font-size: 18pt; |
| 40 font-weight: bold; |
| 41 } |
| 42 } |
| 43 <div var=topDiv class="name-item" attr="test" attr1=test1 attr2='test2' attr3=
test3> |
| 44 <span var=spanElem>${name}</span> |
| 45 <span> - </span> |
| 46 <span>${age}</span> |
| 47 </div> |
| 48 } |
| 49 |
OLD | NEW |