Skip to content

Commit

Permalink
ktl-657 refactor: Next.js structure
Browse files Browse the repository at this point in the history
  • Loading branch information
nikpachoo committed Apr 14, 2022
1 parent dd8b425 commit 4cd24cb
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 9 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,13 @@ You can:
[project-url]: https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub
[project-badge]: http://jb.gg/badges/official.svg
[slack-url]: http://slack.kotlinlang.org

## Pages on Next.js

You can find all pages in the "pages" directory.

Projects Structure:
- **Components**. The building blocks.
- **Blocks**. Blocks are groups of components joined together to form a relatively complex, distinct section of an interface.
- **Layouts**. Layouts consist mostly of groups of Blocks and Components stitched together to form pages.
- **Pages**. Each page is associated with a route based on its file name.
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
.banner {
}

.content {
margin: 24px 0 var(--ktl-grid-gutter);
max-width: 720px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import classNames from 'classnames';
import Image from 'next/image';

import styles from './community-banner.module.css';
import communityBanner from '../../public/images/community-banner.png';
import communityBanner from '../../../public/images/community-banner.png';

interface CommunityBannerProps {
title: string;
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pages/community/events.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import {CommunityLayout} from "../../components/layout/community-layout";
import {CommunityLayout} from "../../layouts/community-layout";

function UserGroups() {
return (
Expand Down
4 changes: 2 additions & 2 deletions pages/community/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";

import {CommunityBanner} from '../../components/community-banner/community-banner';
import {CommunityLayout} from "../../components/layout/community-layout";
import {CommunityBanner} from '../../blocks/community/community-banner/community-banner';
import {CommunityLayout} from "../../layouts/community-layout";

function Index() {
return (
Expand Down
4 changes: 2 additions & 2 deletions pages/community/user-groups.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import {CommunityLayout} from "../../components/layout/community-layout";
import {KugsBanner} from "../../components/kugs-banner/kugs-banner";
import {CommunityLayout} from "../../layouts/community-layout";
import {KugsBanner} from "../../blocks/community/kugs-banner/kugs-banner";

function UserGroups() {
return (
Expand Down

0 comments on commit 4cd24cb

Please sign in to comment.