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

docs: Add landing page for React Native Screens #2240

Merged
merged 37 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
c5e06b0
Init commit
patrycjakalinska Jul 8, 2024
2958061
Add Overview, Downloads, Sponsors and Testimonials Sections
patrycjakalinska Jul 9, 2024
e6aa0a3
Add mock data to Testimonials
patrycjakalinska Jul 9, 2024
3223842
Hide testimonials
patrycjakalinska Jul 9, 2024
b4ca354
Stylistic fixes
patrycjakalinska Jul 9, 2024
ee1f8b7
Fix for tab title
patrycjakalinska Jul 11, 2024
2c4de0f
add og-image and favicon
patrycjakalinska Jul 11, 2024
2e53094
Add link to blog post
patrycjakalinska Jul 11, 2024
b2923fd
draft
patrycjakalinska Jul 11, 2024
d00f527
style: add animation to hero
patrycjakalinska Jul 12, 2024
328d7df
style: run prettier on files
patrycjakalinska Jul 12, 2024
1174759
rename variables
patrycjakalinska Jul 15, 2024
eff0741
style: remove unneccessary styles
patrycjakalinska Jul 15, 2024
dfdc235
style: remove animation for mobile
patrycjakalinska Jul 15, 2024
56d772f
change of copy
patrycjakalinska Jul 15, 2024
d5630cd
style: adjustment for big screens
patrycjakalinska Jul 15, 2024
ac94507
Bump `@swmansion/t-rex-ui` to 0.0.13
patrycjakalinska Jul 16, 2024
3ec2afb
chore: update navbar to work with latest t-rex-ui
patrycjakalinska Jul 16, 2024
d727cfc
chore: replace hireUsSection
patrycjakalinska Jul 16, 2024
34a2c52
chore: adjustments for HireUs
patrycjakalinska Jul 16, 2024
8bfc6ca
chore: fix typo
patrycjakalinska Jul 16, 2024
41a7443
style: rename
patrycjakalinska Jul 16, 2024
52a5db9
chore: add hero icon
patrycjakalinska Jul 17, 2024
a61a9ee
chore: add multiplatform animation tile
patrycjakalinska Jul 17, 2024
34b7a32
chore: link changes
patrycjakalinska Jul 30, 2024
3b7cc61
style: review changes
patrycjakalinska Jul 30, 2024
f369400
chore: make uppercase
patrycjakalinska Jul 30, 2024
8b0c5c9
chore: review changes
patrycjakalinska Jul 30, 2024
6e8380a
chore: renaming files
patrycjakalinska Jul 30, 2024
d18a2bc
docs: replace readme
patrycjakalinska Jul 30, 2024
8d24d20
chore: hide testimonials
patrycjakalinska Jul 30, 2024
c3445d2
style: review changes
patrycjakalinska Jul 30, 2024
b9ccdae
style: switch to grid on Overview
patrycjakalinska Jul 31, 2024
cd1015b
style: fix grid for >2000px
patrycjakalinska Jul 31, 2024
d2c97b6
chore: replace favicon
patrycjakalinska Jul 31, 2024
bdee55f
review changes
patrycjakalinska Aug 12, 2024
8e4be27
style: add margin
patrycjakalinska Aug 12, 2024
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
20 changes: 20 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
19 changes: 19 additions & 0 deletions docs/README.md
patrycjakalinska marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Screens Documentation

👉 Landing: [https://docs.swmansion.com/react-native-screens/](https://docs.swmansion.com/react-native-screens/)
👉 Documentation: [https://reactnavigation.org/docs/native-stack-navigator/](https://reactnavigation.org/docs/native-stack-navigator/)

## How can I help?

Glad you asked! You can help the project in many ways e.g. by:

- _Reading and sharing_ the docs with friends and co-workers
- _Sending feedback_ in the discussion or issues on GitHub
- _Submitting PRs_ with fixes and improvements to the docs content and styles

All feedback in all forms ranging from general to tiny fixes is highly appreciated!

## Meet the docs team

- [Balbina Falba](https://dribbble.com/balbina): design
patrycjakalinska marked this conversation as resolved.
Show resolved Hide resolved
- [Patrycja Kalińska](https://x.com/patkalinska): site development
3 changes: 3 additions & 0 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
Empty file added docs/docs/intro.md
patrycjakalinska marked this conversation as resolved.
Show resolved Hide resolved
Empty file.
80 changes: 80 additions & 0 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'React Native Screens',
favicon: 'img/favicon.ico',

url: 'https://docs.swmansion.com',

baseUrl: '/react-native-screens/',

organizationName: 'software-mansion',
projectName: 'react-native-screens',

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',

i18n: {
defaultLocale: 'en',
locales: ['en'],
},

presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
breadcrumbs: false,
sidebarPath: require.resolve('./sidebars.js'),
sidebarCollapsible: false,
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: 'img/og-image.png',
metadata: [
{ name: 'og:image:width', content: '1200' },
{ name: 'og:image:height', content: '630' },
],
navbar: {
hideOnScroll: true,
logo: {
alt: 'React Native Screens logo',
src: 'img/logo.svg',
srcDark: 'img/logo-dark.svg',
},
items: [
{
to: 'https://reactnavigation.org/docs/7.x/native-stack-navigator/',
activeBasePath: 'docs',
label: 'Docs',
position: 'right',
},
{
href: 'https://github.com/software-mansion/react-native-screens/',
position: 'right',
className: 'header-github',
'aria-label': 'GitHub repository',
},
],
},
footer: {
style: 'light',
links: [],
copyright:
'All trademarks and copyrights belong to their respective owners.',
},
}),
};

module.exports = config;
48 changes: 48 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "docs",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.4.3",
"@docusaurus/preset-classic": "2.4.3",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@mdx-js/react": "^1.6.22",
"@mui/material": "^5.16.0",
"@swmansion/t-rex-ui": "^0.0.13",
"clsx": "^1.2.1",
"prettier": "^2.8.4",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.4.3"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"engines": {
"node": ">=16.14"
}
}
33 changes: 33 additions & 0 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation

The sidebars can be generated from the filesystem, or explicitly defined here.

Create as many sidebars as you want.
*/

// @ts-check

/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }],

// But you can create a sidebar manually
/*
tutorialSidebar: [
'intro',
'hello',
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
},
],
*/
};

module.exports = sidebars;
tboba marked this conversation as resolved.
Show resolved Hide resolved
24 changes: 24 additions & 0 deletions docs/src/components/Downloads/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from 'react';
import styles from './styles.module.css';

const Downloads = () => {
return (
<div className={styles.downloadsWrapper}>
<div className={styles.downloadsContainer}>
<h2 className={styles.title}>+1 000 000 / week</h2>
<p className={styles.content}>
React Native Screens is directly used in the React Navigation and Expo
Router libraries, some of the most popular libraries in the React
Native ecosystem. That's why nearly every second project uses React
Native Screens in React Native applications.
</p>
<div className={styles.brandContainer}>
<img src="img/react-navigation.svg" />
<img src="img/expo-router.svg" />
</div>
</div>
</div>
);
};

export default Downloads;
63 changes: 63 additions & 0 deletions docs/src/components/Downloads/styles.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
.title {
font-size: 48px;
font-weight: 700;
text-align: center;
color: var(--swm-navy-light-100);
}

.content {
font-size: 20px;
line-height: 32px;
color: var(--swm-navy-light-100);
text-align: center;
text-wrap: balance;
}

.brandContainer {
display: flex;
flex-direction: row;
justify-content: center;
gap: 4rem;
}

.brandContainer img {
width: 100px;
height: auto;
}

.downloadsWrapper {
background-color: var(--swm-blue-light-40);
margin: 6.5rem 0;
}

[data-theme='dark'] .downloadsWrapper {
background-color: var(--swm-blue-dark-80);
}

.downloadsContainer {
width: 60%;
margin: 5rem auto 7.5rem;
position: relative;
display: flex;
flex-direction: column;
gap: 2rem;
}

@media (max-width: 1440px) {
.downloadsContainer {
width: 75%;
}
}

@media (max-width: 996px) {
.downloadsContainer {
width: 85%;
gap: 3.5rem;
}
.title {
font-size: 40px;
}
.brandContainer {
gap: 2.5rem;
}
}
12 changes: 12 additions & 0 deletions docs/src/components/FooterBackground/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';
import styles from './styles.module.css';

const FooterBackground = () => {
return (
<div className={styles.container}>
<div className={styles.footerBackground} />
</div>
);
};

export default FooterBackground;
75 changes: 75 additions & 0 deletions docs/src/components/FooterBackground/styles.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
.footerBackground {
position: absolute;
bottom: 0;
left: 0;

background: linear-gradient(
180deg,
var(--swm-white) 0%,
rgba(252, 252, 255, 0) 150.5%
),
linear-gradient(
180deg,
var(--swm-blue-light-40) 35%,
var(--swm-blue-light-60) 100%
);
width: 100%;
height: 50vh;
overflow: hidden;

z-index: -100;
}

.container {
position: relative;
margin-top: 107px;
}

footer {
margin-top: -107px;
}

@media (max-width: 996px) {
.container {
margin-top: 122px;
}
footer {
margin-top: -122px;
}
}

@media (max-width: 700px) {
.container {
margin-top: 147px;
}
footer {
margin-top: -147px;
}
}

@media (max-width: 375px) {
.container {
margin-top: 173px;
}
footer {
margin-top: -173px;
}
}
Comment on lines +25 to +57
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm concerned why these values are so deviated 😄 Can we round them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They fix the gradient on the footer, so they are so specific to be perfect. Before it was connected to Footer component from Docusaurus so there was no need to do that, right now we need to use negative margin to move gradient down to cover footer on each media screen size

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still against putting that much specific numbers, couple of pixels shouldn't break anything 😄 Let's try rounding it


[data-theme='dark'] .footerBackground {
background: linear-gradient(
180deg,
var(--swm-white) 0%,
rgba(252, 252, 255, 0) 150.5%
),
linear-gradient(
180deg,
var(--swm-blue-dark-120) 35%,
var(--swm-navy-dark-140) 100%
);
background: linear-gradient(
180deg,
var(--swm-navy-dark-140) 0%,
var(--swm-blue-dark-120) 100%
);
}
Loading
Loading