Skip to content

Commit

Permalink
wip: global config
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Dec 2, 2024
1 parent 84b9144 commit 4436ab1
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 10 deletions.
Binary file added img/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/logo-dark.webp
Binary file not shown.
Binary file added img/logo-light.webp
Binary file not shown.
Binary file removed img/logo-wide.png
Binary file not shown.
14 changes: 13 additions & 1 deletion index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# Enabling Open Science Discoveries
---
site:
hide_title_block: true
hide_outline: true
hide_toc: true
---

% Make page widescreen
+++ {"class": "col-page-inset"}

:::{hero}
Enabling Open Science Discoveries
:::

Enabling learning and discovery with interactive computing.

Expand Down
62 changes: 62 additions & 0 deletions landing-page.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
const heroDirective = {
name: `hero`,
doc: `A directive for a hero section`,
body: {
type: "myst",
},
run(data) {
const div = {
type: "div",
style: {
fontWeight: "bold",
fontSize: "4em",
maxWidth: "50%",
margin: ".5em auto",
textAlign: "center",
lineHeight: "normal",
},
children: data.body,
};
return [div];
},
};

const largeRole = {
name: `large`,
doc: `A role for large text`,
body: {
type: "myst",
},
run(data) {
const div = {
type: "span",
style: { fontSize: "1.5em" },
children: data.body,
};
return [div];
},
};

const orangeRole = {
name: `orange`,
doc: `A role for Jupyter orange text`,
body: {
type: "myst",
},
run(data) {
const div = {
type: "span",
style: { color: "#e07330" },
children: data.body,
};
return [div];
},
};

const plugin = {
name: "Landing page extensions",
roles: [largeRole, orangeRole],
directives: [heroDirective],
};

export default plugin;
9 changes: 7 additions & 2 deletions myst.shared.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ project:

site:
template: book-theme
nav:
nav:
- title: Gallery
url: https://2i2c.org/demo-gallery

actions:
- title: 2i2c
url: https://2i2c.org

options:
logo: img/logo-light.webp
logo_dark: img/logo-dark.webp
favicon: img/favicon.png
14 changes: 7 additions & 7 deletions myst.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# See docs at: https://mystmd.org/guide/frontmatter
version: 1
extends:
- https://raw.githubusercontent.com/2i2c-org/demo-gallery/refs/heads/main/myst.shared.yaml
project:
title: Enabling Open Science Discoveries
description: A gallery website for demonstrating open science discoveries at the knowledge frontier.
keywords: []
authors: []
copyright: '2024'
copyright: "2024"
open_access: true
plugins:
- landing-page.mjs
license:
code: GPL-3.0-or-later
content: CC-BY-4.0
content: CC-BY-4.0
github: https://github.com/2i2c-org/demo-gallery
# bibliography: []
toc:
# Auto-generated by `myst init --write-toc`
- file: index.md
site:
template: book-theme
options:
# favicon: favicon.ico
logo: img/logo-wide.png
nav: []
domains: []
logo_text: Demo Gallery

0 comments on commit 4436ab1

Please sign in to comment.