Giter VIP home page Giter VIP logo

website-members's Introduction

Better Uptime Badge

website-members

The part of the website that shows the members of RDS This page is hosted on: https://members.realdevsquad.com/

How can I contribute?

Wish to contribute? You can find a detailed guide here!

Development

This project uses Yarn and Volta for package management and version switching. So, make sure to install both to use the project.

From your terminal:

yarn dev

This starts your app in development mode, rebuilding assets on file changes. First, build your app for production:

yarn build

Then run the app in production mode:

yarn start

Project Structure

We are using Next.js for this project. Next.js has a well defined directory structure that must be used to make sure the apps runs properly. Read more about Next.js here

Pages

In Next.js, a page is a React Component exported from a .js, .jsx, .ts, or .tsx file in the pages directory. Each page is associated with a route based on its file/directory name. Read more about pages here. An example is given below -

Directory Structure

pages
|__ members
|   |__ [id]
|   |   |__ index.js
|   |
|   |__ index.js
|
|__ blogs
|   |__ index.js
|
|__ index.js

Routes Created by Next.js

/
/members
/members/[id]
/blogs

Note: In /members/[id] the [id] part is dynamic it can be 1, 2, a, etc.

Components

All the reusable components are created inside /components directory.

/components/pages

In Next.js it is adviced that the files inside /pages directory should contain as minimal code as possible, that's why all the code for a given page is written inside /components/pages directory and imported in /pages. For Example -

// Inside /components/pages/blogs/index.js
import React from "react";
const Blogs = () => {
  return <div>This is my first documentation, I am super scared.</div>
};

export default Blogs;


// Inside /pages/blogs/index.js
import React from "react";
import Blogs from "../../components/pages/blogs";

const BlogsPage = () => {
  return (
    <div>
      <Blogs/>
    </div>
  );
};

export default BlogsPage;

Note: Do not create individual files in /components or /pages. Put every file in folders with appropriate names.

Public

All the public assets like icons, images are stored inside public directory.

SCSS Guide

There are two ways to add styles in the project

Global Sylesheets

Create a stylesheet, for example nav-styles.scss

nav {
  padding: 20px 20px 60px;
  max-width: 680px;
  margin: 0 auto;
}

Import the nav-style.scss in a js file.

import './nav-styles.css';

const Nav = () => {
  return <nav>This is nav</nav>;
}

Note this way is suitable for writing global stylesheets only, for internal component stylesheets use CSS modules syntax explained below.

CSS Modules

Next support CSS Modules out of the box. To enable CSS Module for any SCSS stylesheet use .module.scss in the end of the filename. Let's see and example -

Creating a filename with the name button.module.scss

.btn{
  color: red;
  font-size: 100px;
  border: 0px;
}

In the JS file import this stylesheet.

import classNames from "./button.module.scss";

const Button = () => {
  return <button className={classNames.btn}>Click Me!</button>;
}

export default Button;

Importing styles in this way will scope all the styles to their respective files. So classname .btn is converted to [filename]_btn__[hash]. Read this guide for more info on CSS support in Next.js.

How to start ?

These scripts refer to the different stages of developing an application:

dev - Runs next which starts Next.js in development mode.

build - Runs next build which builds the application for production usage.

build-static - Runs next build && next export which builds the application and have a static version of app in the 'out' directory.

start - Runs next start which starts a Next.js production server.

website-members's People

Contributors

sumitd94 avatar ankushdharkar avatar invalidtoken avatar lakshayman avatar vinayak-trivedi avatar dashdeipayan avatar prakashchoudhary07 avatar kshashank99 avatar rohitkuwar avatar swarajpure avatar rohandhar1234 avatar pavangbhat avatar sahsisunny avatar aman7870 avatar harshith-venkatesh-lumen avatar ritikjaiswal75 avatar sanyogita14 avatar akshay1502 avatar dependabot[bot] avatar rajat-mehra05 avatar harshith-venkatesh avatar kshitij430 avatar priyanshk20 avatar manas-e avatar bajajcodes avatar rohan09-raj avatar shubham-1994 avatar deraowl avatar heyrandhir avatar debarshi95 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.