Skip to content

Commit

Permalink
genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
thepixelmonk committed Feb 13, 2024
0 parents commit 4078eae
Show file tree
Hide file tree
Showing 29 changed files with 207 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# build output
dist/
.output/

# 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
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM node:lts AS build
WORKDIR /app
COPY . .
RUN npm i -g bun
RUN bun i
RUN bun run build

FROM httpd:2.4 AS runtime
COPY --from=build /app/dist /usr/local/apache2/htdocs/
EXPOSE 80
23 changes: 23 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { defineConfig } from 'astro/config';
import svelte from '@astrojs/svelte';
import mdx from '@astrojs/mdx';
import remarkGfm from 'remark-gfm';
import remarkSmartypants from 'remark-smartypants';
import rehypeExternalLinks from 'rehype-external-links';

import tailwind from "@astrojs/tailwind";

// https://astro.build/config
export default defineConfig({
site: 'https://bolton.dev',
integrations: [mdx(), svelte(), tailwind({nesting:true})],
markdown: {
shikiConfig: {
theme: 'nord'
},
remarkPlugins: [remarkGfm, remarkSmartypants],
rehypePlugins: [[rehypeExternalLinks, {
target: '_blank'
}]]
}
});
Binary file added bun.lockb
Binary file not shown.
29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "bytecraft",
"version": "0.0.1",
"scripts": {
"dev": "bunx astro dev",
"preinstall": "npx only-allow bun",
"start": "bunx astro dev",
"build": "bunx astro check && astro build",
"preview": "bunx astro preview",
"astro": "bunx astro"
},
"dependencies": {
"@astrojs/check": "^0.4.1",
"@astrojs/mdx": "^2.0.0",
"@astrojs/svelte": "^5.0.3",
"@astrojs/tailwind": "^5.1.0",
"@types/bun": "^1.0.2",
"astro": "^4.0.1",
"daisyui": "^4.6.0",
"reading-time": "^1.5.0",
"rehype-external-links": "^3.0.0",
"remark-gfm": "^4.0.0",
"remark-smartypants": "^2.0.0",
"svelte": "^5.0.0-next.37",
"svelte-preprocess": "^5.1.3",
"tailwindcss": "^3.4.1",
"typescript": "^5.3.3"
}
}
Binary file added public/assets/images/email.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 public/assets/images/facebook.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 public/assets/images/github.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 public/assets/images/google.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 public/assets/images/instagram.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 public/assets/images/linkedin.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 public/assets/images/pixelmnok.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 public/assets/images/reddit.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 public/assets/images/seoul-gray.jpg
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/assets/images/soundcloud.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 public/assets/images/stackoverflow.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 public/assets/images/twitter.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 public/assets/images/youtube.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 public/favicon.ico
Binary file not shown.
2 changes: 2 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Allow: /
11 changes: 11 additions & 0 deletions sandbox.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"infiniteLoopProtection": true,
"hardReloadOnChange": false,
"view": "browser",
"template": "node",
"container": {
"port": 3000,
"startScript": "start",
"node": "14"
}
}
53 changes: 53 additions & 0 deletions src/components/BaseHead.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
import { ViewTransitions } from 'astro:transitions'
import '../styles/global.css'
export interface Props {
title: string
description: string
permalink: string
}
const { title, description, permalink } = Astro.props
const socialUrl = Astro.site.href + 'assets/images/bytecraft.png'
---

<!-- Global Metadata -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />

<!-- Primary Meta Tags -->
<title>{title}</title>
<meta name="title" content={title} />
<meta name="description" content={description} />

<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:url" content={permalink} />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:image" content={socialUrl} />

<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content={permalink} />
<meta property="twitter:title" content={title} />
<meta property="twitter:description" content={description} />
<meta property="twitter:image" content={socialUrl} />

<ViewTransitions />

<!-- This is intentionally inlined to avoid FOUC -->
<script is:inline>
const root = document.documentElement
const theme = localStorage.getItem('theme')
if (
theme === 'dark' ||
(!theme && window.matchMedia('(prefers-color-scheme: dark)').matches)
) {
root.classList.add('theme-dark')
} else {
root.classList.remove('theme-dark')
}
</script>
1 change: 1 addition & 0 deletions src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="astro/client" />
21 changes: 21 additions & 0 deletions src/layouts/BaseLayout.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
import BaseHead from '../components/BaseHead.astro';
export interface Props {
title: string;
description: string;
permalink: string;
current?: string;
}
const { title, description, permalink, current } = Astro.props;
---
<html lang="en">
<head>
<BaseHead title={title} description={description} permalink={permalink} />
</head>
<body class="index">
<main>
<slot />
</main>
</body>
</html>
10 changes: 10 additions & 0 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
import BaseLayout from '../layouts/BaseLayout.astro';
const title = 'Bytecraft';
const description = 'A small software development and game studio.';
const permalink = Astro.site.href;
---

<BaseLayout title={title} description={description} permalink={permalink}>
</BaseLayout>
Empty file added src/styles/global.css
Empty file.
8 changes: 8 additions & 0 deletions svelte.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const preprocess = require('svelte-preprocess')

module.exports = {
preprocess: preprocess({ sass: {} }),
compilerOptions: {
runes: true
}
}
8 changes: 8 additions & 0 deletions tailwind.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('tailwindcss').Config} */
export default {
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
theme: {
extend: {},
},
plugins: [require('daisyui')],
}
11 changes: 11 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true
},
"extends": "astro/tsconfigs/base"
}

0 comments on commit 4078eae

Please sign in to comment.