Skip to content

Commit

Permalink
Downloads: Change layout
Browse files Browse the repository at this point in the history
  • Loading branch information
moysa committed Nov 6, 2024
1 parent a638b9f commit fe2ca06
Show file tree
Hide file tree
Showing 4 changed files with 150 additions and 99 deletions.
Binary file modified src/assets/images/primal_qr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
219 changes: 124 additions & 95 deletions src/pages/Downloads.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

.downloadsContent {
display: flex;
flex-direction: column;
gap: 10px;
align-items: flex-start;
justify-content: center;
Expand All @@ -37,128 +38,156 @@
padding-top: 20px;
}

.promoHolder {
position: relative;
.appInfo {
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-bottom: 24px;
width: 300px;
justify-content: space-between;
align-items: flex-start;
margin-top: 12px;
padding-inline: 20px;

>video {
width: 100%;
border-radius: 8px;
>div {
display: flex;
width: 190px;
height: 154px;
flex-direction: column;
justify-content: flex-start;
align-items: center;
padding-top: 20px;
border-radius: 12px;
}
}

.linkHolder {
.qrCode {
display: flex;
flex-direction: column;
justify-content: center;
justify-content: flex-start;
align-items: center;
gap: 16px;
padding-top: 12px;
gap: 14px;
border: 1px solid var(--background-input);

>div {
img {
width: 92px;
border-radius: 4px;
}

.qrCaption {
color: var(--text-secondary);
font-size: 12px;
font-weight: 400;
line-height: 12px;
}
}


.appStore {

background-color: var(--background-input);

.desktopCTA {
color: var(--text-primary);
text-align: center;
font-size: 20px;
font-weight: 600;
line-height: 20px;
}

.buidDetails {
display: flex;
width: 243px;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 20px 28px;
border-radius: 12px;
background-color: var(--background-input);
width: 100%;
color: var(--text-tertiary-2);
font-size: 12px;
font-weight: 400;
line-height: 12px;
margin-top: 4px;

>div:first-child {
display: flex;
flex-direction: column;
align-items: flex-end;
// margin-right: 8px;
}
>div:last-child {
display: flex;
flex-direction: column;
align-items: flex-start;
text-transform: capitalize;
}
}

.appStore {
border-radius: 8px;
>a {
margin-top: 16px;
width: 120px;
height: 40px;
}
}

.playStore {

.desktopCTA {
color: var(--text-primary);
text-align: center;
font-size: 20px;
font-weight: 600;
line-height: 20px;
}
background-color: var(--background-input);

.buidDetails {
display: flex;
justify-content: center;
width: 100%;
color: var(--text-tertiary-2);
font-size: 14px;
font-weight: 400;
line-height: 14px;
margin-top: 4px;
.playstoreLink {
margin-top: 16px;
}

>div:first-child {
display: flex;
flex-direction: column;
align-items: flex-end;
margin-right: 8px;
}
>div:last-child {
display: flex;
flex-direction: column;
align-items: flex-start;
text-transform: capitalize;
}
}
.apkLink {
font-size: 12px;
font-weight: 400;
line-height: 18px;
margin-top: 16px;
}

>a {
margin-top: 16px;
width: 120px;
height: 40px;
}
.desktopCTA {
color: var(--text-primary);
text-align: center;
font-size: 20px;
font-weight: 600;
line-height: 20px;
}

.playStore {
border-radius: 8px;
.playstoreLink {
margin-top: 16px;
}
.buidDetails {
display: flex;
justify-content: center;
width: 100%;
color: var(--text-tertiary-2);
font-size: 12px;
font-weight: 400;
line-height: 12px;
margin-top: 4px;
text-align: center;

.apkLink {
font-size: 12px;
font-weight: 400;
line-height: 18px;
margin-top: 16px;
>div:first-child {
display: flex;
flex-direction: column;
align-items: flex-end;
// margin-right: 8px;
}

.desktopCTA {
color: var(--text-primary);
text-align: center;
font-size: 20px;
font-weight: 600;
line-height: 20px;
>div:last-child {
display: flex;
flex-direction: column;
align-items: flex-start;
text-transform: capitalize;
}
}
}

.buidDetails {
display: flex;
justify-content: center;
width: 100%;
color: var(--text-tertiary-2);
font-size: 14px;
font-weight: 400;
line-height: 14px;
margin-top: 4px;
.promoVideo {
width: 600px;
height: 337px;
display: flex;
justify-content: center;

>div:first-child {
display: flex;
flex-direction: column;
align-items: flex-end;
margin-right: 8px;
}
margin-inline: 20px;

>div:last-child {
display: flex;
flex-direction: column;
align-items: flex-start;
text-transform: capitalize;
}
}
border-radius: 12px;
overflow: hidden;

background: var(--background-header-input);
video {
width: 100%;
height: 100%;
}
}

Expand Down
23 changes: 20 additions & 3 deletions src/pages/Downloads.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Search from '../components/Search/Search';

import appstoreImg from '../assets/images/appstore_download.svg';
import playstoreImg from '../assets/images/playstore_download.svg';
import primalQR from '../assets/images/primal_qr.png';

import gitHubLight from '../assets/icons/github_light.svg';
import gitHubDark from '../assets/icons/github.svg';
Expand Down Expand Up @@ -117,11 +118,19 @@ const Downloads: Component = () => {

<div class={styles.downloadsContent}>

<div class={styles.promoHolder}>
<img src={primalDownloads} />
<div class={styles.promoVideo}>
<video
src='https://m.primal.net/HcyV.mp4'
controls={false}
muted={true}
loop={true}
playsinline={true}
autoplay={true}
/>
</div>

<div class={styles.linkHolder}>
<div class={styles.appInfo}>

<div class={styles.appStore}>
<div class={styles.desktopCTA}>{intl.formatMessage(t.callToActionIOSTitle)}</div>

Expand All @@ -144,6 +153,14 @@ const Downloads: Component = () => {
<img src={appstoreImg} />
</a>
</div>

<div class={styles.qrCode}>
<img src={primalQR} width={180} />
<div class={styles.qrCaption}>
{intl.formatMessage(t.callToActionQRTitle)}
</div>
</div>

<div class={styles.playStore}>
<div class={styles.desktopCTA}>{intl.formatMessage(t.callToActionAndroidTitle)}</div>

Expand Down
7 changes: 6 additions & 1 deletion src/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,14 +492,19 @@ export const downloads = {
},
callToActionAndroidTitle: {
id: 'downloads.ctaAndroidTitle',
defaultMessage: 'Primal Android Beta',
defaultMessage: 'Primal Android',
description: 'Title for the Android downloads\' page call-to-action',
},
callToActionAndroidDescription: {
id: 'downloads.ctaAndroidDescription',
defaultMessage: 'The app features easy onboarding, fast & snappy UI, ability to explore Nostr, and create & manage custom feeds',
description: 'Description for the Android downloads\' page call-to-action',
},
callToActionQRTitle: {
id: 'downloads.ctaQRTitle',
defaultMessage: 'Scan to install app',
description: 'Title for the QR code downloads\' page call-to-action',
},
appStoreCaption: {
id: 'downloads.appStoreCaption',
defaultMessage: 'TestFlight Available Now',
Expand Down

0 comments on commit fe2ca06

Please sign in to comment.