Skip to content

Commit 2fc5cd4

Browse files
authored
Merge pull request #3 from MPUSP/dev
feat: updates to style, added README
2 parents c7b9740 + dbc2d0f commit 2fc5cd4

8 files changed

Lines changed: 100 additions & 38 deletions

File tree

README.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,49 @@
1-
# Website
1+
# mpusp.github.io
22

3+
[![Deploy to GitHub Pages](https://github.com/MPUSP/mpusp.github.io/actions/workflows/deploy.yml/badge.svg)](https://github.com/MPUSP/mpusp.github.io/actions/workflows/deploy.yml)
4+
[![GitHub last commit](https://img.shields.io/github/last-commit/MPUSP/mpusp-github-io)](https://github.com/MPUSP/mpusp.github.io/actions/workflows/deploy.yml)
5+
6+
A homepage for the bioionformatic platform of the Max-Planck-Unit for the Science of Pathogens ([MPUSP](mpusp.mpg.de)).
37
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
8+
All data to render the less-static parts of the website (repo and user stats) are retrieved from Github using API requests.
9+
The website is automatically updated and built once per week, and on pull requests to the `main` branch.
10+
11+
### Structure
12+
13+
- The website is build using the Github action `.github/workflows/deploy.yml`.
14+
- The website building is tested for each PR to main with `.github/workflows/test-deploy.yml`
15+
- The Github action will retrieve public data from the Github API using two scripts
16+
- `src/scripts/generate_page.py`: collects all relevant data and stores it in `static/data/*.json`
17+
- `src/scripts/generate_workflow_md.py`: collects relevant workflow data and renders an info page in markdown format, exported to `docs/workflows/all_workflows/*.md`
18+
- static page data is located in the `docs/` dir, where also new `.md` docs can be added
19+
- all custom website elements and styles (cards, bar charts, etc) are located in `src/components`
20+
- global color and style definitions are located in `src/css/custom.css`
21+
- global header, footer, and metadata definition is located in `docusaurus.config.js`
22+
23+
### Dependencies
24+
25+
To develop the page locally, create a conda environment with the required packages:
26+
27+
```bash
28+
conda create -n docusaurus -c conda-forge python pygithub jinja2 nodejs
29+
conda activate docusaurus
30+
```
431

5-
### Installation
32+
To create a test page, run:
633

734
```bash
835
npm create-docusaurus@latest docusaurus-test classic
936
```
1037

1138
### Local Development
1239

40+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
41+
1342
```bash
1443
npm start
1544
```
1645

17-
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18-
19-
### Build
46+
To build the website locally, run:
2047

2148
```bash
2249
npm run build

docusaurus.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ const config = {
8080
label: "Workflows",
8181
},
8282
{ to: "/blog", label: "News", position: "left" },
83+
{
84+
href: "https://mpusp.mpg.de",
85+
label: "MPUSP",
86+
position: "right",
87+
},
8388
{
8489
href: "https://github.com/MPUSP",
8590
label: "MPUSP GitHub",
@@ -138,7 +143,7 @@ const config = {
138143
darkTheme: prismThemes.dracula,
139144
},
140145
colorMode: {
141-
defaultMode: "dark",
146+
defaultMode: "light",
142147
disableSwitch: false,
143148
respectPrefersColorScheme: false,
144149
},

src/components/About/index.jsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,15 @@ export default function Stats() {
4747
<div className={styles.about_description}>
4848
<h1>Our Github Projects</h1>
4949
<p>
50-
More than 30 open-source{" "}
51-
<Link to="https://github.com/MPUSP/repositories">MPUSP repositories</Link>{" "}
52-
are available on Github, representing a diverse range of projects.
50+
We work on a diverse range of projects and aim to make as many as possible{" "}
51+
<Link to="https://github.com/orgs/MPUSP/repositories">publicly available on Github</Link>{" "}.
5352
</p>
5453
</div>
5554
<div className={styles.stats_container}>
5655
<div className={styles.stats1_card}>
5756
{stats.map(({ number, content }, index) => (
5857
<Link key={index}
59-
to="https://github.com/MPUSP/repositories">
58+
to="https://github.com/orgs/MPUSP/repositories">
6059
<div className={styles.card}>
6160
<h1 className="gradient_text">{number}</h1>
6261
<h3>{content}</h3>
@@ -67,7 +66,7 @@ export default function Stats() {
6766
<div className={styles.stats2_card}>
6867
{stats2.map(({ number, content }, index) => (
6968
<Link key={index}
70-
to="https://github.com/MPUSP/repositories">
69+
to="https://github.com/orgs/MPUSP/repositories">
7170
<div className={styles.card}>
7271
<h1 className="gradient_text">{number}</h1>
7372
<h3>{content}</h3>

src/components/About/styles.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
}
6666

6767
.card:hover {
68-
transform: scale(0.9);
68+
transform: scale(0.95);
6969
}
7070

7171
.card h1,

src/components/Activity/styles.module.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
.activity_footer {
6868
text-align: center;
6969
font-size: 0.9rem;
70-
color: rgba(0, 0, 0, 0.65);
7170
margin-top: 0.5rem;
7271
}
7372

src/components/Header/index.jsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,24 @@ export default function Header() {
1717
</div>
1818
<div className={styles.header_content}>
1919
<h1>
20-
The MPUSP Bioinformatics Platform:
21-
Workflows for Reproducible Science.
20+
The MPUSP Bioinformatics Platform
2221
</h1>
22+
<h2>
23+
Workflows for Computational Biology at the
24+
Max-Planck-Unit for the Science of Pathogens.
25+
</h2>
2326
<div className={styles.header_content_input}>
2427
<Link to="/docs/projects/intro"
25-
className="button button--secondary button--lg">
26-
Projects
28+
className="button">
29+
<span>Projects</span>
2730
</Link>
2831
<Link to="/docs/workflows/workflow_overview"
29-
className="button button--secondary button--lg">
30-
Explore workflows
32+
className="button">
33+
<span>Explore workflows</span>
3134
</Link>
3235
<Link to="/blog"
33-
className="button button--secondary button--lg">
34-
News
36+
className="button">
37+
<span>News</span>
3538
</Link>
3639
</div>
3740
</div>

src/components/Header/styles.module.css

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,43 @@
4242

4343
.header_content_input a {
4444
margin-right: 5px;
45-
text-decoration: none;
4645
width: 250px;
46+
background: var(--theme-card);
47+
color: var(--ifm-font-color-base);
48+
border-radius: 10px;
49+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
50+
display: flex;
51+
flex-direction: column;
52+
align-items: center;
53+
justify-content: center;
54+
text-align: center;
55+
padding: 10px 15px 10px 15px;
56+
margin: 5px;
57+
transition: all 800ms cubic-bezier(0.19, 1, 0.22, 1);
58+
font-weight: 700;
59+
font-size: 20px;
4760
}
4861

4962
.header_content_input a:focus {
5063
background: none;
5164
}
5265

66+
.header_content_input a:hover {
67+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
68+
transform: scale(0.95);
69+
}
70+
71+
.header_content_input a span {
72+
background-image: linear-gradient(
73+
90deg,
74+
var(--ifm-color-primary-dark),
75+
var(--ifm-color-primary-lightest)
76+
);
77+
-webkit-background-clip: text;
78+
background-clip: text;
79+
color: transparent;
80+
}
81+
5382
@media screen and (max-width: 1050px) {
5483
.header {
5584
flex-direction: column;

src/css/custom.css

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
/* You can override the default Infima variables here. */
88
:root {
9-
--ifm-color-primary: #2e8555;
10-
--ifm-color-primary-dark: #29784c;
11-
--ifm-color-primary-darker: #277148;
12-
--ifm-color-primary-darkest: #205d3b;
13-
--ifm-color-primary-light: #33925d;
14-
--ifm-color-primary-lighter: #359962;
15-
--ifm-color-primary-lightest: #3cad6e;
16-
--ifm-color-secondary: #ebedf0;
9+
--ifm-color-primary: #428e81;
10+
--ifm-color-primary-dark: #347b6f;
11+
--ifm-color-primary-darker: #246b5f;
12+
--ifm-color-primary-darkest: #19594f;
13+
--ifm-color-primary-light: #46a293;
14+
--ifm-color-primary-lighter: #5eb1a3;
15+
--ifm-color-primary-lightest: #76c0b3;
16+
--ifm-color-secondary: #e1e1e1;
1717
--ifm-color-success: #388e3c;
1818
--ifm-color-info: #1976d2;
1919
--ifm-color-warning: #ef6c00;
@@ -31,14 +31,14 @@
3131

3232
/* For readability concerns, you should choose a lighter palette in dark mode. */
3333
[data-theme="dark"] {
34-
--ifm-color-primary: #10b981;
35-
--ifm-color-primary-dark: #059669;
36-
--ifm-color-primary-darker: #06865e;
37-
--ifm-color-primary-darkest: #056d4c;
38-
--ifm-color-primary-light: #29d5b0;
39-
--ifm-color-primary-lighter: #32d8b4;
40-
--ifm-color-primary-lightest: #4fddbf;
41-
--ifm-color-secondary: #ebedf0;
34+
--ifm-color-primary: #46a293;
35+
--ifm-color-primary-dark: #428e81;
36+
--ifm-color-primary-darker: #347b6f;
37+
--ifm-color-primary-darkest: #246b5f;
38+
--ifm-color-primary-light: #5eb1a3;
39+
--ifm-color-primary-lighter: #76c0b3;
40+
--ifm-color-primary-lightest: #8ccbbf;
41+
--ifm-color-secondary: #515151;
4242
--ifm-color-success: #388e3c;
4343
--ifm-color-info: #1976d2;
4444
--ifm-color-warning: #ef6c00;

0 commit comments

Comments
 (0)