Changed to binit.app
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "Minipaste Dev Container",
|
"name": "binit.app Dev Container",
|
||||||
"image": "mcr.microsoft.com/devcontainers/javascript-node:24-bookworm",
|
"image": "mcr.microsoft.com/devcontainers/javascript-node:24-bookworm",
|
||||||
"forwardPorts": [3000],
|
"forwardPorts": [3000],
|
||||||
"portsAttributes": {
|
"portsAttributes": {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "minipaste",
|
"name": "binit.app",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "A minimal pastebin alternative backed by MinIO",
|
"description": "A minimal pastebin alternative backed by MinIO",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ app.use((err, req, res, _next) => {
|
|||||||
|
|
||||||
async function start() {
|
async function start() {
|
||||||
await ensureBucket();
|
await ensureBucket();
|
||||||
app.listen(PORT, () => console.log(`Minipaste running → http://localhost:${PORT}`));
|
app.listen(PORT, () => console.log(`binit.app running → http://localhost:${PORT}`));
|
||||||
}
|
}
|
||||||
|
|
||||||
start().catch(err => {
|
start().catch(err => {
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Minipaste — New Paste</title>
|
<title>binit.app — New Paste</title>
|
||||||
<link rel="stylesheet" href="/style.css" />
|
<link rel="stylesheet" href="/style.css" />
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github-dark.min.css" />
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github-dark.min.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<a href="/" class="logo">Minipaste</a>
|
<a href="/" class="logo">binit.app</a>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Minipaste</title>
|
<title>binit.app</title>
|
||||||
<link rel="stylesheet" href="/style.css" />
|
<link rel="stylesheet" href="/style.css" />
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github-dark.min.css" />
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github-dark.min.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<a href="/" class="logo">Minipaste</a>
|
<a href="/" class="logo">binit.app</a>
|
||||||
<div class="header-actions">
|
<div class="header-actions">
|
||||||
<a href="/" class="btn">New Paste</a>
|
<a href="/" class="btn">New Paste</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -21,8 +21,9 @@
|
|||||||
<span id="paste-date" class="paste-date"></span>
|
<span id="paste-date" class="paste-date"></span>
|
||||||
<span id="paste-expiry" class="paste-date"></span>
|
<span id="paste-expiry" class="paste-date"></span>
|
||||||
<div class="paste-meta-actions">
|
<div class="paste-meta-actions">
|
||||||
<button id="download-btn" type="button">Download</button>
|
<a id="raw-btn" href="#" target="_blank" class="meta-action">Raw</a>
|
||||||
<button id="copy-btn" type="button">Copy</button>
|
<button id="download-btn" type="button" class="meta-action">Download</button>
|
||||||
|
<button id="copy-btn" type="button" class="meta-action">Copy</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ const pasteExpiryEl = document.getElementById('paste-expiry');
|
|||||||
const pasteLangEl = document.getElementById('paste-lang');
|
const pasteLangEl = document.getElementById('paste-lang');
|
||||||
const copyBtn = document.getElementById('copy-btn');
|
const copyBtn = document.getElementById('copy-btn');
|
||||||
const downloadBtn = document.getElementById('download-btn');
|
const downloadBtn = document.getElementById('download-btn');
|
||||||
|
const rawBtn = document.getElementById('raw-btn');
|
||||||
|
|
||||||
|
rawBtn.href = `/raw/${location.pathname.replace(/^\/p\//, '')}`;
|
||||||
|
|
||||||
const LANG_EXT = {
|
const LANG_EXT = {
|
||||||
bash: 'sh', c: 'c', cpp: 'cpp', css: 'css', go: 'go',
|
bash: 'sh', c: 'c', cpp: 'cpp', css: 'css', go: 'go',
|
||||||
@@ -104,7 +107,7 @@ async function loadPaste() {
|
|||||||
// Use textContent — never innerHTML — to prevent XSS
|
// Use textContent — never innerHTML — to prevent XSS
|
||||||
pasteCodeEl.textContent = data.content;
|
pasteCodeEl.textContent = data.content;
|
||||||
setLineNumbers(data.content);
|
setLineNumbers(data.content);
|
||||||
document.title = `Minipaste — ${id}`;
|
document.title = `binit.app — ${id}`;
|
||||||
|
|
||||||
if (data.lang) {
|
if (data.lang) {
|
||||||
pasteLangEl.textContent = data.lang;
|
pasteLangEl.textContent = data.lang;
|
||||||
|
|||||||
@@ -265,7 +265,31 @@ textarea#content::placeholder { color: var(--text-muted); }
|
|||||||
.paste-meta-actions {
|
.paste-meta-actions {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 0.5rem;
|
gap: 0.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.meta-action {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
background: transparent;
|
||||||
|
color: var(--text-muted);
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: var(--radius);
|
||||||
|
padding: 0.2rem 0.6rem;
|
||||||
|
font-size: 0.78rem;
|
||||||
|
font-weight: 500;
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.15s, border-color 0.15s;
|
||||||
|
font-family: var(--sans);
|
||||||
|
white-space: nowrap;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.meta-action:hover {
|
||||||
|
color: var(--text);
|
||||||
|
border-color: var(--text-muted);
|
||||||
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lang-badge {
|
.lang-badge {
|
||||||
|
|||||||
Reference in New Issue
Block a user