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

Add contribution (issue: #57 Implementar interacciones principales) #59

Merged
merged 18 commits into from
Jun 10, 2022
Merged
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@react-spring/web": "9.4.4",
"@react-three/drei": "9.0.1",
"@react-three/fiber": "8.0.6",
"cookies-next": "^2.0.4",
"graphql": "16.3.0",
"next": "12.1.4",
"next-seo": "5.3.0",
Expand Down
53 changes: 53 additions & 0 deletions src/components/ui/AlertPageUnderConstruction/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { useMantineColorScheme, createStyles } from "@mantine/core";
import MinskyLogotype from "../../future/MinskyLogo";

const useStyles = createStyles(theme => {
const BREAKPOINT = theme.fn.smallerThan("md");

return {
container: {
height: "100vh",
display: "flex",
alignItems: "center",
justifyContent: "center"
},
wrapper: {
display: "flex",
boxSizing: "border-box",
maxWidth: 700,
backgroundColor: theme.colorScheme === "dark" ? theme.colors.dark[8] : theme.white,

[BREAKPOINT]: {
flexDirection: "column",
},
},
text: {
fontFamily: `${theme.fontFamily}`,
fontSize: 38,
fontWeight: 900,
lineHeight: 1.2,
marginLeft: 20,
color: theme.colorScheme === "dark" ? theme.white : theme.black,

[BREAKPOINT]: {
align: "center",
marginTop: 30,
marginLeft: 0
},
},
};
});

export default function MinskyAlertPageUnderConstruction() {
const { colorScheme } = useMantineColorScheme();
const { classes } = useStyles();

return (
<div className={classes.container}>
<div className={classes.wrapper}>
<MinskyLogotype scale={0.3} typographyColor={colorScheme === "dark" ? "white" : undefined} />
<span className={classes.text}>PAGE UNDER CONSTRUCTION</span>
</div>
</div>
)
}
9 changes: 4 additions & 5 deletions src/components/ui/ContactCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from "react";
import React, { useState } from "react";
import {
Paper,
Text,
Expand All @@ -23,9 +23,8 @@ const useStyles = createStyles(theme => {
backgroundColor: theme.colorScheme === "dark" ? theme.colors.dark[8] : theme.white,
borderRadius: theme.radius.lg,
padding: 4,
border: `1px solid ${
theme.colorScheme === "dark" ? theme.colors.dark[8] : theme.colors.gray[2]
}`,
border: `1px solid ${theme.colorScheme === "dark" ? theme.colors.dark[8] : theme.colors.gray[2]
}`,

[BREAKPOINT]: {
flexDirection: "column",
Expand Down Expand Up @@ -119,7 +118,7 @@ export function MinskyGetInTouch({
const [formState, setFormState] = useState<Subscriber>(NULL_SUBSCRIBER);

return (
<Paper shadow="md" radius="lg">
<Paper id="contact" shadow="md" radius="lg">
<div className={classes.wrapper}>
<div className={classes.contacts}>
<Text size="lg" weight={700} className={classes.title} sx={{ color: "#fff" }}>
Expand Down
39 changes: 17 additions & 22 deletions src/components/ui/Header/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
createStyles,
Menu,
Center,
Header,
Container,
Group,
Expand All @@ -14,7 +13,8 @@ import {
Text,
} from "@mantine/core";
import { useBooleanToggle } from "@mantine/hooks";
import { ChevronDown, MoonStars, Sun } from "tabler-icons-react";
import { MoonStars, Sun } from "tabler-icons-react";
import Link from "next/link";
import MinskyLogotype from "../../future/MinskyLogo";

const HEADER_HEIGHT = 60;
Expand Down Expand Up @@ -53,6 +53,7 @@ const useStyles = createStyles(theme => ({
borderRadius: theme.radius.sm,
textDecoration: "none",
color: theme.colorScheme === "dark" ? theme.colors.dark[0] : theme.colors.gray[7],
fontFamily: `${theme.fontFamily}`,
fontSize: theme.fontSizes.sm,
fontWeight: 500,

Expand All @@ -61,10 +62,10 @@ const useStyles = createStyles(theme => ({
},
},

linkLabel: {
fontFamily: `${theme.fontFamily}`,
marginRight: 5,
},
/* linkLabel: {
fontFamily: `${theme.fontFamily}`,
marginRight: 5,
}, */

header: {
marginBottom: 80,
Expand Down Expand Up @@ -97,12 +98,11 @@ export function MinskyLandingHeader({ links }: MinskyLandingHeaderProps) {
placement="end"
gutter={1}
control={
<a href={link.link} className={classes.link} onClick={event => event.preventDefault()}>
<Center>
<span className={classes.linkLabel}>{link.label}</span>
<ChevronDown size={12} />
</Center>
</a>
<Link href={`/${link.link}`}>
<a href={link.link} className={classes.link}>
{link.label}
</a>
</Link>
}
>
{menuItems}
Expand All @@ -111,14 +111,9 @@ export function MinskyLandingHeader({ links }: MinskyLandingHeaderProps) {
}

return (
<a
key={link.label}
href={link.link}
className={classes.link}
onClick={event => event.preventDefault()}
>
{link.label}
</a>
<Link key={link.label} href={`/${link.link}`}>
<a className={classes.link}>{link.label}</a>
</Link>
);
});

Expand All @@ -145,7 +140,7 @@ export function MinskyLandingHeader({ links }: MinskyLandingHeaderProps) {
onClick={() => toggleColorScheme()}
size="lg"
variant="default"
// className={classes.colorSchemaToggler}
// className={classes.colorSchemaToggler}
>
{colorScheme === "dark" ? <Sun size={18} /> : <MoonStars size={18} />}
</ActionIcon>
Expand Down Expand Up @@ -177,7 +172,7 @@ export function MinskyLandingHeader({ links }: MinskyLandingHeaderProps) {
>
{colorScheme === "dark" ? <Sun size={18} /> : <MoonStars size={18} />}
</ActionIcon>
<Button radius="md">Contact</Button>
<Button component="a" href="#contact">Contact</Button>
</Group>
</Container>
</Header>
Expand Down
11 changes: 7 additions & 4 deletions src/components/ui/Information/sections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { Button, Grid, Group, Space, Text, Title } from "@mantine/core";
import { SymbolsIllustration, SystemIllustration } from "components/future/illustrations";
import { MinskyLandingSection } from "lib/landing/structure";
import { BrandGithub } from "tabler-icons-react";
import Link from "next/link";
import { useCallback } from "react";

type MinskyLandingSections = {
sections: MinskyLandingSection[];
Expand All @@ -10,6 +12,7 @@ type MinskyLandingSections = {
export function MinskyLandingSections({ sections }: MinskyLandingSections) {
let aboutUsSection: MinskyLandingSection | undefined;
let ourWorkSection: MinskyLandingSection | undefined;
const handleClickExternalURL = useCallback(() => { window.open("https://github.com/minskylab", "_blank") }, [])

sections.forEach(section => {
if (section.type === "about-us") {
Expand Down Expand Up @@ -61,8 +64,9 @@ export function MinskyLandingSections({ sections }: MinskyLandingSections) {
{paragraph}
</Text>
))}

<Button>Our Dream Team</Button>
<Link href="/team" passHref>
<Button component="a">Our Dream Team</Button>
</Link>
</Group>
</Group>
</Grid.Col>
Expand Down Expand Up @@ -115,8 +119,7 @@ export function MinskyLandingSections({ sections }: MinskyLandingSections) {
{paragraph}
</Text>
))}

<Button color="dark" leftIcon={<BrandGithub />}>
<Button color="dark" leftIcon={<BrandGithub />} onClick={handleClickExternalURL}>
Our GitHub
</Button>
</Group>
Expand Down
11 changes: 11 additions & 0 deletions src/modules/academy/AcademyPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Container } from "@mantine/core";
import MinskyAlertPageUnderConstruction from "../../components/ui/AlertPageUnderConstruction/index";

export default function AcademyPageContent() {

return (
<Container>
<MinskyAlertPageUnderConstruction />
</Container>
)
}
11 changes: 11 additions & 0 deletions src/modules/developers/DevelopersPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Container } from "@mantine/core";
import MinskyAlertPageUnderConstruction from "../../components/ui/AlertPageUnderConstruction/index";

export default function DevelopersPageContent() {

return (
<Container>
<MinskyAlertPageUnderConstruction />
</Container>
)
}
1 change: 0 additions & 1 deletion src/modules/home/HomePageContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { useNotifications } from "@mantine/notifications";
import { MinskyGetInTouch } from "components/ui/ContactCard";
import TensionLine from "components/ui/TensionLine";
import { MinskySimpleFAQ } from "components/ui/Faq";

import { Directus } from "@directus/sdk";
import { MinskyPlatformTypes, Subscriber } from "lib/platform/types";
import { MinskyLandingSections } from "components/ui/Information";
Expand Down
11 changes: 11 additions & 0 deletions src/modules/partners/PartnersPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Container } from "@mantine/core";
import MinskyAlertPageUnderConstruction from "../../components/ui/AlertPageUnderConstruction/index";

export default function PartnersPageContent() {

return (
<Container>
<MinskyAlertPageUnderConstruction />
</Container>
)
}
11 changes: 11 additions & 0 deletions src/modules/platform/PlatformPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Container } from "@mantine/core";
import MinskyAlertPageUnderConstruction from "../../components/ui/AlertPageUnderConstruction/index";

export default function PlatformPageContent() {

return (
<Container>
<MinskyAlertPageUnderConstruction />
</Container>
)
}
11 changes: 11 additions & 0 deletions src/modules/team/TeamPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Container } from "@mantine/core";
import MinskyAlertPageUnderConstruction from "../../components/ui/AlertPageUnderConstruction/index";

export default function TeamPageContent() {

return (
<Container>
<MinskyAlertPageUnderConstruction />
</Container>
)
}
27 changes: 18 additions & 9 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
import { GetServerSidePropsContext } from 'next';
import { useState } from 'react';
import { getCookie, setCookies } from 'cookies-next';
import { AppProps } from "next/app";
import Head from "next/head";
import { ColorScheme, ColorSchemeProvider, MantineProvider } from "@mantine/core";

import Fonts from "theming/fonts";
import { minskyBrandDark, minskyBrandPrimary } from "theming";
import { NotificationsProvider } from "@mantine/notifications";
import { useState } from "react";
import { useLocalStorage } from "@mantine/hooks";
import { DefaultSeo } from "next-seo";
import Script from "next/script";

// const client = URQLClient();

const FairpayApp = ({ Component, pageProps }: AppProps) => {
const [colorScheme, setColorScheme] = useLocalStorage<ColorScheme>({
key: "color-scheme",
defaultValue: "light",
});
const FairpayApp = (props: AppProps & { colorScheme: ColorScheme }) => {
const { Component, pageProps } = props;
const [colorScheme, setColorScheme] = useState<ColorScheme>(props.colorScheme);

const toggleColorScheme = (value?: ColorScheme) => {
const nextColorScheme = value || (colorScheme === 'dark' ? 'light' : 'dark');
setColorScheme(nextColorScheme);
// when color scheme is updated save it to cookie
setCookies('mantine-color-scheme', nextColorScheme, { maxAge: 60 * 60 * 24 * 30 });
}

const toggleColorScheme = (value?: ColorScheme) =>
setColorScheme(value || (colorScheme === "dark" ? "light" : "dark"));
return (
<>
<Head>
Expand Down Expand Up @@ -91,4 +95,9 @@ const FairpayApp = ({ Component, pageProps }: AppProps) => {
);
};

FairpayApp.getInitialProps = ({ ctx }: { ctx: GetServerSidePropsContext }) => ({
// get color scheme from cookie
colorScheme: getCookie('mantine-color-scheme', ctx) || 'light',
});

export default FairpayApp;
21 changes: 20 additions & 1 deletion src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,28 @@ import Document, { Head, Html, Main, NextScript } from "next/document";
import { createGetInitialProps } from "@mantine/next";

const getInitialProps = createGetInitialProps();

export default class _Document extends Document {
static getInitialProps = getInitialProps;
}
/* import Document, { DocumentContext } from 'next/document';
import { ServerStyles, createStylesServer, createGetInitialProps } from "@mantine/next";

const stylesServer = createStylesServer();
export default class _Document extends Document {
static async getInitialProps(ctx: DocumentContext) {
const initialProps = await Document.getInitialProps(ctx);

return {
...initialProps,
styles: (
<>
{initialProps.styles}
<ServerStyles html={initialProps.html} server={stylesServer} />
</>
),
};
}
} */


// export default Document;
3 changes: 3 additions & 0 deletions src/pages/academy.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import AcademyPageContent from "modules/academy/AcademyPage";

export default AcademyPageContent;
3 changes: 3 additions & 0 deletions src/pages/developers.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import DevelopersPageContent from "modules/developers/DevelopersPage";

export default DevelopersPageContent;
3 changes: 3 additions & 0 deletions src/pages/partners.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import PartnersPageContent from "modules/partners/PartnersPage";

export default PartnersPageContent;
3 changes: 3 additions & 0 deletions src/pages/platform.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import PlatformPageContent from "modules/platform/PlatformPage";

export default PlatformPageContent;
Loading