@ucd-lib/theme-elements 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -128,6 +128,7 @@ export default class UcdlibAuthorProfile extends LitElement {
|
|
|
128
128
|
*/
|
|
129
129
|
_onError(e){
|
|
130
130
|
this.ERROR = true;
|
|
131
|
+
console.log(this.ERROR);
|
|
131
132
|
console.error(e);
|
|
132
133
|
}
|
|
133
134
|
|
|
@@ -141,37 +142,44 @@ export default class UcdlibAuthorProfile extends LitElement {
|
|
|
141
142
|
*
|
|
142
143
|
*/
|
|
143
144
|
_onComplete(results){
|
|
144
|
-
this.COMPLETE = true;
|
|
145
|
-
this.PENDING = false;
|
|
146
|
-
this.LOADING = false;
|
|
147
145
|
this.results = results;
|
|
146
|
+
if(this.results.data != undefined) {
|
|
147
|
+
this.ERROR = true;
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
this.COMPLETE = true;
|
|
151
|
+
this.PENDING = false;
|
|
152
|
+
this.LOADING = false;
|
|
148
153
|
|
|
149
|
-
this.id = this.results.id;
|
|
150
154
|
|
|
151
|
-
|
|
155
|
+
this.id = this.results.id;
|
|
152
156
|
|
|
153
|
-
|
|
157
|
+
this.nameLast = this.results.nameLast;
|
|
154
158
|
|
|
155
|
-
|
|
159
|
+
this.nameFirst = this.results.nameFirst;
|
|
156
160
|
|
|
157
|
-
|
|
161
|
+
this.link = this.results.link;
|
|
158
162
|
|
|
159
|
-
|
|
163
|
+
this.contactWebsite = this.results.contactWebsite.length !== 0 ? this.results.contactWebsite[0].value :null;
|
|
160
164
|
|
|
161
|
-
|
|
165
|
+
this.contactEmail = this.results.contactEmail.length !== 0 ? this.results.contactEmail[0].value : null;
|
|
162
166
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
this.positionTitle = this.results.positionTitle;
|
|
167
|
+
this.contactPhone = this.results.contactPhone.length !== 0 ? this.results.contactPhone[0].value : null;
|
|
166
168
|
|
|
167
|
-
|
|
169
|
+
this.contactAppointmentUrl = this.results.contactAppointmentUrl != "" ? this.results.contactAppointmentUrl : undefined;
|
|
170
|
+
|
|
171
|
+
this.positionTitle = this.results.positionTitle;
|
|
168
172
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
this.photoAlt = this.nameFirst + "_" + this.nameLast + "_Img";
|
|
173
|
+
this.photo = Object.keys(this.results.photo).length !== 0 ? this.results.photo : "Empty";
|
|
172
174
|
|
|
173
|
-
|
|
175
|
+
this.department = this.results.department.title;
|
|
176
|
+
|
|
177
|
+
this.photoAlt = this.nameFirst + "_" + this.nameLast + "_Img";
|
|
174
178
|
|
|
179
|
+
this.requestUpdate();
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
|
|
175
183
|
|
|
176
184
|
}
|
|
177
185
|
|
|
@@ -102,6 +102,9 @@ export function render() {
|
|
|
102
102
|
line-height: 25px;
|
|
103
103
|
color:#36454F;
|
|
104
104
|
}
|
|
105
|
+
.noApp-pipe {
|
|
106
|
+
display:none;
|
|
107
|
+
}
|
|
105
108
|
|
|
106
109
|
@media (max-width: 800px) {
|
|
107
110
|
|
|
@@ -154,8 +157,8 @@ ${this.eController ? html`
|
|
|
154
157
|
<h3 class="name"><a class="name" href="">${this.nameFirst} ${this.nameLast}</a></h3>
|
|
155
158
|
<p class="title">${this.positionTitle} <span class="pipe">|</span> ${this.department}</p>
|
|
156
159
|
<p class="contact-list">${this.contactPhone ? html`${this.svgIcon.phone} <a class="info" href="tel:${this.contactPhone}">${this.contactPhone}</a> <span class="pipe">|</span>`: html``}</p>
|
|
157
|
-
<p class="contact-list">${this.contactEmail ? html`${this.svgIcon.email} <a class="info" href="mailto:${this.contactEmail}">${this.contactEmail}</a>
|
|
158
|
-
<p class="contact-list">${this.svgIcon.calendar} <a class="info" href="${this.contactAppointmentUrl}">Book an Appointment</a
|
|
160
|
+
<p class="contact-list">${this.contactEmail ? html`${this.svgIcon.email} <a class="info" href="mailto:${this.contactEmail}">${this.contactEmail}</a> ${this.contactAppointmentUrl ? html`<span class="pipe">|</span>`:html`<span class="noApp-pipe">|</span>`}`: html``}</p>
|
|
161
|
+
<p class="contact-list">${this.contactAppointmentUrl ? html`${this.svgIcon.calendar} <a class="info" href="${this.contactAppointmentUrl ? this.contactAppointmentUrl:"#"}">Book an Appointment</a>`: html``}</p>
|
|
159
162
|
</div>
|
|
160
163
|
</div>
|
|
161
164
|
`
|
|
@@ -165,28 +168,33 @@ ${this.eController ? html`
|
|
|
165
168
|
<h3 class="name"><a class="name" href="">${this.nameFirst} ${this.nameLast}</a></h3>
|
|
166
169
|
<p class="title">${this.positionTitle} <span class="pipe">|</span> ${this.department}</p>
|
|
167
170
|
<p class="contact-list">${this.contactPhone ? html`${this.svgIcon.phone} <a class="info" href="tel:${this.contactPhone}">${this.contactPhone}</a> <span class="pipe">|</span> `: html``}</p>
|
|
168
|
-
<p class="contact-list">${this.contactEmail ? html`${this.svgIcon.email} <a class="info" href="mailto:${this.contactEmail}">${this.contactEmail}</a>
|
|
169
|
-
<p class="contact-list">${this.svgIcon.calendar} <a class="info" href="${this.contactAppointmentUrl ? this.contactAppointmentUrl:"#"}">Book an Appointment</a
|
|
171
|
+
<p class="contact-list">${this.contactEmail ? html`${this.svgIcon.email} <a class="info" href="mailto:${this.contactEmail}">${this.contactEmail}</a> ${this.contactAppointmentUrl ? html`<span class="pipe">|</span>`:html`<span class="noApp-pipe">|</span>`}`: html``}</p>
|
|
172
|
+
<p class="contact-list">${this.contactAppointmentUrl ? html`${this.svgIcon.calendar} <a class="info" href="${this.contactAppointmentUrl ? this.contactAppointmentUrl:"#"}">Book an Appointment</a>`: html``}</p>
|
|
170
173
|
</div>
|
|
171
174
|
</div>
|
|
172
175
|
`}
|
|
173
176
|
|
|
174
177
|
`:html`
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
<
|
|
184
|
-
<div class="
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
178
|
+
${this.ERROR ? html`
|
|
179
|
+
<p>Person does not exist!</p>
|
|
180
|
+
`: html`
|
|
181
|
+
<!--
|
|
182
|
+
If it is in the loading stage of the permalink fetch
|
|
183
|
+
it will render this
|
|
184
|
+
look.
|
|
185
|
+
-->
|
|
186
|
+
<div class="vm-teaser__figure category_loading"></div>
|
|
187
|
+
<div class="vm-teaser__body">
|
|
188
|
+
<div class="load_teaser_a"></div>
|
|
189
|
+
<br/>
|
|
190
|
+
<div class="load_teaser_b"></div>
|
|
191
|
+
<br/>
|
|
192
|
+
<div class="load_teaser_c"></div>
|
|
193
|
+
<br/>
|
|
194
|
+
<div class="load_teaser_c"></div>
|
|
195
|
+
</div>
|
|
196
|
+
`}
|
|
197
|
+
|
|
190
198
|
`}
|
|
191
199
|
</article>
|
|
192
200
|
`;
|