Skip to content

Commit 08de8b0

Browse files
Cleanup
1 parent 7c0c70e commit 08de8b0

File tree

8 files changed

+115
-134
lines changed

8 files changed

+115
-134
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ async function exist(path) {
1313
const location = path.join(__dirname, "..", "..");
1414
const links = require("./links.json");
1515

16-
const template = await fs.readFile(path.join(__dirname, "template.html"), "utf8");
16+
const template = await fs.readFile(path.join(__dirname, "index.template.html"), "utf8");
1717

1818
for (const link of links) {
1919
const input = path.join(location, link.input);

.github/workflows/deploy.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ jobs:
4444
- name: Minify
4545
run: bun run ./.github/minify.js
4646

47-
- name: Migrate
48-
run: bun run ./.github/migrate/index.js
49-
5047
- name: Cleanup Bun
5148
run: |
5249
rm -rf node_modules

web/projects/build.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
const cards = require("./cards.json");
2+
3+
const html = [];
4+
for (const { name, description, link, image } of cards) {
5+
html.push(/* html */`
6+
<div class="card card-background card-rounded">
7+
<h1 class="card-title">${name}</h1>
8+
<p class="card-description">${description}</p>
9+
<br>
10+
<a class="button card-button button-primary" href="${link}">View</a>
11+
<br>
12+
<br>
13+
<img class="card-rounded card-shadow" src="${image}" width="90%" height="90%">
14+
</div>
15+
`)
16+
}
17+
18+
const file = Bun.file(`${__dirname}/index.template.html`);
19+
20+
Bun.write(
21+
`${__dirname}/index.html`,
22+
await file
23+
.text()
24+
.replace(
25+
"REPLACE_WITH_CARDS",
26+
html.join("\n")
27+
)
28+
);

web/projects/cards.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[
2+
{
3+
"name": "API",
4+
"description": "A web api to get data from services and manipulate images.",
5+
"image": "./img/projects/api.png",
6+
"link": "https://api.serversmp.xyz/pages/api"
7+
},
8+
{
9+
"name": "Lamar",
10+
"description": "A bot for all your needs! May it be moderation, info on things from your server, or even random pictures of ducks. We have it all!",
11+
"image": "./img/projects/lamar.png",
12+
"link": "https://serversmp-github.github.io/Lamar/"
13+
},
14+
{
15+
"name": "Auth2",
16+
"description": "A system I made to handle accounts for other projects, like the uploader and codebin+.",
17+
"image": "./img/projects/auth2.png",
18+
"link": "https://api.serversmp.xyz/auth2"
19+
},
20+
{
21+
"name": "Uploader",
22+
"description": "A file uploader with support for all file types. Built in markdown rendering, url shortener, audio to mp4, embeds and more.",
23+
"image": "./img/projects/uploader.png",
24+
"link": "https://api.serversmp.xyz/upload"
25+
},
26+
{
27+
"name": "Sites",
28+
"description": "A simple way to host a static site.",
29+
"image": "./img/projects/sites.png",
30+
"link": "https://api.serversmp.xyz/sites"
31+
},
32+
{
33+
"name": "Post",
34+
"description": "A tumblr like social media but with more code support.",
35+
"image": "./img/projects/post.png",
36+
"link": "https://api.serversmp.xyz/post"
37+
},
38+
{
39+
"name": "Codebin+",
40+
"description": "Codebin+ is a site where you can upload text with support for markdown rendering and language syntax highlighting.",
41+
"image": "./img/projects/codebin+.png",
42+
"link": "https://api.serversmp.xyz/codebinplus"
43+
},
44+
{
45+
"name": "Shorten+",
46+
"description": "Shorten+ is a site where you can shorten long urls.",
47+
"image": "./img/projects/shorten+.png",
48+
"link": "https://api.serversmp.xyz/shortenplus"
49+
},
50+
{
51+
"name": "API - Shortener",
52+
"description": "The shorten url for the API.",
53+
"image": "./img/projects/shorten-link.png",
54+
"link": "https://ssmp.link"
55+
},
56+
{
57+
"name": "Slimefun Textures",
58+
"description": "A combination texture pack for the mc plugin \"slimefun\"",
59+
"image": "./img/projects/slimefun.png",
60+
"link": "https://github.com/ServerSMP-Github/Slimefun-Textures"
61+
}
62+
]

web/projects/css/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ body {
6060
}
6161

6262
.grid {
63-
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
63+
grid-template-columns: repeat(1fr, 2);
6464
grid-auto-rows: minmax(100px, auto);
6565
justify-items: center;
6666
align-items: center;

web/projects/index.html

Lines changed: 0 additions & 129 deletions
This file was deleted.

web/projects/index.template.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<link rel="shortcut icon" href="./img/icon.png">
8+
<link rel="stylesheet" href="../../assets/css/prince.css">
9+
<link rel="stylesheet" href="./css/style.css">
10+
<title>ServerSMP</title>
11+
</head>
12+
<body>
13+
14+
<div id="body">
15+
<div class="container">
16+
<div class="grid">
17+
REPLACE_WITH_CARDS
18+
</div>
19+
</div>
20+
</div>
21+
22+
</body>
23+
</html>

0 commit comments

Comments
 (0)