Skip to content

Commit

Permalink
GT-2201 Add image that links to homepage within tools (#148)
Browse files Browse the repository at this point in the history
Add logo to the tools pages header
  • Loading branch information
caleballdrin authored Nov 15, 2023
1 parent 0550fec commit 91a5a24
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 10 deletions.
3 changes: 2 additions & 1 deletion embed/embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
iframe.style.minHeight = '450px';
iframe.setAttribute('allowtransparency', 'true');
iframe.setAttribute('scrolling', 'no');
iframe.src = [baseUrl, '#', dataLang, dataBook].join('/');
iframe.src =
[baseUrl, '#', dataLang, dataBook].join('/') + '?embedded=true';

knowGodEmbed.appendChild(iframe);

Expand Down
38 changes: 31 additions & 7 deletions src/app/new-page/page.component.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***** Elements *****/
html {
background-color: white !important;
background-color: white !important;
}

h1,
Expand All @@ -10,17 +10,17 @@ h4,
h5,
h6,
p {
margin-bottom: 0;
margin-bottom: 0;
}

h4 {
font-size: 24px;
line-height: 30px;
font-weight: 300;
font-size: 24px;
line-height: 30px;
font-weight: 300;
}

p {
line-height: 24px;
line-height: 24px;
}

/***** High level *****/
Expand Down Expand Up @@ -57,6 +57,8 @@ p {
line-height: 36px;
padding: 12px 24px;
cursor: pointer;
position: absolute;
left: 0;
}

.language-selector-toggle .fas {
Expand All @@ -75,6 +77,10 @@ p {
position: relative;
z-index: 1;
}
#toolHeader .logo img {
height: 24px;
margin: 20px 0 0 0;
}

#languageList {
background-color: #f0f0f0;
Expand Down Expand Up @@ -105,6 +111,24 @@ p {
}
}

@media screen and (max-width: 440px) {
#toolHeader .logo img {
margin: 12px 0 0 0;
}
#toolHeader .logo {
display: block;
}
.language-selector-toggle {
position: relative;
}
.language-selector-toggle > .langicon {
float: none;
}
.header {
height: auto;
}
}

/***** Tool Footer *****/
#toolFooter {
margin-top: 48px !important;
Expand Down Expand Up @@ -138,4 +162,4 @@ footer span {
footer span:last-child {
float: right;
}
}
}
11 changes: 9 additions & 2 deletions src/app/new-page/page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@
<div class="outerbox">
<header id="toolHeader">
<div class="header tc relative">
<app-sharing-modal [book]="selectedBookName"></app-sharing-modal>
<a
[attr.href]="embedded ? 'https://knowgod.com' : '/'"
[attr.target]="embedded ? '_blank' : null"
class="logo"
>
<img src="assets/img/kg-logo-blue.png"
/></a>
<span
class="l absolute kg-gray-dark ng-binding language-selector-toggle"
class="kg-gray-dark ng-binding language-selector-toggle"
(click)="onToggleLanaguageSelect()"
>
<img src="assets/img/lang.png" class="langicon" /> {{ selectedLang }}
<i class="fas fa-chevron-up flip"></i>
</span>
<app-sharing-modal [book]="selectedBookName"></app-sharing-modal>
</div>
<div id="languageList" class="py25 ng-hide" *ngIf="languagesVisible">
<div class="mw568">
Expand Down
4 changes: 4 additions & 0 deletions src/app/new-page/page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export class PageNewComponent implements OnInit, OnDestroy {
totalPages: number;
bookNotAvailableInLanguage: boolean;
bookNotAvailable: boolean;
embedded: boolean;

constructor(
private loaderService: LoaderService,
Expand Down Expand Up @@ -107,6 +108,9 @@ export class PageNewComponent implements OnInit, OnDestroy {
this.awaitPageParameters();
this.awaitEmailFormSignupDataSubmitted();
this.awaitLiveShareStream();
this.route.queryParams.subscribe((queryParam) => {
this.embedded = queryParam.embedded === 'true';
});
}

ngOnDestroy() {
Expand Down
Binary file added src/assets/img/kg-logo-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 91a5a24

Please sign in to comment.