Skip to content

Commit 0e5a8c9

Browse files
authored
[Interactive visualizer] Add left footer (#368)
1 parent b93909b commit 0e5a8c9

File tree

3 files changed

+83
-2
lines changed

3 files changed

+83
-2
lines changed

interactive-visualizers/src/app/app.component.html

+25-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,31 @@
5959
</div>
6060
</div>
6161

62-
<div class="LeftFooter"
63-
id="left-footer-section">
62+
<!-- Left footer -->
63+
<div class="LeftFooter">
64+
<img *ngIf="publisherThumbnailUrl != null"
65+
class="LeftFooterPublisherThumbnailUrl"
66+
src="{{ publisherThumbnailUrl }}"
67+
alt="">
68+
<div *ngIf="publisherName != null"
69+
class="LeftFooterPublisherNameContainer">
70+
<div class="LeftFooterPublisherNameHeader">
71+
Published by:
72+
</div>
73+
<div class="LeftFooterPublisherNameText">
74+
{{ publisherName }}
75+
</div>
76+
</div>
77+
<a class="LeftFooterTermsOfService"
78+
href="https://www.google.com/intl/en/policies/terms/"
79+
target="_blank">
80+
Terms of Service
81+
</a>
82+
<a class="LeftFooterPrivacyPolicy"
83+
href="https://www.google.com/intl/en/policies/privacy/"
84+
target="_blank">
85+
Privacy Policy
86+
</a>
6487
</div>
6588
</div>
6689
<div class="RightSide">

interactive-visualizers/src/app/app.component.scss

+50
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,56 @@ $XXSMALL_FONT_SIZE: 12px;
218218
width: calc(100% - 4px);
219219
}
220220

221+
/* Left footer */
222+
223+
.LeftFooterPublisherThumbnailUrl {
224+
border-radius: 100%;
225+
display: inline-block;
226+
height: 50px;
227+
width: 50px;
228+
}
229+
230+
.LeftFooterPublisherNameContainer {
231+
display: inline-block;
232+
height: 100%;
233+
margin-left: 12px;
234+
vertical-align: top;
235+
}
236+
237+
.LeftFooterPublisherNameHeader {
238+
color: $SECONDARY_TEXT_COLOR;
239+
font-size: $XXSMALL_FONT_SIZE;
240+
height: 17px;
241+
margin-top: 7px;
242+
}
243+
244+
.LeftFooterPublisherNameText {
245+
color: $PRIMARY_TEXT_COLOR;
246+
font-size: $SMALL_FONT_SIZE;
247+
height: 26px;
248+
}
249+
250+
.LeftFooterPrivacyPolicy {
251+
color: $PRIMARY_TEXT_COLOR;
252+
cursor: pointer;
253+
float: right;
254+
font-size: $XXSMALL_FONT_SIZE;
255+
margin-top: 28px;
256+
padding-right: 8px;
257+
text-decoration: none;
258+
}
259+
260+
.LeftFooterTermsOfService {
261+
border-left: solid 1px $BORDER_COLOR;
262+
color: $PRIMARY_TEXT_COLOR;
263+
cursor: pointer;
264+
float: right;
265+
font-size: $XXSMALL_FONT_SIZE;
266+
margin-top: 28px;
267+
padding-left: 8px;
268+
text-decoration: none;
269+
}
270+
221271
/* Input section */
222272

223273
.DragAndDrop {

interactive-visualizers/src/app/app.component.ts

+8
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ export class AppComponent implements OnInit {
4040
title = 'interactive-visualizers';
4141

4242
// Model related variables.
43+
publisherThumbnailUrl: string|null = null;
44+
publisherName: string|null = null;
4345
modelMetadataUrl: string|null = null;
4446
modelMetadata: any|null = null;
4547
modelType: string|null = null;
@@ -67,6 +69,12 @@ export class AppComponent implements OnInit {
6769
throw new Error(NO_MODEL_METADATA_ERROR_MESSAGE);
6870
}
6971
const modelMetadataUrl = urlParams.get('modelMetadataUrl');
72+
if (urlParams.has('publisherThumbnailUrl')) {
73+
this.publisherThumbnailUrl = urlParams.get('publisherThumbnailUrl');
74+
}
75+
if (urlParams.has('publisherName')) {
76+
this.publisherName = urlParams.get('publisherName');
77+
}
7078

7179
this.initApp(modelMetadataUrl);
7280
}

0 commit comments

Comments
 (0)