diff --git a/website/docusaurus.config.json b/website/docusaurus.config.json index 244e3723a0..9287ef54a4 100644 --- a/website/docusaurus.config.json +++ b/website/docusaurus.config.json @@ -37,6 +37,11 @@ "label": "Download", "position": "left" }, + { + "to": "plugin_store", + "label": "Plugins", + "position": "left" + }, { "to": "features", "label": "Features", diff --git a/website/package.json b/website/package.json index 952a586a91..61267fdcb7 100644 --- a/website/package.json +++ b/website/package.json @@ -5,9 +5,10 @@ "homepage": ".", "scripts": { "prestart": "npm run make combined.md", - "start": "docusaurus start", - "prebuild": "npm run make combined.md", + "start": "npm run fetchPlugins && docusaurus start", + "prebuild": "npm run make combined.md && npm run fetchPlugins", "build": "docusaurus build", + "fetchPlugins": "rimraf plugins.json && wget https://s3.amazonaws.com/jbrowse.org/plugin-store/plugins.json", "swizzle": "docusaurus swizzle", "predeploy": "npm run build && npm run make", "deploy": "aws s3 sync --delete build s3://jbrowse.org/jb2/ && aws s3 cp docs/jbrowse2.pdf s3://jbrowse.org/jb2/", @@ -18,9 +19,11 @@ "@docusaurus/core": "^2.0.0-alpha.72", "@docusaurus/preset-classic": "^2.0.0-alpha.72", "@material-ui/core": "^4.9.13", + "@material-ui/icons": "^4.11.2", "acorn": "^8.1.1", "acorn-jsx": "^5.3.1", "clsx": "^1.1.1", + "copy-to-clipboard": "^3.3.1", "react": "^16.8.4", "react-dom": "^16.8.4" }, diff --git a/website/plugins.json b/website/plugins.json new file mode 100644 index 0000000000..f116a861f1 --- /dev/null +++ b/website/plugins.json @@ -0,0 +1,67 @@ +{ + "plugins": [ + { + "name": "MsaView", + "authors": ["Colin Diesh"], + "description": "multiple sequence alignment browser plugin for JBrowse 2", + "location": "https://github.com/GMOD/jbrowse-plugin-msaview", + "url": "https://unpkg.com/jbrowse-plugin-msaview/dist/jbrowse-plugin-msaview.umd.production.min.js", + "license": "Apache License 2.0", + "image": "https://raw.githubusercontent.com/GMOD/jbrowse-plugin-list/main/img/msaview-screenshot-fs8.png" + }, + { + "name": "GDC", + "authors": ["Garrett Stevens", "Colin Diesh", "Rob Buels"], + "description": "JBrowse 2 plugin for integrating with GDC resources", + "location": "https://github.com/GMOD/jbrowse-plugin-gdc", + "url": "https://unpkg.com/jbrowse-plugin-gdc/dist/jbrowse-plugin-gdc.umd.production.min.js", + "license": "NONE", + "image": "https://raw.githubusercontent.com/GMOD/jbrowse-plugin-list/main/img/gdc-screenshot-fs8.png" + }, + { + "name": "Quantseq", + "authors": ["Elliot Hershberg"], + "description": "External JB2 plugin implementing a QuantitativeSequence track for displaying base-resolution models.", + "location": "https://github.com/GMOD/jbrowse-plugin-quantseq", + "url": "https://unpkg.com/jbrowse-plugin-quantseq/dist/jbrowse-plugin-quantseq.umd.production.min.js", + "license": "Apache License 2.0", + "image": "https://raw.githubusercontent.com/GMOD/jbrowse-plugin-list/main/img/quantseq-screenshot-fs8.png" + }, + { + "name": "GWAS", + "authors": ["Colin Diesh"], + "description": "Plugin for displaying GWAS results such as manhattan plot renderings", + "location": "https://github.com/cmdcolin/jbrowse-plugin-gwas", + "url": "https://unpkg.com/jbrowse-plugin-gwas/dist/jbrowse-plugin-gwas.umd.production.min.js", + "license": "NONE", + "image": "https://raw.githubusercontent.com/GMOD/jbrowse-plugin-list/main/img/gwas-screenshot-fs8.png" + }, + { + "name": "UCSC", + "authors": ["Colin Diesh"], + "description": "A JBrowse 2 plugin for accessing the UCSC API", + "location": "https://github.com/cmdcolin/jbrowse-plugin-ucsc-api", + "url": "https://unpkg.com/jbrowse-plugin-ucsc/dist/jbrowse-plugin-ucsc.umd.production.min.js", + "license": "NONE", + "image": "https://raw.githubusercontent.com/GMOD/jbrowse-plugin-list/main/img/ucsc-screenshot-fs8.png" + }, + { + "name": "Biothings", + "authors": ["Colin Diesh"], + "description": "Adapts to APIs like mygene.info to get super rich gene annotations", + "location": "https://github.com/cmdcolin/jbrowse-plugin-biothings-api", + "url": "https://unpkg.com/jbrowse-plugin-biothings/dist/jbrowse-plugin-biothings.umd.production.min.js", + "license": "NONE", + "image": "https://raw.githubusercontent.com/GMOD/jbrowse-plugin-list/main/img/biothings-screenshot-fs8.png" + }, + { + "name": "Ideogram", + "authors": ["Colin Diesh"], + "description": "JBrowse 2 plugin for rendering ideograms", + "location": "https://github.com/cmdcolin/jbrowse-plugin-ideogram", + "url": "https://unpkg.com/jbrowse-plugin-ideogram/dist/jbrowse-plugin-ideogram.umd.production.min.js", + "license": "Apache License 2.0", + "image": "https://raw.githubusercontent.com/GMOD/jbrowse-plugin-list/main/img/ideogram-screenshot-fs8.png" + } + ] +} diff --git a/website/src/pages/plugin_store.js b/website/src/pages/plugin_store.js new file mode 100644 index 0000000000..b67723174d --- /dev/null +++ b/website/src/pages/plugin_store.js @@ -0,0 +1,360 @@ +/* eslint-disable react/prop-types */ +import React, { useState } from 'react' +import copy from 'copy-to-clipboard' + +// eslint-disable-next-line import/no-unresolved +import Layout from '@theme/Layout' +// eslint-disable-next-line import/no-unresolved +import useDocusaurusContext from '@docusaurus/useDocusaurusContext' + +import { makeStyles } from '@material-ui/core/styles' +import Link from '@material-ui/core/Link' +import Typography from '@material-ui/core/Typography' +import Card from '@material-ui/core/Card' +import CardActions from '@material-ui/core/CardActions' +import CardContent from '@material-ui/core/CardContent' +import CardMedia from '@material-ui/core/CardMedia' +import Button from '@material-ui/core/Button' +import Dialog from '@material-ui/core/Dialog' +import DialogTitle from '@material-ui/core/DialogTitle' + +import PersonIcon from '@material-ui/icons/Person' +import AccountBalanceIcon from '@material-ui/icons/AccountBalance' +import GitHubIcon from '@material-ui/icons/GitHub' +import AssignmentIcon from '@material-ui/icons/Assignment' +import AssignmentTurnedInIcon from '@material-ui/icons/AssignmentTurnedIn' +import HelpIcon from '@material-ui/icons/Help' +import CodeIcon from '@material-ui/icons/Code' +import IconButton from '@material-ui/core/IconButton' +import CloseIcon from '@material-ui/icons/Close' + +import { DialogContent } from '@material-ui/core' +import { plugins } from '../../plugins.json' + +const useStyles = makeStyles(theme => ({ + button: { + textTransform: 'none', + }, + section: { + marginTop: '24px', + marginBottom: '32px', + }, + + container: { + display: 'flex', + [theme.breakpoints.down('md')]: { + flexDirection: 'column', + }, + justifyContent: 'center', + alignItems: 'center', + }, + + body: { + [theme.breakpoints.down('md')]: { + margin: '0.5em', + }, + margin: '5em', + }, + + topLinks: { + margin: '0 auto', + display: 'flex', + alignItems: 'space-between', + justifyContent: 'center', + }, + + card: { + margin: '1em auto', + width: 800, + }, + + cardMedia: { + height: 200, + width: 800, + }, + + '@media (max-width: 800px)': { + cardMedia: { + display: 'none', + }, + + card: { + width: 'auto', + }, + }, + + icon: { + marginLeft: '0.5em', + marginRight: '0.5em', + }, + + topButton: { + margin: '1em', + }, + + closeButton: { + color: '#fff', + position: 'absolute', + top: 5, + right: 0, + }, + + dataField: { + display: 'flex', + alignItems: 'center', + margin: '0.4em 0em', + }, + + dialogTitleBox: { + backgroundColor: theme.palette.primary.main, + color: '#fff', + textAlign: 'center', + }, +})) + +function TopDocumentation() { + const classes = useStyles() + const [aboutSectionOpen, setAboutSectionOpen] = useState(false) + const [developerSectionOpen, setDeveloperSectionOpen] = useState(false) + + return ( + <> +
+ {configString}
+
+ :