Skip to content
Snippets Groups Projects
Commit d5bd2909 authored by hannahl8's avatar hannahl8
Browse files

initial commit with Header, Welcome, Footer pages complete

parent 92763bab
No related branches found
No related tags found
No related merge requests found
Showing with 4116 additions and 84 deletions
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# vt-research-connect-frontend # React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
## Getting started - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
To make it easy for you to get started with GitLab, here's a list of recommended next steps. ## Expanding the ESLint configuration
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)! If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
## Add your files - Configure the top-level `parserOptions` property like this:
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files ```js
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command: export default {
// other rules...
``` parserOptions: {
cd existing_repo ecmaVersion: 'latest',
git remote add origin https://git.cs.vt.edu/cscapstone-group3/vt-research-connect-frontend.git sourceType: 'module',
git branch -M main project: ['./tsconfig.json', './tsconfig.node.json'],
git push -uf origin main tsconfigRootDir: __dirname,
},
}
``` ```
## Integrate with your tools - Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- [ ] [Set up project integrations](https://git.cs.vt.edu/cscapstone-group3/vt-research-connect-frontend/-/settings/integrations) - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
## Collaborate with your team
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
## Test and Deploy
Use the built-in continuous integration in GitLab.
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
***
# Editing this README
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name
Choose a self-explaining name for your project.
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Import font-awesome icons -->
<script src="https://kit.fontawesome.com/29ce78ff92.js" crossorigin="anonymous"></script>
<link rel="icon" type="image/svg" href="./public/site-images/flask-solid.svg" />
<title>VT Research Connect</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
This diff is collapsed.
{
"name": "vt-research-connect-client",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.23.1"
},
"devDependencies": {
"@types/react": "^18.2.66",
"@types/react-dom": "^18.2.22",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.6",
"typescript": "^5.2.2",
"vite": "^5.2.0"
}
}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path fill="#ffffff" d="M288 0H160 128C110.3 0 96 14.3 96 32s14.3 32 32 32V196.8c0 11.8-3.3 23.5-9.5 33.5L10.3 406.2C3.6 417.2 0 429.7 0 442.6C0 480.9 31.1 512 69.4 512H378.6c38.3 0 69.4-31.1 69.4-69.4c0-12.8-3.6-25.4-10.3-36.4L329.5 230.4c-6.2-10.1-9.5-21.7-9.5-33.5V64c17.7 0 32-14.3 32-32s-14.3-32-32-32H288zM192 196.8V64h64V196.8c0 23.7 6.6 46.9 19 67.1L309.5 320h-171L173 263.9c12.4-20.2 19-43.4 19-67.1z"/></svg>
\ No newline at end of file
#root {
max-width: 1400px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}
import AppHeader from "./components/AppHeader";
import AppFooter from "./components/AppFooter";
import {Route, Routes} from "react-router-dom";
import WelcomePage from "./pages/WelcomePage.tsx";
import './App.css'
export default function App() {
return (
<div className="app">
<AppHeader/>
<Routes>
<Route path="/" element={<WelcomePage/>}/>
</Routes>
<AppFooter/>
</div>
);
}
:root {
--default-font-family: "Times New Roman", sans-serif;
/*
16px is the default font size set by browswers in the html tag.
This should never be changed so that vision-impared users can override it.
Therefore, 1rem (root em) is the width of an em-dash at 16px.
If you want a differnt default size for your site, change it in the body tag.
For example, if you want 20px, then set the size to 20/16 = 1.25rem.
*/
--default-font-size: 1rem;
--default-text-color: white;
--primary-color: #861F41;
--secondary-color: #E5751F;
--tertiary-color: #AB637A;
--primary-background-color: #1E1E1E;
}
/* RESET */
/*
In CSS, margins can be a pain to work with. One of the reasons for this
is that top and bottom margins collapse into one another. For example,
if you have one paragraph following another and they both have top
and bottom margins of 1em, the space between them will be... 1em.
It will not be 2em as you might think. To get around this odd behavior,
many developers choose to set all margins on paragrph elements to 0
and fix problems as they arise.
*/
h1,
h2,
h3,
p {
margin: 0;
}
/* For large text sizes, you typically want to decrease your line height. */
h1,
h2,
h3 {
line-height: 1;
}
/* For small text sizes, you typically want to increase your line height. */
p {
line-height: 1.5;
}
/* Get rid of styling (numbers, bullets, and spacing) for lists. */
ol,
ul {
list-style: none;
padding: 0;
margin: 0;
}
/*
By default, a width refers to the width of the content box.
This causes unexpected behavior in many situations. The following
rull makes width refer to the width of the border box.
See the box model (content/padding/border/margin) for details.
*/
* {
box-sizing: border-box;
}
/*
This rule ensures that all images stretch to fit the width
of the parent element, and all images start on a new line.
A height of auto will ensure the aspect ratio is preserved.
*/
img {
max-width: 100%;
height: auto;
display: block;
}
/*
In general, font properties of elements are inherited from
the parent element, and layout properties of elements are NOT inherited
from the parent element. An exception to this convention involves elements
that are associated with forms (like button and input). This rule fixes
that oversight in the CSS specification, and ensures that form elements
also inherit font properties from their parent element.
For details, see https://www.youtube.com/watch?v=qKiz9gdJdr8&t=49s.
*/
button,
input,
optgroup,
select,
textarea {
color: inherit;
font: inherit;
margin: 0;
}
/* UTILITY CLASSES */
/*
When you get rid of margins, everything is crammed together. For example,
paragraphs will have no space between them, which is NOT good design.
The following utility class gives a top margin of 1.25rem (20px)
to all children inside a parent with class .flow-content,
EXCEPT for the first child, which will NOT get a margin.
That's because "elem + elem" means that the rule should be applied
to the first elem only when it is followed by another elem.
*/
.flow-content > * + * {
margin-top: 1rem;
}
/*
Giving various sections of your page this utility class
will ensure a nice padding around the contents.
*/
.container {
padding: 1rem;
}
/*
Sometimes it's nice to have a section where the foreground
and background colors are (more-or-less) flipped for contrast.
This utility class does that.
*/
/*.dark-background {*/
/* background-color: var(--neutral-color);*/
/* color: whitesmoke;*/
/*}*/
/* LAYOUT */
/* These global font properties with be inherited by child elements. */
body {
background: var(--primary-background-color);
color: var(--default-text-color);
font-family: var(--default-font-family), sans-serif;
font-size: var(--default-font-size);
margin: 0 auto;
max-width: 1400px;
border: double 5px var(--default-text-color);
}
/* BUTTONS */
/*
These rules gives simplistic styles for buttons inside and outside of forms.
A richer web site will likely have multiple styles that are defined
by multiple classes. At a minimum, you might have class .primary-button
and .secondary-button.
*/
.button,
.button:visited {
display: inline-block;
background: var(--primary-background-color);
color: var(--default-text-color);
text-decoration: none;
padding: 0.5em 1em;
cursor: pointer;
border: none;
}
.button:hover,
.button:active {
background: var(--primary-color);
}
.call-to-action-button,
.call-to-action-button:visited {
display: inline-block;
background: var(--primary-color);
color: var(--default-text-color);
text-decoration: none;
padding: 1em 1em;
cursor: pointer;
border-radius: 0.5em;
font-weight: bold;
}
.call-to-action-button:hover,
.call-to-action-button:active {
background: var(--secondary-color);
transform: scale(1.1);
}
.primary-button,
.primary-button:visited {
display: inline-block;
background: var(--primary-color);
color: var(--default-text-color);
text-decoration: none;
padding: 0.5em 1em;
cursor: pointer;
border-radius: 1em;
}
.primary-button:hover,
.primary-button:active {
background: var(--secondary-color);
}
.tertiary-button,
.tertiary-button:visited {
display: inline-block;
background: var(--tertiary-color);
color: var(--default-text-color);
text-decoration: none;
padding: 0.1em 1em;
cursor: pointer;
border-radius: 1em;
}
.tertiary-button:hover,
.tertiary-button:active {
color: var(--tertiary-color);
background: var(--default-text-color);
border-color: var(--tertiary-color);
}
.tertiary-button-other,
.tertiary-button-other:visited {
display: inline-block;
background: none;
color: var(--tertiary-color);
text-decoration: none;
padding: 0;
cursor: pointer;
border: none;
font-style: italic;
}
.tertiary-button-other:hover,
.tertiary-button-other:active {
color: var(--default-text-color);
}
/* LINKS */
/*
Some developers choose to make links look like buttons. Technically,
links are things you click on that take you to another page, and buttons
are things you click on that perform some action (like adding a product
to the shopping cart), but the line has become somewhat blurred.
*/
a,
a:visited {
color: var(--default-text-color);
text-decoration: none;
}
a:hover,
a.active {
color: var(--tertiary-color);
cursor: pointer;
}
footer {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 0 1em;
gap: 0.25em;
border-top: solid 2px var(--secondary-color);
}
\ No newline at end of file
import {Link} from "react-router-dom";
import "./AppFooter.css";
export default function AppFooter() {
return (
<footer className="container">
<section className="links">
<Link to="/">RESEARCH LABS</Link> | <Link to="/">OPENINGS</Link> | <Link to="/">DISCUSSION FORUM</Link> | <Link to="/">PROFILE</Link>
</section>
<p>&copy; 2024 VT Research Connect. All Rights Reserved.</p>
<p>Capstone Project</p>
</footer>
);
}
\ No newline at end of file
header {
display: flex;
justify-content: space-between;
margin: 0 1em;
gap: 1em;
border-bottom: solid 2px var(--primary-color);
}
.logo-and-title {
display: flex;
justify-content: center;
align-items: center;
gap: 1em;
}
.logo-and-text:hover {
color: inherit;
}
.logo-text {
font-size: xx-large;
}
.labs-openings-discussion-profile-login {
display: flex;
justify-content: center;
align-items: center;
gap: 1em;
}
import {Link} from "react-router-dom";
import "./AppHeader.css";
export default function AppHeader() {
return (
<header className="header container">
<section className="logo-and-title">
<Link className="logo-and-text" to="/">
<img
src="/public/site-images/flask-solid.svg" // PLACEHOLDER
alt="VT Reseach Connect Logo"
/>
</Link>
<Link className="logo-and-text" to="/">
<h1 className="logo-text">VT Research Connect</h1>
</Link>
</section>
<section className="labs-openings-discussion-profile-login">
<button className="button"><i className="fa-solid fa-flask"></i> LABS</button>
<button className="button"><i className="fa-solid fa-door-open"></i> OPENINGS</button>
<button className="button"><i className="fa-solid fa-comments"></i> DISCUSSION</button>
<button className="button"><i className="fa-solid fa-user"></i> PROFILE</button>
<button className="button"><i className="fa-solid fa-sign-in"></i> LOGIN</button>
</section>
</header>
);
}
\ No newline at end of file
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.tsx'
import './index.css'
import {BrowserRouter} from "react-router-dom";
import "./assets/global.css";
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
< BrowserRouter basename={import.meta.env.BASE_URL}>
<App/>
</BrowserRouter>
</React.StrictMode>,
);
.welcome-page {
display: flex;
flex-direction: row;
justify-content: space-evenly;
margin: 5px 1em;
padding: 10rem 1rem;
border-top: solid 2px var(--secondary-color);
border-bottom: solid 2px var(--primary-color);
}
.welcome-students,
.welcome-professors {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 2em;
width: 40%;
}
.welcome-page p a,
.welcome-page p a:visited {
color: var(--secondary-color);
}
.welcome-page p a:hover,
.welcome-page p a.active {
color: var(--tertiary-color);
}
import './WelcomePage.css'
import {Link} from "react-router-dom";
export default function WelcomePage() {
return (
<div className="welcome-page">
<section className="welcome-students">
<h2>Welcome Students</h2>
<p>As a student, you can easily explore and filter through all the <Link to="/">Research Labs</Link> at
Virginia Tech. Each lab's profile includes essential details such as the lab name, the principal
investigator (PI), and a link to their external website. Additionally, you can search for <Link
to="/">Openings</Link> and apply for volunteer or paid positions in various research labs. Join
our <Link to="/">Discussion Forum</Link> to engage with fellow students, share insights about
research, and subscribe to feeds based on department, topic, or specific labs.</p>
<button className="call-to-action-button">STUDENT SIGN UP!</button>
</section>
<section className="welcome-professors">
<h2>Welcome Professors</h2>
<p>As a professor, you can showcase your <Link to="/">Research Lab</Link> to the vibrant Virginia Tech
community. Create a comprehensive profile that includes your lab's name, your role as the principal
investigator (PI), and a link to your external website. Post <Link to="/">Openings</Link> for
volunteer and paid positions to attract enthusiastic and qualified students. Engage with students
and colleagues in our <Link to="/">Discussion Forum</Link>, where you can share insights, foster
collaborations, and stay updated on the latest research topics and departmental news.</p>
<button className="call-to-action-button">PROFESSOR SIGN UP!</button>
</section>
</div>
);
}
\ No newline at end of file
/// <reference types="vite/client" />
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment