Skip to content
Snippets Groups Projects
Commit ccd0ea4c authored by Kamile Liucija Vainiute's avatar Kamile Liucija Vainiute
Browse files

Merge branch 'dev' into 'main'

2024 Pre-release

See merge request templates/wiki-react-vite!2
parents 087fb44c 71c80fb1
No related branches found
No related tags found
No related merge requests found
Showing
with 1160 additions and 92 deletions
.env 0 → 100644
VITE_TEAM_ID=TeamID
VITE_TEAM_NAME=TeamName
VITE_TEAM_YEAR=2024
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?
image: node:18.20.0
pages:
stage: deploy
cache:
- key:
files:
- yarn.lock
paths:
- .yarn-cache/
before_script:
- echo 'yarn-offline-mirror ".yarn-cache/"' >> .yarnrc
- echo 'yarn-offline-mirror-pruning true' >> .yarnrc
- yarn install --frozen-lockfile
script:
- yarn build
- cp -a dist/. public/
- echo '/* /index.html 200' > public/_redirects
artifacts:
paths:
- public
LICENSE 0 → 100644
Attribution 4.0 International (CC BY 4.0)
https://creativecommons.org/licenses/by/4.0/
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution 4.0 International Public License ("Public License"). To the
extent this Public License may be interpreted as a contract, You are
granted the Licensed Rights in consideration of Your acceptance of
these terms and conditions, and the Licensor grants You such rights in
consideration of benefits the Licensor receives from making the
Licensed Material available under these terms and conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
d. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
g. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
i. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
j. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
k. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's
License You apply must not prevent recipients of the Adapted
Material from complying with this Public License.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public licenses.
Notwithstanding, Creative Commons may elect to apply one of its public
licenses to material it publishes and in those instances will be
considered the “Licensor.” The text of the Creative Commons public
licenses is dedicated to the public domain under the CC0 Public Domain
Dedication. Except for the limited purpose of indicating that material
is shared under a Creative Commons public license or as otherwise
permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the public
licenses.
Creative Commons may be contacted at creativecommons.org.
# Wiki React Vite
# Team TeamName 2024 Wiki
This repository uses `TypeScript` and `React` to manage the wikis.
This repository **MUST** contain all coding assets to generate your team's wiki
(HTML, CSS, JavaScript, TypeScript, Python, etc).
Images, photos, icons and fonts **MUST** be stored on `static.igem.wiki` using
[tools.igem.org](https://tools.igem.org), and Videos **must** be embedded
from [iGEM Video Universe](https://video.igem.org).
For up-to-date requirements, resources, help and guidance, visit
[competition.igem.org/deliverables/team-wiki](https://competition.igem.org/deliverables/team-wiki).
## Getting Started
Before refactoring the code of this template to suit your wiki needs, please make sure you have the ability to use React
for web development.
1. Clone the repository:
```bash
git clone https://gitlab.igem.org/templates/wiki-react-vite
cd wiki-react-vite
```
2. Install the dependencies:
```bash
yarn install
```
### Important:
Your Node version must be >=20.0.0. You can check your Node version by running `node -v` in your terminal.
3. Start the development server:
```bash
yarn run dev
```
4. Navigate to the files you wish to edit:
- The main App component can be found under `src/containers/App`
- Pre-built components are located under `src/components`
- Individual pages can be modified in the `src/pages.ts`
- Content pages can be updated in the `src/contents`
5. Once you are done, save the changes by **committing** them to the _main branch_ of the repository
6. An automated script will build, test and deploy your wiki to the iGEM server
## About This Template
### Files
Below is the structure of important files and directories in this project:
├── README.md -> The file you are currently reading
├── index.html -> Single HTML file for the wiki
├── package.json -> Manages project metadata and dependencies
├── src/
│ ├── components/ -> Pre-built components(like Navbar, Footer, etc.)
│ ├── containers/
│ │ └── App/ -> Main React application container
│ ├── contents/
│ │ ├── *.tsx -> Page components for the wiki
│ ├── main.tsx -> Entry point of the wiki application
│ ├── pages.ts -> Page definition and path mapping
│ ├── utils/ -> Utility functions
│ └── vite-env.d.ts -> TypeScript definitions for Vite
├── tsconfig.json -> Configures TypeScript options
├── tsconfig.node.json -> TypeScript settings for Node.js
├── vite.config.ts -> Configuration for the Vite tool
└── yarn.lock -> Yarn lock file for dependency management
### Technologies
- [React](https://reactjs.org): A JavaScript library for building user interfaces
- [TypeScript](https://www.typescriptlang.org): Extends JavaScript by adding types
- [Vite](https://vitejs.dev): Frontend tooling that provides faster and leaner development builds
- [Bootstrap](https://getbootstrap.com): Framework for building responsive, mobile-first sites
- [React Bootstrap](https://react-bootstrap.github.io): Bootstrap components built with React
- [React Router](https://reactrouter.com): Declarative routing for React applications
- (Optional) [Prettier](https://prettier.io): Code formatter
## Getting started
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
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)!
## Add your files
- [ ] [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
- [ ] [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:
```
cd existing_repo
git remote add origin https://gitlab.igem.org/templates/wiki-react-vite.git
git branch -M main
git push -uf origin main
```
## Integrate with your tools
- [ ] [Set up project integrations](https://gitlab.igem.org/templates/wiki-react-vite/-/settings/integrations)
## 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" />
<link
rel="shortcut icon"
href="https://static.igem.wiki/common/icons/favicons/igem-2022.svg"
type="image/x-icon"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>%VITE_TEAM_NAME% - iGEM %VITE_TEAM_YEAR%</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
{
"name": "team-slug",
"version": "0.0.1",
"license": "CC-BY-4.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"format": "prettier --write \"**/*.{ts,tsx,md,json,css}\"",
"preview": "vite preview"
},
"dependencies": {
"bootstrap": "^5.3.3",
"react": "^18.2.0",
"react-bootstrap": "^2.10.2",
"react-dom": "^18.2.0",
"react-router-dom": "^6.23.0"
},
"devDependencies": {
"@types/node": "^20.12.10",
"@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",
"prettier": "^3.2.5",
"typescript": "^5.2.2",
"vite": "^5.2.0"
}
}
import {stringToSlug} from "../utils";
export function Footer() {
const teamYear = import.meta.env.VITE_TEAM_YEAR;
const teamName = import.meta.env.VITE_TEAM_NAME;
const teamSlug = stringToSlug(teamName);
return (
<footer className="pt-5 pb-5 footer py-5 mt-5 bg-dark text-white">
<div className="container">
<div className="row mb-4">
<div className="col-lg-6 col-xs-12">
<h4 className="mb-3">Heading</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam ac
ante mollis quam tristique convallis
</p>
</div>
<div className="col-lg-3 col-xs-12">
<h4 className="mt-lg-0 mt-sm-3">Links</h4>
<ul className="m-2 p-2">
<li>
<a href="#">Lorem ipsum</a>
</li>
<li>
<a href="#">Nam mauris velit</a>
</li>
<li>
<a href="#">Etiam vitae mauris</a>
</li>
<li>
<a href="#">Fusce scelerisque</a>
</li>
<li>
<a href="#">Sed faucibus</a>
</li>
<li>
<a href="#">Mauris efficitur nulla</a>
</li>
</ul>
</div>
<div className="col-lg-3 col-xs-12">
<h4 className="mt-lg-0 mt-sm-4 mb-3">Contact</h4>
<p>22, Lorem ipsum dolor, consectetur adipiscing</p>
<p className="mb-0">(541) 754-3010</p>
<p>info@hsdf.com</p>
</div>
</div>
<hr />
{/* The following MUST be on every page: license information and link to the repository on gitlab.igem.org */}
<div className="row mt-4">
<div className="col">
<p className="mb-0">
<small>
© 2024 - Content on this site is licensed under a{" "}
<a
className="subfoot"
href="https://creativecommons.org/licenses/by/4.0/"
rel="license"
>
Creative Commons Attribution 4.0 International license
</a>
.
</small>
</p>
<p>
<small>
The repository used to create this website is available at{" "}
<a href={`https://gitlab.igem.org/${teamYear}/${teamSlug}`}>
gitlab.igem.org/{teamYear}/{teamSlug}
</a>
.
</small>
</p>
</div>
</div>
</div>
</footer>
);
}
interface HeaderProps {
title: string;
lead: string;
}
export function Header({ title, lead }: HeaderProps) {
return (
<header className="bg-hero py-5 mb-5">
<div className="container h-100">
<div className="row h-100 align-items-center">
<div className="col-lg-12">
<h1 className="display-4 text-white mt-5 mb-2">{title}</h1>
<p className="lead mb-5 text-white-50">{lead}</p>
</div>
</div>
</div>
</header>
);
}
import {stringToSlug} from "../utils";
export interface InspirationLink {
year: number;
teamName: string;
pageName: string;
}
interface InspirationsProps {
inspirationLinkList: InspirationLink[];
}
export function Inspirations ({ inspirationLinkList }: InspirationsProps) {
return (
<>
<div className="col-lg-4">
<h2>Inspirations</h2>
<hr />
<ul>
{inspirationLinkList.map((inspirationLink) => {
const { year, teamName, pageName } = inspirationLink;
const teamSlug = stringToSlug(teamName);
const pageSlug = pageName ? `/${stringToSlug(pageName)}` : "";
const href =
year < 2022
? `https://${year}.igem.org/Team:${teamName}${pageName ? `/${pageName}` : ""}`
: `https://${year}.igem.wiki/${teamSlug}${pageSlug}`;
return (
<li key={`${year}-${teamName}`}>
<a href={href} target="_blank">
{year} {teamName}
</a>
</li>
);
})}
</ul>
</div>
</>
);
};
import Container from "react-bootstrap/Container";
import Nav from "react-bootstrap/Nav";
import BootstrapNavbar from "react-bootstrap/Navbar";
import NavDropdown from "react-bootstrap/NavDropdown";
import { Link } from "react-router-dom";
import Pages from "../pages.ts";
export function Navbar() {
const pages = Pages.map((item, pageIndex) => {
if ("folder" in item && item.folder) {
const folderItems = item.folder.map((subpage, subpageIndex) => {
if (subpage.path) {
return (
<NavDropdown.Item
key={`subpage-${pageIndex}-${subpageIndex}`}
as={Link}
to={subpage.path}
>
{subpage.name}
</NavDropdown.Item>
);
}
});
return (
<NavDropdown
key={`page-${pageIndex}`}
title={item.name}
id="basic-nav-dropdown"
>
{folderItems}
</NavDropdown>
);
} else if ("path" in item && item.path) {
return (
<Nav.Link key={`page-${pageIndex}`} as={Link} to={item.path}>
{item.name}
</Nav.Link>
);
}
});
return (
<BootstrapNavbar expand="lg" className="bg-body-tertiary" fixed="top">
<Container>
<BootstrapNavbar.Brand>{import.meta.env.VITE_TEAM_NAME}</BootstrapNavbar.Brand>
<BootstrapNavbar.Toggle aria-controls="basic-navbar-nav" />
<BootstrapNavbar.Collapse id="basic-navbar-nav">
<Nav className="left-aligned">{pages}</Nav>
</BootstrapNavbar.Collapse>
</Container>
</BootstrapNavbar>
);
}
\ No newline at end of file
import { Link } from "react-router-dom";
export function NotFound() {
return (
<div className="d-flex flex-column justify-content-center align-items-center">
<h1 className="not-found-title" style={{ fontSize: "100pt" }}>
404
</h1>
<div className="my-5">
<Link to="/" className="btn btn-secondary btn-lg">
Back to Home
</Link>
</div>
</div>
);
}
export * from "./Navbar";
export * from "./Header";
export * from "./Footer";
export * from "./NotFound";
export * from "./Inspirations";
body {
padding-top: 56px;
}
.left-aligned {
margin-left: auto;
}
.bg-dark {
background-color: #343a40 !important;
}
.bg-hero {
background-color: #45b06cff;
}
/* CALLOUT */
.bd-callout {
padding: 1.25rem;
margin-top: 1.25rem;
margin-bottom: 1.25rem;
border: 1px solid #e9ecef;
border-left-width: 0.25rem;
border-radius: 0.25rem;
}
.bd-callout h4 {
margin-bottom: 0.25rem;
}
.bd-callout p:last-child {
margin-bottom: 0;
}
.bd-callout code {
border-radius: 0.25rem;
}
.bd-callout + .bd-callout {
margin-top: -0.25rem;
}
.bd-callout-info {
border-left-color: #5bc0de;
}
.bd-callout-warning {
border-left-color: #f0ad4e;
}
.bd-callout-danger {
border-left-color: #d9534f;
}
/* footer */
footer a {
color: white;
font-weight: bold;
text-decoration: none;
}
footer a:hover {
color: white;
text-decoration: underline;
}
import "./App.css";
import "bootstrap/dist/css/bootstrap.min.css";
import { Route, Routes } from "react-router-dom";
import { Footer, Header, Navbar, NotFound } from "../../components";
import { getPathMapping, stringToSlug } from "../../utils";
import {useEffect} from "react";
const App = () => {
const pathMapping = getPathMapping();
const currentPath =
location.pathname
.split(`${stringToSlug(import.meta.env.VITE_TEAM_NAME)}`)
.pop() || "/";
// Set Page Title
const title =
currentPath in pathMapping ? pathMapping[currentPath].title : "Not Found";
useEffect(() => {
document.title = `${title || ""} | ${import.meta.env.VITE_TEAM_NAME} - iGEM ${import.meta.env.VITE_TEAM_YEAR}`;
}, [title]);
return (
<>
{/* Navigation */}
<Navbar />
{/* Header and PageContent */}
<Routes>
{Object.entries(pathMapping).map(
([path, { title, lead, component: Component }]) => (
<Route
key={path}
path={path}
element={
<>
<Header title={title || ""} lead={lead || ""} />
<div className="container">
<Component />
</div>
</>
}
/>
),
)}
<Route
path="*"
element={
<>
<Header
title="Not Found"
lead="The requested URL was not found on this server."
/>
<NotFound />
</>
}
/>
</Routes>
{/* Footer */}
{/* MUST mention license AND have a link to team wiki's repository on gitlab.igem.org */}
<Footer />
</>
);
};
export default App;
import {useEffect} from 'react';
export function Attributions () {
const teamID = import.meta.env.VITE_TEAM_ID;
useEffect(() => {
function listenToIframeHeight(e: MessageEvent) {
if (e.origin === "https://teams.igem.org") {
const { type, data } = JSON.parse(e.data);
if (type === "igem-attribution-form") {
const element = document.getElementById("igem-attribution-form");
if (element) {
element.style.height = `${data + 50}px`;
}
}
}
}
window.addEventListener("message", listenToIframeHeight);
return () => {
window.removeEventListener("message", listenToIframeHeight)
}
}, [])
return (
<>
<div className="row mt-4">
<div className="col">
<div className="bd-callout bd-callout-info">
<h4>Bronze Medal Criterion #2</h4>
<p>
Describe what work your team members did and what other people did
for your project.
</p>
<p>
The form that bas been embded in an iframe in this page shows your
team's Project Attribution form. This page must keep the form as
it is.
</p>
<p>
If you use a different website framework, make sure to embed the
right URL for your team's form.
</p>
<hr />
<p>
Please see the{" "}
<a href="https://competition.igem.org/deliverables/project-attribution">
Project Attribution page
</a>{" "}
for more information.
</p>
</div>
</div>
</div>
<iframe
style={{ width: "100%" }}
id="igem-attribution-form"
src={`https://teams.igem.org/${teamID}/attributions`}
/>
</>
);
}
\ No newline at end of file
export function Contribution () {
return (
<>
<div className="row mt-4">
<div className="col">
<div className="bd-callout bd-callout-info">
<h4>Bronze Medal Criterion #4</h4>
<p>
Make a useful contribution for future iGEM teams. Use this page to
document that contribution.
</p>
<p>
If you are making a contribution by adding information to an
existing Part or creating a new Part, you must document your
contribution on the Part's Main Page on the{" "}
<a href="http://parts.igem.org/Main_Page">Registry</a> for your
team to be eligible for this criteria. You can use this page to
link to that part and include additional information about your
contribution.
</p>
<hr />
<p>
Please see the{" "}
<a href="https://competition.igem.org/judging/medals">
2024 Medals Page
</a>{" "}
for more information.
</p>
</div>
</div>
</div>
</>
);
}
\ No newline at end of file
import { Inspirations, InspirationLink } from "../components";
export function Description () {
const links: InspirationLink[] = [
{ year: 2022, teamName: "DTU-Denmark", pageName: "Description" },
{ year: 2019, teamName: "ITESO_Guadalajara", pageName: "Description" },
{ year: 2020, teamName: "Technion-Israel", pageName: "Description" },
{ year: 2020, teamName: "Botchan_Lab_Tokyo", pageName: "Description" },
{ year: 2020, teamName: "St_Andrews", pageName: "Description" },
{ year: 2020, teamName: "MIT", pageName: "Description" },
];
return (
<>
<div className="row mt-4">
<div className="col">
<div className="bd-callout bd-callout-info">
<h4>Bronze Medal Criterion #3</h4>
<p>Describe how and why you chose your iGEM project.</p>
<hr />
<p>
Please see the{" "}
<a href="https://competition.igem.org/judging/medals">
2024 Medals Page
</a>{" "}
for more information.
</p>
</div>
</div>
</div>
<div className="row mt-4">
<div className="col-lg-8">
<h2>What should this page contain?</h2>
<hr />
<ul>
<li>A clear and concise description of your project.</li>
<li>
A detailed explanation of why your team chose to work on this
particular project.
</li>
<li>References and sources to document your research.</li>
<li>
Use illustrations and other visual resources to explain your
project.
</li>
</ul>
</div>
<Inspirations inspirationLinkList={links} />
</div>
<div className="row mt-4">
<div className="col-lg-8">
<h2>Some advice</h2>
<hr />
<p>
We encourage you to put up a lot of information and content on your
wiki, but we also encourage you to include summaries as much as
possible. If you think of the sections in your project description
as the sections in a publication, you should try to be concise,
accurate, and unambiguous in your achievements. Your Project
Description should include more information than your project
abstract.
</p>
</div>
<div className="col-lg-4">
<h2>References</h2>
<hr />
<p>
iGEM teams are encouraged to record references you use during the
course of your research. They should be posted somewhere on your
wiki so that judges and other visitors can see how you thought about
your project and what works inspired you.
</p>
</div>
</div>
</>
);
}
\ No newline at end of file
import { Inspirations, InspirationLink } from "../components";
export function Education () {
const links: InspirationLink[] = [
{ year: 2020, teamName: "CCA_San_Diego", pageName: "Education" },
{ year: 2020, teamName: "Lambert_GA", pageName: "Education" },
{ year: 2020, teamName: "Stanford", pageName: "Education" },
{ year: 2020, teamName: "Waseda", pageName: "Education" },
{ year: 2020, teamName: "Fudan", pageName: "Education" },
{ year: 2020, teamName: "Toulouse_INSA-UPS", pageName: "Education" },
];
return (
<>
<div className="row mt-4">
<div className="col">
<div className="bd-callout bd-callout-info">
<h4>Best Education</h4>
<p>
How have you developed new opportunities to include more people in
shaping synthetic biology? Innovative educational tools and
outreach activities have the ability to establish a two-way
dialogue with new communities by discussing public values and the
science behind synthetic biology. Document your approach and what
was learned by everyone involved to compete for this award.
</p>
<p>
To compete for the Best Education prize, please describe your work
on this page and also fill out the description on the{" "}
<a href="https://competition.igem.org/deliverables/judging-form">
judging form
</a>
.
</p>
<hr />
<p>
Please see the{" "}
<a href="https://competition.igem.org/judging/awards">
2024 Awards Page
</a>{" "}
for more information.
</p>
</div>
</div>
</div>
<Inspirations inspirationLinkList={links} />
</>
);
}
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