pull/1/head
Drake 2 years ago
commit aab14053dc

17
.gitignore vendored

@ -0,0 +1,17 @@
# build output
dist
# dependencies
node_modules/
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# environment variables
.env
.env.production
# macOS-specific files
.DS_Store

@ -0,0 +1,2 @@
## force pnpm to hoist
shamefully-hoist = true

@ -0,0 +1,6 @@
{
"startCommand": "npm start",
"env": {
"ENABLE_CJS_IMPORTS": true
}
}

@ -0,0 +1,6 @@
all: dev
build:
npm run build
node postBuild.mjs
dev:
npm run dev

@ -0,0 +1,43 @@
# Astro Starter Kit: Minimal
```
npm init astro -- --template minimal
```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal)
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
## 🚀 Project Structure
Inside of your Astro project, you'll see the following folders and files:
```
/
├── public/
├── src/
│ └── pages/
│ └── index.astro
└── package.json
```
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
Any static assets, like images, can be placed in the `public/` directory.
## 🧞 Commands
All commands are run from the root of the project, from a terminal:
| Command | Action |
|:---------------- |:-------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:3000` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
## 👀 Want to learn more?
Feel free to check [our documentation](https://github.com/withastro/astro) or jump into our [Discord server](https://astro.build/chat).

@ -0,0 +1,13 @@
// Full Astro Configuration API Documentation:
// https://docs.astro.build/reference/configuration-reference
// @type-check enabled!
// VSCode and other TypeScript-enabled text editors will provide auto-completion,
// helpful tooltips, and warnings if your exported object is invalid.
// You can disable this by removing "@ts-check" and `@type` comments below.
// @ts-check
export default /** @type {import('astro').AstroUserConfig} */ ({
// Comment out "renderers: []" to enable Astro's default component support.
renderers: [],
});

10934
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -0,0 +1,14 @@
{
"name": "@example/minimal",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview"
},
"devDependencies": {
"astro": "^0.22.20"
}
}

@ -0,0 +1,45 @@
/**
* Copyright 2022 Pranav Karawale
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Script to replace __VITE_ASSET__ with the correct asset name
import fg from 'fast-glob';
import fs from 'fs';
const buildDir = 'dist';
const cssFiles = await fg(`./${buildDir}/**/*.css`);
const hashes = (await fg(`./${buildDir}/**/*`))
.map((path) => path.replace(`./${buildDir}/`, '/'))
.map((path) => {
const parts = path.split('/').pop().split('.');
const hash = parts[parts.length - 2];
if (hash.length === 8 && /^[0-9a-f]+$/.test(hash)) return [path, hash];
})
.filter(Boolean);
cssFiles.forEach((path) => {
const content = fs.readFileSync(path, 'utf8');
let newContent = content;
// Sample asset: __VITE_ASSET__643e4e0a__
const viteAssets = content.match(/__VITE_ASSET__[0-9a-f]{8}__/g);
if (viteAssets) {
viteAssets.forEach((viteAsset) => {
const hash = viteAsset.replace('__VITE_ASSET__', '').replace('__', '');
const hashFile = hashes.find((h) => h[1] === hash)[0];
newContent = newContent.replace(viteAsset, `"${hashFile}"`);
});
}
fs.writeFileSync(path, newContent);
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Binary file not shown.

@ -0,0 +1,11 @@
{
"infiniteLoopProtection": true,
"hardReloadOnChange": false,
"view": "browser",
"template": "node",
"container": {
"port": 3000,
"startScript": "start",
"node": "14"
}
}

@ -0,0 +1,29 @@
body {
background-color:#333333;
color: white;
font-family: 'Source Sans Pro', sans-serif;
}
pre {
background-color: #555555;
max-width: 33%;
font-family: 'IBM Plex Mono', monospace;
font-size: 14px;
}
p {
font-size: 18px;
}
a {
color:#47FF58;
}
a:link {
color:#47FF58;
}
a:visited {
color:#47FF58;
}
a:hover {
color:#47FF58;
}
a:active {
color:#47FF58;
}

@ -0,0 +1,12 @@
@font-face {
font-family: 'IBM Plex Mono';
font-style: normal;
font-weight: 400;
src: url('/public/fonts/mono.ttf') format('truetype');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
src: url('/public/fonts/sans.woff2') format('woff2');
}

@ -0,0 +1,54 @@
---
import '../css/font.css'
import '../css/color.css'
const {title} = Astro.props;
---
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>{title}</title>
<style>
a + a {
margin-left: 5px;
} /*i will kill you if this breaks other parts of the site*/
.footer {
position: fixed;
bottom: 0;
left: 0px;
width: 100%;
height: 100;
}
.white {
background-color: #222222;
}
.grey {
color: #ffffff;
}
.padding {
position: relative;
left: 10px;
}
.padding-right {
position: relative;
right: 10px;
}
</style>
</head>
<body>
<slot />
<div id="footer" class="white">
<footer class="white footer">
<p>
<center>
<a href="/index.html" class="grey padding">Homepage</a>
</center>
<!--<span class = "grey padding-right" style = "font-size: small; float: right; position: fixed; bottom: 50">&copy; 2020-2022 Ruthenic</span>-->
</p>
</footer>
</div>
</body>

@ -0,0 +1,22 @@
{
"0 debug pnpm:scope": {
"selected": 1
},
"1 error pnpm": {
"code": "ELIFECYCLE",
"errno": "ENOENT",
"syscall": "spawn",
"file": "sh",
"pkgid": "@example/minimal@0.0.1",
"stage": "dev",
"script": "astro dev",
"pkgname": "@example/minimal",
"err": {
"name": "pnpm",
"message": "@example/minimal@0.0.1 dev: `astro dev`\nspawn ENOENT",
"code": "ELIFECYCLE",
"stack": "pnpm: @example/minimal@0.0.1 dev: `astro dev`\nspawn ENOENT\n at ChildProcess.<anonymous> (/usr/lib/node_modules/pnpm/dist/pnpm.cjs:91795:22)\n at ChildProcess.emit (node:events:390:28)\n at maybeClose (node:internal/child_process:1062:16)\n at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)"
}
},
"2 warn pnpm:global": " Local package.json exists, but node_modules missing, did you mean to install?"
}

@ -0,0 +1,29 @@
---
import Base from '../layout/Normal.astro'
---
<Base title="ruthenic.com: Homepage">
<center><h1>Ruthenic's site</h1> <!--originally intended to be only written in CSS and HTML but f**k that-->
<p>Welcome to my site. I hope you enjoy the experience.</p></center>
<a href ="https://github.com/Ruthenic"><marquee behavior="scroll" direction="left">Checkout (haha) my Github!</marquee></a>
<p>Favorite Programming Languages:</p>
<ol>
<li>C</li>
<li>Python</li>
<li>C++</li>
<li>Machine Code</li>
<li>C#</li>
<li>Pseudocode</li>
<li>Java</li>
<li>English</li>
</ol>
<p>This list has been rated 69/10 by <a href = "https://unpromptedtirade.com">ForLoveOfCats</a></p>
<p>Check me out on:
<ul>
<li><a href = "https://github.com/Ruthenic">Github</a></li>
<li><a href = "https://www.last.fm/user/DustyAngel47">Last.fm</a></li>
<li><a href = "https://twitter.com/RuthenicDawn208">Twitter</a></li>
<li><a href = "https://www.youtube.com/channel/UC5BfTH4lP7rY5q3qSAvpvhA">Youtube</a></li>
</ul>
</p>
</Base>

@ -0,0 +1,5 @@
{
"compilerOptions": {
"moduleResolution": "node"
}
}
Loading…
Cancel
Save