Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
andraz committed May 26, 2024
1 parent 02a66d2 commit b47d2e2
Show file tree
Hide file tree
Showing 65 changed files with 2,856 additions and 2 deletions.
57 changes: 57 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "AGI OS website",
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bullseye",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers-contrib/features/prettier:1": {},
"ghcr.io/prulloac/devcontainer-features/bun:1": {}
},

"customizations": {
"vscode": {
"extensions": [
// TypeScript language support
"ms-vscode.vscode-typescript-next",
// Prettier code formatter
"esbenp.prettier-vscode",
// Remote development support
"ms-vscode-remote.remote-containers",
// Code spell checker
"streetsidesoftware.code-spell-checker",
// Git graph visualization
"mhutchie.git-graph",
// ESLint integration
"dbaeumer.vscode-eslint",
// Markdown mermaid syntax highlighting
"bpruitt-goddard.mermaid-markdown-syntax-highlighting",
// Markdown mermaid preview rendering
"bierner.markdown-mermaid",
// Tailwind CSS IntelliSense
"bradlc.vscode-tailwindcss",
// Codiumate
"Codium.codium"
],
"settings": {
// Allow tailwind extension to detect classes in all strings
"tailwindCSS.experimental.classRegex": ["([a-zA-Z0-9\\-:]+)"],

// Use prettier for formatting
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always"
},
// Enable prettier for markdown and jsonc
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
}
},
// Automatically start the server when VS Code opens
"postAttachCommand": "bun i && bun dev",
}

39 changes: 39 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy to GitHub Pages

on:
# Trigger the workflow every time you push to the `main` branch
# Using a different branch name? Replace `main` with your branch’s name
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:

# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4
- name: Install, build, and upload your site output
uses: withastro/action@v2
# with:
# path: . # The root location of your Astro project inside the repository. (optional)
# node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)
# package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# build output
dist/

# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

bun.lockb
pnpm-lock.yaml
yarn.lock
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"singleQuote": true,
"trailingComma": "es5",
"tabWidth": 2,
"useTabs": false,
"semi": false,
"arrowParens": "avoid",
"bracketSameLine": true,
"proseWrap": "always",
"endOfLine": "lf"
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 agi-os
Copyright (c) 2024 Andraž Kos

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# agi-os.github.io
# agi
Awesome Gamer Insight Orchestrating System
16 changes: 16 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { defineConfig } from 'astro/config'
import mdx from '@astrojs/mdx'
import sitemap from '@astrojs/sitemap'
import tailwind from '@astrojs/tailwind'
import solidJs from '@astrojs/solid-js'

export default defineConfig({
site: 'https://agi-os.github.io',
integrations: [
mdx(),
sitemap(),
solidJs(),
tailwind({ applyBaseStyles: false }),
],
output: 'static',
})
33 changes: 33 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "agi-os-website",
"type": "module",
"version": "1.0.0",
"scripts": {
"dev": "astro dev",
"dev:network": "astro dev --host",
"start": "astro dev --host",
"build": "astro check && astro build",
"preview": "astro preview",
"preview:network": "astro dev --host",
"astro": "astro",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@astrojs/check": "^0.5.6",
"@astrojs/mdx": "^2.1.1",
"@astrojs/rss": "^4.0.5",
"@astrojs/sitemap": "^3.1.1",
"@astrojs/solid-js": "^4.0.1",
"@astrojs/tailwind": "^5.1.0",
"@tailwindcss/typography": "^0.5.10",
"astro": "^4.4.13",
"clsx": "^2.1.0",
"fuse.js": "^7.0.0",
"sharp": "^0.33.2",
"solid-js": "^1.8.15",
"tailwind-merge": "^2.2.1",
"tailwindcss": "^3.4.1",
"typescript": "^5.3.3"
}
}
8 changes: 8 additions & 0 deletions public/brand.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/favicon.svg
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 public/fonts/atkinson-bold.woff
Binary file not shown.
Binary file added public/fonts/atkinson-regular.woff
Binary file not shown.
12 changes: 12 additions & 0 deletions public/js/animate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function animate() {
const animateElements = document.querySelectorAll('.animate')

animateElements.forEach((element, index) => {
setTimeout(() => {
element.classList.add('show')
}, index * 150)
});
}

document.addEventListener("DOMContentLoaded", animate)
document.addEventListener("astro:after-swap", animate)
96 changes: 96 additions & 0 deletions public/js/bg.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@

function generateParticles(n) {
let value = `${getRandom(2560)}px ${getRandom(2560)}px #000`;
for (let i = 2; i <= n; i++) {
value += `, ${getRandom(2560)}px ${getRandom(2560)}px #000`;
}
return value;
}

function generateStars(n) {
let value = `${getRandom(2560)}px ${getRandom(2560)}px #fff`;
for (let i = 2; i <= n; i++) {
value += `, ${getRandom(2560)}px ${getRandom(2560)}px #fff`;
}
return value;
}

function getRandom(max) {
return Math.floor(Math.random() * max);
}

function initBG() {
const particlesSmall = generateParticles(1000);
const particlesMedium = generateParticles(500);
const particlesLarge = generateParticles(250);
const particles1 = document.getElementById('particles1');
const particles2 = document.getElementById('particles2');
const particles3 = document.getElementById('particles3');

if (particles1) {
particles1.style.cssText = `
width: 1px;
height: 1px;
border-radius: 50%;
box-shadow: ${particlesSmall};
animation: animStar 50s linear infinite;
`;
}

if (particles2) {
particles2.style.cssText = `
width: 1.5px;
height: 1.5px;
border-radius: 50%;
box-shadow: ${particlesMedium};
animation: animateParticle 100s linear infinite;
`;
}

if (particles3) {
particles3.style.cssText = `
width: 2px;
height: 2px;
border-radius: 50%;
box-shadow: ${particlesLarge};
animation: animateParticle 150s linear infinite;
`;
}

const starsSmall = generateStars(1000);
const starsMedium = generateStars(500);
const starsLarge = generateStars(250);
const stars1 = document.getElementById('stars1');
const stars2 = document.getElementById('stars2');
const stars3 = document.getElementById('stars3');

if (stars1) {
stars1.style.cssText = `
width: 1px;
height: 1px;
border-radius: 50%;
box-shadow: ${starsSmall};
`;
}

if (stars2) {
stars2.style.cssText = `
width: 1.5px;
height: 1.5px;
border-radius: 50%;
box-shadow: ${starsMedium};
`;
}

if (stars3) {
stars3.style.cssText = `
width: 2px;
height: 2px;
border-radius: 50%;
box-shadow: ${starsLarge};
`;
}
}

document.addEventListener('astro:after-swap', initBG);
initBG();
10 changes: 10 additions & 0 deletions public/js/scroll.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function onScroll() {
const header = document.getElementById("header")
if (window.scrollY > 0) {
header.classList.add("scrolled")
} else {
header.classList.remove("scrolled")
}
}

document.addEventListener("scroll", onScroll)
Loading

0 comments on commit b47d2e2

Please sign in to comment.