Skip to content

Commit

Permalink
Merge pull request #13 from ms-club-sliit/development
Browse files Browse the repository at this point in the history
Development into Main
  • Loading branch information
senuravihanjayadeva authored Dec 12, 2021
2 parents 542be43 + aea4551 commit c81d2c7
Show file tree
Hide file tree
Showing 23 changed files with 1,104 additions and 41 deletions.
7 changes: 7 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"projects": {
"default": "msclub-admin-panel-dev",
"development": "msclub-admin-panel"
},
"targets": {}
}
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:14.18-alpine AS BUILD_IMAGE
RUN apk add --no-cache nodejs npm
WORKDIR /msclub-admin
COPY ["yarn.lock", "package.json", "./"]
RUN yarn install --check-files --non-interactive --ignore-optional --frozen-lockfile
COPY . .
RUN yarn build

FROM node:14.18-alpine
WORKDIR /app
COPY --from=BUILD_IMAGE /msclub-admin /app/
EXPOSE 9090
ENTRYPOINT [ "yarn" ]
CMD [ "start" ]
31 changes: 15 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[![Firebase CD](https://github.com/ms-club-sliit/msclubwebsite/actions/workflows/firebase-deploy.yml/badge.svg)](https://github.com/ms-club-sliit/msclubwebsite/actions/workflows/firebase-deploy.yml)
![Pull Requests](https://badgen.net/github/open-issues/ms-club-sliit/msclubwesite-v2)
![Contributors](https://badgen.net/github/contributors/ms-club-sliit/msclubwesite-v2)
![Pull Requests](https://badgen.net/github/open-issues/ms-club-sliit/msclub-admin-panel)
![Contributors](https://badgen.net/github/contributors/ms-club-sliit/msclub-admin-panel)

# MS Club Admin Panel

# MS Club of SLIIT - Website V2
Your one-stop portal to all things regarding MS Club of SLIIT🌀
Read further to know how **you** can start contributing to MS Club!
Read further to know how **you** can start contributing to MS Club!

## Quick Links

Expand All @@ -14,29 +15,27 @@ Read further to know how **you** can start contributing to MS Club!

## [Tech Stack](#Tech-Stack)

![banner-whitebg-spacing-10px(2)](https://user-images.githubusercontent.com/73905901/126197938-6f1301fb-623f-4d0a-8bce-5b268722da1c.png)
![tech stack](https://user-images.githubusercontent.com/42801983/145599241-658e56b6-24ed-494a-ad11-96c7d2df32be.png)

<!-- Add system architecture -->



## [How to contribute](#how-to)

1. Fork the repo on GitHub.

2. Clone the project to your own machine.

```git clone https://github.com/<YOUR_USERNAME>/msclubwebsite.git```
`git clone https://github.com/<YOUR_USERNAME>/msclub-admin-panel.git`

3. Create a branch using the git checkout command.

`git checkout -b <your-new-branch-name>`

4. Stage your changes and commit with a meaningful commit message.

```
```
git add .
git commit -m "<initial commit>"
git commit -m "<initial commit>"
```

5. Push your work back up to your fork.
Expand All @@ -45,9 +44,9 @@ git commit -m "<initial commit>"

6. Submit a Pull request so that we can review your changes. [Learn about creating a pull request.](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)

## [I really want to contribute but where do I start?](#resources)
## [I really want to contribute but where do I start?](#resources)

We got your back. Here are some **FREE** resources for you to strengthen your web development skills and start firing some commits
We got your back. Here are some **FREE** resources for you to strengthen your web development skills and start firing some commits

**HTML / CSS / JS**

Expand All @@ -57,17 +56,17 @@ We got your back. Here are some **FREE** resources for you to strengthen your we
- [HTML & CSS Crash Course by Scrimba](https://scrimba.com/learn/htmlcss)
- [Learn Modern Javascript by freeCodeCamp + Scrimba](https://scrimba.com/learn/es6)


**React.js**

- [React course by freeCodeCamp](https://www.freecodecamp.org/learn/front-end-libraries/#react)
- [Learn React by Scrimba](https://scrimba.com/learn/learnreact)

**Redux.js**

- [Redux documentation](https://redux.js.org/introduction/getting-started)

## Contributors

<a href="https://github.com/ms-club-sliit/msclubwebsite/graphs/contributors">
<img src="https://contrib.rocks/image?repo=ms-club-sliit/msclubwebsite" />
</a>



16 changes: 16 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@
"@types/jest": "^26.0.15",
"@types/node": "^12.0.0",
"@types/react": "^17.0.0",
"@types/react-bootstrap-table-next": "^4.0.16",
"@types/react-bootstrap-table2-paginator": "^2.1.2",
"@types/react-dom": "^17.0.0",
"axios": "^0.24.0",
"env-cmd": "^10.1.0",
"moment": "^2.29.1",
"node-sass": "4.14.1",
"react": "^17.0.2",
"react-bootstrap-table-next": "^4.0.3",
"react-bootstrap-table2-paginator": "^2.1.2",
"react-bootstrap-table2-toolkit": "^2.1.3",
"react-dom": "^17.0.2",
"react-redux": "^7.2.6",
"react-router-dom": "^6.0.2",
Expand All @@ -26,12 +31,10 @@
"web-vitals": "^1.0.1"
},
"scripts": {
"start:local": "react-scripts start",
"start": "serve -s build",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"heroku-postbuild": "npm run build"
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
Expand All @@ -52,6 +55,7 @@
]
},
"devDependencies": {
"@types/react-bootstrap-table2-toolkit": "^2.1.5",
"@types/react-redux": "^7.1.20",
"@types/redux": "^3.6.0",
"@types/redux-promise-middleware": "^6.0.0",
Expand Down
Binary file added public/images/ms_club_logo_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,53 @@
If you implement stylings that belongs to individual component, use the "styles" directory to implement it
*/

/**
MS Club of SLIIT Website - Media Query Template
@include media("<=phone") {}
@include media(">=phone", '<tablet') {}
@include media('>=tablet', '<smalldesktop') {}
@include media('>=smalldesktop', '<desktop') {}
@include media(">=desktop", '<largedesktop') {}
@include media('>=largedesktop') {}
*/

// Import Styles
@import "./styles/breakpoints.scss";
@import "react-bootstrap-table-next/dist/react-bootstrap-table2.min.css";
@import "react-bootstrap-table2-paginator/dist/react-bootstrap-table2-paginator.min.css";
@import "./styles/colors.scss";
@import "./styles/navbar.scss";
@import "./styles/table.scss";
@import "./styles/events.scss";

.container {
margin-top: 70px;
}

.btn {
text-transform: unset !important;
}

.card {
border-radius: 0px;
padding: 15px;
}

footer {
.footer-text {
font-family: "Roboto Regular";
}
}

.page-title {
font-family: "Poppins Medium";
font-size: 30px;
font-weight: 500;
margin: 0px;
}

.page-description {
font-family: "Roboto Regular";
font-size: 16px;
margin-top: 0px;
}
17 changes: 17 additions & 0 deletions src/components/footer/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from "react";

const Footer: React.FC = () => (
<footer className="bg-dark text-center text-white fixed-bottom">
<div
className="text-center p-3 footer-text"
style={{ backgroundColor: "rgba(0, 0, 0, 0.2)" }}
>
© 2022 Copyright:&nbsp;
<a className="text-white" href="/">
msclubadmin.com
</a>
</div>
</footer>
);

export default Footer;
5 changes: 3 additions & 2 deletions src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from 'react';
import NavBar from "./navbar";
import Footer from "./footer";

// Import and export components in here
export { NavBar, Footer };
108 changes: 108 additions & 0 deletions src/components/navbar/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
import React, { useState, useEffect } from "react";
import ApplicationConstants from "../../constants";

const NavBar: React.FC = () => {
const [authToken, setAuthToken] = useState<string | null>();

useEffect(() => {
let authToken = localStorage.getItem("token");

if (authToken) {
setAuthToken(authToken);
} else {
setAuthToken(null);
}
});

return (
<div>
<nav className="navbar fixed-top navbar-expand-lg navbar-dark bg-dark">
<div className="container-fluid">
<button
className="navbar-toggler"
type="button"
data-mdb-toggle="collapse"
data-mdb-target="#navbar-content"
aria-controls="navbar-content"
aria-expanded="false"
aria-label="Toggle navigation"
>
<i className="fas fa-bars"></i>
</button>

<div className="collapse navbar-collapse" id="navbar-content">
<a className="navbar-brand mt-4 mx-2 mt-lg-0" href="/">
<img
className="navbar-logo"
src="images/ms_club_logo_light.png"
alt="MS Club Logo"
loading="lazy"
/>
</a>
{authToken ? (
<ul className="navbar-nav">
{ApplicationConstants.AUTH_NABAR_ITEMS.map((item) => (
<li className="navbar-item nav-item" key={item.id}>
<a href={item.link} className="nav-link">
{item.name}
</a>
</li>
))}
</ul>
) : (
<ul className="navbar-nav">
{ApplicationConstants.DEFAULT_NAVBAR_ITEMS.map((item) => (
<li className="navbar-item nav-item" key={item.id}>
<a href={item.link} className="nav-link">
{item.name}
</a>
</li>
))}
</ul>
)}
</div>

<div className="d-flex align-items-center">
{authToken ? (
<a
className="dropdown-toggle d-flex align-items-center hidden-arrow profile-icon"
href="#"
id="profile-dropdown"
role="button"
data-mdb-toggle="dropdown"
aria-expanded="false"
>
<img
src="https://mdbootstrap.com/img/new/avatars/2.jpg"
className="rounded-circle"
height="35"
alt="Black and White Portrait of a Man"
loading="lazy"
/>
</a>
) : null}
<ul
className="dropdown-menu dropdown-menu-end"
aria-labelledby="profile-dropdown"
>
{ApplicationConstants.AUTH_NAVBAR_OPTIONS.map((item) => (
<li key={item.id}>
{item.link ? (
<a href={item.link} className="dropdown-item">
{item.name}
</a>
) : null}
</li>
))}
<li>
<span className="dropdown-item">Logout</span>
</li>
</ul>
</div>
</div>
</nav>
</div>
);
};

export default NavBar;
18 changes: 18 additions & 0 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const ApplicationConstants = {
AUTH_NABAR_ITEMS: [
{ id: 1, name: "Dashboard", link: "/" },
{ id: 2, name: "Events", link: "/events" },
{ id: 3, name: "Webinars", link: "/webinars" },
{ id: 4, name: "Top Speakers", link: "/speakers" },
{ id: 5, name: "Applications", link: "/applications" },
{ id: 6, name: "Inquiry", link: "/inquries" },
],
AUTH_NAVBAR_OPTIONS: [{ id: 1, name: "My Profile", link: "/profile" }],
DEFAULT_NAVBAR_ITEMS: [
{ id: 1, name: "Sign In", link: "/signin" },
{ id: 2, name: "Sign Up", link: "/signup" },
{ id: 3, name: "Contact Admin", link: "/contact" },
],
};

export default ApplicationConstants;
Loading

0 comments on commit c81d2c7

Please sign in to comment.