feat: add website link to app footer, Join Alpha opens in new tab
Fixes #2 - Add website link to app footer - Add VITE_WEBSITE_URL build arg for configurable website URL - Add Git Repository and License links to app footer - Update Join Free Alpha links to open in new tab (target=_blank)
This commit is contained in:
@@ -11,12 +11,14 @@ RUN bun build src/index.ts --outdir ./dist --target bun
|
|||||||
|
|
||||||
FROM node:20-alpine AS frontend-builder
|
FROM node:20-alpine AS frontend-builder
|
||||||
ARG VITE_GIT_URL=https://git.kropa.tech/lotherk/deardiary
|
ARG VITE_GIT_URL=https://git.kropa.tech/lotherk/deardiary
|
||||||
|
ARG VITE_WEBSITE_URL=https://deardiary.lother.io
|
||||||
|
|
||||||
WORKDIR /app/frontend
|
WORKDIR /app/frontend
|
||||||
COPY frontend/package*.json ./
|
COPY frontend/package*.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
COPY frontend ./
|
COPY frontend ./
|
||||||
ENV VITE_GIT_URL=$VITE_GIT_URL
|
ENV VITE_GIT_URL=$VITE_GIT_URL
|
||||||
|
ENV VITE_WEBSITE_URL=$VITE_WEBSITE_URL
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM oven/bun:1.1-alpine AS runner
|
FROM oven/bun:1.1-alpine AS runner
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ services:
|
|||||||
- "8080:80"
|
- "8080:80"
|
||||||
environment:
|
environment:
|
||||||
- APP_URL=${WEBSITE_APP_URL:-http://localhost:3000}
|
- APP_URL=${WEBSITE_APP_URL:-http://localhost:3000}
|
||||||
- GIT_URL=${GIT_URL:-https://github.com/lotherk/deardiary}
|
- GIT_URL=${GIT_URL:-https://git.kropa.tech/lotherk/deardiary}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
app:
|
app:
|
||||||
@@ -16,6 +16,7 @@ services:
|
|||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
args:
|
args:
|
||||||
- VITE_GIT_URL=${GIT_URL:-https://git.kropa.tech/lotherk/deardiary}
|
- VITE_GIT_URL=${GIT_URL:-https://git.kropa.tech/lotherk/deardiary}
|
||||||
|
- VITE_WEBSITE_URL=${WEBSITE_APP_URL:-http://localhost:3000}
|
||||||
ports:
|
ports:
|
||||||
- "3000:80"
|
- "3000:80"
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ function Footer({ appName = 'DearDiary' }: { appName?: string }) {
|
|||||||
const { resolvedTheme } = useTheme();
|
const { resolvedTheme } = useTheme();
|
||||||
return (
|
return (
|
||||||
<footer className={`py-6 text-center text-sm text-slate-500 ${resolvedTheme === 'dark' ? 'border-t border-slate-800' : 'border-t border-slate-200'}`}>
|
<footer className={`py-6 text-center text-sm text-slate-500 ${resolvedTheme === 'dark' ? 'border-t border-slate-800' : 'border-t border-slate-200'}`}>
|
||||||
<p>{appName} v{packageJson.version} — Self-hosted AI-powered journaling · <a href={import.meta.env.VITE_GIT_URL || 'https://git.kropa.tech/lotherk/deardiary'} className="hover:text-purple-400 transition">Git Repository</a> · MIT License · © 2026 Konrad Lother</p>
|
<p>{appName} v{packageJson.version} · <a href={import.meta.env.VITE_GIT_URL || 'https://git.kropa.tech/lotherk/deardiary'} target="_blank" rel="noopener noreferrer" className="hover:text-purple-400 transition">Git Repository</a> · <a href={`${import.meta.env.VITE_GIT_URL || 'https://git.kropa.tech/lotherk/deardiary'}/src/branch/main/LICENSE'} target="_blank" rel="noopener noreferrer" className="hover:text-purple-400 transition">License</a></p>
|
||||||
</footer>
|
</footer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
},
|
},
|
||||||
define: {
|
define: {
|
||||||
'import.meta.env.VITE_GIT_URL': JSON.stringify(env.VITE_GIT_URL || 'https://git.kropa.tech/lotherk/deardiary'),
|
'import.meta.env.VITE_GIT_URL': JSON.stringify(env.VITE_GIT_URL || 'https://git.kropa.tech/lotherk/deardiary'),
|
||||||
|
'import.meta.env.VITE_WEBSITE_URL': JSON.stringify(env.VITE_WEBSITE_URL || 'https://deardiary.lother.io'),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<a href="#features">Features</a>
|
<a href="#features">Features</a>
|
||||||
<a href="docs/">Docs</a>
|
<a href="docs/">Docs</a>
|
||||||
<a href="${GIT_URL}" target="_blank">Git Repository</a>
|
<a href="${GIT_URL}" target="_blank">Git Repository</a>
|
||||||
<a href="${APP_URL}" class="btn btn-primary">Join Free Alpha</a>
|
<a href="${APP_URL}" target="_blank" class="btn btn-primary">Join Free Alpha</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
<h1>Your AI-Powered<br><span class="gradient-text">Daily Journal</span></h1>
|
<h1>Your AI-Powered<br><span class="gradient-text">Daily Journal</span></h1>
|
||||||
<p class="hero-subtitle">Capture events throughout the day and let AI transform them into beautiful, thoughtful diary pages. Self-hosted. Private. Yours.</p>
|
<p class="hero-subtitle">Capture events throughout the day and let AI transform them into beautiful, thoughtful diary pages. Self-hosted. Private. Yours.</p>
|
||||||
<div class="hero-actions">
|
<div class="hero-actions">
|
||||||
<a href="${APP_URL}" class="btn btn-primary btn-large">Join Free Alpha</a>
|
<a href="${APP_URL}" target="_blank" class="btn btn-primary btn-large">Join Free Alpha</a>
|
||||||
<a href="docs/" class="btn btn-secondary btn-large">Read Docs</a>
|
<a href="docs/" class="btn btn-secondary btn-large">Read Docs</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="hero-meta">
|
<div class="hero-meta">
|
||||||
@@ -115,12 +115,12 @@
|
|||||||
<h2>Ready to start journaling?</h2>
|
<h2>Ready to start journaling?</h2>
|
||||||
<p>Try our free alpha hosted for you, or self-host in minutes with Docker.</p>
|
<p>Try our free alpha hosted for you, or self-host in minutes with Docker.</p>
|
||||||
<div class="try-actions">
|
<div class="try-actions">
|
||||||
<a href="${APP_URL}" class="btn btn-primary btn-large">Join Free Alpha</a>
|
<a href="${APP_URL}" target="_blank" class="btn btn-primary btn-large">Join Free Alpha</a>
|
||||||
<span class="try-or">or</span>
|
<span class="try-or">or</span>
|
||||||
<a href="docs/getting-started/installation.html" class="btn btn-secondary btn-large">Self-Host</a>
|
<a href="docs/getting-started/installation.html" class="btn btn-secondary btn-large">Self-Host</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="try-code">
|
<div class="try-code">
|
||||||
<code>git clone https://github.com/lotherk/deardiary.git && cd deardiary && docker compose up -d</code>
|
<code>git clone ${GIT_URL}.git && cd deardiary && docker compose up -d</code>
|
||||||
</div>
|
</div>
|
||||||
<p class="try-hint">Self-hosted default login: admin@localhost / changeme123</p>
|
<p class="try-hint">Self-hosted default login: admin@localhost / changeme123</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
<a href="#features">Features</a>
|
<a href="#features">Features</a>
|
||||||
<a href="docs/">Documentation</a>
|
<a href="docs/">Documentation</a>
|
||||||
<a href="#how">How it Works</a>
|
<a href="#how">How it Works</a>
|
||||||
<a href="${APP_URL}">Free Alpha</a>
|
<a href="${APP_URL}" target="_blank">Free Alpha</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer-col">
|
<div class="footer-col">
|
||||||
<h4>Resources</h4>
|
<h4>Resources</h4>
|
||||||
|
|||||||
Reference in New Issue
Block a user