Skip to content

Commit

Permalink
in work
Browse files Browse the repository at this point in the history
  • Loading branch information
meta-panic committed Jan 6, 2025
1 parent 95c9fc1 commit b3c313b
Show file tree
Hide file tree
Showing 27 changed files with 799 additions and 114 deletions.
6 changes: 6 additions & 0 deletions frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ const compat = new FlatCompat({

const eslintConfig = [
...compat.extends("next/core-web-vitals", "next/typescript"),
{
rules: {
"comma-dangle": ["error", "always-multiline"],
"semi": ["error", "always"],
},
},
];

export default eslintConfig;
15 changes: 15 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@
"lint": "next lint"
},
"dependencies": {
"@next/font": "^14.2.15",
"classnames": "^2.5.1",
"next": "15.1.3",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"next": "15.1.3"
"react-dom": "^19.0.0"
},
"devDependencies": {
"typescript": "^5",
"@eslint/eslintrc": "^3",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"eslint": "^9",
"eslint-config-next": "15.1.3",
"@eslint/eslintrc": "^3"
"typescript": "^5"
}
}
}
Binary file added frontend/public/fonts/BebasNeue-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file added frontend/public/fonts/Raleway-regular.ttf
Binary file not shown.
Binary file added frontend/public/fonts/Raleway-semi-bold.ttf
Binary file not shown.
13 changes: 13 additions & 0 deletions frontend/src/app/components/counter.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"use client";

import { useState } from "react";

export const Counter = () => {

const [count, setCount] = useState(0);

console.log('Counter component - ');
return (
<button onClick={() => setCount(count + 1)}>Count: {count}</button>
)
}
Empty file.
35 changes: 35 additions & 0 deletions frontend/src/app/components/navigation.tsx
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>
);
};
15 changes: 15 additions & 0 deletions frontend/src/app/components/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"use client";

import { useState } from "react";

export const D = () => {

const [count, setCount] = useState(0);

console.log('Counter component - ');
return (
<button onClick={() => setCount(count + 1)}> Count: {count} </button>
)
}

export default D;
42 changes: 0 additions & 42 deletions frontend/src/app/globals.css

This file was deleted.

58 changes: 44 additions & 14 deletions frontend/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,61 @@
import { isDebug } from "@/utils/isDebug";
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import localFont from 'next/font/local'

const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
const bebas = localFont({
weight: '500',
variable: '--font-bebas-regular',
src: '../../public/fonts/BebasNeue-Regular.ttf',
display: 'swap',
});

const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
const ralewayRegular = localFont({
weight: '500',
variable: '--font-raleway-regular',
src: '../../public/fonts/Raleway-Regular.ttf',
display: 'swap',
});
const ralewayItalic = localFont({
weight: '500',
variable: '--font-raleway-italic',
src: '../../public/fonts/Raleway-Italic-VariableFont_wght.ttf',
display: 'swap',
});
const ralewaySemiBold = localFont({
weight: '500',
variable: '--font-raleway-semobold',
src: '../../public/fonts/Raleway-semi-bold.ttf',
display: 'swap',
});


export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
title: "Дом молитвы",
description: "Церковь Евангельских христиан-баптистов",
};

export default function RootLayout({
export default async function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
const isDevelopment = await isDebug();

if (!isDevelopment) {
return (
<html lang="ru">
<body className={`${bebas.variable} ${ralewayRegular.variable} ${ralewayItalic.variable} ${ralewaySemiBold.variable}`}>
{children}
</body>
</html>
);
}

return (
<html lang="en">
<body className={`${geistSans.variable} ${geistMono.variable}`}>
<html lang="ru">
<body className={`${bebas.variable} ${ralewayRegular.variable} ${ralewayItalic.variable} ${ralewaySemiBold.variable}`}>
<header>header</header>
{children}
<footer>footer</footer>
</body>
</html>
);
Expand Down
103 changes: 50 additions & 53 deletions frontend/src/app/page.tsx
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>);
}
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;
}
Loading

0 comments on commit b3c313b

Please sign in to comment.