Skip to content

Commit

Permalink
ci: frontend work for "CDN"
Browse files Browse the repository at this point in the history
  • Loading branch information
NotAShelf committed Dec 7, 2024
1 parent 1b93f60 commit 3469998
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 0 deletions.
116 changes: 116 additions & 0 deletions .github/assets/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Wallpkgs</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: Arial, sans-serif;
background-color: #f3f4f6;
color: #52525b;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}

.container {
text-align: center;
background: #e4e4e7;
padding: 40px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
width: 90%;
max-width: 800px;
}

h1 {
font-size: 2.5rem;
color: #52525b;
margin-bottom: 20px;
}

#archive-list {
list-style: none;
padding: 0;
margin-top: 20px;
}

#archive-list li {
background-color: #f9f9f9;
padding: 10px;
margin: 10px 0;
border-radius: 6px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
transition: background-color 0.3s ease;
}

#archive-list li:hover {
background-color: #e6e6e6;
}

a {
text-decoration: none;
color: #3498db;
font-size: 1.2rem;
}

a:hover {
text-decoration: underline;
}

a {
display: inline-block;
padding: 8px 16px;
border-radius: 4px;
background-color: #3498db;
color: white;
font-weight: bold;
transition: background-color 0.3s ease;
}

a:hover {
background-color: #2980b9;
}
</style>
</head>
<body>
<div class="container">
<h1>Wallpkgs</h1>
<ul id="archive-list"></ul>
</div>

<!-- This is so stupid. -->
<script>
const baseURL = window.location.origin;
const archives = [
"catppuccin.zip",
"cities.zip",
"gruvbox.zip",
"monochrome-dark.zip",
"nature.zip",
"oxocarbon.zip",
"rose_pine.zip",
"space.zip",
"tokyo_night.zip",
];
const list = document.getElementById("archive-list");
archives.forEach((archive) => {
const li = document.createElement("li");
const link = document.createElement("a");
link.href = `${baseURL}/${archive}`;
link.textContent = archive.replace(".zip", "").replace("_", " ");
li.appendChild(link);
list.appendChild(li);
});
</script>
</body>
</html>
3 changes: 3 additions & 0 deletions .github/assets/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
User-agent: *
Disallow: /archives/

4 changes: 4 additions & 0 deletions .github/workflows/archive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
fi
done
- name: Copy assets
run: |
cp .github/assets/* ./archives
- name: Upload to gh-pages
uses: peaceiris/actions-gh-pages@v4
with:
Expand Down

0 comments on commit 3469998

Please sign in to comment.