-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from meta-panic/feature/add-frontend-architecture
frontend main page: in work
- Loading branch information
Showing
26 changed files
with
759 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
"use client"; | ||
import Link from "next/link"; | ||
import { usePathname } from "next/navigation"; | ||
|
||
export const Navigation = () => { | ||
const pathname = usePathname(); | ||
return ( | ||
<nav className="flex justify-center items-center p-4"> | ||
<Link | ||
href="/" | ||
className={pathname === "/" ? "font-bold mr-4" : "text-blue-500 mr-4"} | ||
> | ||
Home | ||
</Link> | ||
<Link | ||
href="/about" | ||
className={ | ||
pathname === "/about" ? "font-bold mr-4" : "text-blue-500 mr-4" | ||
} | ||
> | ||
About | ||
</Link> | ||
<Link | ||
href="/products/1" | ||
className={ | ||
pathname.startsWith("/products/1") | ||
? "font-bold mr-4" | ||
: "text-blue-500 mr-4" | ||
} | ||
> | ||
Product 1 | ||
</Link> | ||
</nav> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,53 @@ | ||
import Image from "next/image"; | ||
|
||
export default function Home() { | ||
return ( | ||
<div style={{ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
height: '100vh', | ||
fontFamily: 'Arial, sans-serif', | ||
backgroundColor: '#f4f4f4', | ||
}}> | ||
<Image | ||
src="/church-logo.svg" | ||
alt="Логотип церкви" | ||
width={208} | ||
height={96} | ||
style={{ marginBottom: '1.5rem' }} | ||
/> | ||
<h1 style={{ | ||
fontSize: '2.5em', | ||
textAlign: 'center', | ||
color: '#333', | ||
marginBottom: '0.5rem', | ||
}}>Скоро здесь будет сайт</h1> | ||
<p style={{ | ||
fontSize: '1.2em', | ||
textAlign: 'center', | ||
color: '#555', | ||
}}>Загляните позже за обновлениями</p> | ||
<p style={{ | ||
fontSize: '0.8em', | ||
textAlign: 'center', | ||
color: '#555', | ||
marginTop: '2rem', | ||
}}> | ||
Местная религиозная организация Церковь Евангельских христиан-баптистов | ||
</p> | ||
<p style={{ | ||
fontSize: '0.8em', | ||
textAlign: 'center', | ||
color: '#555', | ||
}}> | ||
г. Невинномысск Ставропольского края | ||
</p> | ||
<p style={{ | ||
fontSize: '0.8em', | ||
textAlign: 'center', | ||
color: '#555', | ||
}}> | ||
ИНН 2631020933 / КПП 263101001 | ||
</p> | ||
</div> | ||
import "../styles/reset.css"; | ||
import "../styles/colours.css"; | ||
import "../styles/semantic.css"; | ||
import "../styles/sizes.css"; | ||
import "../styles/globals.css"; | ||
|
||
import Typography from "@/components/atoms/typography/Typography"; | ||
import { isDebug } from "@/utils/isDebug"; | ||
|
||
|
||
const Stub = () => { | ||
return (<div style={{ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
height: '100vh', | ||
fontFamily: 'Arial, sans-serif', | ||
backgroundColor: '#f4f4f4', | ||
}} | ||
> | ||
<Image | ||
src="/church-logo.svg" | ||
alt="Логотип церкви" | ||
width={208} | ||
height={96} | ||
style={{ marginBottom: '1.5rem' }} | ||
/> | ||
<Typography tag="H1">Скоро здесь будет сайт</Typography> | ||
<Typography tag="body">Загляните позже за обновлениями</Typography> | ||
|
||
<br /> | ||
<br /> | ||
<Typography tag="body-mini">Местная религиозная организация Церковь Евангельских христиан-баптистов</Typography> | ||
<Typography tag="body-mini">г. Невинномысск Ставропольского края</Typography> | ||
<Typography tag="body-mini">ИНН 2631020933 / КПП 263101001</Typography> | ||
</div > | ||
); | ||
} | ||
}; | ||
|
||
export default async function Home() { | ||
const isDebugMode = await isDebug(); | ||
|
||
if (!isDebugMode) { | ||
console.log("Runnin in prod mode"); | ||
return <Stub />; | ||
} | ||
|
||
console.log("Runnin in debug mode"); | ||
return (<div>test</div>); | ||
} |
8 changes: 8 additions & 0 deletions
8
frontend/src/components/atoms/ColorBlock/ColorBlock.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.dark-block { | ||
--default-text: var(--common-light-100); | ||
--default-components-link-fg: #f8f6f7; | ||
--hover-text: var(--common-light-100); | ||
--hover-components-link-fg: #f8f6f7; | ||
--active-text-ondark: var(--common-light-100); | ||
--active-components-link-fg: #f8f6f7; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React, { createContext, ReactNode } from 'react'; | ||
import classNames from 'classnames'; | ||
import styles from './ColorBlock.module.css'; | ||
|
||
type BlockColor = 'light' | 'dark'; | ||
|
||
const BlockColorContext = createContext<BlockColor>('light'); | ||
|
||
interface BlockColorProviderProps { | ||
children: ReactNode; | ||
blockColor: BlockColor; | ||
} | ||
|
||
export const BlockColorProvider: React.FC<BlockColorProviderProps> = ({ children, blockColor }) => { | ||
return ( | ||
<BlockColorContext.Provider | ||
value={blockColor} | ||
> | ||
<div | ||
className={classNames({ [styles["dark-block"]]: blockColor === 'dark' })} | ||
> | ||
{children} | ||
</div> | ||
</BlockColorContext.Provider> | ||
); | ||
}; |
Oops, something went wrong.