Skip to content

Commit

Permalink
BUILD docs (#6654)
Browse files Browse the repository at this point in the history
  • Loading branch information
pubkey authored Dec 1, 2024
1 parent 73b8552 commit 1b5b831
Show file tree
Hide file tree
Showing 223 changed files with 1,097 additions and 647 deletions.
30 changes: 25 additions & 5 deletions docs-src/src/components/browser-window.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
*
* @link https://www.w3schools.com/howto/howto_css_browser_window.asp
*/
export function BrowserWindow(props) {
export function BrowserWindow(props: {
opacity?: number;
iconUrl?: string;
iconAlt?: string;
children?: any;
}) {
const opacity = props.opacity ? props.opacity : 1;

const styles = {
Expand Down Expand Up @@ -67,15 +72,21 @@ export function BrowserWindow(props) {
borderRadius: 4,
borderWidth: 1,
paddingTop: 3
},
iconUrl: {
position: 'absolute',
height: 35,
marginLeft: -2,
marginTop: -52
}
} as any;

return <div style={styles.container}>
<div style={styles.row}>
<div style={{ ...styles.column, ...styles.left }}>
<span style={{ ...styles.dot, ...{ background: '#ED594A' } }}></span>
<span style={{ ...styles.dot, ...{ background: '#FDD800' } }} ></span>
<span style={{ ...styles.dot, ...{ background: '#5AC05A' } }} ></span>
<span style={{ ...styles.dot, ...{ background: props.iconUrl ? '' : '#ED594A' } }}></span>
<span style={{ ...styles.dot, ...{ background: props.iconUrl ? '' : '#FDD800' } }} ></span>
<span style={{ ...styles.dot, ...{ background: props.iconUrl ? '' : '#5AC05A' } }} ></span>
</div>
<div style={{ ...styles.column, ...styles.middle }}>
<input type="text" value="" disabled style={styles.input} />
Expand All @@ -89,8 +100,17 @@ export function BrowserWindow(props) {
</div>
<div className='clear'></div>
</div >

<div style={styles.content}>
{
props.iconUrl ? <img src={props.iconUrl} style={{ ...styles.iconUrl }} alt={props.iconAlt}></img> : ''
}
<img
// src="/img/hero.svg"
src="/files/logo/logo_text.svg"
className="hero-img"
style={{ padding: 40, paddingLeft: 80, paddingRight: 80 }}
alt="rxdb-image"
/>
{props.children}
</div>
</div>;
Expand Down
69 changes: 57 additions & 12 deletions docs-src/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,21 @@ async function startLandingpageAnimation() {
});
}

export default function Home(props) {

/**
* For custom pages for search engine marketing,
* we can swap out titles texts and icons.
*/
export type SemPage = {
metaTitle: string;
iconUrl?: string;
title: any;
text: any;
};

export default function Home(props: {
sem?: SemPage;
}) {
const { siteConfig } = useDocusaurusContext();

const [tags] = useState([
Expand Down Expand Up @@ -352,17 +366,27 @@ export default function Home(props) {
<body className="homepage" />
</Head>
<Layout
title={props.metaTitle ? props.metaTitle : siteConfig.title}
title={props.sem ? props.sem.metaTitle : siteConfig.title}
description="RxDB is a fast, local-first NoSQL-database for JavaScript Applications like Websites, hybrid Apps, Electron-Apps, Progressive Web Apps and Node.js">
<main>
<div className="block first hero centered dark">
<div className="content">
<div className="inner">
<div className="half left">
{
props.sem ? (
<div style={{ width: '100%', textAlign: 'left' }}>
<img src={props.sem.iconUrl} style={{
marginLeft: '40%',
height: 51
}} alt={props.sem.metaTitle}></img>
</div>
) : <></>
}
<h1 style={{
}}>
{
props.title ? props.title : <>The local <b className="underline">Database</b> for{' '}
props.sem ? props.sem.title : <>The local <b className="underline">Database</b> for{' '}
<b className="underline">JavaScript</b> Applications</>
}
</h1>
Expand Down Expand Up @@ -396,7 +420,7 @@ export default function Home(props) {
</ul> */}
<div className="text">
{
props.text ? props.text : <>Store data locally to build high performance realtime applications that sync data with the backend and even work when offline.</>
props.sem ? props.sem.text : <>Store data locally to build high performance realtime applications that sync data with the backend and even work when offline.</>
}
</div>

Expand Down Expand Up @@ -447,14 +471,7 @@ export default function Home(props) {
}}
>
<div style={{ paddingLeft: 80, paddingRight: 80 }}>
<BrowserWindow opacity={0.3}>
<img
// src="/img/hero.svg"
src="/files/logo/logo_text.svg"
className="hero-img"
style={{ padding: 40, paddingLeft: 80, paddingRight: 80 }}
alt="rxdb-image"
/>
<BrowserWindow opacity={0.3} iconUrl={props.sem ? props.sem.iconUrl : undefined} iconAlt={props.sem ? props.sem.metaTitle : undefined}>
</BrowserWindow>
</div>
{/* <img
Expand Down Expand Up @@ -580,6 +597,20 @@ export default function Home(props) {
style={{ marginLeft: 481, marginTop: 117 }}
>
<div className="beating-color">
{
props.sem ? <>
<img src={props.sem.iconUrl} style={{
height: 23,
width: 23,
position: 'absolute',
marginLeft: -83, marginTop: 95, zIndex: 2,
backgroundColor: 'white',
padding: 2,
borderRadius: '50%'
}}
alt={props.sem.metaTitle}></img>
</> : <></>
}
<img
src="/files/logo/logo.svg"
className="beating logo"
Expand All @@ -589,6 +620,20 @@ export default function Home(props) {
</div>
<div className="device desktop" style={{ marginTop: '0%' }}>
<div className="beating-color">
{
props.sem ? <>
<img src={props.sem.iconUrl} style={{
height: 30,
width: 30,
position: 'absolute', marginLeft: -224, marginTop: 104, zIndex: 2,
borderRadius: '50%',
backgroundColor: 'white',
padding: 2,

}}
alt={props.sem.metaTitle}></img>
</> : <></>
}
<img
src="/files/logo/logo.svg"
className="beating logo"
Expand Down
13 changes: 13 additions & 0 deletions docs-src/src/pages/sem/angular-database.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Home from '..';

export default function Page() {
return Home({
sem: {
metaTitle: 'The local Database for Angular Apps',
title: <>The local <b className="underline">Database</b> for{' '}
<b className="underline">Angular</b> Apps</>,
text: <>Store data inside of your angular app to build high performance realtime applications that sync data from the backend and even work when offline.</>,
iconUrl: '/files/icons/angular.svg'
}
});
}
10 changes: 6 additions & 4 deletions docs-src/src/pages/sem/browser-database.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import Home from '..';

export default function Page() {
return Home({
metaTitle: 'The local Database for Browsers',
title: <>The local <b className="underline">Database</b> for{' '}
<b className="underline">Browsers</b></>,
text: <>Store data inside the Browser to build high performance realtime applications that sync data from the backend and even work when offline.</>
sem: {
metaTitle: 'The local Database for Browsers',
title: <>The local <b className="underline">Database</b> for{' '}
<b className="underline">Browsers</b></>,
text: <>Store data inside the Browser to build high performance realtime applications that sync data from the backend and even work when offline.</>
}
});
}
13 changes: 13 additions & 0 deletions docs-src/src/pages/sem/capacitor-database.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Home from '..';

export default function Page() {
return Home({
sem: {
title: <>The local <b className="underline">Database</b> for{' '}
<b className="underline">Capacitor</b> Apps</>,
text: <>Store data inside your Capacitor Hybrid App to build high performance realtime applications that sync data with the backend and even work when offline.</>,
iconUrl: '/files/icons/capacitor.svg',
metaTitle: 'Capacitor Database'
}
});
}
10 changes: 7 additions & 3 deletions docs-src/src/pages/sem/electron-database.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ import Home from '..';

export default function Page() {
return Home({
title: <>The local <b className="underline">Database</b> for{' '}
<b className="underline">Electron</b> Applications</>,
text: <>Store data inside your Electron.js Desktop App to build high performance realtime applications that sync data with the backend and even work when offline.</>
sem: {
title: <>The local <b className="underline">Database</b> for{' '}
<b className="underline">Electron</b> Applications</>,
text: <>Store data inside your Electron.js Desktop App to build high performance realtime applications that sync data with the backend and even work when offline.</>,
iconUrl: '/files/icons/electron.svg',
metaTitle: 'Local Electron Database'
}
});
}
10 changes: 6 additions & 4 deletions docs-src/src/pages/sem/firestore-alternative.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import Home from '..';

export default function Page() {
return Home({
metaTitle: 'The Open Source alternative for Firestore',
title: <>The <b className="underline">Open Source</b> alternative for {' '}
<b className="underline">Firestore</b></>,
text: <>Store data inside the Browser to build high performance realtime applications that sync data from the backend and even work when offline.</>
sem: {
metaTitle: 'The Open Source alternative for Firestore',
title: <>The <b className="underline">Open Source</b> alternative for {' '}
<b className="underline">Firestore</b></>,
text: <>Store data inside the Browser to build high performance realtime applications that sync data from the backend and even work when offline.</>
}
});
}
10 changes: 6 additions & 4 deletions docs-src/src/pages/sem/indexeddb-database.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import Home from '..';

export default function Page() {
return Home({
metaTitle: 'The best Database on top of IndexedDB',
title: <>The best <b className="underline">Database</b> on top of{' '}
<b className="underline">IndexedDB</b></>,
text: <>Store data inside the Browsers IndexedDB to build high performance realtime applications that sync data from the backend and even work when offline.</>
sem: {
metaTitle: 'The best Database on top of IndexedDB',
title: <>The best <b className="underline">Database</b> on top of{' '}
<b className="underline">IndexedDB</b></>,
text: <>Store data inside the Browsers IndexedDB to build high performance realtime applications that sync data from the backend and even work when offline.</>
}
});
}
13 changes: 13 additions & 0 deletions docs-src/src/pages/sem/ionic-database.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Home from '..';

export default function Page() {
return Home({
sem: {
metaTitle: 'The local Database for Ionic Apps',
title: <>The local <b className="underline">Database</b> for{' '}
<b className="underline">Ionic</b> Apps</>,
text: <>Store data inside of your Ionic app to build high performance realtime applications that sync data from the backend and even work when offline.</>,
iconUrl: '/files/icons/ionic.svg'
}
});
}
10 changes: 6 additions & 4 deletions docs-src/src/pages/sem/localstorage-database.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import Home from '..';

export default function Page() {
return Home({
metaTitle: 'The best Database on top of localstorage',
title: <>The best <b className="underline">Database</b> on top of{' '}
<b className="underline">localstorage</b></>,
text: <>Store data inside the Browsers localstorage to build high performance realtime applications that sync data from the backend and even work when offline.</>
sem: {
metaTitle: 'The best Database on top of localstorage',
title: <>The best <b className="underline">Database</b> on top of{' '}
<b className="underline">localstorage</b></>,
text: <>Store data inside the Browsers localstorage to build high performance realtime applications that sync data from the backend and even work when offline.</>
}
});
}
10 changes: 6 additions & 4 deletions docs-src/src/pages/sem/nedb-alternative.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import Home from '..';

export default function Page() {
return Home({
metaTitle: 'The modern alternative for NeDB',
title: <>The <b className="underline">modern</b> alternative for{' '}
<b className="underline">NeDB</b></>,
text: <>Store data inside the Browser to build high performance realtime applications that sync data from the backend and even work when offline.</>
sem: {
metaTitle: 'The modern alternative for NeDB',
title: <>The <b className="underline">modern</b> alternative for{' '}
<b className="underline">NeDB</b></>,
text: <>Store data inside the Browser to build high performance realtime applications that sync data from the backend and even work when offline.</>
}
});
}
10 changes: 6 additions & 4 deletions docs-src/src/pages/sem/nodejs-database.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import Home from '..';

export default function Page() {
return Home({
metaTitle: 'The local Database for Node.js',
title: <>The local <b className="underline">Database</b> for{' '}
<b className="underline">Node.js</b></>,
text: <>Fast in-app database for Node.js. Build high performance realtime applications that sync data from the anywhere and even work when offline.</>
sem: {
metaTitle: 'The local Database for Node.js',
title: <>The local <b className="underline">Database</b> for{' '}
<b className="underline">Node.js</b></>,
text: <>Fast in-app database for Node.js. Build high performance realtime applications that sync data from the anywhere and even work when offline.</>
}
});
}
10 changes: 6 additions & 4 deletions docs-src/src/pages/sem/nosql-database.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import Home from '..';

export default function Page() {
return Home({
metaTitle: 'The NoSQL Database for JavaScript Applications',
title: <>The NoSQL <b className="underline">Database</b> for{' '}
<b className="underline">JavaScript</b> Applications</>,
text: <>Store NoSQL data inside your App to build high performance realtime applications that sync data with the backend and even work when offline.</>
sem: {
metaTitle: 'The NoSQL Database for JavaScript Applications',
title: <>The NoSQL <b className="underline">Database</b> for{' '}
<b className="underline">JavaScript</b> Applications</>,
text: <>Store NoSQL data inside your App to build high performance realtime applications that sync data with the backend and even work when offline.</>
}
});
}
10 changes: 6 additions & 4 deletions docs-src/src/pages/sem/pouchdb-alternative.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import Home from '..';

export default function Page() {
return Home({
metaTitle: 'The NoSQL alternative for PouchDB',
title: <>The <b className="underline">modern</b> alternative for{' '}
<b className="underline">PouchDB</b></>,
text: <>Store data inside the Browser to build high performance realtime applications that sync data from the backend and even work when offline.</>
sem: {
metaTitle: 'The NoSQL alternative for PouchDB',
title: <>The <b className="underline">modern</b> alternative for{' '}
<b className="underline">PouchDB</b></>,
text: <>Store data inside the Browser to build high performance realtime applications that sync data from the backend and even work when offline.</>
}
});
}
13 changes: 13 additions & 0 deletions docs-src/src/pages/sem/react-database.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Home from '..';

export default function Page() {
return Home({
sem: {
metaTitle: 'The local Database for React Apps',
title: <>The local <b className="underline">Database</b> for{' '}
<b className="underline">React</b> Apps</>,
text: <>Store data inside of your React app to build high performance realtime applications that sync data from the backend and even work when offline.</>,
iconUrl: '/files/icons/react.svg'
}
});
}
11 changes: 7 additions & 4 deletions docs-src/src/pages/sem/react-native-database.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import Home from '..';

export default function Page() {
return Home({
metaTitle: 'The local Database for React Native',
title: <>The local <b className="underline">Database</b> for{' '}
<b className="underline">React Native</b></>,
text: <>Store data inside your React Native App to build high performance realtime applications that sync data from React-Native to the backend and even work when offline.</>
sem: {
metaTitle: 'The local Database for React Native',
title: <>The local <b className="underline">Database</b> for{' '}
<b className="underline">React Native</b></>,
text: <>Store data inside your React Native App to build high performance realtime applications that sync data from React-Native to the backend and even work when offline.</>,
iconUrl: '/files/icons/react.svg'
}
});
}
Loading

0 comments on commit 1b5b831

Please sign in to comment.