Skip to content

Commit

Permalink
Rewrite using astro
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmelon54 committed Dec 29, 2024
1 parent f9603c1 commit 61132bd
Show file tree
Hide file tree
Showing 28 changed files with 4,445 additions and 164 deletions.
26 changes: 0 additions & 26 deletions +layout.html

This file was deleted.

25 changes: 24 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
build/
# 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

# jetbrains setting folder
.idea/
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode", "unifiedjs.vscode-mdx"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# [1f349.com](https://1f349.com)

The website for 1f349.
11 changes: 11 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// @ts-check
// @ts-check
import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';

// https://astro.build/config
export default defineConfig({
site: 'https://1f349.com',
integrations: [mdx(), sitemap()],
});
34 changes: 0 additions & 34 deletions compile.sh

This file was deleted.

20 changes: 0 additions & 20 deletions hosting.page

This file was deleted.

17 changes: 0 additions & 17 deletions index.page

This file was deleted.

18 changes: 18 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "1f349.com",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^3.1.9",
"@astrojs/sitemap": "^3.2.1",
"astro": "^4.16.16",
"@astrojs/check": "^0.9.4",
"typescript": "^5.7.2"
}
}
7 changes: 0 additions & 7 deletions public/1f349.svg

This file was deleted.

Binary file modified public/favicon.ico
Binary file not shown.
Binary file added public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 0 additions & 59 deletions public/style.css

This file was deleted.

51 changes: 51 additions & 0 deletions src/components/BaseHead.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
// Import the global.css file here so that it is included on
// all pages through the use of the <BaseHead /> component.
import '../styles/global.css';
interface Props {
title: string;
description: string;
image?: string;
}
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
const { title, description, image = '/blog-placeholder-1.jpg' } = Astro.props;
---

<!-- Global Metadata -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="shortcut icon" type="image/png" href="/favicon.png" />
<link rel="shortcut icon" type="image/ico" href="/favicon.ico" />
<meta name="generator" content={Astro.generator} />

<!-- Font preloads -->
<link rel="preload" href="/fonts/Ubuntu.woff2" as="font" type="font/woff2" crossorigin />
<link rel="preload" href="/fonts/FiraCode-Regular.woff2" as="font" type="font/woff2" crossorigin />

<!-- Canonical URL -->
<link rel="canonical" href={canonicalURL} />

<!-- 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={Astro.url} />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:image" content={new URL(image, Astro.url)} />

<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content={Astro.url} />
<meta property="twitter:title" content={title} />
<meta property="twitter:description" content={description} />
<meta property="twitter:image" content={new URL(image, Astro.url)} />

<!-- Verification -->
<meta name="google-site-verification" content="eY45_J1mKAjTWUt6KUfbGztBsBCmUbOXuMBWEvpCIPo" />
32 changes: 32 additions & 0 deletions src/components/ExternalLink.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
import type {HTMLAttributes} from 'astro/types';
type Props = HTMLAttributes<'a'>;
const {href, class: className, ...props} = Astro.props;
---

<a href={href} class:list={[className]} target="_blank" {...props}>
<slot/>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link">
<path d="M15 3h6v6"/>
<path d="M10 14 21 3"/>
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>
</svg>
</a>
<style>
a {
display: inline-block;
text-decoration: none;
}

a.active {
font-weight: bolder;
text-decoration: underline;
}

a > svg {
vertical-align: sub;
}
</style>
19 changes: 19 additions & 0 deletions src/components/Footer.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
import SocialLinks from "./SocialLinks.astro";
const today = new Date();
---

<footer>
<div class="copyright">&copy; {today.getFullYear()} 1f349. All rights reserved.</div>
<SocialLinks/>
</footer>
<style>
footer {
padding: 2em 1em 6em 1em;
text-align: center;
}

.copyright {
margin-bottom: 2em;
}
</style>
Loading

0 comments on commit 61132bd

Please sign in to comment.