website

#astro#js#html#css

git clone https://git.pyrossh.dev/website

木 Personal website of pyrossh. Built with astrojs, shiki, vite.


bf7618dpyrossh 2026-08-06T10:15:06+05:30
moar improvements
assets/css/repos.css CHANGED
@@ -83,11 +83,14 @@
83
83
  align-items: center;
84
84
  justify-content: space-between;
85
85
  font-weight: 400;
86
+ font-size: var(--fs-repo-clone);
86
- font-size: 0.85rem;
87
+ padding: 0.4rem;
88
+ background-color: var(--color-pre-bg);
87
89
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
88
90
  overflow-x: auto;
89
91
  white-space: pre;
90
92
  width: fit-content;
93
+ margin-top: 0.2rem;
91
94
 
92
95
  .copy-btn {
93
96
  flex-shrink: 0;
@@ -132,7 +135,7 @@
132
135
  display: flex;
133
136
  flex: 1;
134
137
  padding-top: 0.3rem;
135
- font-size: 0.95rem;
138
+ font-size: var(--fs-repo-subtitle);
136
139
  font-weight: 400;
137
140
  }
138
141
 
assets/css/shared.css CHANGED
@@ -102,7 +102,9 @@ table { border-collapse: collapse; }
102
102
  --fs-title-lg: clamp(1.6rem, calc(1.5083rem + 0.4583vw), 1.875rem);
103
103
  --fs-heading-md: clamp(1.2rem, calc(1.1rem + 0.5vw), 1.5rem);
104
104
  --fs-heading-sm: clamp(1rem, calc(0.9167rem + 0.4167vw), 1.25rem);
105
- --fs-repo-title: clamp(1.3rem, calc(1.2rem + 0.5vw), 1.6rem);
105
+ --fs-repo-title: clamp(1.7rem, calc(1.6rem + 0.5vw), 2rem);
106
+ --fs-repo-clone: clamp(0.7rem, calc(0.7rem + 0.5vw), 0.9rem);
107
+ --fs-repo-subtitle: clamp(0.9rem, calc(0.9rem + 0.5vw), 1.1rem);
106
108
  --fs-hero-xl: clamp(1.65rem, calc(1.5333rem + 0.5833vw), 2rem);
107
109
  --fs-features: clamp(0.925rem, calc(0.8583rem + 0.3333vw), 1.125rem);
108
110
  --space-gap-fluid: clamp(0rem, calc(-0.6667rem + 3.3333vw), 2rem);
scripts/submit-to-archives.js CHANGED
@@ -79,17 +79,24 @@ async function submitToWaybackMachine(url) {
79
79
  async function submitToArchiveToday(url) {
80
80
  const response = await fetch("https://archive.ph/submit/", {
81
81
  method: "POST",
82
+ headers: {
82
- headers: { "content-type": "application/x-www-form-urlencoded" },
83
+ "content-type": "application/x-www-form-urlencoded",
84
+ // archive.today's anti-bot layer rejects requests without a
85
+ // browser-like User-Agent outright, independent of any real rate limit.
86
+ "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0 Safari/537.36",
87
+ },
83
88
  body: new URLSearchParams({ url, anyway: "1" }),
84
89
  redirect: "manual",
85
90
  });
86
91
  const location = response.headers.get("location");
87
92
  const isRedirect = response.status >= 300 && response.status < 400;
88
- return {
93
+ if (isRedirect) return { ok: true, status: response.status, detail: location };
94
+
95
+ const body = await response.text().catch(() => "");
89
- ok: response.ok || isRedirect,
96
+ if (/captcha/i.test(body)) {
90
- status: response.status,
91
- detail: location ?? "submitted (archive.today may still be processing check the site manually)",
97
+ return { ok: false, status: response.status, detail: "blocked by archive.today's CAPTCHA/anti-bot checksubmit this URL manually at https://archive.ph/" };
92
- };
98
+ }
99
+ return { ok: response.ok, status: response.status, detail: "submitted — check https://archive.ph/ manually for the resulting snapshot" };
93
100
  }
94
101
 
95
102
  const PROVIDERS = {