Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> | 1 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> |
| 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-f lex-layout.html"> | |
| 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm l"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm l"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.h tml"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.h tml"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html"> |
| 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> |
| 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/shadow.htm l"> | |
| 7 <link rel="import" href="chrome://resources/html/util.html"> | 9 <link rel="import" href="chrome://resources/html/util.html"> |
| 8 | 10 |
| 9 <dom-module id="history-item"> | 11 <dom-module id="history-item"> |
| 10 <template> | 12 <template> |
| 11 <style> | 13 <style> |
| 14 :host { | |
| 15 @apply(--layout-center); | |
| 16 @apply(--layout-vertical); | |
| 17 padding: 0 24px; | |
| 18 } | |
| 19 | |
| 12 #main-container { | 20 #main-container { |
| 21 background: #fff; | |
| 22 max-width: 960px; | |
| 23 min-width: 500px; | |
| 24 width: 100%; | |
| 25 } | |
| 26 | |
| 27 :host([is-card-start]) #main-container { | |
| 28 margin-top: 20px; | |
| 29 } | |
| 30 | |
| 31 #date-accessed { | |
| 32 display: none; | |
| 33 } | |
| 34 | |
| 35 :host([is-card-start]) #date-accessed { | |
| 36 @apply(--layout-center); | |
| 37 @apply(--layout-horizontal); | |
| 38 -webkit-padding-start: 20px; | |
| 39 background: #fafafa; | |
| 40 border-bottom: 1px solid rgba(0, 0, 0, 0.14); | |
| 41 border-radius: 2px 2px 0 0; | |
| 42 color: #333; | |
| 43 font-size: 14px; | |
| 44 font-weight: 500; | |
| 45 height: 48px; | |
| 46 } | |
| 47 | |
| 48 #item-container { | |
| 13 @apply(--layout-center); | 49 @apply(--layout-center); |
| 14 @apply(--layout-horizontal); | 50 @apply(--layout-horizontal); |
| 15 min-height: 40px; | 51 min-height: 40px; |
| 16 } | 52 } |
| 17 | 53 |
| 54 :host([is-card-start]) #item-container { | |
| 55 padding-top: 8px; | |
| 56 } | |
| 57 | |
| 58 :host([is-card-end]) #item-container { | |
| 59 padding-bottom: 8px; | |
| 60 } | |
| 61 | |
| 18 #titleAndDomain { | 62 #titleAndDomain { |
| 19 @apply(--layout-center); | 63 @apply(--layout-center); |
| 20 @apply(--layout-flex); | 64 @apply(--layout-flex); |
| 21 @apply(--layout-horizontal); | 65 @apply(--layout-horizontal); |
| 22 min-height: 40px; | 66 min-height: 40px; |
| 23 overflow: hidden; | 67 overflow: hidden; |
| 24 } | 68 } |
| 25 | 69 |
| 26 paper-checkbox { | 70 paper-checkbox { |
| 27 --paper-checkbox-checked-color: rgb(68, 136, 255); | 71 --paper-checkbox-checked-color: rgb(68, 136, 255); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 } | 121 } |
| 78 | 122 |
| 79 #bookmark { | 123 #bookmark { |
| 80 -webkit-margin-end: 10px; | 124 -webkit-margin-end: 10px; |
| 81 -webkit-margin-start: 20px; | 125 -webkit-margin-start: 20px; |
| 82 color: rgb(68, 136, 255); | 126 color: rgb(68, 136, 255); |
| 83 min-width: 16px; | 127 min-width: 16px; |
| 84 visibility: hidden; | 128 visibility: hidden; |
| 85 } | 129 } |
| 86 | 130 |
| 87 :host([starred]) #bookmark { | 131 #time-gap-separator { |
| 88 visibility: visible; | 132 -webkit-border-start: 1px solid #888; |
| 133 -webkit-margin-start: 77px; | |
| 134 height: 15px; | |
| 89 } | 135 } |
| 90 </style> | 136 </style> |
| 137 | |
| 91 <div id="main-container"> | 138 <div id="main-container"> |
| 92 <paper-checkbox id="checkbox" on-tap="onCheckboxSelected_" | 139 <div id="date-accessed">[[historyDate]]</div> |
| 93 checked="{{selected}}"> | 140 <div id="item-container"> |
| 94 </paper-checkbox> | 141 <paper-checkbox id="checkbox" on-tap="onCheckboxSelected_" |
| 95 <span id="time">{{timeAccessed_}}</span> | 142 checked="{{selected}}"> |
| 96 <div id="website-icon"></div> | 143 </paper-checkbox> |
| 97 <div id="titleAndDomain"> | 144 <span id="time">{{timeAccessed}}</span> |
| 98 <a href="{{websiteUrl_}}" id="title">{{websiteTitle_}}</a> | 145 <div id="website-icon"></div> |
| 99 <span id="domain">{{websiteDomain_}}</span> | 146 <div id="titleAndDomain"> |
| 147 <a href="{{websiteUrl}}" id="title">{{websiteTitle}}</a> | |
|
tsergeant
2016/02/08 02:23:59
While you're here,
when you use polymer to bind t
yingran
2016/02/08 03:20:36
Done.
| |
| 148 <span id="domain">{{websiteDomain}}</span> | |
| 149 </div> | |
| 150 <iron-icon icon="star" id="bookmark"></iron-icon> | |
| 151 <paper-icon-button icon="more-vert" id="menu-button" | |
| 152 on-tap="onMenuButtonTap_"> | |
| 153 </paper-icon-button> | |
| 100 </div> | 154 </div> |
| 101 <iron-icon icon="star" id="bookmark"></iron-icon> | 155 <template is="dom-if" if="{{hasTimeGap}}"> |
| 102 <paper-icon-button icon="more-vert" id="menu-button" | 156 <div id="time-gap-separator"></div> |
| 103 on-tap="onMenuButtonTap_"> | 157 </template> |
| 104 </paper-icon-button> | |
| 105 </div> | 158 </div> |
| 106 </template> | 159 </template> |
| 107 <script src="chrome://history/history_item.js"></script> | 160 <script src="chrome://history/history_item.js"></script> |
| 108 </dom-module> | 161 </dom-module> |
| OLD | NEW |