Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#364 - Homepage style #374

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
221 changes: 151 additions & 70 deletions src/app/adf-home/df-welcome-page/df-welcome-page.component.html
Original file line number Diff line number Diff line change
@@ -1,78 +1,159 @@
<ng-container
*ngIf="{
isFirstTimeUser: isFirstTimeUser$ | async
isFirstTimeUser: isFirstTimeUser$ | async,
apiKeyNum: apiKeyNum$ | async,
latestVideoLink: latestVideoLink$ | async
} as data">
<div [class]="(isDarkMode | async) ? 'dark-theme' : ''">
<section
class="two-column-flex-container"
[class.mobile]="breakpointService.isSmallScreen | async">
<article class="flex-column">
<article>
<h2>
{{ 'home.welcomePage.welcomeHeading' | transloco }}
</h2>
<p id="get-started-links">
{{ 'home.welcomePage.welcomeSubHeading' | transloco }}
</p>
<ul aria-labelledby="get-started-links">
<li *ngFor="let resource of welcomePageResources">
<ng-container *ngIf="data.isFirstTimeUser; else notFirst">
<df-icon-link [linkItem]="resource"></df-icon-link>
</ng-container>
<ng-template #notFirst>
<ng-container
*ngIf="
resource.name === 'home.resourceLinks.fullDocumentation' ||
resource.name === 'home.resourceLinks.blog' ||
resource.name === 'home.resourceLinks.contactSupport'
"
><df-icon-link [linkItem]="resource"></df-icon-link
></ng-container>
</ng-template>
</li>
</ul>
</article>
</article>
<aside class="flex-column">
<div class="video-link">
<a
href="https://youtu.be/FOSOm88RxPw"
target="_blank"
aria-labelledby="video-link-description">
<img
class="video-image"
src="assets/img/macbook-hp-df-1.png"
alt="" />
<div class="video-overlay">
<fa-icon [icon]="faCirclePlay" class="fa-4x play-icon"></fa-icon>
<span id="video-link-description">{{
'home.welcomePage.watchVideoCta' | transloco
}}</span>
</div>
</a>
</div>
<!-- <mat-card class="notice-card">
<h3>
<fa-icon
[icon]="faHeart"
class="pre-heading-icon"
aria-hidden="true"></fa-icon
>{{ 'home.welcomePage.ossUsersHeading' | transloco }}
</h3>
<p [innerHtml]="'home.welcomePage.ossUsersText' | transloco"></p>
<section>
<h2>Connections</h2>
<div class="connection-container">
<mat-card
class="connection-card release-card"
[style]="{ 'word-break': 'break-all' }">
<mat-card-header>
<mat-card-subtitle class="title"
>Database<br />
Connections</mat-card-subtitle
>
</mat-card-header>
<mat-card-content>
<br />
<p
class="num"
*ngIf="getServiceCardByName('Database Connections') as card">
{{ card.num }}
</p>
</mat-card-content>
</mat-card>

<mat-card class="notice-card">
<h3>
<fa-icon
[icon]="faComment"
class="pre-heading-icon"
aria-hidden="true"></fa-icon
>{{ 'home.welcomePage.hearFromYouHeading' | transloco }}
</h3>
<p [innerHtml]="'home.welcomePage.hearFromYouText' | transloco"></p>
</mat-card> -->
</aside>
<mat-card
class="connection-card release-card"
[style]="{ 'word-break': 'break-all' }">
<mat-card-header>
<mat-card-subtitle class="title">API Keys</mat-card-subtitle>
</mat-card-header>
<mat-card-content>
<br />
<p class="num">{{ data.apiKeyNum }}</p>
</mat-card-content>
</mat-card>
<mat-card
class="connection-card release-card"
[style]="{ 'word-break': 'break-all' }">
<mat-card-header>
<mat-card-subtitle class="title">Scripting </mat-card-subtitle>
</mat-card-header>
<mat-card-content>
<br />
<p class="num" *ngIf="getServiceCardByName('Scripting') as card">
{{ card.num }}
</p>
</mat-card-content>
</mat-card>
<mat-card
class="connection-card release-card"
[style]="{ 'word-break': 'break-all' }">
<mat-card-header>
<mat-card-subtitle class="title"
>Network<br />
Connection</mat-card-subtitle
>
</mat-card-header>
<mat-card-content>
<br />
<p
class="num"
*ngIf="getServiceCardByName('Network Connections') as card">
{{ card.num }}
</p>
</mat-card-content>
</mat-card>
</div>
</section>
<section>
<h2>News</h2>
<div class="news-container">
<div class="main-content">
<mat-card
class="full-width news-card release-card"
[style]="{ 'word-break': 'break-all' }">
<mat-card-header>
<mat-card-subtitle class="title"
>DreamFactory <br />Documentation</mat-card-subtitle
>
</mat-card-header>
<mat-card-content>
<br /><a
href="https://wiki.dreamfactory.com/"
target="_blank"
class="link"
>View</a
></mat-card-content
>
</mat-card>
<mat-card
class="full-width news-card release-card"
[style]="{ 'word-break': 'break-all' }">
<mat-card-header>
<mat-card-subtitle class="title"
>DreamFactory <br />Blog</mat-card-subtitle
>
</mat-card-header>
<mat-card-content>
<br />
<a
href="https://blog.dreamfactory.com/"
target="_blank"
class="link"
>View</a
></mat-card-content
>
</mat-card>
<mat-card
class="full-width news-card release-card"
[style]="{ 'word-break': 'break-all' }">
<mat-card-header>
<mat-card-subtitle class="title"
>DreamFactory <br />Guide</mat-card-subtitle
>
</mat-card-header>
<mat-card-content>
<br /><a
href="https://guide.dreamfactory.com"
target="_blank"
class="link"
>View</a
></mat-card-content
>
</mat-card>
<mat-card
class="full-width news-card release-card"
[style]="{ 'word-break': 'break-all' }">
<mat-card-header>
<mat-card-subtitle class="title"
>Contact Support</mat-card-subtitle
>
</mat-card-header>
<mat-card-content
><br /><a
href="https://www.dreamfactory.com/support"
target="_blank"
class="link"
>View</a
></mat-card-content
>
</mat-card>
</div>
<div *ngIf="data.latestVideoLink">
<iframe
id="youtube_video"
width="560"
height="315"
frameborder="0"
allowfullscreen
[src]="data.latestVideoLink"></iframe>
</div>
</div>
</section>
<section class="platforms-section">
<div>
Expand Down
87 changes: 47 additions & 40 deletions src/app/adf-home/df-welcome-page/df-welcome-page.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,65 @@
@import '../adf-home.module.scss';
$df-purple-palette: mat.define-palette(theme.$df-purple-palette);
$df-coral-palette: mat.define-palette(theme.$df-coral-palette);

.two-column-flex-container {
.connection-container {
display: flex;
justify-content: stretch;
padding-bottom: 50px;

&.mobile {
gap: 10px;
.connection-card {
display: flex;
flex-direction: column;

.flex-column:first-child {
padding-right: 0;
padding-bottom: 25px;
justify-content: space-between;
width: 25%;
padding: 20px 30px;
border-radius: 12px;
border: 1px solid rgb(0 0 0 / 0.1);
box-shadow:
0 10px 15px -3px rgb(0 0 0 / 0.1),
0 4px 6px -4px rgb(0 0 0 / 0.1);
.title {
font-size: 16px;
}

.flex-column:last-child {
padding: 0;
.num {
font-size: 25px;
font-weight: 400;
}
}
}

.flex-column {
flex-basis: 50%;

&:first-child {
padding-right: 25px;
}
&:last-child {
padding-left: 25px;
.news-container {
display: flex;
gap: 10px;
.main-content {
display: flex;
flex-wrap: wrap;
gap: 4px;
width: 50%;
.news-card {
display: flex;
flex-direction: column;
justify-content: space-between;
width: 49%;
padding: 20px 30px;
.title {
font-size: 16px;
}
.link {
font-size: 20px;
font-weight: 400;
text-decoration: none;
}
}
}
}

.video-link {
position: relative;
}

.video-image {
max-width: 100%;
}

.video-overlay {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 2;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
pointer-events: none;
@media screen and (max-width: 1024px) {
.news-container {
flex-direction: column !important;
.main-content {
width: 100% !important;
}
}
}

.play-icon {
Expand All @@ -75,7 +83,6 @@ mat-card.notice-card {
}
}
}

.pre-heading-icon {
margin-right: 10px;
color: mat.get-color-from-palette($df-purple-palette, 600);
Expand Down
Loading