Skip to content

Commit 1577519

Browse files
adding maintainance mode
0 parents  commit 1577519

34 files changed

+5650
-0
lines changed

.bolt/config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"template": "bolt-vite-react-ts"
3+
}

.bolt/prompt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
For all designs I ask you to make, have them be beautiful, not cookie cutter. Make webpages that are fully featured and worthy for production.
2+
3+
By default, this template supports JSX syntax with Tailwind CSS classes, React hooks, and Lucide React for icons. Do not install other packages for UI themes, icons, etc unless absolutely necessary or I request them.
4+
5+
Use icons from lucide-react for logos.
6+
7+
Use stock photos from unsplash where appropriate, only valid URLs you know exist. Do not download the images, only link to them in image tags.
8+

.github/workflows/deploy.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
cache: 'npm'
22+
- name: Install dependencies
23+
run: npm ci
24+
- name: Build
25+
run: npm run build
26+
- name: Upload artifact
27+
uses: actions/upload-pages-artifact@v3
28+
with:
29+
path: dist
30+
31+
deploy:
32+
environment:
33+
name: github-pages
34+
url: ${{ steps.deployment.outputs.page_url }}
35+
needs: build
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Deploy to GitHub Pages
39+
id: deployment
40+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
node_modules
2+
dist
3+
dist-ssr
4+
*.local
5+
.env
6+
.env.*
7+
!.env.example
8+
9+
# Editor directories and files
10+
.vscode/*
11+
!.vscode/extensions.json
12+
.idea
13+
.DS_Store
14+
*.suo
15+
*.ntvs*
16+
*.njsproj
17+
*.sln
18+
*.sw?

CONTRIBUTING.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Contributing to Starlight Lab Website
2+
3+
Thank you for your interest in contributing to the Starlight Lab website! This document provides guidelines and instructions for contributing.
4+
5+
## Development Process
6+
7+
1. Fork the repository
8+
2. Create a feature branch
9+
3. Make your changes
10+
4. Test locally
11+
5. Submit a pull request
12+
13+
## Code Style
14+
15+
- Follow the existing code style
16+
- Use TypeScript for type safety
17+
- Use Tailwind CSS for styling
18+
- Keep components modular and reusable
19+
- Add comments for complex logic
20+
21+
## Content Guidelines
22+
23+
### Images
24+
- Use high-quality images
25+
- Optimize images for web
26+
- Use Unsplash or similar free stock photos
27+
- Keep image sizes reasonable (max 1MB)
28+
29+
### Text Content
30+
- Keep content professional
31+
- Check grammar and spelling
32+
- Follow academic writing style
33+
- Update content regularly
34+
35+
## Testing
36+
37+
- Test all changes locally
38+
- Verify responsive design
39+
- Check all links work
40+
- Ensure no console errors
41+
- Test on multiple browsers
42+
43+
## Pull Request Process
44+
45+
1. Update documentation if needed
46+
2. Add meaningful commit messages
47+
3. Reference related issues
48+
4. Wait for review
49+
5. Address feedback
50+
51+
## Questions?
52+
53+
Open an issue for any questions or concerns.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Starlight Lab
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
# Starlight Lab Website
2+
3+
This is the official website for the Starlight Lab at Carnegie Mellon University. The website is built using React, TypeScript, and Tailwind CSS, and is deployed using GitHub Pages.
4+
5+
## 🚀 Quick Start
6+
7+
1. Clone the repository:
8+
```bash
9+
git clone https://github.com/starlightcmu/starlightcmu.github.io.git
10+
cd starlightcmu.github.io
11+
```
12+
13+
2. Install dependencies:
14+
```bash
15+
npm install
16+
```
17+
18+
3. Start the development server:
19+
```bash
20+
npm run dev
21+
```
22+
23+
## 📁 Project Structure
24+
25+
```
26+
src/
27+
├── components/ # Reusable React components
28+
├── data/ # JSON data files for content
29+
├── pages/ # Page components
30+
├── types/ # TypeScript type definitions
31+
└── styles/ # CSS and styling files
32+
```
33+
34+
## 🚧 Maintenance Mode
35+
36+
The website includes a maintenance overlay that can be toggled on/off using a single variable:
37+
38+
1. Open `src/App.tsx`
39+
2. Locate the `MAINTENANCE_MODE` variable at the top of the file:
40+
```typescript
41+
export const MAINTENANCE_MODE = true;
42+
```
43+
3. Set it to `false` to disable the maintenance overlay and show the full website
44+
4. Set it to `true` to enable the maintenance overlay
45+
46+
## 📝 Making Changes
47+
48+
### Updating Content
49+
50+
All content is stored in JSON files in the `src/data` directory:
51+
52+
- `news.json`: Latest news and announcements
53+
- `team.json`: Team member information
54+
- `publications.json`: Research publications
55+
- `projects.json`: Research projects
56+
57+
To update content, simply edit the corresponding JSON file. The changes will be automatically reflected in the website.
58+
59+
#### Adding News Items
60+
61+
Add new items to the `news` array in `src/data/news.json`:
62+
63+
```json
64+
{
65+
"news": [
66+
{
67+
"date": "March 20, 2024",
68+
"title": "Your News Title",
69+
"content": "Your news content"
70+
},
71+
// ... existing items
72+
]
73+
}
74+
```
75+
76+
#### Adding Team Members
77+
78+
Add new members to the `labMembers` array in `src/data/team.json`:
79+
80+
```json
81+
{
82+
"labMembers": [
83+
{
84+
"name": "New Member Name",
85+
"role": "Role Title",
86+
"bio": "Member bio",
87+
"image": "https://image-url.com",
88+
"links": {
89+
"google_scholar": "optional-url",
90+
"github": "optional-url",
91+
"website": "optional-url",
92+
"email": "optional-email",
93+
"linkedin": "optional-url"
94+
}
95+
},
96+
// ... existing members
97+
]
98+
}
99+
```
100+
101+
#### Adding Publications
102+
103+
Add new publications to the `publications` array in `src/data/publications.json`:
104+
105+
```json
106+
{
107+
"publications": [
108+
{
109+
"title": "Publication Title",
110+
"authors": ["Author 1", "Author 2"],
111+
"venue": "Conference/Journal Name",
112+
"year": 2024,
113+
"pdf": "optional-pdf-url",
114+
"code": "optional-code-url",
115+
"abstract": "Publication abstract"
116+
},
117+
// ... existing publications
118+
]
119+
}
120+
```
121+
122+
#### Adding Projects
123+
124+
Add new projects to the `projects` array in `src/data/projects.json`:
125+
126+
```json
127+
{
128+
"projects": [
129+
{
130+
"title": "Project Title",
131+
"description": "Project description",
132+
"image": "https://image-url.com",
133+
"tags": ["Tag1", "Tag2"],
134+
"link": "optional-project-url"
135+
},
136+
// ... existing projects
137+
]
138+
}
139+
```
140+
141+
### Styling Changes
142+
143+
The website uses Tailwind CSS for styling. The main configuration is in:
144+
- `tailwind.config.js`: Tailwind configuration
145+
- `src/index.css`: Global styles and animations
146+
147+
### Adding New Pages
148+
149+
1. Create a new component in `src/pages/`
150+
2. Add the route in `src/App.tsx`
151+
3. Add the navigation link in `src/components/Navbar.tsx`
152+
153+
## 🚀 Deployment
154+
155+
The website is automatically deployed to GitHub Pages when changes are pushed to the main branch. The deployment process is handled by the GitHub Actions workflow in `.github/workflows/deploy.yml`.
156+
157+
To deploy manually:
158+
159+
1. Push your changes to the main branch:
160+
```bash
161+
git add .
162+
git commit -m "Your commit message"
163+
git push origin main
164+
```
165+
166+
2. The GitHub Actions workflow will automatically:
167+
- Build the project
168+
- Deploy to GitHub Pages
169+
- Make the changes live at https://starlightcmu.github.io
170+
171+
## 🛠️ Development
172+
173+
### Available Scripts
174+
175+
- `npm run dev`: Start development server
176+
- `npm run build`: Build for production
177+
- `npm run preview`: Preview production build locally
178+
- `npm run lint`: Run ESLint
179+
180+
### TypeScript Types
181+
182+
The types for all data structures are defined in `src/types/index.ts`. Update these types if you modify the data structure in the JSON files.
183+
184+
## 📱 Responsive Design
185+
186+
The website is fully responsive with three main breakpoints:
187+
- Mobile: < 768px
188+
- Tablet: 768px - 1024px
189+
- Desktop: > 1024px
190+
191+
## 🔍 SEO
192+
193+
Update the metadata in `index.html` to improve SEO:
194+
- Title
195+
- Description
196+
- Open Graph tags
197+
- Twitter card tags
198+
199+
## 🤝 Contributing
200+
201+
1. Create a new branch for your changes
202+
2. Make your changes
203+
3. Test locally
204+
4. Create a pull request
205+
5. Wait for review and merge
206+
207+
## 📄 License
208+
209+
MIT License - see LICENSE file for details

eslint.config.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import js from '@eslint/js';
2+
import globals from 'globals';
3+
import reactHooks from 'eslint-plugin-react-hooks';
4+
import reactRefresh from 'eslint-plugin-react-refresh';
5+
import tseslint from 'typescript-eslint';
6+
7+
export default tseslint.config(
8+
{ ignores: ['dist'] },
9+
{
10+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
11+
files: ['**/*.{ts,tsx}'],
12+
languageOptions: {
13+
ecmaVersion: 2020,
14+
globals: globals.browser,
15+
},
16+
plugins: {
17+
'react-hooks': reactHooks,
18+
'react-refresh': reactRefresh,
19+
},
20+
rules: {
21+
...reactHooks.configs.recommended.rules,
22+
'react-refresh/only-export-components': [
23+
'warn',
24+
{ allowConstantExport: true },
25+
],
26+
},
27+
}
28+
);

0 commit comments

Comments
 (0)