Skip to content

Commit 5e8fe63

Browse files
authored
Merge pull request #1 from kabilar/framework
Merge GitHub Actions workflows into main to enable for testing
2 parents 654d894 + 6317d45 commit 5e8fe63

17 files changed

Lines changed: 338 additions & 0 deletions

.github/workflows/deploy.yml

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

.github/workflows/test-deploy.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Test deployment
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
test-deploy:
10+
name: Test deployment
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
cache: npm
20+
- name: Install dependencies
21+
run: npm ci
22+
- name: Test build website
23+
run: npm run build

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# dependencies
2+
/node_modules
3+
4+
# production
5+
/build
6+
7+
# generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

docusaurus.config.js

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import {themes as prismThemes} from 'prism-react-renderer';
2+
3+
const config = {
4+
title: 'LINC Gallery',
5+
staticDirectories: ['static'],
6+
tagline: 'Showcase of the science from a NIH BRAIN CONNECTS center',
7+
favicon: 'img/linc.logo.color+white.notext+square.png',
8+
9+
url: 'https://gallery.lincbrain.org',
10+
baseUrl: '/',
11+
organizationName: 'lincbrain',
12+
projectName: 'linc-gallery',
13+
deploymentBranch: 'gh-pages',
14+
trailingSlash: false,
15+
16+
onBrokenLinks: 'throw',
17+
onBrokenMarkdownLinks: 'warn',
18+
19+
i18n: {
20+
defaultLocale: 'en',
21+
locales: ['en'],
22+
},
23+
24+
presets: [
25+
[
26+
'classic',
27+
{
28+
theme: {
29+
customCss: './src/css/custom.css',
30+
},
31+
docs: false,
32+
},
33+
],
34+
],
35+
36+
themeConfig:
37+
({
38+
navbar: {
39+
logo: {
40+
alt: 'Logo',
41+
src: 'img/linc.logo.color+white.notext.png',
42+
},
43+
items: [
44+
{to: '/pathways', label: 'Pathway Atlas', position: 'right'},
45+
{to: '/dmri', label: 'High-resolution dMRI', position: 'right'},
46+
{to: 'https://connects.mgh.harvard.edu/', label: 'Project Homepage', position: 'right'},
47+
],
48+
},
49+
footer: {
50+
style: 'light',
51+
links: [
52+
{
53+
items: [
54+
{
55+
label: 'GitHub',
56+
href: 'https://github.com/lincbrain/linc-gallery',
57+
},
58+
],
59+
},
60+
{
61+
items: [
62+
{
63+
html: `<div style="text-align: right;">© ${new Date().getFullYear()} LINC</div>`,
64+
},
65+
],
66+
},
67+
],
68+
},
69+
colorMode: {
70+
defaultMode: 'light',
71+
disableSwitch: true,
72+
},
73+
prism: {
74+
theme: prismThemes.github,
75+
},
76+
}),
77+
};
78+
79+
export default config;

package.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "linc-gallery",
3+
"version": "0.1.0",
4+
"private": true,
5+
"homepage": "https://gallery.lincbrain.org",
6+
"scripts": {
7+
"docusaurus": "docusaurus",
8+
"start": "docusaurus start",
9+
"build": "docusaurus build",
10+
"swizzle": "docusaurus swizzle",
11+
"clear": "docusaurus clear",
12+
"serve": "docusaurus serve",
13+
"deploy": "docusaurus deploy"
14+
},
15+
"dependencies": {
16+
"@docusaurus/core": "3.7.0",
17+
"@docusaurus/preset-classic": "3.7.0",
18+
"@mdx-js/react": "^3.0.0",
19+
"@niivue/niivue": "^0.57.0",
20+
"clsx": "^2.0.0",
21+
"gh-pages": "^6.3.0",
22+
"prism-react-renderer": "^2.3.0",
23+
"react": "^19.0.0",
24+
"react-dom": "^19.0.0"
25+
},
26+
"browserslist": {
27+
"production": [
28+
">0.5%",
29+
"not dead",
30+
"not op_mini all"
31+
],
32+
"development": [
33+
"last 3 chrome version",
34+
"last 3 firefox version",
35+
"last 3 safari version"
36+
]
37+
},
38+
"engines": {
39+
"node": ">=18.0"
40+
}
41+
}

src/css/custom.css

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/* Override the default Infima variables */
2+
:root {
3+
--ifm-color-primary: rgb(120, 88, 188);
4+
}
5+
6+
/* Homepage features */
7+
8+
.heroBanner {
9+
position: relative;
10+
min-height: calc(100vh - 120px);
11+
display: flex;
12+
align-items: center;
13+
justify-content: center;
14+
background-image: url('/img/homepage-temp.jpg');
15+
background-size: cover;
16+
background-position: center;
17+
background-repeat: no-repeat;
18+
overflow: hidden;
19+
}
20+
21+
.heroContent {
22+
position: relative;
23+
z-index: 2;
24+
text-align: center;
25+
}
26+
27+
.heroTitle {
28+
font-size: 3.5rem;
29+
font-weight: bold;
30+
color: white;
31+
margin-bottom: 0rem;
32+
}
33+
34+
.heroSubtitle {
35+
font-size: 1.5rem;
36+
font-weight: lighter;
37+
color: white;
38+
margin-bottom: 5rem;
39+
}
40+
41+
@media screen and (max-width: 996px) {
42+
.heroBanner {
43+
min-height: calc(100vh - 50px);
44+
}
45+
46+
.heroTitle {
47+
font-size: 2.5rem;
48+
}
49+
50+
.heroSubtitle {
51+
font-size: 1.2rem;
52+
}
53+
}
54+
55+
@media screen and (max-width: 600px) {
56+
.heroTitle {
57+
font-size: 2rem;
58+
}
59+
60+
.heroSubtitle {
61+
font-size: 1rem;
62+
}
63+
}
64+
65+
66+
/* Reduce footer height */
67+
.footer {
68+
padding-top: 0rem;
69+
padding-bottom: 0.75rem;
70+
}
71+
72+
.footer__links {
73+
margin-top: 0;
74+
margin-bottom: 0;
75+
}
76+
77+

src/pages/dmri.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: High-resolution dMRI
3+
hide_table_of_contents: true
4+
---
5+
6+
# High-resolution dMRI

src/pages/index.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import Link from '@docusaurus/Link';
2+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
3+
import Layout from '@theme/Layout';
4+
import Heading from '@theme/Heading';
5+
6+
function HomepageHeader() {
7+
const {siteConfig} = useDocusaurusContext();
8+
return (
9+
<header className="heroBanner">
10+
<div className="heroContent">
11+
<Heading as="h1" className="heroTitle">
12+
{siteConfig.title}
13+
</Heading>
14+
<p className="heroSubtitle">
15+
{siteConfig.tagline}
16+
</p>
17+
<div className="buttons">
18+
<Link
19+
className="button button--secondary button--lg"
20+
to="/pathways">
21+
Explore now
22+
</Link>
23+
</div>
24+
</div>
25+
</header>
26+
);
27+
}
28+
29+
export default function Home() {
30+
const {siteConfig} = useDocusaurusContext();
31+
return (
32+
<Layout
33+
title={`${siteConfig.title}`}
34+
description={`${siteConfig.tagline}`}>
35+
<HomepageHeader />
36+
</Layout>
37+
);
38+
}

src/pages/pathways.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Pathway Atlas
3+
hide_table_of_contents: true
4+
---
5+
6+
# Pathway Atlas
7+

static/.nojekyll

Whitespace-only changes.

0 commit comments

Comments
 (0)