Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
New website
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettmflynn committed Aug 4, 2024
1 parent 4349100 commit 0a827f9
Show file tree
Hide file tree
Showing 323 changed files with 2,468 additions and 14,987 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
57 changes: 57 additions & 0 deletions .github/workflows/Build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build and Deploy
run-name: ${{ github.actor }} is building a GitHub Pages site

on:
push:
branches: [ "main" ]

workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: "18"

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Install dependencies
run: npm install

- name: Build site
run: npm run build -- --outDir _site

- name: Upload artifact
uses: actions/upload-pages-artifact@v2

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
12 changes: 5 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

.DS_Store
.idea
_site
.sass-cache
.jekyll-cache
.jekyll-metadata
vendor
node_modules

.vitepress/cache

.vscode
_site
47 changes: 47 additions & 0 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { defineConfig } from 'vitepress'

const siteCopyright = 'Copyright © 2024-present Garrett Flynn and Contributors';

export default defineConfig({

lang: 'en-US',
title: "Brains@Play",
description: "An API for 8B Brains",

themeConfig: {

nav: [
{ text: 'Home', link: '/' },
{ text: 'Guide', link: '/guide' },
{ text: 'Blog', link: '/posts' },
{ text: 'Team', link: '/team' },
{ text: 'Contact', link: 'mailto:[email protected]' }
],

sidebar: {
'/guide': [
{ text: 'Getting Started', link: '/guide' },
],
'/projects': [
{
text: 'The Brains@Play Initiative',
items: [
{ text: 'International Competition', link: '/projects/initiative/brains-and-games-competition' },
{ text: 'High School Course', link: '/projects/initiative/brains-at-play-course' },
{ text: 'Public Engagement Event', link: '/projects/initiative/livewire' },
]
}
]
},

socialLinks: [
{ icon: 'github', link: 'https://github.com/neuralinterfaces/brainsatplay' }
],

aside: false,
footer: {
message: 'Built with 🧠 by Garrett Flynn',
copyright: siteCopyright
}
}
})
17 changes: 17 additions & 0 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// https://vitepress.dev/guide/custom-theme
import { h } from 'vue'
import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import './style.css'

export default {
extends: DefaultTheme,
Layout: () => {
return h(DefaultTheme.Layout, null, {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
})
},
enhanceApp({ app, router, siteData }) {
// ...
}
} satisfies Theme
139 changes: 139 additions & 0 deletions .vitepress/theme/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
/**
* Customize default theme styling by overriding CSS variables:
* https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
*/

/**
* Colors
*
* Each colors have exact same color scale system with 3 levels of solid
* colors with different brightness, and 1 soft color.
*
* - `XXX-1`: The most solid color used mainly for colored text. It must
* satisfy the contrast ratio against when used on top of `XXX-soft`.
*
* - `XXX-2`: The color used mainly for hover state of the button.
*
* - `XXX-3`: The color for solid background, such as bg color of the button.
* It must satisfy the contrast ratio with pure white (#ffffff) text on
* top of it.
*
* - `XXX-soft`: The color used for subtle background such as custom container
* or badges. It must satisfy the contrast ratio when putting `XXX-1` colors
* on top of it.
*
* The soft color must be semi transparent alpha channel. This is crucial
* because it allows adding multiple "soft" colors on top of each other
* to create a accent, such as when having inline code block inside
* custom containers.
*
* - `default`: The color used purely for subtle indication without any
* special meanings attched to it such as bg color for menu hover state.
*
* - `brand`: Used for primary brand colors, such as link text, button with
* brand theme, etc.
*
* - `tip`: Used to indicate useful information. The default theme uses the
* brand color for this by default.
*
* - `warning`: Used to indicate warning to the users. Used in custom
* container, badges, etc.
*
* - `danger`: Used to show error, or dangerous message to the users. Used
* in custom container, badges, etc.
* -------------------------------------------------------------------------- */

:root {
--vp-c-default-1: var(--vp-c-gray-1);
--vp-c-default-2: var(--vp-c-gray-2);
--vp-c-default-3: var(--vp-c-gray-3);
--vp-c-default-soft: var(--vp-c-gray-soft);

--vp-c-brand-1: var(--vp-c-indigo-1);
--vp-c-brand-2: var(--vp-c-indigo-2);
--vp-c-brand-3: var(--vp-c-indigo-3);
--vp-c-brand-soft: var(--vp-c-indigo-soft);

--vp-c-tip-1: var(--vp-c-brand-1);
--vp-c-tip-2: var(--vp-c-brand-2);
--vp-c-tip-3: var(--vp-c-brand-3);
--vp-c-tip-soft: var(--vp-c-brand-soft);

--vp-c-warning-1: var(--vp-c-yellow-1);
--vp-c-warning-2: var(--vp-c-yellow-2);
--vp-c-warning-3: var(--vp-c-yellow-3);
--vp-c-warning-soft: var(--vp-c-yellow-soft);

--vp-c-danger-1: var(--vp-c-red-1);
--vp-c-danger-2: var(--vp-c-red-2);
--vp-c-danger-3: var(--vp-c-red-3);
--vp-c-danger-soft: var(--vp-c-red-soft);
}

/**
* Component: Button
* -------------------------------------------------------------------------- */

:root {
--vp-button-brand-border: transparent;
--vp-button-brand-text: var(--vp-c-white);
--vp-button-brand-bg: var(--vp-c-brand-3);
--vp-button-brand-hover-border: transparent;
--vp-button-brand-hover-text: var(--vp-c-white);
--vp-button-brand-hover-bg: var(--vp-c-brand-2);
--vp-button-brand-active-border: transparent;
--vp-button-brand-active-text: var(--vp-c-white);
--vp-button-brand-active-bg: var(--vp-c-brand-1);
}

/**
* Component: Home
* -------------------------------------------------------------------------- */

:root {
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(
120deg,
#bd34fe 30%,
#41d1ff
);

--vp-home-hero-image-background-image: linear-gradient(
-45deg,
#bd34fe 50%,
#47caff 50%
);
--vp-home-hero-image-filter: blur(44px);
}

@media (min-width: 640px) {
:root {
--vp-home-hero-image-filter: blur(56px);
}
}

@media (min-width: 960px) {
:root {
--vp-home-hero-image-filter: blur(68px);
}
}

/**
* Component: Custom Block
* -------------------------------------------------------------------------- */

:root {
--vp-custom-block-tip-border: transparent;
--vp-custom-block-tip-text: var(--vp-c-text-1);
--vp-custom-block-tip-bg: var(--vp-c-brand-soft);
--vp-custom-block-tip-code-bg: var(--vp-c-brand-soft);
}

/**
* Component: Algolia
* -------------------------------------------------------------------------- */

.DocSearch {
--docsearch-primary-color: var(--vp-c-brand-1) !important;
}

17 changes: 17 additions & 0 deletions .vitepress/theme/utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { ContentData } from 'vitepress';

export function getSorted( posts: ContentData[] ) : ContentData[] {
return [ ...posts ].sort( ( a, b ) => {
const dateA = new Date( a.frontmatter.date ).getTime();
const dateB = new Date( b.frontmatter.date ).getTime();
return dateB - dateA;
} );
}

export function formatDate( date: string ) {
return new Date( date ).toLocaleString( 'EN', {
year: 'numeric',
month: '2-digit',
day: '2-digit'
} );
}
24 changes: 0 additions & 24 deletions 404.html

This file was deleted.

1 change: 0 additions & 1 deletion CNAME

This file was deleted.

14 changes: 0 additions & 14 deletions Gemfile

This file was deleted.

Loading

0 comments on commit 0a827f9

Please sign in to comment.